lituix 0.1.12 → 0.1.14
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.
- package/components.json +3 -2
- package/dist/components/lui-button.d.ts.map +1 -1
- package/dist/components/lui-tab.d.ts +1 -0
- package/dist/components/lui-tab.d.ts.map +1 -1
- package/dist/index.browser.js +48 -22
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +170 -144
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +213 -187
- package/dist/index.mjs.map +3 -3
- package/llm.txt +266 -266
- package/llms-full.txt +444 -444
- package/llms.txt +70 -70
- package/package.json +1 -1
- package/recipes.json +111 -111
package/llm.txt
CHANGED
|
@@ -1,266 +1,266 @@
|
|
|
1
|
-
litui / LLM Repo Guide
|
|
2
|
-
|
|
3
|
-
1. What this repository is
|
|
4
|
-
- `litui` is a framework-agnostic UI component library built with Lit Web Components.
|
|
5
|
-
- Package name: `litui`
|
|
6
|
-
- Main goal: provide reusable `lui-*` custom elements plus imperative APIs like `dialog`, `toast`, `form`, and `showContextMenu`.
|
|
7
|
-
- Storybook is the main interactive documentation surface.
|
|
8
|
-
|
|
9
|
-
2. Tech stack
|
|
10
|
-
- Lit 3 Web Components
|
|
11
|
-
- TypeScript
|
|
12
|
-
- Storybook 10 (`@storybook/web-components` + Vite)
|
|
13
|
-
- esbuild for library bundling
|
|
14
|
-
- Vite for examples / Storybook build pipeline
|
|
15
|
-
|
|
16
|
-
Important dependencies used by specific components:
|
|
17
|
-
- `@floating-ui/dom`: popover / dropdown / tooltip / overlay positioning
|
|
18
|
-
- `flatpickr`: date / time picker related components
|
|
19
|
-
- `cropperjs`: image cropper
|
|
20
|
-
- `@panzoom/panzoom`: image preview pan / zoom
|
|
21
|
-
- `@lit-labs/virtualizer`: virtualized list / table / tree behavior
|
|
22
|
-
- `interactjs`: drag / resize interactions in some rich components
|
|
23
|
-
- `@tanstack/lit-form`: dynamic form schema support
|
|
24
|
-
- `iconify-icon` + `@iconify-json/lucide`: icon system
|
|
25
|
-
|
|
26
|
-
3. Repository structure
|
|
27
|
-
- `src/components/`
|
|
28
|
-
- all custom elements, almost all named `lui-*.ts`
|
|
29
|
-
- `src/apis/`
|
|
30
|
-
- imperative APIs such as dialog / toast / form / context-menu
|
|
31
|
-
- `src/themes/`
|
|
32
|
-
- shared tokens and base styles
|
|
33
|
-
- `src/utils/`
|
|
34
|
-
- config provider, i18n, formatting, overlay stack helpers, etc.
|
|
35
|
-
- `src/icons/`
|
|
36
|
-
- builtin icon registry helpers
|
|
37
|
-
- `src/index.ts`
|
|
38
|
-
- public library export surface and side-effect component registration
|
|
39
|
-
- `components.json`
|
|
40
|
-
- machine-readable component / API / story index for tooling and AI
|
|
41
|
-
- `stories/`
|
|
42
|
-
- Storybook stories; best place to understand intended public API usage
|
|
43
|
-
- `examples/`
|
|
44
|
-
- standalone HTML demos (for example music-player)
|
|
45
|
-
- `dist/`
|
|
46
|
-
- build output
|
|
47
|
-
|
|
48
|
-
4. Public API conventions
|
|
49
|
-
- Custom elements use `lui-*` tag names, for example `lui-button`, `lui-dialog`, `lui-table`.
|
|
50
|
-
- Public DOM events should NOT use `lui-` prefixes.
|
|
51
|
-
- Prefer event names like:
|
|
52
|
-
- `click`
|
|
53
|
-
- `input`
|
|
54
|
-
- `change`
|
|
55
|
-
- `select`
|
|
56
|
-
- `open`
|
|
57
|
-
- `close`
|
|
58
|
-
- `submit`
|
|
59
|
-
- `clear`
|
|
60
|
-
- Boolean open state synchronization may use `open-change`.
|
|
61
|
-
- New API design must not introduce legacy aliases or `lui-*` event prefixes.
|
|
62
|
-
- Public data-source naming is unified to `source`.
|
|
63
|
-
- In `lui-form` schema, field data sources should also use `source`, not `options`.
|
|
64
|
-
|
|
65
|
-
5. Main component groups
|
|
66
|
-
|
|
67
|
-
5.1 Foundation / navigation / display
|
|
68
|
-
- `lui-button`, `lui-button-group`, `lui-button-group-item`
|
|
69
|
-
- `lui-icon`, `lui-icon-picker`
|
|
70
|
-
- `lui-text`, `lui-tag`, `lui-badge`, `lui-statistic`, `lui-card`
|
|
71
|
-
- `lui-avatar`, `lui-avatar-group`
|
|
72
|
-
- `lui-tab`
|
|
73
|
-
- `lui-breadcrumb`
|
|
74
|
-
- `lui-pagination`
|
|
75
|
-
- `lui-background`, `lui-divider`, `lui-scroll-area`, `lui-row`
|
|
76
|
-
|
|
77
|
-
5.2 Form
|
|
78
|
-
- `lui-form`, `lui-form-item`
|
|
79
|
-
- `lui-input`, `lui-input-number`, `lui-input-opt`, `lui-textarea`
|
|
80
|
-
- `lui-select`, `lui-option`, `lui-option-group`
|
|
81
|
-
- `lui-checkbox`, `lui-checkbox-group`
|
|
82
|
-
- `lui-radio`, `lui-radio-group`
|
|
83
|
-
- `lui-switch`, `lui-slider`
|
|
84
|
-
- `lui-datepicker`, `lui-calendar`, `lui-date-range-picker`
|
|
85
|
-
- `lui-file-input`
|
|
86
|
-
- `lui-color-picker`
|
|
87
|
-
|
|
88
|
-
5.3 Overlay / menu / command
|
|
89
|
-
- `lui-popover`
|
|
90
|
-
- `lui-tooltip`
|
|
91
|
-
- `lui-dropdown`
|
|
92
|
-
- `lui-dropmenu`
|
|
93
|
-
- `lui-dialog`
|
|
94
|
-
- `lui-drawer`
|
|
95
|
-
- `lui-command-palette`
|
|
96
|
-
- `lui-menu`, `lui-menu-item`, `lui-menu-divider`
|
|
97
|
-
- `lui-overlay-root`
|
|
98
|
-
|
|
99
|
-
5.4 Feedback / rich data
|
|
100
|
-
- `lui-progress`
|
|
101
|
-
- `lui-alert` — inline notice; distinct from `dialog.alert()` and from toast
|
|
102
|
-
- `lui-spinner` — the one loading ring; button, card and tree all render it
|
|
103
|
-
- `lui-qrcode` — SVG QR code, encoder bundled in `src/utils/qrcode.ts`
|
|
104
|
-
- `lui-skeleton`
|
|
105
|
-
- `lui-toast`
|
|
106
|
-
- `lui-empty-state`
|
|
107
|
-
- `lui-image`, `lui-image-cropper`
|
|
108
|
-
- `lui-table`
|
|
109
|
-
- `lui-tree`
|
|
110
|
-
|
|
111
|
-
5.5 Added later
|
|
112
|
-
- `lui-collapse`, `lui-collapse-item` — accordion
|
|
113
|
-
- `lui-popconfirm` — bubble confirmation, composes `lui-popover`
|
|
114
|
-
- `lui-autocomplete` — free-text input with suggestions; value is what was typed
|
|
115
|
-
- `lui-tree-select` — a tree behind a select trigger; value is one key
|
|
116
|
-
- `lui-cascader` — column-per-level picker; value is the whole path
|
|
117
|
-
|
|
118
|
-
5.6 Sub-elements that only work inside their parent
|
|
119
|
-
- `lui-tabs` / `lui-tab-panel`
|
|
120
|
-
- `lui-table-column`
|
|
121
|
-
- `lui-breadcrumb-item`
|
|
122
|
-
- `lui-option` / `lui-option-group`
|
|
123
|
-
- `lui-collapse-item`
|
|
124
|
-
- `lui-context-menu` is standalone but is usually driven by `showContextMenu`
|
|
125
|
-
|
|
126
|
-
6. Important imperative APIs
|
|
127
|
-
Defined under `src/apis/` and re-exported from `src/index.ts`.
|
|
128
|
-
|
|
129
|
-
- `dialog`
|
|
130
|
-
- alert / confirm / prompt / loading / open
|
|
131
|
-
- `toast`
|
|
132
|
-
- show / close / update / loading / success / warning / error / promise helpers
|
|
133
|
-
- `form`
|
|
134
|
-
- open schema-driven forms via modal-like workflow
|
|
135
|
-
- `showContextMenu()`
|
|
136
|
-
- singleton right-click menu helper
|
|
137
|
-
- `createContextMenu()`
|
|
138
|
-
- controller-based reusable context menu helper
|
|
139
|
-
|
|
140
|
-
7. Key architecture notes
|
|
141
|
-
|
|
142
|
-
7.1 Overlay model
|
|
143
|
-
- Overlay-related components are built on top of `lui-overlay-root` and overlay layer helpers.
|
|
144
|
-
- Common concepts:
|
|
145
|
-
- `portal`
|
|
146
|
-
- `overlayLayer`
|
|
147
|
-
- `backdrop`
|
|
148
|
-
- `closeOnOutsidePress` / `close-on-outside-press`
|
|
149
|
-
- `lui-popover` is the base floating layer primitive.
|
|
150
|
-
- `lui-dropdown`, `lui-tooltip`, and parts of `lui-dropmenu` build on top of popover behavior.
|
|
151
|
-
- Dialog / drawer / toast / context-menu also use shared overlay infrastructure.
|
|
152
|
-
|
|
153
|
-
7.2 Config provider
|
|
154
|
-
- `lui-config-provider` provides global config such as:
|
|
155
|
-
- locale
|
|
156
|
-
- theme
|
|
157
|
-
- size
|
|
158
|
-
- disabled
|
|
159
|
-
- variant
|
|
160
|
-
- direction
|
|
161
|
-
- popup / overlay mount container
|
|
162
|
-
- z-index base
|
|
163
|
-
- renderEmpty
|
|
164
|
-
- per-component default props via `componentConfig`
|
|
165
|
-
- See `src/components/lui-config-provider.ts` and `src/utils/config-provider.ts`.
|
|
166
|
-
|
|
167
|
-
7.3 Theming
|
|
168
|
-
- The library relies heavily on CSS custom properties with `--lui-*` tokens.
|
|
169
|
-
- Shared tokens and base styles live in `src/themes/`.
|
|
170
|
-
- Components should be themeable in light and dark mode.
|
|
171
|
-
- When adjusting visuals, check both light and dark stories.
|
|
172
|
-
|
|
173
|
-
7.4 Storybook as source of truth
|
|
174
|
-
- Stories are curated and usually reflect intended public API better than internal implementation details alone.
|
|
175
|
-
- For unfamiliar components, inspect both:
|
|
176
|
-
- `src/components/lui-*.ts`
|
|
177
|
-
- matching `stories/lui-*.stories.ts`
|
|
178
|
-
|
|
179
|
-
8. Notable rich components
|
|
180
|
-
|
|
181
|
-
8.1 `lui-form`
|
|
182
|
-
- Supports schema-driven dynamic forms.
|
|
183
|
-
- Includes custom render hooks, validation, steps, and array-style field groups.
|
|
184
|
-
- Field schema naming is unified:
|
|
185
|
-
- `source` for select / radio / checkbox-group data
|
|
186
|
-
- `value` / `defaultValue` for values
|
|
187
|
-
- Best reference: `stories/lui-form.stories.ts`
|
|
188
|
-
|
|
189
|
-
8.2 `lui-table`
|
|
190
|
-
- Supports:
|
|
191
|
-
- data-driven columns
|
|
192
|
-
- sorting
|
|
193
|
-
- selection
|
|
194
|
-
- pagination
|
|
195
|
-
- virtual scroll
|
|
196
|
-
- row animation
|
|
197
|
-
- column resize
|
|
198
|
-
- column reorder
|
|
199
|
-
- context menu
|
|
200
|
-
- Best reference: `stories/lui-table.stories.ts`
|
|
201
|
-
|
|
202
|
-
8.3 `lui-tree`
|
|
203
|
-
- Supports:
|
|
204
|
-
- expand / collapse
|
|
205
|
-
- single / multiple select
|
|
206
|
-
- checkbox cascade
|
|
207
|
-
- async load
|
|
208
|
-
- search / filtering
|
|
209
|
-
- drag and drop
|
|
210
|
-
- virtual scroll
|
|
211
|
-
- built-in context menu integration
|
|
212
|
-
- Drag rules support custom filtering and rejection reasons.
|
|
213
|
-
- Best reference: `stories/lui-tree.stories.ts`
|
|
214
|
-
|
|
215
|
-
8.4 `lui-image`
|
|
216
|
-
- Supports skeleton, error state, preview viewer, zoom / pan / rotate / download.
|
|
217
|
-
- Public events are native-style `open / close / change`.
|
|
218
|
-
|
|
219
|
-
9. Entry points to inspect first
|
|
220
|
-
If you are an LLM or coding agent trying to understand the repo quickly, read in this order:
|
|
221
|
-
- `README.md`
|
|
222
|
-
- `package.json`
|
|
223
|
-
- `components.json`
|
|
224
|
-
- `src/index.ts`
|
|
225
|
-
- target component file in `src/components/`
|
|
226
|
-
- matching story in `stories/`
|
|
227
|
-
|
|
228
|
-
Suggested high-value stories:
|
|
229
|
-
- `stories/lui-api-conventions.stories.ts`
|
|
230
|
-
- `stories/lui-form.stories.ts`
|
|
231
|
-
- `stories/lui-table.stories.ts`
|
|
232
|
-
- `stories/lui-tree.stories.ts`
|
|
233
|
-
- `stories/lui-dialog.stories.ts`
|
|
234
|
-
- `stories/lui-dropdown.stories.ts`
|
|
235
|
-
- `stories/lui-image.stories.ts`
|
|
236
|
-
- `stories/lui-config-provider.stories.ts`
|
|
237
|
-
|
|
238
|
-
10. Build and validation commands
|
|
239
|
-
Preferred commands:
|
|
240
|
-
- `pnpm -s typecheck`
|
|
241
|
-
- `pnpm -s build`
|
|
242
|
-
- `pnpm -s build-storybook`
|
|
243
|
-
|
|
244
|
-
Other useful commands:
|
|
245
|
-
- `pnpm storybook`
|
|
246
|
-
- `pnpm example:music`
|
|
247
|
-
|
|
248
|
-
11. Project-specific working guidance for coding agents
|
|
249
|
-
- Prefer minimal, reviewable edits.
|
|
250
|
-
- Do not invent new event naming schemes; keep native-style event names.
|
|
251
|
-
- When changing public APIs, update the relevant Storybook stories.
|
|
252
|
-
- When changing visuals, verify light and dark themes.
|
|
253
|
-
- For overlay-related changes, consider portal, backdrop, container, and outside-click behavior.
|
|
254
|
-
- For table / tree / form changes, test both behavior and docs stories.
|
|
255
|
-
- This repo values Storybook completeness: props/controls/docs should be kept in sync with the component.
|
|
256
|
-
|
|
257
|
-
12. Export surface summary
|
|
258
|
-
Everything public is re-exported from `src/index.ts`.
|
|
259
|
-
If unsure whether something is intended to be public, check whether it is exported there.
|
|
260
|
-
|
|
261
|
-
13. If you need to add new documentation
|
|
262
|
-
- Prefer adding or updating Storybook stories first.
|
|
263
|
-
- Keep descriptions concise and user-facing.
|
|
264
|
-
- Prefer Chinese-facing docs style currently used in most stories.
|
|
265
|
-
|
|
266
|
-
End of file.
|
|
1
|
+
litui / LLM Repo Guide
|
|
2
|
+
|
|
3
|
+
1. What this repository is
|
|
4
|
+
- `litui` is a framework-agnostic UI component library built with Lit Web Components.
|
|
5
|
+
- Package name: `litui`
|
|
6
|
+
- Main goal: provide reusable `lui-*` custom elements plus imperative APIs like `dialog`, `toast`, `form`, and `showContextMenu`.
|
|
7
|
+
- Storybook is the main interactive documentation surface.
|
|
8
|
+
|
|
9
|
+
2. Tech stack
|
|
10
|
+
- Lit 3 Web Components
|
|
11
|
+
- TypeScript
|
|
12
|
+
- Storybook 10 (`@storybook/web-components` + Vite)
|
|
13
|
+
- esbuild for library bundling
|
|
14
|
+
- Vite for examples / Storybook build pipeline
|
|
15
|
+
|
|
16
|
+
Important dependencies used by specific components:
|
|
17
|
+
- `@floating-ui/dom`: popover / dropdown / tooltip / overlay positioning
|
|
18
|
+
- `flatpickr`: date / time picker related components
|
|
19
|
+
- `cropperjs`: image cropper
|
|
20
|
+
- `@panzoom/panzoom`: image preview pan / zoom
|
|
21
|
+
- `@lit-labs/virtualizer`: virtualized list / table / tree behavior
|
|
22
|
+
- `interactjs`: drag / resize interactions in some rich components
|
|
23
|
+
- `@tanstack/lit-form`: dynamic form schema support
|
|
24
|
+
- `iconify-icon` + `@iconify-json/lucide`: icon system
|
|
25
|
+
|
|
26
|
+
3. Repository structure
|
|
27
|
+
- `src/components/`
|
|
28
|
+
- all custom elements, almost all named `lui-*.ts`
|
|
29
|
+
- `src/apis/`
|
|
30
|
+
- imperative APIs such as dialog / toast / form / context-menu
|
|
31
|
+
- `src/themes/`
|
|
32
|
+
- shared tokens and base styles
|
|
33
|
+
- `src/utils/`
|
|
34
|
+
- config provider, i18n, formatting, overlay stack helpers, etc.
|
|
35
|
+
- `src/icons/`
|
|
36
|
+
- builtin icon registry helpers
|
|
37
|
+
- `src/index.ts`
|
|
38
|
+
- public library export surface and side-effect component registration
|
|
39
|
+
- `components.json`
|
|
40
|
+
- machine-readable component / API / story index for tooling and AI
|
|
41
|
+
- `stories/`
|
|
42
|
+
- Storybook stories; best place to understand intended public API usage
|
|
43
|
+
- `examples/`
|
|
44
|
+
- standalone HTML demos (for example music-player)
|
|
45
|
+
- `dist/`
|
|
46
|
+
- build output
|
|
47
|
+
|
|
48
|
+
4. Public API conventions
|
|
49
|
+
- Custom elements use `lui-*` tag names, for example `lui-button`, `lui-dialog`, `lui-table`.
|
|
50
|
+
- Public DOM events should NOT use `lui-` prefixes.
|
|
51
|
+
- Prefer event names like:
|
|
52
|
+
- `click`
|
|
53
|
+
- `input`
|
|
54
|
+
- `change`
|
|
55
|
+
- `select`
|
|
56
|
+
- `open`
|
|
57
|
+
- `close`
|
|
58
|
+
- `submit`
|
|
59
|
+
- `clear`
|
|
60
|
+
- Boolean open state synchronization may use `open-change`.
|
|
61
|
+
- New API design must not introduce legacy aliases or `lui-*` event prefixes.
|
|
62
|
+
- Public data-source naming is unified to `source`.
|
|
63
|
+
- In `lui-form` schema, field data sources should also use `source`, not `options`.
|
|
64
|
+
|
|
65
|
+
5. Main component groups
|
|
66
|
+
|
|
67
|
+
5.1 Foundation / navigation / display
|
|
68
|
+
- `lui-button`, `lui-button-group`, `lui-button-group-item`
|
|
69
|
+
- `lui-icon`, `lui-icon-picker`
|
|
70
|
+
- `lui-text`, `lui-tag`, `lui-badge`, `lui-statistic`, `lui-card`
|
|
71
|
+
- `lui-avatar`, `lui-avatar-group`
|
|
72
|
+
- `lui-tab`
|
|
73
|
+
- `lui-breadcrumb`
|
|
74
|
+
- `lui-pagination`
|
|
75
|
+
- `lui-background`, `lui-divider`, `lui-scroll-area`, `lui-row`
|
|
76
|
+
|
|
77
|
+
5.2 Form
|
|
78
|
+
- `lui-form`, `lui-form-item`
|
|
79
|
+
- `lui-input`, `lui-input-number`, `lui-input-opt`, `lui-textarea`
|
|
80
|
+
- `lui-select`, `lui-option`, `lui-option-group`
|
|
81
|
+
- `lui-checkbox`, `lui-checkbox-group`
|
|
82
|
+
- `lui-radio`, `lui-radio-group`
|
|
83
|
+
- `lui-switch`, `lui-slider`
|
|
84
|
+
- `lui-datepicker`, `lui-calendar`, `lui-date-range-picker`
|
|
85
|
+
- `lui-file-input`
|
|
86
|
+
- `lui-color-picker`
|
|
87
|
+
|
|
88
|
+
5.3 Overlay / menu / command
|
|
89
|
+
- `lui-popover`
|
|
90
|
+
- `lui-tooltip`
|
|
91
|
+
- `lui-dropdown`
|
|
92
|
+
- `lui-dropmenu`
|
|
93
|
+
- `lui-dialog`
|
|
94
|
+
- `lui-drawer`
|
|
95
|
+
- `lui-command-palette`
|
|
96
|
+
- `lui-menu`, `lui-menu-item`, `lui-menu-divider`
|
|
97
|
+
- `lui-overlay-root`
|
|
98
|
+
|
|
99
|
+
5.4 Feedback / rich data
|
|
100
|
+
- `lui-progress`
|
|
101
|
+
- `lui-alert` — inline notice; distinct from `dialog.alert()` and from toast
|
|
102
|
+
- `lui-spinner` — the one loading ring; button, card and tree all render it
|
|
103
|
+
- `lui-qrcode` — SVG QR code, encoder bundled in `src/utils/qrcode.ts`
|
|
104
|
+
- `lui-skeleton`
|
|
105
|
+
- `lui-toast`
|
|
106
|
+
- `lui-empty-state`
|
|
107
|
+
- `lui-image`, `lui-image-cropper`
|
|
108
|
+
- `lui-table`
|
|
109
|
+
- `lui-tree`
|
|
110
|
+
|
|
111
|
+
5.5 Added later
|
|
112
|
+
- `lui-collapse`, `lui-collapse-item` — accordion
|
|
113
|
+
- `lui-popconfirm` — bubble confirmation, composes `lui-popover`
|
|
114
|
+
- `lui-autocomplete` — free-text input with suggestions; value is what was typed
|
|
115
|
+
- `lui-tree-select` — a tree behind a select trigger; value is one key
|
|
116
|
+
- `lui-cascader` — column-per-level picker; value is the whole path
|
|
117
|
+
|
|
118
|
+
5.6 Sub-elements that only work inside their parent
|
|
119
|
+
- `lui-tabs` / `lui-tab-panel`
|
|
120
|
+
- `lui-table-column`
|
|
121
|
+
- `lui-breadcrumb-item`
|
|
122
|
+
- `lui-option` / `lui-option-group`
|
|
123
|
+
- `lui-collapse-item`
|
|
124
|
+
- `lui-context-menu` is standalone but is usually driven by `showContextMenu`
|
|
125
|
+
|
|
126
|
+
6. Important imperative APIs
|
|
127
|
+
Defined under `src/apis/` and re-exported from `src/index.ts`.
|
|
128
|
+
|
|
129
|
+
- `dialog`
|
|
130
|
+
- alert / confirm / prompt / loading / open
|
|
131
|
+
- `toast`
|
|
132
|
+
- show / close / update / loading / success / warning / error / promise helpers
|
|
133
|
+
- `form`
|
|
134
|
+
- open schema-driven forms via modal-like workflow
|
|
135
|
+
- `showContextMenu()`
|
|
136
|
+
- singleton right-click menu helper
|
|
137
|
+
- `createContextMenu()`
|
|
138
|
+
- controller-based reusable context menu helper
|
|
139
|
+
|
|
140
|
+
7. Key architecture notes
|
|
141
|
+
|
|
142
|
+
7.1 Overlay model
|
|
143
|
+
- Overlay-related components are built on top of `lui-overlay-root` and overlay layer helpers.
|
|
144
|
+
- Common concepts:
|
|
145
|
+
- `portal`
|
|
146
|
+
- `overlayLayer`
|
|
147
|
+
- `backdrop`
|
|
148
|
+
- `closeOnOutsidePress` / `close-on-outside-press`
|
|
149
|
+
- `lui-popover` is the base floating layer primitive.
|
|
150
|
+
- `lui-dropdown`, `lui-tooltip`, and parts of `lui-dropmenu` build on top of popover behavior.
|
|
151
|
+
- Dialog / drawer / toast / context-menu also use shared overlay infrastructure.
|
|
152
|
+
|
|
153
|
+
7.2 Config provider
|
|
154
|
+
- `lui-config-provider` provides global config such as:
|
|
155
|
+
- locale
|
|
156
|
+
- theme
|
|
157
|
+
- size
|
|
158
|
+
- disabled
|
|
159
|
+
- variant
|
|
160
|
+
- direction
|
|
161
|
+
- popup / overlay mount container
|
|
162
|
+
- z-index base
|
|
163
|
+
- renderEmpty
|
|
164
|
+
- per-component default props via `componentConfig`
|
|
165
|
+
- See `src/components/lui-config-provider.ts` and `src/utils/config-provider.ts`.
|
|
166
|
+
|
|
167
|
+
7.3 Theming
|
|
168
|
+
- The library relies heavily on CSS custom properties with `--lui-*` tokens.
|
|
169
|
+
- Shared tokens and base styles live in `src/themes/`.
|
|
170
|
+
- Components should be themeable in light and dark mode.
|
|
171
|
+
- When adjusting visuals, check both light and dark stories.
|
|
172
|
+
|
|
173
|
+
7.4 Storybook as source of truth
|
|
174
|
+
- Stories are curated and usually reflect intended public API better than internal implementation details alone.
|
|
175
|
+
- For unfamiliar components, inspect both:
|
|
176
|
+
- `src/components/lui-*.ts`
|
|
177
|
+
- matching `stories/lui-*.stories.ts`
|
|
178
|
+
|
|
179
|
+
8. Notable rich components
|
|
180
|
+
|
|
181
|
+
8.1 `lui-form`
|
|
182
|
+
- Supports schema-driven dynamic forms.
|
|
183
|
+
- Includes custom render hooks, validation, steps, and array-style field groups.
|
|
184
|
+
- Field schema naming is unified:
|
|
185
|
+
- `source` for select / radio / checkbox-group data
|
|
186
|
+
- `value` / `defaultValue` for values
|
|
187
|
+
- Best reference: `stories/lui-form.stories.ts`
|
|
188
|
+
|
|
189
|
+
8.2 `lui-table`
|
|
190
|
+
- Supports:
|
|
191
|
+
- data-driven columns
|
|
192
|
+
- sorting
|
|
193
|
+
- selection
|
|
194
|
+
- pagination
|
|
195
|
+
- virtual scroll
|
|
196
|
+
- row animation
|
|
197
|
+
- column resize
|
|
198
|
+
- column reorder
|
|
199
|
+
- context menu
|
|
200
|
+
- Best reference: `stories/lui-table.stories.ts`
|
|
201
|
+
|
|
202
|
+
8.3 `lui-tree`
|
|
203
|
+
- Supports:
|
|
204
|
+
- expand / collapse
|
|
205
|
+
- single / multiple select
|
|
206
|
+
- checkbox cascade
|
|
207
|
+
- async load
|
|
208
|
+
- search / filtering
|
|
209
|
+
- drag and drop
|
|
210
|
+
- virtual scroll
|
|
211
|
+
- built-in context menu integration
|
|
212
|
+
- Drag rules support custom filtering and rejection reasons.
|
|
213
|
+
- Best reference: `stories/lui-tree.stories.ts`
|
|
214
|
+
|
|
215
|
+
8.4 `lui-image`
|
|
216
|
+
- Supports skeleton, error state, preview viewer, zoom / pan / rotate / download.
|
|
217
|
+
- Public events are native-style `open / close / change`.
|
|
218
|
+
|
|
219
|
+
9. Entry points to inspect first
|
|
220
|
+
If you are an LLM or coding agent trying to understand the repo quickly, read in this order:
|
|
221
|
+
- `README.md`
|
|
222
|
+
- `package.json`
|
|
223
|
+
- `components.json`
|
|
224
|
+
- `src/index.ts`
|
|
225
|
+
- target component file in `src/components/`
|
|
226
|
+
- matching story in `stories/`
|
|
227
|
+
|
|
228
|
+
Suggested high-value stories:
|
|
229
|
+
- `stories/lui-api-conventions.stories.ts`
|
|
230
|
+
- `stories/lui-form.stories.ts`
|
|
231
|
+
- `stories/lui-table.stories.ts`
|
|
232
|
+
- `stories/lui-tree.stories.ts`
|
|
233
|
+
- `stories/lui-dialog.stories.ts`
|
|
234
|
+
- `stories/lui-dropdown.stories.ts`
|
|
235
|
+
- `stories/lui-image.stories.ts`
|
|
236
|
+
- `stories/lui-config-provider.stories.ts`
|
|
237
|
+
|
|
238
|
+
10. Build and validation commands
|
|
239
|
+
Preferred commands:
|
|
240
|
+
- `pnpm -s typecheck`
|
|
241
|
+
- `pnpm -s build`
|
|
242
|
+
- `pnpm -s build-storybook`
|
|
243
|
+
|
|
244
|
+
Other useful commands:
|
|
245
|
+
- `pnpm storybook`
|
|
246
|
+
- `pnpm example:music`
|
|
247
|
+
|
|
248
|
+
11. Project-specific working guidance for coding agents
|
|
249
|
+
- Prefer minimal, reviewable edits.
|
|
250
|
+
- Do not invent new event naming schemes; keep native-style event names.
|
|
251
|
+
- When changing public APIs, update the relevant Storybook stories.
|
|
252
|
+
- When changing visuals, verify light and dark themes.
|
|
253
|
+
- For overlay-related changes, consider portal, backdrop, container, and outside-click behavior.
|
|
254
|
+
- For table / tree / form changes, test both behavior and docs stories.
|
|
255
|
+
- This repo values Storybook completeness: props/controls/docs should be kept in sync with the component.
|
|
256
|
+
|
|
257
|
+
12. Export surface summary
|
|
258
|
+
Everything public is re-exported from `src/index.ts`.
|
|
259
|
+
If unsure whether something is intended to be public, check whether it is exported there.
|
|
260
|
+
|
|
261
|
+
13. If you need to add new documentation
|
|
262
|
+
- Prefer adding or updating Storybook stories first.
|
|
263
|
+
- Keep descriptions concise and user-facing.
|
|
264
|
+
- Prefer Chinese-facing docs style currently used in most stories.
|
|
265
|
+
|
|
266
|
+
End of file.
|