MCPcopy Index your code
hub / github.com/dlight-js/dlight

github.com/dlight-js/dlight @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
1,174 symbols 2,114 edges 156 files 256 documented · 22% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

author stars Size license

downloads version version

dlight.dev

DX-first UI rendering library.

  • 🥳 Delightful
  • With an API designed to be intuitive and user-friendly, web development becomes effortless with DLight, whether you're building a simple website or a complex web application.
  • 🚀 Performant
  • With a minuscule file size of just 5KB, DLight is lightning-fast and ultra-lightweight, delivering optimal performance without the need for manual optimization.
  • DX-first
  • DLight uses the syntax of function calls and dot notation to make development more enjoyable, without the need to write outdated and hard-to-read XML code.
  • 🪶 Intuitively Simple
  • DLight is born reactive and is designed to be intuitively simple, with a minimalistic API that requires no memorization of complex functions or libraries.

Preview

import { View } from "@dlightjs/dlight"

@View
class MyComp {
  night = false
  fruits = ["🍎", "🍊", "🥑"]

  Body() {
    h1("hello, dlight js")

    for (const fruit of this.fruits) {
      div(fruit)
    }

    button("toggle")
      .class("toggle")
      .onClick(() => {
        this.night = !this.night
      })

    if (this.night) {
      "🌙"
      "✨"
      "🌟"
    } else {
      "🔆"
    }
  }
}


Credits

Thanks all existing frameworks for the inspiration and the great work they've done. DLight is standing on the shoulders of giants. * SwiftUI * React * Vue * Svelte * Solid * Angular * Preact * Qwik * Ember * Marko * VanJs * ef.js * Lit

Thanks js-framework-benchmark for the benchmarking tooling that pulls my hair out.

Thanks component party for the syntax level comparison between different frameworks.

Contributors

Duan Yihan Duan Yihan 🚇 ⚠️ 💻 orange04 orange04 💻 🎨 Guo-lab Guo-lab 🖋 Gor Gor 💻 🐛 💡 Haibo Zheng Haibo Zheng 🐛 🖋

Extension points exported contracts — how you extend this code

TestProps (Interface)
(no doc) [1 implementers]
apps/dev/src/Test.view.ts
Options (Interface)
(no doc)
packages/tools/babel-plugin-syntax-typescript-new/src/index.ts
ViewGeneratorConfig (Interface)
(no doc)
packages/core/transpiler/view-generator/src/types.ts
ToDo (Interface)
(no doc)
apps/ToDoMVC/src/ToDoMVC.view.ts
NavProps (Interface)
(no doc)
packages/tools/create-dlightjs/templates/dlight-vite-ts/src/Header.view.ts
DependencyValue (Interface)
(no doc)
packages/core/transpiler/reactivity-parser/src/types.ts
ToDoItemProps (Interface)
(no doc)
apps/ToDoMVC/src/ToDoMVC.view.ts
BtnProps (Interface)
(no doc)
packages/tools/create-dlightjs/templates/dlight-vite-ts/src/App.view.ts

Core symbols most depended-on inside this repo

parse
called by 72
packages/core/transpiler/view-parser/src/test/mock.ts
parse
called by 35
packages/core/transpiler/reactivity-parser/src/test/mock.ts
parseCode
called by 32
packages/core/transpiler/view-parser/src/test/mock.ts
parseView
called by 32
packages/core/transpiler/view-parser/src/test/mock.ts
addInitStatement
called by 30
packages/core/transpiler/view-generator/src/HelperGenerators/BaseGenerator.ts
addUpdateStatements
called by 16
packages/core/transpiler/view-generator/src/HelperGenerators/BaseGenerator.ts
add
called by 15
apps/dev/src/Test.view.ts
generateNodeName
called by 14
packages/core/transpiler/view-generator/src/HelperGenerators/BaseGenerator.ts

Shape

Method 562
Class 400
Function 169
Interface 43

Languages

TypeScript100%

Modules by API surface

apps/dev/src/Button100.view.ts303 symbols
apps/dev/src/ss.jsx101 symbols
packages/core/babel-preset-dlight/src/pluginProvider.ts57 symbols
packages/core/transpiler/reactivity-parser/src/parser.ts41 symbols
packages/core/transpiler/view-generator/src/HelperGenerators/BaseGenerator.ts24 symbols
packages/core/dlight/src/CompNode.js24 symbols
packages/core/transpiler/view-parser/src/parser.ts22 symbols
packages/core/transpiler/view-generator/src/HelperGenerators/HTMLPropGenerator.ts20 symbols
apps/dev/src/test.js20 symbols
packages/core/dlight/src/MutableNode/ForNode.js19 symbols
apps/dev/src/benchmark/benchmark-comp.view.js18 symbols
packages/core/transpiler/reactivity-parser/src/types.ts17 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add dlight \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact