lituix 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +31 -0
  2. package/dist/apis/context-menu.d.ts +29 -0
  3. package/dist/apis/context-menu.d.ts.map +1 -0
  4. package/dist/apis/dialog.d.ts +72 -0
  5. package/dist/apis/dialog.d.ts.map +1 -0
  6. package/dist/apis/form.d.ts +44 -0
  7. package/dist/apis/form.d.ts.map +1 -0
  8. package/dist/apis/toast.d.ts +57 -0
  9. package/dist/apis/toast.d.ts.map +1 -0
  10. package/dist/components/button-group-collapse.d.ts +14 -0
  11. package/dist/components/button-group-collapse.d.ts.map +1 -0
  12. package/dist/components/button-group-state.d.ts +13 -0
  13. package/dist/components/button-group-state.d.ts.map +1 -0
  14. package/dist/components/context-menu-tree.d.ts +2 -0
  15. package/dist/components/context-menu-tree.d.ts.map +1 -0
  16. package/dist/components/lui-avatar-group.d.ts +44 -0
  17. package/dist/components/lui-avatar-group.d.ts.map +1 -0
  18. package/dist/components/lui-avatar.d.ts +60 -0
  19. package/dist/components/lui-avatar.d.ts.map +1 -0
  20. package/dist/components/lui-background.d.ts +42 -0
  21. package/dist/components/lui-background.d.ts.map +1 -0
  22. package/dist/components/lui-badge.d.ts +37 -0
  23. package/dist/components/lui-badge.d.ts.map +1 -0
  24. package/dist/components/lui-breadcrumb.d.ts +91 -0
  25. package/dist/components/lui-breadcrumb.d.ts.map +1 -0
  26. package/dist/components/lui-button-group-item.d.ts +33 -0
  27. package/dist/components/lui-button-group-item.d.ts.map +1 -0
  28. package/dist/components/lui-button-group.d.ts +97 -0
  29. package/dist/components/lui-button-group.d.ts.map +1 -0
  30. package/dist/components/lui-button.d.ts +36 -0
  31. package/dist/components/lui-button.d.ts.map +1 -0
  32. package/dist/components/lui-calendar.d.ts +53 -0
  33. package/dist/components/lui-calendar.d.ts.map +1 -0
  34. package/dist/components/lui-card.d.ts +35 -0
  35. package/dist/components/lui-card.d.ts.map +1 -0
  36. package/dist/components/lui-checkbox-group.d.ts +60 -0
  37. package/dist/components/lui-checkbox-group.d.ts.map +1 -0
  38. package/dist/components/lui-checkbox.d.ts +43 -0
  39. package/dist/components/lui-checkbox.d.ts.map +1 -0
  40. package/dist/components/lui-color-picker.d.ts +101 -0
  41. package/dist/components/lui-color-picker.d.ts.map +1 -0
  42. package/dist/components/lui-command-palette.d.ts +72 -0
  43. package/dist/components/lui-command-palette.d.ts.map +1 -0
  44. package/dist/components/lui-config-provider.d.ts +30 -0
  45. package/dist/components/lui-config-provider.d.ts.map +1 -0
  46. package/dist/components/lui-context-menu.d.ts +114 -0
  47. package/dist/components/lui-context-menu.d.ts.map +1 -0
  48. package/dist/components/lui-date-range-picker.d.ts +2 -0
  49. package/dist/components/lui-date-range-picker.d.ts.map +1 -0
  50. package/dist/components/lui-datepicker.d.ts +52 -0
  51. package/dist/components/lui-datepicker.d.ts.map +1 -0
  52. package/dist/components/lui-dialog.d.ts +84 -0
  53. package/dist/components/lui-dialog.d.ts.map +1 -0
  54. package/dist/components/lui-divider.d.ts +31 -0
  55. package/dist/components/lui-divider.d.ts.map +1 -0
  56. package/dist/components/lui-drawer.d.ts +71 -0
  57. package/dist/components/lui-drawer.d.ts.map +1 -0
  58. package/dist/components/lui-dropdown.d.ts +15 -0
  59. package/dist/components/lui-dropdown.d.ts.map +1 -0
  60. package/dist/components/lui-dropmenu.d.ts +89 -0
  61. package/dist/components/lui-dropmenu.d.ts.map +1 -0
  62. package/dist/components/lui-empty-state.d.ts +22 -0
  63. package/dist/components/lui-empty-state.d.ts.map +1 -0
  64. package/dist/components/lui-file-input.d.ts +23 -0
  65. package/dist/components/lui-file-input.d.ts.map +1 -0
  66. package/dist/components/lui-form-item.d.ts +33 -0
  67. package/dist/components/lui-form-item.d.ts.map +1 -0
  68. package/dist/components/lui-form.d.ts +255 -0
  69. package/dist/components/lui-form.d.ts.map +1 -0
  70. package/dist/components/lui-icon-picker.d.ts +101 -0
  71. package/dist/components/lui-icon-picker.d.ts.map +1 -0
  72. package/dist/components/lui-icon.d.ts +55 -0
  73. package/dist/components/lui-icon.d.ts.map +1 -0
  74. package/dist/components/lui-image-cropper.d.ts +64 -0
  75. package/dist/components/lui-image-cropper.d.ts.map +1 -0
  76. package/dist/components/lui-image.d.ts +87 -0
  77. package/dist/components/lui-image.d.ts.map +1 -0
  78. package/dist/components/lui-input-number.d.ts +42 -0
  79. package/dist/components/lui-input-number.d.ts.map +1 -0
  80. package/dist/components/lui-input-opt.d.ts +31 -0
  81. package/dist/components/lui-input-opt.d.ts.map +1 -0
  82. package/dist/components/lui-input.d.ts +58 -0
  83. package/dist/components/lui-input.d.ts.map +1 -0
  84. package/dist/components/lui-menu-divider.d.ts +12 -0
  85. package/dist/components/lui-menu-divider.d.ts.map +1 -0
  86. package/dist/components/lui-menu-item.d.ts +36 -0
  87. package/dist/components/lui-menu-item.d.ts.map +1 -0
  88. package/dist/components/lui-menu.d.ts +49 -0
  89. package/dist/components/lui-menu.d.ts.map +1 -0
  90. package/dist/components/lui-overlay-root.d.ts +20 -0
  91. package/dist/components/lui-overlay-root.d.ts.map +1 -0
  92. package/dist/components/lui-pagination.d.ts +77 -0
  93. package/dist/components/lui-pagination.d.ts.map +1 -0
  94. package/dist/components/lui-popover.d.ts +126 -0
  95. package/dist/components/lui-popover.d.ts.map +1 -0
  96. package/dist/components/lui-progress.d.ts +44 -0
  97. package/dist/components/lui-progress.d.ts.map +1 -0
  98. package/dist/components/lui-radio-group.d.ts +53 -0
  99. package/dist/components/lui-radio-group.d.ts.map +1 -0
  100. package/dist/components/lui-radio.d.ts +39 -0
  101. package/dist/components/lui-radio.d.ts.map +1 -0
  102. package/dist/components/lui-row.d.ts +57 -0
  103. package/dist/components/lui-row.d.ts.map +1 -0
  104. package/dist/components/lui-scroll-area.d.ts +66 -0
  105. package/dist/components/lui-scroll-area.d.ts.map +1 -0
  106. package/dist/components/lui-select.d.ts +166 -0
  107. package/dist/components/lui-select.d.ts.map +1 -0
  108. package/dist/components/lui-skeleton.d.ts +35 -0
  109. package/dist/components/lui-skeleton.d.ts.map +1 -0
  110. package/dist/components/lui-slider.d.ts +54 -0
  111. package/dist/components/lui-slider.d.ts.map +1 -0
  112. package/dist/components/lui-statistic.d.ts +43 -0
  113. package/dist/components/lui-statistic.d.ts.map +1 -0
  114. package/dist/components/lui-switch.d.ts +29 -0
  115. package/dist/components/lui-switch.d.ts.map +1 -0
  116. package/dist/components/lui-tab.d.ts +103 -0
  117. package/dist/components/lui-tab.d.ts.map +1 -0
  118. package/dist/components/lui-table.d.ts +314 -0
  119. package/dist/components/lui-table.d.ts.map +1 -0
  120. package/dist/components/lui-tag.d.ts +31 -0
  121. package/dist/components/lui-tag.d.ts.map +1 -0
  122. package/dist/components/lui-text.d.ts +53 -0
  123. package/dist/components/lui-text.d.ts.map +1 -0
  124. package/dist/components/lui-textarea.d.ts +42 -0
  125. package/dist/components/lui-textarea.d.ts.map +1 -0
  126. package/dist/components/lui-toast.d.ts +109 -0
  127. package/dist/components/lui-toast.d.ts.map +1 -0
  128. package/dist/components/lui-tooltip.d.ts +25 -0
  129. package/dist/components/lui-tooltip.d.ts.map +1 -0
  130. package/dist/components/lui-tree.d.ts +258 -0
  131. package/dist/components/lui-tree.d.ts.map +1 -0
  132. package/dist/components/menu-model.d.ts +54 -0
  133. package/dist/components/menu-model.d.ts.map +1 -0
  134. package/dist/components/menu-render.d.ts +56 -0
  135. package/dist/components/menu-render.d.ts.map +1 -0
  136. package/dist/components/menu-state.d.ts +19 -0
  137. package/dist/components/menu-state.d.ts.map +1 -0
  138. package/dist/icons/builtin-iconify.d.ts +6002 -0
  139. package/dist/icons/builtin-iconify.d.ts.map +1 -0
  140. package/dist/icons/index.d.ts +2 -0
  141. package/dist/icons/index.d.ts.map +1 -0
  142. package/dist/index.browser.css +2 -0
  143. package/dist/index.browser.css.map +7 -0
  144. package/dist/index.browser.js +13316 -0
  145. package/dist/index.browser.js.map +7 -0
  146. package/dist/index.cjs +13149 -0
  147. package/dist/index.cjs.map +7 -0
  148. package/dist/index.d.ts +122 -0
  149. package/dist/index.d.ts.map +1 -0
  150. package/dist/index.mjs +13149 -0
  151. package/dist/index.mjs.map +7 -0
  152. package/dist/themes/index.d.ts +2 -0
  153. package/dist/themes/index.d.ts.map +1 -0
  154. package/dist/themes/tokens.d.ts +11 -0
  155. package/dist/themes/tokens.d.ts.map +1 -0
  156. package/dist/utils/apply-element-props.d.ts +9 -0
  157. package/dist/utils/apply-element-props.d.ts.map +1 -0
  158. package/dist/utils/config-provider.d.ts +39 -0
  159. package/dist/utils/config-provider.d.ts.map +1 -0
  160. package/dist/utils/format.d.ts +4 -0
  161. package/dist/utils/format.d.ts.map +1 -0
  162. package/dist/utils/i18n.d.ts +13 -0
  163. package/dist/utils/i18n.d.ts.map +1 -0
  164. package/dist/utils/interact-draggable.d.ts +20 -0
  165. package/dist/utils/interact-draggable.d.ts.map +1 -0
  166. package/dist/utils/overlay-stack.d.ts +14 -0
  167. package/dist/utils/overlay-stack.d.ts.map +1 -0
  168. package/llm.txt +245 -0
  169. package/llms-full.txt +428 -0
  170. package/llms.txt +61 -0
  171. package/package.json +85 -0
