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.
- package/README.md +31 -0
- package/dist/apis/context-menu.d.ts +29 -0
- package/dist/apis/context-menu.d.ts.map +1 -0
- package/dist/apis/dialog.d.ts +72 -0
- package/dist/apis/dialog.d.ts.map +1 -0
- package/dist/apis/form.d.ts +44 -0
- package/dist/apis/form.d.ts.map +1 -0
- package/dist/apis/toast.d.ts +57 -0
- package/dist/apis/toast.d.ts.map +1 -0
- package/dist/components/button-group-collapse.d.ts +14 -0
- package/dist/components/button-group-collapse.d.ts.map +1 -0
- package/dist/components/button-group-state.d.ts +13 -0
- package/dist/components/button-group-state.d.ts.map +1 -0
- package/dist/components/context-menu-tree.d.ts +2 -0
- package/dist/components/context-menu-tree.d.ts.map +1 -0
- package/dist/components/lui-avatar-group.d.ts +44 -0
- package/dist/components/lui-avatar-group.d.ts.map +1 -0
- package/dist/components/lui-avatar.d.ts +60 -0
- package/dist/components/lui-avatar.d.ts.map +1 -0
- package/dist/components/lui-background.d.ts +42 -0
- package/dist/components/lui-background.d.ts.map +1 -0
- package/dist/components/lui-badge.d.ts +37 -0
- package/dist/components/lui-badge.d.ts.map +1 -0
- package/dist/components/lui-breadcrumb.d.ts +91 -0
- package/dist/components/lui-breadcrumb.d.ts.map +1 -0
- package/dist/components/lui-button-group-item.d.ts +33 -0
- package/dist/components/lui-button-group-item.d.ts.map +1 -0
- package/dist/components/lui-button-group.d.ts +97 -0
- package/dist/components/lui-button-group.d.ts.map +1 -0
- package/dist/components/lui-button.d.ts +36 -0
- package/dist/components/lui-button.d.ts.map +1 -0
- package/dist/components/lui-calendar.d.ts +53 -0
- package/dist/components/lui-calendar.d.ts.map +1 -0
- package/dist/components/lui-card.d.ts +35 -0
- package/dist/components/lui-card.d.ts.map +1 -0
- package/dist/components/lui-checkbox-group.d.ts +60 -0
- package/dist/components/lui-checkbox-group.d.ts.map +1 -0
- package/dist/components/lui-checkbox.d.ts +43 -0
- package/dist/components/lui-checkbox.d.ts.map +1 -0
- package/dist/components/lui-color-picker.d.ts +101 -0
- package/dist/components/lui-color-picker.d.ts.map +1 -0
- package/dist/components/lui-command-palette.d.ts +72 -0
- package/dist/components/lui-command-palette.d.ts.map +1 -0
- package/dist/components/lui-config-provider.d.ts +30 -0
- package/dist/components/lui-config-provider.d.ts.map +1 -0
- package/dist/components/lui-context-menu.d.ts +114 -0
- package/dist/components/lui-context-menu.d.ts.map +1 -0
- package/dist/components/lui-date-range-picker.d.ts +2 -0
- package/dist/components/lui-date-range-picker.d.ts.map +1 -0
- package/dist/components/lui-datepicker.d.ts +52 -0
- package/dist/components/lui-datepicker.d.ts.map +1 -0
- package/dist/components/lui-dialog.d.ts +84 -0
- package/dist/components/lui-dialog.d.ts.map +1 -0
- package/dist/components/lui-divider.d.ts +31 -0
- package/dist/components/lui-divider.d.ts.map +1 -0
- package/dist/components/lui-drawer.d.ts +71 -0
- package/dist/components/lui-drawer.d.ts.map +1 -0
- package/dist/components/lui-dropdown.d.ts +15 -0
- package/dist/components/lui-dropdown.d.ts.map +1 -0
- package/dist/components/lui-dropmenu.d.ts +89 -0
- package/dist/components/lui-dropmenu.d.ts.map +1 -0
- package/dist/components/lui-empty-state.d.ts +22 -0
- package/dist/components/lui-empty-state.d.ts.map +1 -0
- package/dist/components/lui-file-input.d.ts +23 -0
- package/dist/components/lui-file-input.d.ts.map +1 -0
- package/dist/components/lui-form-item.d.ts +33 -0
- package/dist/components/lui-form-item.d.ts.map +1 -0
- package/dist/components/lui-form.d.ts +255 -0
- package/dist/components/lui-form.d.ts.map +1 -0
- package/dist/components/lui-icon-picker.d.ts +101 -0
- package/dist/components/lui-icon-picker.d.ts.map +1 -0
- package/dist/components/lui-icon.d.ts +55 -0
- package/dist/components/lui-icon.d.ts.map +1 -0
- package/dist/components/lui-image-cropper.d.ts +64 -0
- package/dist/components/lui-image-cropper.d.ts.map +1 -0
- package/dist/components/lui-image.d.ts +87 -0
- package/dist/components/lui-image.d.ts.map +1 -0
- package/dist/components/lui-input-number.d.ts +42 -0
- package/dist/components/lui-input-number.d.ts.map +1 -0
- package/dist/components/lui-input-opt.d.ts +31 -0
- package/dist/components/lui-input-opt.d.ts.map +1 -0
- package/dist/components/lui-input.d.ts +58 -0
- package/dist/components/lui-input.d.ts.map +1 -0
- package/dist/components/lui-menu-divider.d.ts +12 -0
- package/dist/components/lui-menu-divider.d.ts.map +1 -0
- package/dist/components/lui-menu-item.d.ts +36 -0
- package/dist/components/lui-menu-item.d.ts.map +1 -0
- package/dist/components/lui-menu.d.ts +49 -0
- package/dist/components/lui-menu.d.ts.map +1 -0
- package/dist/components/lui-overlay-root.d.ts +20 -0
- package/dist/components/lui-overlay-root.d.ts.map +1 -0
- package/dist/components/lui-pagination.d.ts +77 -0
- package/dist/components/lui-pagination.d.ts.map +1 -0
- package/dist/components/lui-popover.d.ts +126 -0
- package/dist/components/lui-popover.d.ts.map +1 -0
- package/dist/components/lui-progress.d.ts +44 -0
- package/dist/components/lui-progress.d.ts.map +1 -0
- package/dist/components/lui-radio-group.d.ts +53 -0
- package/dist/components/lui-radio-group.d.ts.map +1 -0
- package/dist/components/lui-radio.d.ts +39 -0
- package/dist/components/lui-radio.d.ts.map +1 -0
- package/dist/components/lui-row.d.ts +57 -0
- package/dist/components/lui-row.d.ts.map +1 -0
- package/dist/components/lui-scroll-area.d.ts +66 -0
- package/dist/components/lui-scroll-area.d.ts.map +1 -0
- package/dist/components/lui-select.d.ts +166 -0
- package/dist/components/lui-select.d.ts.map +1 -0
- package/dist/components/lui-skeleton.d.ts +35 -0
- package/dist/components/lui-skeleton.d.ts.map +1 -0
- package/dist/components/lui-slider.d.ts +54 -0
- package/dist/components/lui-slider.d.ts.map +1 -0
- package/dist/components/lui-statistic.d.ts +43 -0
- package/dist/components/lui-statistic.d.ts.map +1 -0
- package/dist/components/lui-switch.d.ts +29 -0
- package/dist/components/lui-switch.d.ts.map +1 -0
- package/dist/components/lui-tab.d.ts +103 -0
- package/dist/components/lui-tab.d.ts.map +1 -0
- package/dist/components/lui-table.d.ts +314 -0
- package/dist/components/lui-table.d.ts.map +1 -0
- package/dist/components/lui-tag.d.ts +31 -0
- package/dist/components/lui-tag.d.ts.map +1 -0
- package/dist/components/lui-text.d.ts +53 -0
- package/dist/components/lui-text.d.ts.map +1 -0
- package/dist/components/lui-textarea.d.ts +42 -0
- package/dist/components/lui-textarea.d.ts.map +1 -0
- package/dist/components/lui-toast.d.ts +109 -0
- package/dist/components/lui-toast.d.ts.map +1 -0
- package/dist/components/lui-tooltip.d.ts +25 -0
- package/dist/components/lui-tooltip.d.ts.map +1 -0
- package/dist/components/lui-tree.d.ts +258 -0
- package/dist/components/lui-tree.d.ts.map +1 -0
- package/dist/components/menu-model.d.ts +54 -0
- package/dist/components/menu-model.d.ts.map +1 -0
- package/dist/components/menu-render.d.ts +56 -0
- package/dist/components/menu-render.d.ts.map +1 -0
- package/dist/components/menu-state.d.ts +19 -0
- package/dist/components/menu-state.d.ts.map +1 -0
- package/dist/icons/builtin-iconify.d.ts +6002 -0
- package/dist/icons/builtin-iconify.d.ts.map +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/index.browser.css +2 -0
- package/dist/index.browser.css.map +7 -0
- package/dist/index.browser.js +13316 -0
- package/dist/index.browser.js.map +7 -0
- package/dist/index.cjs +13149 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +122 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +13149 -0
- package/dist/index.mjs.map +7 -0
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/tokens.d.ts +11 -0
- package/dist/themes/tokens.d.ts.map +1 -0
- package/dist/utils/apply-element-props.d.ts +9 -0
- package/dist/utils/apply-element-props.d.ts.map +1 -0
- package/dist/utils/config-provider.d.ts +39 -0
- package/dist/utils/config-provider.d.ts.map +1 -0
- package/dist/utils/format.d.ts +4 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/i18n.d.ts +13 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/interact-draggable.d.ts +20 -0
- package/dist/utils/interact-draggable.d.ts.map +1 -0
- package/dist/utils/overlay-stack.d.ts +14 -0
- package/dist/utils/overlay-stack.d.ts.map +1 -0
- package/llm.txt +245 -0
- package/llms-full.txt +428 -0
- package/llms.txt +61 -0
- package/package.json +85 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens exposed via CSS custom properties.
|
|
3
|
+
*
|
|
4
|
+
* Supports two theme modes: light (default) and dark.
|
|
5
|
+
* Set theme by adding `theme="dark"` attribute to host element or ancestor.
|
|
6
|
+
*
|
|
7
|
+
* Override any token on the host element or any ancestor to customize the theme.
|
|
8
|
+
*/
|
|
9
|
+
export declare const tokens: import("lit").CSSResult;
|
|
10
|
+
export declare const baseStyles: import("lit").CSSResult;
|
|
11
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/themes/tokens.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,yBA2MlB,CAAC;AAEF,eAAO,MAAM,UAAU,yBAsBtB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ElementStyleBag = string | Record<string, string | number | null | undefined>;
|
|
2
|
+
export interface ElementPropBag {
|
|
3
|
+
class?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: ElementStyleBag;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function applyElementProps<T extends HTMLElement>(element: T | null | undefined, props?: ElementPropBag): void;
|
|
9
|
+
//# sourceMappingURL=apply-element-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-element-props.d.ts","sourceRoot":"","sources":["../../src/utils/apply-element-props.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EACrD,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC7B,KAAK,CAAC,EAAE,cAAc,GACrB,IAAI,CAgCN"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { TranslationMap } from "./i18n";
|
|
2
|
+
export type LuiComponentConfigMap = Record<string, Record<string, unknown>>;
|
|
3
|
+
export interface LuiConfigProviderValue {
|
|
4
|
+
locale?: string;
|
|
5
|
+
translations?: TranslationMap;
|
|
6
|
+
theme?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
variant?: string;
|
|
10
|
+
direction?: "ltr" | "rtl";
|
|
11
|
+
popupContainer?: HTMLElement | ShadowRoot | null;
|
|
12
|
+
overlayContainer?: HTMLElement | ShadowRoot | null;
|
|
13
|
+
zIndexBase?: number;
|
|
14
|
+
renderEmpty?: ((componentName?: string) => unknown) | null;
|
|
15
|
+
componentConfig?: LuiComponentConfigMap;
|
|
16
|
+
}
|
|
17
|
+
export interface LuiConfigProviderLike extends HTMLElement {
|
|
18
|
+
getConfig?: () => LuiConfigProviderValue;
|
|
19
|
+
}
|
|
20
|
+
export declare function findConfigProviders(host: Node | null): LuiConfigProviderLike[];
|
|
21
|
+
export declare function resolveConfig(host: Node | null): LuiConfigProviderValue;
|
|
22
|
+
export declare function findGlobalConfigProvider(root?: ParentNode | null): LuiConfigProviderLike | null;
|
|
23
|
+
export declare function resolveGlobalConfig(): LuiConfigProviderValue;
|
|
24
|
+
export declare function resolveComponentConfig(host: Node | null, componentName: string): Record<string, unknown>;
|
|
25
|
+
export declare function resolveGlobalComponentConfig(componentName: string): Record<string, unknown>;
|
|
26
|
+
export declare function resolveLocaleConfig(host: Node | null, locale?: string, translations?: TranslationMap): {
|
|
27
|
+
locale?: string;
|
|
28
|
+
translations?: TranslationMap;
|
|
29
|
+
};
|
|
30
|
+
export declare function resolveGlobalLocaleConfig(locale?: string, translations?: TranslationMap): {
|
|
31
|
+
locale?: string;
|
|
32
|
+
translations?: TranslationMap;
|
|
33
|
+
};
|
|
34
|
+
export declare function resolvePopupContainer(host: Node | null): HTMLElement | ShadowRoot | null;
|
|
35
|
+
export declare function resolveGlobalPopupContainer(): HTMLElement | ShadowRoot | null;
|
|
36
|
+
export declare function resolveOverlayContainer(host: Node | null): HTMLElement | ShadowRoot | null;
|
|
37
|
+
export declare function resolveGlobalOverlayContainer(): HTMLElement | ShadowRoot | null;
|
|
38
|
+
export declare function resolveRenderEmpty(host: Node | null): ((componentName?: string) => unknown) | null;
|
|
39
|
+
//# sourceMappingURL=config-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-provider.d.ts","sourceRoot":"","sources":["../../src/utils/config-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE5E,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,cAAc,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,IAAI,CAAC;IACjD,gBAAgB,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,IAAI,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3D,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,SAAS,CAAC,EAAE,MAAM,sBAAsB,CAAC;CAC1C;AAaD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,qBAAqB,EAAE,CAe9E;AAsBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,sBAAsB,CAcvE;AAED,wBAAgB,wBAAwB,CACtC,IAAI,GAAE,UAAU,GAAG,IAAwD,GAC1E,qBAAqB,GAAG,IAAI,CAI9B;AAED,wBAAgB,mBAAmB,IAAI,sBAAsB,CAE5D;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,aAAa,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB;AAED,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAS3F;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,cAAc,GAC5B;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,cAAc,CAAA;CAAE,CASpD;AAED,wBAAgB,yBAAyB,CACvC,MAAM,CAAC,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,cAAc,GAC5B;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,cAAc,CAAA;CAAE,CASpD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,CAExF;AAED,wBAAgB,2BAA2B,IAAI,WAAW,GAAG,UAAU,GAAG,IAAI,CAE7E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,CAE1F;AAED,wBAAgB,6BAA6B,IAAI,WAAW,GAAG,UAAU,GAAG,IAAI,CAE/E;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,GAAG,IAAI,GAChB,CAAC,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,IAAI,CAE9C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function formatSize(bytes: number | string | null | undefined): string;
|
|
2
|
+
export declare function formatDate(input?: string | number | null): string;
|
|
3
|
+
export declare function isImageIconSource(source?: string | null): boolean;
|
|
4
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GACxC,MAAM,CAmBR;AAED,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAajE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAWjE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TranslationMap = Record<string, string>;
|
|
2
|
+
type TranslationParams = Record<string, string | number | boolean | null | undefined>;
|
|
3
|
+
export declare const builtinTranslations: Record<string, TranslationMap>;
|
|
4
|
+
export declare function resolveBuiltinTranslations(locale?: string): TranslationMap;
|
|
5
|
+
export declare function mergeTranslations(locale?: string, overrides?: TranslationMap): TranslationMap;
|
|
6
|
+
export declare function translate(translations: TranslationMap | undefined, key: string, fallback: string, params?: TranslationParams): string;
|
|
7
|
+
export declare function getLocale(): string;
|
|
8
|
+
export declare function setLocale(locale: string): void;
|
|
9
|
+
export declare function registerTranslations(locale: string, translations: TranslationMap): void;
|
|
10
|
+
export declare function onLocaleChange(listener: EventListenerOrEventListenerObject): () => void;
|
|
11
|
+
export declare function t(key: string, fallback: string, params?: TranslationParams, locale?: string, overrides?: TranslationMap): string;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/utils/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AA0PtF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAK9D,CAAC;AAMF,wBAAgB,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAI1E;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,cAAc,GACzB,cAAc,CAOhB;AAED,wBAAgB,SAAS,CACvB,YAAY,EAAE,cAAc,GAAG,SAAS,EACxC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAOR;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAK9C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,GAAG,IAAI,CAUvF;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,kCAAkC,GAAG,MAAM,IAAI,CAGvF;AAED,wBAAgB,CAAC,CACf,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,cAAc,GACzB,MAAM,CAER"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface InteractDraggableState {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export interface InteractDraggableOptions {
|
|
6
|
+
target: HTMLElement;
|
|
7
|
+
handle: HTMLElement;
|
|
8
|
+
visibleMarginX?: number;
|
|
9
|
+
visibleMarginY?: number;
|
|
10
|
+
ignoreFrom?: string;
|
|
11
|
+
onMove?: (state: InteractDraggableState) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface InteractDraggableHandle {
|
|
14
|
+
dispose: () => void;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
getState: () => InteractDraggableState;
|
|
17
|
+
setState: (next: Partial<InteractDraggableState>) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function createInteractDraggable(options: InteractDraggableOptions): InteractDraggableHandle;
|
|
20
|
+
//# sourceMappingURL=interact-draggable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interact-draggable.d.ts","sourceRoot":"","sources":["../../src/utils/interact-draggable.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;IACvC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;CAC3D;AAOD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,uBAAuB,CAgEzB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OverlayLayerName } from "../components/lui-overlay-root";
|
|
2
|
+
export declare function setOverlayOwner(element: HTMLElement, owner: HTMLElement | null | undefined): void;
|
|
3
|
+
export declare function eventPathContainsOwnedOverlay(path: EventTarget[], ancestor: Node): boolean;
|
|
4
|
+
export declare function markOverlayInteraction(element: HTMLElement | null | undefined, duration?: number): void;
|
|
5
|
+
export declare function hasRecentOverlayInteraction(element: HTMLElement | null | undefined): boolean;
|
|
6
|
+
export declare function registerOverlayStack(element: HTMLElement, layer: HTMLElement, layerName: OverlayLayerName): void;
|
|
7
|
+
export declare function bringOverlayStackToFront(element: HTMLElement): boolean;
|
|
8
|
+
export declare function unregisterOverlayStack(element: HTMLElement): boolean;
|
|
9
|
+
export declare function isOverlayTopmost(element: HTMLElement): boolean;
|
|
10
|
+
export declare function resolveOverlayLayerRegistration(element: HTMLElement | null | undefined): {
|
|
11
|
+
layer: HTMLElement;
|
|
12
|
+
layerName: OverlayLayerName;
|
|
13
|
+
} | null;
|
|
14
|
+
//# sourceMappingURL=overlay-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-stack.d.ts","sourceRoot":"","sources":["../../src/utils/overlay-stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAkDvE,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAMjG;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAK1F;AAGD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,SAAM,GAAG,IAAI,CAWpG;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAI5F;AAuCD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,gBAAgB,GAC1B,IAAI,CAoBN;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAatE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAepE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAK9D;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACtC;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,gBAAgB,CAAA;CAAE,GAAG,IAAI,CAK5D"}
|
package/llm.txt
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
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
|
+
- `stories/`
|
|
40
|
+
- Storybook stories; best place to understand intended public API usage
|
|
41
|
+
- `examples/`
|
|
42
|
+
- standalone HTML demos (for example music-player)
|
|
43
|
+
- `dist/`
|
|
44
|
+
- build output
|
|
45
|
+
|
|
46
|
+
4. Public API conventions
|
|
47
|
+
- Custom elements use `lui-*` tag names, for example `lui-button`, `lui-dialog`, `lui-table`.
|
|
48
|
+
- Public DOM events should NOT use `lui-` prefixes.
|
|
49
|
+
- Prefer event names like:
|
|
50
|
+
- `click`
|
|
51
|
+
- `input`
|
|
52
|
+
- `change`
|
|
53
|
+
- `select`
|
|
54
|
+
- `open`
|
|
55
|
+
- `close`
|
|
56
|
+
- `submit`
|
|
57
|
+
- `clear`
|
|
58
|
+
- Boolean open state synchronization may use `open-change`.
|
|
59
|
+
- New API design must not introduce legacy aliases or `lui-*` event prefixes.
|
|
60
|
+
- Public data-source naming is unified to `source`.
|
|
61
|
+
- In `lui-form` schema, field data sources should also use `source`, not `options`.
|
|
62
|
+
|
|
63
|
+
5. Main component groups
|
|
64
|
+
|
|
65
|
+
5.1 Foundation / navigation / display
|
|
66
|
+
- `lui-button`, `lui-button-group`, `lui-button-group-item`
|
|
67
|
+
- `lui-icon`, `lui-icon-picker`
|
|
68
|
+
- `lui-text`, `lui-tag`, `lui-badge`, `lui-statistic`, `lui-card`
|
|
69
|
+
- `lui-avatar`, `lui-avatar-group`
|
|
70
|
+
- `lui-tab`
|
|
71
|
+
- `lui-breadcrumb`
|
|
72
|
+
- `lui-pagination`
|
|
73
|
+
- `lui-background`, `lui-divider`, `lui-scroll-area`, `lui-row`
|
|
74
|
+
|
|
75
|
+
5.2 Form
|
|
76
|
+
- `lui-form`, `lui-form-item`
|
|
77
|
+
- `lui-input`, `lui-input-number`, `lui-input-opt`, `lui-textarea`
|
|
78
|
+
- `lui-select`, `lui-option`, `lui-option-group`
|
|
79
|
+
- `lui-checkbox`, `lui-checkbox-group`
|
|
80
|
+
- `lui-radio`, `lui-radio-group`
|
|
81
|
+
- `lui-switch`, `lui-slider`
|
|
82
|
+
- `lui-datepicker`, `lui-calendar`, `lui-date-range-picker`
|
|
83
|
+
- `lui-file-input`
|
|
84
|
+
- `lui-color-picker`
|
|
85
|
+
|
|
86
|
+
5.3 Overlay / menu / command
|
|
87
|
+
- `lui-popover`
|
|
88
|
+
- `lui-tooltip`
|
|
89
|
+
- `lui-dropdown`
|
|
90
|
+
- `lui-dropmenu`
|
|
91
|
+
- `lui-dialog`
|
|
92
|
+
- `lui-drawer`
|
|
93
|
+
- `lui-command-palette`
|
|
94
|
+
- `lui-menu`, `lui-menu-item`, `lui-menu-divider`
|
|
95
|
+
- `lui-overlay-root`
|
|
96
|
+
|
|
97
|
+
5.4 Feedback / rich data
|
|
98
|
+
- `lui-progress`
|
|
99
|
+
- `lui-skeleton`
|
|
100
|
+
- `lui-toast`
|
|
101
|
+
- `lui-empty-state`
|
|
102
|
+
- `lui-image`, `lui-image-cropper`
|
|
103
|
+
- `lui-table`
|
|
104
|
+
- `lui-tree`
|
|
105
|
+
|
|
106
|
+
6. Important imperative APIs
|
|
107
|
+
Defined under `src/apis/` and re-exported from `src/index.ts`.
|
|
108
|
+
|
|
109
|
+
- `dialog`
|
|
110
|
+
- alert / confirm / prompt / loading / open
|
|
111
|
+
- `toast`
|
|
112
|
+
- show / close / update / loading / success / warning / error / promise helpers
|
|
113
|
+
- `form`
|
|
114
|
+
- open schema-driven forms via modal-like workflow
|
|
115
|
+
- `showContextMenu()`
|
|
116
|
+
- singleton right-click menu helper
|
|
117
|
+
- `createContextMenu()`
|
|
118
|
+
- controller-based reusable context menu helper
|
|
119
|
+
|
|
120
|
+
7. Key architecture notes
|
|
121
|
+
|
|
122
|
+
7.1 Overlay model
|
|
123
|
+
- Overlay-related components are built on top of `lui-overlay-root` and overlay layer helpers.
|
|
124
|
+
- Common concepts:
|
|
125
|
+
- `portal`
|
|
126
|
+
- `overlayLayer`
|
|
127
|
+
- `backdrop`
|
|
128
|
+
- `closeOnOutsidePress` / `close-on-outside-press`
|
|
129
|
+
- `lui-popover` is the base floating layer primitive.
|
|
130
|
+
- `lui-dropdown`, `lui-tooltip`, and parts of `lui-dropmenu` build on top of popover behavior.
|
|
131
|
+
- Dialog / drawer / toast / context-menu also use shared overlay infrastructure.
|
|
132
|
+
|
|
133
|
+
7.2 Config provider
|
|
134
|
+
- `lui-config-provider` provides global config such as:
|
|
135
|
+
- locale
|
|
136
|
+
- theme
|
|
137
|
+
- size
|
|
138
|
+
- disabled
|
|
139
|
+
- variant
|
|
140
|
+
- direction
|
|
141
|
+
- popup / overlay mount container
|
|
142
|
+
- z-index base
|
|
143
|
+
- renderEmpty
|
|
144
|
+
- per-component default props via `componentConfig`
|
|
145
|
+
- See `src/components/lui-config-provider.ts` and `src/utils/config-provider.ts`.
|
|
146
|
+
|
|
147
|
+
7.3 Theming
|
|
148
|
+
- The library relies heavily on CSS custom properties with `--lui-*` tokens.
|
|
149
|
+
- Shared tokens and base styles live in `src/themes/`.
|
|
150
|
+
- Components should be themeable in light and dark mode.
|
|
151
|
+
- When adjusting visuals, check both light and dark stories.
|
|
152
|
+
|
|
153
|
+
7.4 Storybook as source of truth
|
|
154
|
+
- Stories are curated and usually reflect intended public API better than internal implementation details alone.
|
|
155
|
+
- For unfamiliar components, inspect both:
|
|
156
|
+
- `src/components/lui-*.ts`
|
|
157
|
+
- matching `stories/lui-*.stories.ts`
|
|
158
|
+
|
|
159
|
+
8. Notable rich components
|
|
160
|
+
|
|
161
|
+
8.1 `lui-form`
|
|
162
|
+
- Supports schema-driven dynamic forms.
|
|
163
|
+
- Includes custom render hooks, validation, steps, and array-style field groups.
|
|
164
|
+
- Field schema naming is unified:
|
|
165
|
+
- `source` for select / radio / checkbox-group data
|
|
166
|
+
- `value` / `defaultValue` for values
|
|
167
|
+
- Best reference: `stories/lui-form.stories.ts`
|
|
168
|
+
|
|
169
|
+
8.2 `lui-table`
|
|
170
|
+
- Supports:
|
|
171
|
+
- data-driven columns
|
|
172
|
+
- sorting
|
|
173
|
+
- selection
|
|
174
|
+
- pagination
|
|
175
|
+
- virtual scroll
|
|
176
|
+
- row animation
|
|
177
|
+
- column resize
|
|
178
|
+
- column reorder
|
|
179
|
+
- context menu
|
|
180
|
+
- Best reference: `stories/lui-table.stories.ts`
|
|
181
|
+
|
|
182
|
+
8.3 `lui-tree`
|
|
183
|
+
- Supports:
|
|
184
|
+
- expand / collapse
|
|
185
|
+
- single / multiple select
|
|
186
|
+
- checkbox cascade
|
|
187
|
+
- async load
|
|
188
|
+
- search / filtering
|
|
189
|
+
- drag and drop
|
|
190
|
+
- virtual scroll
|
|
191
|
+
- built-in context menu integration
|
|
192
|
+
- Drag rules support custom filtering and rejection reasons.
|
|
193
|
+
- Best reference: `stories/lui-tree.stories.ts`
|
|
194
|
+
|
|
195
|
+
8.4 `lui-image`
|
|
196
|
+
- Supports skeleton, error state, preview viewer, zoom / pan / rotate / download.
|
|
197
|
+
- Public events are native-style `open / close / change`.
|
|
198
|
+
|
|
199
|
+
9. Entry points to inspect first
|
|
200
|
+
If you are an LLM or coding agent trying to understand the repo quickly, read in this order:
|
|
201
|
+
- `README.md`
|
|
202
|
+
- `package.json`
|
|
203
|
+
- `src/index.ts`
|
|
204
|
+
- target component file in `src/components/`
|
|
205
|
+
- matching story in `stories/`
|
|
206
|
+
|
|
207
|
+
Suggested high-value stories:
|
|
208
|
+
- `stories/lui-api-conventions.stories.ts`
|
|
209
|
+
- `stories/lui-form.stories.ts`
|
|
210
|
+
- `stories/lui-table.stories.ts`
|
|
211
|
+
- `stories/lui-tree.stories.ts`
|
|
212
|
+
- `stories/lui-dialog.stories.ts`
|
|
213
|
+
- `stories/lui-dropdown.stories.ts`
|
|
214
|
+
- `stories/lui-image.stories.ts`
|
|
215
|
+
- `stories/lui-config-provider.stories.ts`
|
|
216
|
+
|
|
217
|
+
10. Build and validation commands
|
|
218
|
+
Preferred commands:
|
|
219
|
+
- `pnpm -s typecheck`
|
|
220
|
+
- `pnpm -s build`
|
|
221
|
+
- `pnpm -s build-storybook`
|
|
222
|
+
|
|
223
|
+
Other useful commands:
|
|
224
|
+
- `pnpm storybook`
|
|
225
|
+
- `pnpm example:music`
|
|
226
|
+
|
|
227
|
+
11. Project-specific working guidance for coding agents
|
|
228
|
+
- Prefer minimal, reviewable edits.
|
|
229
|
+
- Do not invent new event naming schemes; keep native-style event names.
|
|
230
|
+
- When changing public APIs, update the relevant Storybook stories.
|
|
231
|
+
- When changing visuals, verify light and dark themes.
|
|
232
|
+
- For overlay-related changes, consider portal, backdrop, container, and outside-click behavior.
|
|
233
|
+
- For table / tree / form changes, test both behavior and docs stories.
|
|
234
|
+
- This repo values Storybook completeness: props/controls/docs should be kept in sync with the component.
|
|
235
|
+
|
|
236
|
+
12. Export surface summary
|
|
237
|
+
Everything public is re-exported from `src/index.ts`.
|
|
238
|
+
If unsure whether something is intended to be public, check whether it is exported there.
|
|
239
|
+
|
|
240
|
+
13. If you need to add new documentation
|
|
241
|
+
- Prefer adding or updating Storybook stories first.
|
|
242
|
+
- Keep descriptions concise and user-facing.
|
|
243
|
+
- Prefer Chinese-facing docs style currently used in most stories.
|
|
244
|
+
|
|
245
|
+
End of file.
|