package/llms-full.txt ADDED
@@ -0,0 +1,428 @@
1
+ # litui / Full LLM Guide
2
+
3
+ ## 1. What this repo is
4
+
5
+ `litui` is a framework-agnostic UI component library based on Lit Web Components.
6
+ It provides:
7
+
8
+ - `lui-*` custom elements
9
+ - Storybook-driven public documentation
10
+ - native-style event naming
11
+ - overlay primitives and higher-level dialog/dropdown/drawer/menu systems
12
+ - schema-driven forms
13
+ - rich `table` and `tree` components
14
+ - imperative APIs for dialog, toast, form, and context menu usage
15
+
16
+ The main public surface is re-exported from `src/index.ts`.
17
+
18
+ ---
19
+
20
+ ## 2. Stack and dependencies
21
+
22
+ ### Core stack
23
+ - Lit 3
24
+ - TypeScript
25
+ - Storybook 10 (`@storybook/web-components` + Vite)
26
+ - esbuild
27
+ - Vite
28
+
29
+ ### Important supporting libraries
30
+ - `@floating-ui/dom` — floating layer positioning
31
+ - `flatpickr` — date/time picker internals
32
+ - `cropperjs` — image cropper
33
+ - `@panzoom/panzoom` — image preview pan/zoom
34
+ - `@lit-labs/virtualizer` — virtualization
35
+ - `interactjs` — drag/resize interactions
36
+ - `@tanstack/lit-form` — schema-driven forms
37
+ - `iconify-icon` and `@iconify-json/lucide` — icon support
38
+
39
+ ---
40
+
41
+ ## 3. Directory map
42
+
43
+ ### Core source
44
+ - `src/components/` — all custom elements and component-level helpers
45
+ - `src/apis/` — imperative APIs (`dialog`, `toast`, `form`, `context-menu`)
46
+ - `src/themes/` — tokens and shared base styles
47
+ - `src/utils/` — config provider, i18n, formatting, overlay stack, helpers
48
+ - `src/icons/` — builtin icon registry and setup helpers
49
+ - `src/index.ts` — export surface + side-effect registrations
50
+
51
+ ### Docs and demos
52
+ - `stories/` — Storybook stories; often the best user-facing API reference
53
+ - `examples/` — standalone examples such as music player
54
+
55
+ ### Output
56
+ - `dist/` — generated builds
57
+
58
+ ---
59
+
60
+ ## 4. Public API conventions
61
+
62
+ ### Element naming
63
+ - Public components are custom elements named `lui-*`
64
+ - Example tags:
65
+ - `lui-button`
66
+ - `lui-dialog`
67
+ - `lui-table`
68
+ - `lui-tree`
69
+
70
+ ### Event naming
71
+ Use native-style or browser-like event names:
72
+ - `click`
73
+ - `input`
74
+ - `change`
75
+ - `select`
76
+ - `open`
77
+ - `close`
78
+ - `submit`
79
+ - `clear`
80
+
81
+ Notes:
82
+ - do **not** introduce new `lui-*` event names
83
+ - `open-change` is acceptable when synchronizing a boolean open state
84
+ - do **not** add legacy compatibility aliases back once APIs are unified
85
+
86
+ ### Prop and schema naming
87
+ - public data-driven APIs use `source`
88
+ - `lui-form` schema field data sources also use `source`
89
+ - use `value / defaultValue` for controlled vs uncontrolled values
90
+ - use `open / defaultOpen` for overlay visibility
91
+ - use `closeOnSelect` for post-selection closing
92
+ - use `closeOnOutsidePress` for modal-like outside click closing
93
+ - use `placement` for floating layer placement
94
+ - use `size / variant / status / radius / disabled / loading` as the shared visual/state vocabulary
95
+
96
+ ### Documentation expectation
97
+ If a public prop/behavior changes:
98
+ - update component code
99
+ - update matching story controls / docs
100
+ - preserve Storybook as a reliable public reference
101
+
102
+ ---
103
+
104
+ ## 5. Public components by area
105
+
106
+ ### 5.1 Foundation / display
107
+ - `lui-button`
108
+ - `lui-button-group`
109
+ - `lui-button-group-item`
110
+ - `lui-icon`
111
+ - `lui-icon-picker`
112
+ - `lui-text`
113
+ - `lui-card`
114
+ - `lui-tag`
115
+ - `lui-badge`
116
+ - `lui-statistic`
117
+ - `lui-avatar`
118
+ - `lui-avatar-group`
119
+
120
+ ### 5.2 Navigation / layout
121
+ - `lui-tab`
122
+ - `lui-breadcrumb`
123
+ - `lui-pagination`
124
+ - `lui-row`
125
+ - `lui-divider`
126
+ - `lui-background`
127
+ - `lui-scroll-area`
128
+
129
+ ### 5.3 Form
130
+ - `lui-form`
131
+ - `lui-form-item`
132
+ - `lui-input`
133
+ - `lui-input-number`
134
+ - `lui-input-opt`
135
+ - `lui-textarea`
136
+ - `lui-select`
137
+ - `lui-option`
138
+ - `lui-option-group`
139
+ - `lui-checkbox`
140
+ - `lui-checkbox-group`
141
+ - `lui-radio`
142
+ - `lui-radio-group`
143
+ - `lui-switch`
144
+ - `lui-slider`
145
+ - `lui-datepicker`
146
+ - `lui-calendar`
147
+ - `lui-date-range-picker`
148
+ - `lui-file-input`
149
+ - `lui-color-picker`
150
+
151
+ Form schema conventions:
152
+ - use `source` for select / radio / checkbox-group field data
153
+ - avoid `options` as a public schema field name
154
+
155
+ ### 5.4 Overlay / menu / command
156
+ - `lui-popover`
157
+ - `lui-tooltip`
158
+ - `lui-dropdown`
159
+ - `lui-dropmenu`
160
+ - `lui-dialog`
161
+ - `lui-drawer`
162
+ - `lui-command-palette`
163
+ - `lui-menu`
164
+ - `lui-menu-item`
165
+ - `lui-menu-divider`
166
+ - `lui-context-menu`
167
+ - `lui-overlay-root`
168
+
169
+ ### 5.5 Feedback / rich data
170
+ - `lui-progress`
171
+ - `lui-skeleton`
172
+ - `lui-toast`
173
+ - `lui-empty-state`
174
+ - `lui-image`
175
+ - `lui-image-cropper`
176
+ - `lui-table`
177
+ - `lui-tree`
178
+
179
+ ---
180
+
181
+ ## 6. Imperative APIs
182
+
183
+ Defined under `src/apis/` and exported from `src/index.ts`.
184
+
185
+ ### `dialog`
186
+ Used for alert / confirm / prompt / loading / general modal open workflows.
187
+
188
+ ### `toast`
189
+ Used for transient notifications.
190
+ Capabilities include:
191
+ - show
192
+ - close
193
+ - update
194
+ - loading state
195
+ - success / warning / error shortcuts
196
+ - promise-style lifecycle helpers
197
+
198
+ ### `form`
199
+ Used to open schema-driven forms in imperative workflows.
200
+
201
+ ### `showContextMenu()`
202
+ Singleton right-click menu helper.
203
+ Good for one-off menu display.
204
+
205
+ ### `createContextMenu()`
206
+ Returns a reusable controller.
207
+ Good for repeated long-lived menu usage.
208
+
209
+ ---
210
+
211
+ ## 7. Key architecture notes
212
+
213
+ ### 7.1 Overlay architecture
214
+ The repo uses shared overlay infrastructure built around:
215
+ - `lui-overlay-root`
216
+ - overlay layer helpers
217
+ - stack / z-index helpers
218
+
219
+ Common overlay concepts across components:
220
+ - `portal`
221
+ - `overlayLayer`
222
+ - `backdrop`
223
+ - outside-click closing rules
224
+ - popup vs modal-like mount containers
225
+
226
+ `lui-popover` is the main floating primitive.
227
+ These build on or align with popover behavior:
228
+ - `lui-tooltip`
229
+ - `lui-dropdown`
230
+ - parts of `lui-dropmenu`
231
+
232
+ Dialog / drawer / toast / context menu use related overlay infrastructure too.
233
+
234
+ ### 7.2 Config provider
235
+ `lui-config-provider` is the global config boundary.
236
+ It can provide:
237
+ - locale
238
+ - translations
239
+ - theme
240
+ - size
241
+ - disabled
242
+ - variant
243
+ - direction
244
+ - popup container
245
+ - overlay container
246
+ - z-index base
247
+ - renderEmpty
248
+ - component defaults via `componentConfig`
249
+
250
+ Read:
251
+ - `src/components/lui-config-provider.ts`
252
+ - `src/utils/config-provider.ts`
253
+
254
+ ### 7.3 Theming
255
+ The library relies heavily on CSS custom properties using `--lui-*` naming.
256
+ Shared design tokens live in `src/themes/`.
257
+
258
+ When editing visuals:
259
+ - verify light theme
260
+ - verify dark theme
261
+ - keep token-driven styling where possible
262
+
263
+ ### 7.4 Storybook-first public understanding
264
+ In this repo, Storybook stories are high-value public API references.
265
+ Often the correct reading order for a component is:
266
+ 1. component code
267
+ 2. matching story
268
+ 3. related utility / base primitive
269
+
270
+ ---
271
+
272
+ ## 8. High-value components to understand deeply
273
+
274
+ ### `lui-form`
275
+ Schema-driven dynamic form system.
276
+ Supports:
277
+ - field definitions
278
+ - validation
279
+ - custom render hooks
280
+ - steps
281
+ - complex layout
282
+ - array / repeatable structures
283
+
284
+ Best story:
285
+ - `stories/lui-form.stories.ts`
286
+
287
+ ### `lui-table`
288
+ Rich data grid.
289
+ Supports:
290
+ - columns and data-driven configuration
291
+ - sorting
292
+ - selection
293
+ - pagination
294
+ - virtual scroll
295
+ - row animation
296
+ - column resize
297
+ - column reorder
298
+ - context menu integration
299
+
300
+ Best story:
301
+ - `stories/lui-table.stories.ts`
302
+
303
+ ### `lui-tree`
304
+ Rich tree component.
305
+ Supports:
306
+ - expand/collapse
307
+ - single/multiple select
308
+ - checkbox cascade
309
+ - async loading
310
+ - search/filtering
311
+ - highlight
312
+ - drag and drop
313
+ - virtual scroll
314
+ - built-in context menu integration
315
+
316
+ Best story:
317
+ - `stories/lui-tree.stories.ts`
318
+
319
+ ### `lui-image`
320
+ Image with richer UX than a plain `<img>`.
321
+ Supports:
322
+ - skeleton state
323
+ - error state
324
+ - preview viewer
325
+ - pan/zoom
326
+ - rotate
327
+ - download
328
+
329
+ Preferred modern events:
330
+ - `open`
331
+ - `close`
332
+ - `change`
333
+
334
+ ### `lui-dialog` / `lui-drawer`
335
+ Modal-like overlays with portal/backdrop/outside-click behavior.
336
+ Need careful handling of:
337
+ - open/close
338
+ - backdrop style
339
+ - portal container
340
+ - shake / block outside close behavior
341
+
342
+ ### `lui-dropdown` / `lui-dropmenu` / `lui-popover`
343
+ Floating layers with overlapping but distinct responsibilities.
344
+ Use stories to understand intended public differences.
345
+
346
+ ---
347
+
348
+ ## 9. Read order for coding agents
349
+
350
+ For fast repo understanding, use this order:
351
+ 1. `README.md`
352
+ 2. `package.json`
353
+ 3. `src/index.ts`
354
+ 4. `llm.txt`
355
+ 5. `llms.txt`
356
+ 6. target `src/components/lui-*.ts`
357
+ 7. matching `stories/lui-*.stories.ts`
358
+ 8. related helpers in `src/utils/` or `src/apis/`
359
+
360
+ Recommended high-value stories:
361
+ - `stories/lui-api-conventions.stories.ts`
362
+ - `stories/lui-form.stories.ts`
363
+ - `stories/lui-table.stories.ts`
364
+ - `stories/lui-tree.stories.ts`
365
+ - `stories/lui-dialog.stories.ts`
366
+ - `stories/lui-dropdown.stories.ts`
367
+ - `stories/lui-image.stories.ts`
368
+ - `stories/lui-config-provider.stories.ts`
369
+
370
+ ---
371
+
372
+ ## 10. Build and validation commands
373
+
374
+ Preferred validation commands:
375
+ - `pnpm -s typecheck`
376
+ - `pnpm -s build`
377
+ - `pnpm -s build-storybook`
378
+
379
+ Other useful commands:
380
+ - `pnpm storybook`
381
+ - `pnpm example:music`
382
+
383
+ ---
384
+
385
+ ## 11. Working guidance for LLMs / coding agents
386
+
387
+ - Prefer small, reviewable edits.
388
+ - Preserve native-style event naming.
389
+ - Keep Storybook docs / controls aligned with code.
390
+ - When changing overlay behavior, consider:
391
+ - portal
392
+ - overlay layer
393
+ - backdrop
394
+ - outside click close rules
395
+ - mount container rules
396
+ - When changing table / tree / form behavior, inspect rich stories before editing.
397
+ - When changing visual styling, verify both light and dark themes.
398
+ - If unsure whether something is public, confirm it is exported from `src/index.ts`.
399
+
400
+ ---
401
+
402
+ ## 12. Files especially useful for orientation
403
+
404
+ - `README.md`
405
+ - `package.json`
406
+ - `src/index.ts`
407
+ - `src/components/lui-popover.ts`
408
+ - `src/components/lui-dialog.ts`
409
+ - `src/components/lui-form.ts`
410
+ - `src/components/lui-table.ts`
411
+ - `src/components/lui-tree.ts`
412
+ - `src/components/lui-config-provider.ts`
413
+ - `src/utils/config-provider.ts`
414
+ - `src/components/lui-overlay-root.ts`
415
+
416
+ ---
417
+
418
+ ## 13. Notes on documentation style
419
+
420
+ Current repo direction:
421
+ - stories are mostly Chinese-facing
422
+ - public descriptions should be concise and practical
423
+ - technical terms may remain in English when they are API names or established UI concepts
424
+
425
+ If adding docs, keep them:
426
+ - short
427
+ - user-facing
428
+ - synchronized with actual props and events
package/llms.txt ADDED
@@ -0,0 +1,61 @@
1
+ # litui
2
+
3
+ > Lit Web Components UI library with Storybook docs, native-style DOM events, overlay infrastructure, schema-driven forms, rich table/tree components, and imperative APIs (`dialog`, `toast`, `form`, `showContextMenu`).
4
+
5
+ ## Project Summary
6
+
7
+ - Package: `litui`
8
+ - Stack: Lit 3, TypeScript, Storybook 10, Vite, esbuild
9
+ - Style system: CSS custom properties with `--lui-*` tokens
10
+ - Public components use `lui-*` custom elements
11
+ - Public events prefer native-style names like `click`, `input`, `change`, `select`, `open`, `close`, `submit`, `clear`
12
+ - Public data-source naming is unified to `source`, including `lui-form` field schema
13
+
14
+ ## Read First
15
+
16
+ - `README.md` — overview, install, usage, theming, API naming
17
+ - `package.json` — scripts, build outputs, dependencies
18
+ - `src/index.ts` — complete public export surface
19
+ - `llm.txt` — concise repo guide for coding agents
20
+ - `llms-full.txt` — expanded component and architecture guide
21
+
22
+ ## High-Value Stories
23
+
24
+ - `stories/lui-api-conventions.stories.ts`
25
+ - `stories/lui-form.stories.ts`
26
+ - `stories/lui-table.stories.ts`
27
+ - `stories/lui-tree.stories.ts`
28
+ - `stories/lui-dialog.stories.ts`
29
+ - `stories/lui-dropdown.stories.ts`
30
+ - `stories/lui-image.stories.ts`
31
+ - `stories/lui-config-provider.stories.ts`
32
+
33
+ ## Main Public APIs
34
+
35
+ ### Components
36
+ - Foundation/display: `lui-button`, `lui-icon`, `lui-text`, `lui-card`, `lui-tag`, `lui-badge`, `lui-statistic`, `lui-avatar`, `lui-avatar-group`
37
+ - Navigation/layout: `lui-tab`, `lui-breadcrumb`, `lui-pagination`, `lui-row`, `lui-divider`, `lui-background`, `lui-scroll-area`
38
+ - Form: `lui-form`, `lui-form-item`, `lui-input`, `lui-input-number`, `lui-input-opt`, `lui-textarea`, `lui-select`, `lui-checkbox`, `lui-radio`, `lui-switch`, `lui-slider`, `lui-datepicker`, `lui-calendar`, `lui-date-range-picker`, `lui-file-input`, `lui-color-picker`
39
+ - Overlay/menu: `lui-popover`, `lui-tooltip`, `lui-dropdown`, `lui-dropmenu`, `lui-dialog`, `lui-drawer`, `lui-command-palette`, `lui-menu`, `lui-context-menu`
40
+ - Rich data/feedback: `lui-progress`, `lui-skeleton`, `lui-toast`, `lui-empty-state`, `lui-image`, `lui-image-cropper`, `lui-table`, `lui-tree`
41
+
42
+ ### Imperative APIs
43
+ - `dialog`
44
+ - `toast`
45
+ - `form`
46
+ - `showContextMenu()`
47
+ - `createContextMenu()`
48
+
49
+ ## Key Conventions
50
+
51
+ - Do not add legacy compatibility prop / event aliases back
52
+ - Keep Storybook props/controls/docs aligned with component code
53
+ - When changing visuals, verify both light and dark themes
54
+ - Overlay-related changes should consider `portal`, `overlayLayer`, `backdrop`, outside click behavior, and mount container rules
55
+ - If unsure whether an API is public, confirm it is exported from `src/index.ts`
56
+
57
+ ## Validation Commands
58
+
59
+ - `pnpm -s typecheck`
60
+ - `pnpm -s build`
61
+ - `pnpm -s build-storybook`
package/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "lituix",
3
+ "version": "0.0.1",
4
+ "description": "Framework-agnostic UI components based on Lit Web Components",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs",
13
+ "default": "./dist/index.mjs"
14
+ },
15
+ "./styles": "./dist/index.browser.css",
16
+ "./browser": "./dist/index.browser.js"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "llm.txt",
22
+ "llms.txt",
23
+ "llms-full.txt"
24
+ ],
25
+ "scripts": {
26
+ "build:esm": "cross-env BUILD_FORMAT=es node esbuild.config.js",
27
+ "build:cjs": "cross-env BUILD_FORMAT=cjs node esbuild.config.js",
28
+ "build:umd": "cross-env BUILD_FORMAT=umd node esbuild.config.js",
29
+ "build": "pnpm run build:types && pnpm run build:esm && pnpm run build:cjs && pnpm run build:umd",
30
+ "dev": "cross-env BUILD_FORMAT=es node esbuild.config.js --watch",
31
+ "typecheck": "tsc --noEmit",
32
+ "storybook": "storybook dev --host 0.0.0.0 -p 6006 --no-open",
33
+ "build-storybook": "storybook build",
34
+ "build:types": "tsc -p tsconfig.build.json",
35
+ "pack:dry-run": "npm pack --dry-run",
36
+ "release:check": "pnpm typecheck && pnpm build && pnpm pack:dry-run",
37
+ "prepack": "pnpm build",
38
+ "prepublishOnly": "pnpm typecheck && pnpm build"
39
+ },
40
+ "keywords": [
41
+ "web-components",
42
+ "lit",
43
+ "ui-components",
44
+ "design-system"
45
+ ],
46
+ "author": "ppnow",
47
+ "license": "MIT",
48
+ "dependencies": {
49
+ "@floating-ui/dom": "^1.7.6",
50
+ "@iconify-json/lucide": "^1.2.104",
51
+ "@lit-labs/virtualizer": "^2.0.13",
52
+ "@lit/context": "^1.1.5",
53
+ "@panzoom/panzoom": "^4.6.2",
54
+ "@tanstack/lit-form": "^1.23.28",
55
+ "cropperjs": "^2.1.1",
56
+ "flatpickr": "^4.6.13",
57
+ "iconify-icon": "^3.0.2",
58
+ "interactjs": "^1.10.27",
59
+ "just-debounce-it": "^3.2.0",
60
+ "lit": "^3.3.1"
61
+ },
62
+ "devDependencies": {
63
+ "@storybook/addon-docs": "^10.3.5",
64
+ "@storybook/addon-links": "^10.3.5",
65
+ "@storybook/addon-themes": "^10.3.5",
66
+ "@storybook/web-components": "^10.3.5",
67
+ "@storybook/web-components-vite": "^10.3.5",
68
+ "@types/node": "^22.5.4",
69
+ "cross-env": "^7.0.3",
70
+ "esbuild": "^0.24.0",
71
+ "storybook": "^10.3.5",
72
+ "typescript": "^5.5.4",
73
+ "vite": "^6.4.2"
74
+ },
75
+ "pnpm": {
76
+ "onlyBuiltDependencies": [
77
+ "esbuild"
78
+ ]
79
+ },
80
+ "types": "./dist/index.d.ts",
81
+ "sideEffects": true,
82
+ "publishConfig": {
83
+ "access": "public"
84
+ }
85
+ }