@easemate/web-kit 0.3.2 → 0.3.3
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 +99 -17
- package/build/index.cjs +4986 -2313
- package/build/index.cjs.map +1 -1
- package/build/index.js +4977 -2304
- package/build/index.js.map +1 -1
- package/build/jsx.cjs.map +1 -1
- package/build/jsx.d.cts +41 -7
- package/build/jsx.d.ts +41 -7
- package/build/jsx.js.map +1 -1
- package/build/react.cjs +4174 -1529
- package/build/react.cjs.map +1 -1
- package/build/react.d.cts +1 -1
- package/build/react.d.ts +1 -1
- package/build/react.js +4173 -1528
- package/build/react.js.map +1 -1
- package/build/register.cjs +3924 -1213
- package/build/register.cjs.map +1 -1
- package/build/register.js +3924 -1213
- package/build/register.js.map +1 -1
- package/package.json +2 -12
package/build/jsx.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/jsx.ts"],"sourcesContent":["/**\n * JSX type declarations for @easemate/web-kit\n *\n * Import this module to get JSX IntrinsicElements type support:\n * ```ts\n * import '@easemate/web-kit/react/jsx';\n * ```\n */\n\n// Import React types to enable proper module augmentation\n// This ensures 'react' and 'react/jsx-runtime' are resolvable for augmentation\nimport type {} from 'react';\nimport type {} from 'react/jsx-dev-runtime';\nimport type {} from 'react/jsx-runtime';\nimport type { StateChangeEventDetail } from '../elements/state/index';\n\n// Re-export for convenience\nexport type { StateChangeEventDetail };\n\n// Event detail types\nexport interface TabChangeEventDetail {\n index: number;\n id: string;\n event: Event;\n}\n\nexport interface ControlEventDetail<T = unknown> {\n name?: string;\n value: T;\n event: Event;\n}\n\n// Ref types\ntype RefCallback<T> = (instance: T | null) => void;\ntype RefObject<T> = { current: T | null };\ntype Ref<T> = RefCallback<T> | RefObject<T> | null;\n\n// Event handler type\ntype CustomEventHandler<T = unknown> = (event: CustomEvent<T>) => void;\n\n// Base HTML attributes shared by all elements\ninterface BaseHTMLAttributes {\n // React's key prop for list rendering\n key?: string | number | null;\n id?: string;\n class?: string;\n className?: string;\n style?: string | Partial<CSSStyleDeclaration>;\n slot?: string;\n hidden?: boolean;\n tabIndex?: number;\n title?: string;\n name?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-hidden'?: boolean | 'true' | 'false';\n 'aria-disabled'?: boolean | 'true' | 'false';\n 'data-testid'?: string;\n onClick?: (event: MouseEvent) => void;\n onFocus?: (event: FocusEvent) => void;\n onBlur?: (event: FocusEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onKeyUp?: (event: KeyboardEvent) => void;\n children?: unknown;\n}\n\n// Element ref interfaces\nexport interface StateElement extends HTMLElement {\n getState(): Record<string, unknown>;\n get(name: string): unknown;\n set(name: string, value: unknown): void;\n reset(): void;\n}\n\nexport interface PanelElement extends HTMLElement {\n collapsed?: boolean;\n setActiveTab(indexOrId: number | string): void;\n getActiveTab(): { index: number; id: string } | null;\n}\n\nexport interface SliderElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ToggleElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CheckboxElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n}\n\nexport interface InputElement extends HTMLElement {\n value?: string | null;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n focus(): void;\n blur(): void;\n}\n\nexport interface NumberInputElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ColorInputElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface DropdownElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n open?: boolean;\n}\n\nexport interface ButtonElement extends HTMLElement {\n disabled?: boolean;\n type?: string;\n variant?: string;\n}\n\nexport interface FieldElement extends HTMLElement {\n label?: string;\n}\n\nexport interface TooltipElement extends HTMLElement {\n content?: string;\n placement?: string;\n}\n\nexport interface PopoverElement extends HTMLElement {\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface RadioGroupElement extends HTMLElement {\n value?: string;\n}\n\nexport interface CurveElement extends HTMLElement {\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n snapToGrid?: boolean;\n}\n\n// Props interfaces\nexport interface StateProps extends BaseHTMLAttributes {\n ref?: Ref<StateElement>;\n onStateChange?: CustomEventHandler<StateChangeEventDetail>;\n}\n\nexport interface PanelProps extends BaseHTMLAttributes {\n ref?: Ref<PanelElement>;\n collapsed?: boolean;\n onTabChange?: CustomEventHandler<TabChangeEventDetail>;\n}\n\nexport interface SliderProps extends BaseHTMLAttributes {\n ref?: Ref<SliderElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ToggleProps extends BaseHTMLAttributes {\n ref?: Ref<ToggleElement>;\n checked?: boolean;\n disabled?: boolean;\n onToggle?: CustomEventHandler<ControlEventDetail<boolean>>;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface CheckboxProps extends BaseHTMLAttributes {\n ref?: Ref<CheckboxElement>;\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface InputProps extends BaseHTMLAttributes {\n ref?: Ref<InputElement>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface NumberInputProps extends BaseHTMLAttributes {\n ref?: Ref<NumberInputElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ColorInputProps extends BaseHTMLAttributes {\n ref?: Ref<ColorInputElement>;\n value?: string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface DropdownProps extends BaseHTMLAttributes {\n ref?: Ref<DropdownElement>;\n value?: string;\n disabled?: boolean;\n open?: boolean;\n placement?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface ButtonProps extends BaseHTMLAttributes {\n ref?: Ref<ButtonElement>;\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n variant?: 'primary' | 'secondary' | 'ghost';\n pill?: boolean;\n block?: string;\n fullWidth?: boolean;\n}\n\nexport interface FieldProps extends BaseHTMLAttributes {\n ref?: Ref<FieldElement>;\n label?: string;\n inline?: boolean;\n}\n\nexport interface TooltipProps extends BaseHTMLAttributes {\n ref?: Ref<TooltipElement>;\n content?: string;\n placement?: string;\n delay?: number | string;\n}\n\nexport interface PopoverProps extends BaseHTMLAttributes {\n ref?: Ref<PopoverElement>;\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginProps extends BaseHTMLAttributes {\n ref?: Ref<OriginElement>;\n value?: string;\n disabled?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioGroupProps extends BaseHTMLAttributes {\n ref?: Ref<RadioGroupElement>;\n value?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioInputProps extends BaseHTMLAttributes {\n value?: string;\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CurveProps extends BaseHTMLAttributes {\n ref?: Ref<CurveElement>;\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n 'easing-type'?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n 'show-grid'?: boolean;\n snapToGrid?: boolean;\n 'snap-to-grid'?: boolean;\n gridSize?: number | string;\n 'grid-size'?: number | string;\n}\n\nexport interface CodeProps extends BaseHTMLAttributes {\n language?: string;\n}\n\nexport interface MonitorProps extends BaseHTMLAttributes {}\n\nexport interface MonitorFpsProps extends BaseHTMLAttributes {\n interval?: number | string;\n}\n\nexport interface LogoLoaderProps extends BaseHTMLAttributes {\n intro?: 'none' | 'simple' | 'full';\n playing?: boolean;\n}\n\n// JSX IntrinsicElements\nexport interface EaseElements {\n 'ease-state': StateProps;\n 'ease-panel': PanelProps;\n 'ease-slider': SliderProps;\n 'ease-toggle': ToggleProps;\n 'ease-checkbox': CheckboxProps;\n 'ease-input': InputProps;\n 'ease-number-input': NumberInputProps;\n 'ease-color-input': ColorInputProps;\n 'ease-color-picker': ColorInputProps;\n 'ease-dropdown': DropdownProps;\n 'ease-button': ButtonProps;\n 'ease-field': FieldProps;\n 'ease-tooltip': TooltipProps;\n 'ease-popover': PopoverProps;\n 'ease-origin': OriginProps;\n 'ease-radio-group': RadioGroupProps;\n 'ease-radio-input': RadioInputProps;\n 'ease-curve': CurveProps;\n 'ease-code': CodeProps;\n 'ease-monitor': MonitorProps;\n 'ease-monitor-fps': MonitorFpsProps;\n 'ease-logo-loader': LogoLoaderProps;\n}\n\n// Augment global JSX namespace\n// This provides type support in both React and non-React environments\ndeclare global {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's JSX namespace for React 17/18/19 (classic JSX transform)\ndeclare module 'react' {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-runtime for React 17+ (new JSX transform)\n// This is required for Next.js App Router and other projects using the new transform\ndeclare module 'react/jsx-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-dev-runtime for development mode\ndeclare module 'react/jsx-dev-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Runtime marker to ensure this module is processed by TypeScript\n// This is needed because purely type-only modules may not trigger augmentation\nexport const __JSX_TYPES_LOADED__ = true;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAuXO,IAAMA,uBAAuB;","names":["__JSX_TYPES_LOADED__"]}
|
|
1
|
+
{"version":3,"sources":["../src/react/jsx.ts"],"sourcesContent":["/**\n * JSX type declarations for @easemate/web-kit\n *\n * Import this module to get JSX IntrinsicElements type support:\n * ```ts\n * import '@easemate/web-kit/react/jsx';\n * ```\n */\n\n// Import React types to enable proper module augmentation\n// This ensures 'react' and 'react/jsx-runtime' are resolvable for augmentation\nimport type {} from 'react';\nimport type {} from 'react/jsx-dev-runtime';\nimport type {} from 'react/jsx-runtime';\nimport type { StateChangeEventDetail } from '../elements/state/index';\n\n// Re-export for convenience\nexport type { StateChangeEventDetail };\n\n// Event detail types\nexport interface TabChangeEventDetail {\n index: number;\n id: string;\n event: Event;\n}\n\nexport interface ControlEventDetail<T = unknown> {\n name?: string;\n value: T;\n event: Event;\n}\n\n// Ref types\ntype RefCallback<T> = (instance: T | null) => void;\ntype RefObject<T> = { current: T | null };\ntype Ref<T> = RefCallback<T> | RefObject<T> | null;\n\n// Event handler type\ntype CustomEventHandler<T = unknown> = (event: CustomEvent<T>) => void;\n\n// Base HTML attributes shared by all elements\ninterface BaseHTMLAttributes {\n // React's key prop for list rendering\n key?: string | number | null;\n id?: string;\n class?: string;\n className?: string;\n style?: string | Partial<CSSStyleDeclaration>;\n slot?: string;\n hidden?: boolean;\n tabIndex?: number;\n title?: string;\n name?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-hidden'?: boolean | 'true' | 'false';\n 'aria-disabled'?: boolean | 'true' | 'false';\n 'data-testid'?: string;\n onClick?: (event: MouseEvent) => void;\n onFocus?: (event: FocusEvent) => void;\n onBlur?: (event: FocusEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onKeyUp?: (event: KeyboardEvent) => void;\n children?: unknown;\n}\n\n// Element ref interfaces\nexport interface StateElement extends HTMLElement {\n getState(): Record<string, unknown>;\n get(name: string): unknown;\n set(name: string, value: unknown): void;\n reset(): void;\n}\n\nexport interface PanelElement extends HTMLElement {\n collapsed?: boolean;\n setActiveTab(indexOrId: number | string): void;\n getActiveTab(): { index: number; id: string } | null;\n}\n\nexport interface SliderElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ToggleElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CheckboxElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n}\n\nexport interface InputElement extends HTMLElement {\n value?: string | null;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n focus(): void;\n blur(): void;\n}\n\nexport interface NumberInputElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ColorInputElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface DropdownElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n open?: boolean;\n}\n\nexport interface ButtonElement extends HTMLElement {\n disabled?: boolean;\n type?: string;\n variant?: string;\n}\n\nexport interface FieldElement extends HTMLElement {\n label?: string;\n}\n\nexport interface TooltipElement extends HTMLElement {\n content?: string;\n placement?: string;\n}\n\nexport interface PopoverElement extends HTMLElement {\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface RadioGroupElement extends HTMLElement {\n value?: string;\n}\n\nexport interface CurveElement extends HTMLElement {\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n snapToGrid?: boolean;\n}\n\n// Props interfaces\nexport interface StateProps extends BaseHTMLAttributes {\n ref?: Ref<StateElement>;\n onStateChange?: CustomEventHandler<StateChangeEventDetail>;\n}\n\nexport interface PanelProps extends BaseHTMLAttributes {\n ref?: Ref<PanelElement>;\n collapsed?: boolean;\n onTabChange?: CustomEventHandler<TabChangeEventDetail>;\n}\n\nexport interface SliderProps extends BaseHTMLAttributes {\n ref?: Ref<SliderElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ToggleProps extends BaseHTMLAttributes {\n ref?: Ref<ToggleElement>;\n checked?: boolean;\n disabled?: boolean;\n onToggle?: CustomEventHandler<ControlEventDetail<boolean>>;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface CheckboxProps extends BaseHTMLAttributes {\n ref?: Ref<CheckboxElement>;\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface InputProps extends BaseHTMLAttributes {\n ref?: Ref<InputElement>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface NumberInputProps extends BaseHTMLAttributes {\n ref?: Ref<NumberInputElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ColorInputProps extends BaseHTMLAttributes {\n ref?: Ref<ColorInputElement>;\n value?: string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface DropdownProps extends BaseHTMLAttributes {\n ref?: Ref<DropdownElement>;\n value?: string;\n disabled?: boolean;\n open?: boolean;\n placement?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface ButtonProps extends BaseHTMLAttributes {\n ref?: Ref<ButtonElement>;\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n variant?: 'primary' | 'secondary' | 'ghost';\n pill?: boolean;\n block?: string;\n fullWidth?: boolean;\n}\n\nexport interface FieldProps extends BaseHTMLAttributes {\n ref?: Ref<FieldElement>;\n label?: string;\n inline?: boolean;\n}\n\nexport interface TooltipProps extends BaseHTMLAttributes {\n ref?: Ref<TooltipElement>;\n content?: string;\n placement?: string;\n delay?: number | string;\n}\n\nexport interface PopoverProps extends BaseHTMLAttributes {\n ref?: Ref<PopoverElement>;\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginProps extends BaseHTMLAttributes {\n ref?: Ref<OriginElement>;\n value?: string;\n disabled?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioGroupProps extends BaseHTMLAttributes {\n ref?: Ref<RadioGroupElement>;\n value?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioInputProps extends BaseHTMLAttributes {\n value?: string;\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CurveProps extends BaseHTMLAttributes {\n ref?: Ref<CurveElement>;\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n 'easing-type'?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n 'show-grid'?: boolean;\n snapToGrid?: boolean;\n 'snap-to-grid'?: boolean;\n gridSize?: number | string;\n 'grid-size'?: number | string;\n}\n\nexport interface CodeProps extends BaseHTMLAttributes {\n language?: string;\n}\n\nexport interface MonitorProps extends BaseHTMLAttributes {}\n\nexport interface MonitorFpsProps extends BaseHTMLAttributes {\n interval?: number | string;\n}\n\nexport interface LogoLoaderProps extends BaseHTMLAttributes {\n intro?: 'wave' | 'particle';\n loading?: boolean;\n size?: number | string;\n}\n\nexport interface ColorPickerProps extends BaseHTMLAttributes {\n ref?: Ref<ColorInputElement>;\n value?: string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\n// Base interface for all icon components\nexport interface IconProps extends BaseHTMLAttributes {}\n\n// JSX IntrinsicElements\nexport interface EaseElements {\n // Layout & State\n 'ease-state': StateProps;\n 'ease-panel': PanelProps;\n 'ease-field': FieldProps;\n 'ease-popover': PopoverProps;\n 'ease-tooltip': TooltipProps;\n\n // Controls\n 'ease-slider': SliderProps;\n 'ease-toggle': ToggleProps;\n 'ease-checkbox': CheckboxProps;\n 'ease-input': InputProps;\n 'ease-number-input': NumberInputProps;\n 'ease-color-input': ColorInputProps;\n 'ease-color-picker': ColorPickerProps;\n 'ease-dropdown': DropdownProps;\n 'ease-button': ButtonProps;\n 'ease-origin': OriginProps;\n 'ease-radio-group': RadioGroupProps;\n 'ease-radio-input': RadioInputProps;\n\n // Advanced\n 'ease-curve': CurveProps;\n 'ease-code': CodeProps;\n\n // Display\n 'ease-monitor': MonitorProps;\n 'ease-monitor-fps': MonitorFpsProps;\n 'ease-logo-loader': LogoLoaderProps;\n\n // Icons - Interface\n 'ease-icon-anchor-add': IconProps;\n 'ease-icon-anchor-remove': IconProps;\n 'ease-icon-arrow-up': IconProps;\n 'ease-icon-arrows-vertical': IconProps;\n 'ease-icon-bezier': IconProps;\n 'ease-icon-bezier-angle': IconProps;\n 'ease-icon-bezier-distribute': IconProps;\n 'ease-icon-bezier-length': IconProps;\n 'ease-icon-bezier-mirror': IconProps;\n 'ease-icon-check': IconProps;\n 'ease-icon-circle-arrow-left': IconProps;\n 'ease-icon-circle-arrow-right': IconProps;\n 'ease-icon-code': IconProps;\n 'ease-icon-dots': IconProps;\n 'ease-icon-mention': IconProps;\n 'ease-icon-minus': IconProps;\n 'ease-icon-picker': IconProps;\n 'ease-icon-plus': IconProps;\n 'ease-icon-settings': IconProps;\n\n // Icons - Animation\n 'ease-icon-chevron': IconProps;\n 'ease-icon-clear': IconProps;\n 'ease-icon-grid': IconProps;\n 'ease-icon-loading': IconProps;\n 'ease-icon-snap': IconProps;\n}\n\n// Augment global JSX namespace\n// This provides type support in both React and non-React environments\ndeclare global {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's JSX namespace for React 17/18/19 (classic JSX transform)\ndeclare module 'react' {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-runtime for React 17+ (new JSX transform)\n// This is required for Next.js App Router and other projects using the new transform\ndeclare module 'react/jsx-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-dev-runtime for development mode\ndeclare module 'react/jsx-dev-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Runtime marker to ensure this module is processed by TypeScript\n// This is needed because purely type-only modules may not trigger augmentation\nexport const __JSX_TYPES_LOADED__ = true;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAsaO,IAAMA,uBAAuB;","names":["__JSX_TYPES_LOADED__"]}
|
package/build/jsx.d.cts
CHANGED
|
@@ -262,24 +262,34 @@ interface MonitorFpsProps extends BaseHTMLAttributes {
|
|
|
262
262
|
interval?: number | string;
|
|
263
263
|
}
|
|
264
264
|
interface LogoLoaderProps extends BaseHTMLAttributes {
|
|
265
|
-
intro?: '
|
|
266
|
-
|
|
265
|
+
intro?: 'wave' | 'particle';
|
|
266
|
+
loading?: boolean;
|
|
267
|
+
size?: number | string;
|
|
268
|
+
}
|
|
269
|
+
interface ColorPickerProps extends BaseHTMLAttributes {
|
|
270
|
+
ref?: Ref<ColorInputElement>;
|
|
271
|
+
value?: string;
|
|
272
|
+
disabled?: boolean;
|
|
273
|
+
onInput?: CustomEventHandler<ControlEventDetail<string>>;
|
|
274
|
+
onChange?: CustomEventHandler<ControlEventDetail<string>>;
|
|
275
|
+
}
|
|
276
|
+
interface IconProps extends BaseHTMLAttributes {
|
|
267
277
|
}
|
|
268
278
|
interface EaseElements {
|
|
269
279
|
'ease-state': StateProps;
|
|
270
280
|
'ease-panel': PanelProps;
|
|
281
|
+
'ease-field': FieldProps;
|
|
282
|
+
'ease-popover': PopoverProps;
|
|
283
|
+
'ease-tooltip': TooltipProps;
|
|
271
284
|
'ease-slider': SliderProps;
|
|
272
285
|
'ease-toggle': ToggleProps;
|
|
273
286
|
'ease-checkbox': CheckboxProps;
|
|
274
287
|
'ease-input': InputProps;
|
|
275
288
|
'ease-number-input': NumberInputProps;
|
|
276
289
|
'ease-color-input': ColorInputProps;
|
|
277
|
-
'ease-color-picker':
|
|
290
|
+
'ease-color-picker': ColorPickerProps;
|
|
278
291
|
'ease-dropdown': DropdownProps;
|
|
279
292
|
'ease-button': ButtonProps;
|
|
280
|
-
'ease-field': FieldProps;
|
|
281
|
-
'ease-tooltip': TooltipProps;
|
|
282
|
-
'ease-popover': PopoverProps;
|
|
283
293
|
'ease-origin': OriginProps;
|
|
284
294
|
'ease-radio-group': RadioGroupProps;
|
|
285
295
|
'ease-radio-input': RadioInputProps;
|
|
@@ -288,6 +298,30 @@ interface EaseElements {
|
|
|
288
298
|
'ease-monitor': MonitorProps;
|
|
289
299
|
'ease-monitor-fps': MonitorFpsProps;
|
|
290
300
|
'ease-logo-loader': LogoLoaderProps;
|
|
301
|
+
'ease-icon-anchor-add': IconProps;
|
|
302
|
+
'ease-icon-anchor-remove': IconProps;
|
|
303
|
+
'ease-icon-arrow-up': IconProps;
|
|
304
|
+
'ease-icon-arrows-vertical': IconProps;
|
|
305
|
+
'ease-icon-bezier': IconProps;
|
|
306
|
+
'ease-icon-bezier-angle': IconProps;
|
|
307
|
+
'ease-icon-bezier-distribute': IconProps;
|
|
308
|
+
'ease-icon-bezier-length': IconProps;
|
|
309
|
+
'ease-icon-bezier-mirror': IconProps;
|
|
310
|
+
'ease-icon-check': IconProps;
|
|
311
|
+
'ease-icon-circle-arrow-left': IconProps;
|
|
312
|
+
'ease-icon-circle-arrow-right': IconProps;
|
|
313
|
+
'ease-icon-code': IconProps;
|
|
314
|
+
'ease-icon-dots': IconProps;
|
|
315
|
+
'ease-icon-mention': IconProps;
|
|
316
|
+
'ease-icon-minus': IconProps;
|
|
317
|
+
'ease-icon-picker': IconProps;
|
|
318
|
+
'ease-icon-plus': IconProps;
|
|
319
|
+
'ease-icon-settings': IconProps;
|
|
320
|
+
'ease-icon-chevron': IconProps;
|
|
321
|
+
'ease-icon-clear': IconProps;
|
|
322
|
+
'ease-icon-grid': IconProps;
|
|
323
|
+
'ease-icon-loading': IconProps;
|
|
324
|
+
'ease-icon-snap': IconProps;
|
|
291
325
|
}
|
|
292
326
|
declare global {
|
|
293
327
|
namespace JSX {
|
|
@@ -315,4 +349,4 @@ declare module 'react/jsx-dev-runtime' {
|
|
|
315
349
|
}
|
|
316
350
|
declare const __JSX_TYPES_LOADED__ = true;
|
|
317
351
|
|
|
318
|
-
export { type ButtonElement, type ButtonProps, type CheckboxElement, type CheckboxProps, type CodeProps, type ColorInputElement, type ColorInputProps, type ControlEventDetail, type CurveElement, type CurveProps, type DropdownElement, type DropdownProps, type EaseElements, type FieldElement, type FieldProps, type InputElement, type InputProps, type LogoLoaderProps, type MonitorFpsProps, type MonitorProps, type NumberInputElement, type NumberInputProps, type OriginElement, type OriginProps, type PanelElement, type PanelProps, type PopoverElement, type PopoverProps, type RadioGroupElement, type RadioGroupProps, type RadioInputProps, type SliderElement, type SliderProps, StateChangeEventDetail, type StateElement, type StateProps, type TabChangeEventDetail, type ToggleElement, type ToggleProps, type TooltipElement, type TooltipProps, __JSX_TYPES_LOADED__ };
|
|
352
|
+
export { type ButtonElement, type ButtonProps, type CheckboxElement, type CheckboxProps, type CodeProps, type ColorInputElement, type ColorInputProps, type ColorPickerProps, type ControlEventDetail, type CurveElement, type CurveProps, type DropdownElement, type DropdownProps, type EaseElements, type FieldElement, type FieldProps, type IconProps, type InputElement, type InputProps, type LogoLoaderProps, type MonitorFpsProps, type MonitorProps, type NumberInputElement, type NumberInputProps, type OriginElement, type OriginProps, type PanelElement, type PanelProps, type PopoverElement, type PopoverProps, type RadioGroupElement, type RadioGroupProps, type RadioInputProps, type SliderElement, type SliderProps, StateChangeEventDetail, type StateElement, type StateProps, type TabChangeEventDetail, type ToggleElement, type ToggleProps, type TooltipElement, type TooltipProps, __JSX_TYPES_LOADED__ };
|
package/build/jsx.d.ts
CHANGED
|
@@ -262,24 +262,34 @@ interface MonitorFpsProps extends BaseHTMLAttributes {
|
|
|
262
262
|
interval?: number | string;
|
|
263
263
|
}
|
|
264
264
|
interface LogoLoaderProps extends BaseHTMLAttributes {
|
|
265
|
-
intro?: '
|
|
266
|
-
|
|
265
|
+
intro?: 'wave' | 'particle';
|
|
266
|
+
loading?: boolean;
|
|
267
|
+
size?: number | string;
|
|
268
|
+
}
|
|
269
|
+
interface ColorPickerProps extends BaseHTMLAttributes {
|
|
270
|
+
ref?: Ref<ColorInputElement>;
|
|
271
|
+
value?: string;
|
|
272
|
+
disabled?: boolean;
|
|
273
|
+
onInput?: CustomEventHandler<ControlEventDetail<string>>;
|
|
274
|
+
onChange?: CustomEventHandler<ControlEventDetail<string>>;
|
|
275
|
+
}
|
|
276
|
+
interface IconProps extends BaseHTMLAttributes {
|
|
267
277
|
}
|
|
268
278
|
interface EaseElements {
|
|
269
279
|
'ease-state': StateProps;
|
|
270
280
|
'ease-panel': PanelProps;
|
|
281
|
+
'ease-field': FieldProps;
|
|
282
|
+
'ease-popover': PopoverProps;
|
|
283
|
+
'ease-tooltip': TooltipProps;
|
|
271
284
|
'ease-slider': SliderProps;
|
|
272
285
|
'ease-toggle': ToggleProps;
|
|
273
286
|
'ease-checkbox': CheckboxProps;
|
|
274
287
|
'ease-input': InputProps;
|
|
275
288
|
'ease-number-input': NumberInputProps;
|
|
276
289
|
'ease-color-input': ColorInputProps;
|
|
277
|
-
'ease-color-picker':
|
|
290
|
+
'ease-color-picker': ColorPickerProps;
|
|
278
291
|
'ease-dropdown': DropdownProps;
|
|
279
292
|
'ease-button': ButtonProps;
|
|
280
|
-
'ease-field': FieldProps;
|
|
281
|
-
'ease-tooltip': TooltipProps;
|
|
282
|
-
'ease-popover': PopoverProps;
|
|
283
293
|
'ease-origin': OriginProps;
|
|
284
294
|
'ease-radio-group': RadioGroupProps;
|
|
285
295
|
'ease-radio-input': RadioInputProps;
|
|
@@ -288,6 +298,30 @@ interface EaseElements {
|
|
|
288
298
|
'ease-monitor': MonitorProps;
|
|
289
299
|
'ease-monitor-fps': MonitorFpsProps;
|
|
290
300
|
'ease-logo-loader': LogoLoaderProps;
|
|
301
|
+
'ease-icon-anchor-add': IconProps;
|
|
302
|
+
'ease-icon-anchor-remove': IconProps;
|
|
303
|
+
'ease-icon-arrow-up': IconProps;
|
|
304
|
+
'ease-icon-arrows-vertical': IconProps;
|
|
305
|
+
'ease-icon-bezier': IconProps;
|
|
306
|
+
'ease-icon-bezier-angle': IconProps;
|
|
307
|
+
'ease-icon-bezier-distribute': IconProps;
|
|
308
|
+
'ease-icon-bezier-length': IconProps;
|
|
309
|
+
'ease-icon-bezier-mirror': IconProps;
|
|
310
|
+
'ease-icon-check': IconProps;
|
|
311
|
+
'ease-icon-circle-arrow-left': IconProps;
|
|
312
|
+
'ease-icon-circle-arrow-right': IconProps;
|
|
313
|
+
'ease-icon-code': IconProps;
|
|
314
|
+
'ease-icon-dots': IconProps;
|
|
315
|
+
'ease-icon-mention': IconProps;
|
|
316
|
+
'ease-icon-minus': IconProps;
|
|
317
|
+
'ease-icon-picker': IconProps;
|
|
318
|
+
'ease-icon-plus': IconProps;
|
|
319
|
+
'ease-icon-settings': IconProps;
|
|
320
|
+
'ease-icon-chevron': IconProps;
|
|
321
|
+
'ease-icon-clear': IconProps;
|
|
322
|
+
'ease-icon-grid': IconProps;
|
|
323
|
+
'ease-icon-loading': IconProps;
|
|
324
|
+
'ease-icon-snap': IconProps;
|
|
291
325
|
}
|
|
292
326
|
declare global {
|
|
293
327
|
namespace JSX {
|
|
@@ -315,4 +349,4 @@ declare module 'react/jsx-dev-runtime' {
|
|
|
315
349
|
}
|
|
316
350
|
declare const __JSX_TYPES_LOADED__ = true;
|
|
317
351
|
|
|
318
|
-
export { type ButtonElement, type ButtonProps, type CheckboxElement, type CheckboxProps, type CodeProps, type ColorInputElement, type ColorInputProps, type ControlEventDetail, type CurveElement, type CurveProps, type DropdownElement, type DropdownProps, type EaseElements, type FieldElement, type FieldProps, type InputElement, type InputProps, type LogoLoaderProps, type MonitorFpsProps, type MonitorProps, type NumberInputElement, type NumberInputProps, type OriginElement, type OriginProps, type PanelElement, type PanelProps, type PopoverElement, type PopoverProps, type RadioGroupElement, type RadioGroupProps, type RadioInputProps, type SliderElement, type SliderProps, StateChangeEventDetail, type StateElement, type StateProps, type TabChangeEventDetail, type ToggleElement, type ToggleProps, type TooltipElement, type TooltipProps, __JSX_TYPES_LOADED__ };
|
|
352
|
+
export { type ButtonElement, type ButtonProps, type CheckboxElement, type CheckboxProps, type CodeProps, type ColorInputElement, type ColorInputProps, type ColorPickerProps, type ControlEventDetail, type CurveElement, type CurveProps, type DropdownElement, type DropdownProps, type EaseElements, type FieldElement, type FieldProps, type IconProps, type InputElement, type InputProps, type LogoLoaderProps, type MonitorFpsProps, type MonitorProps, type NumberInputElement, type NumberInputProps, type OriginElement, type OriginProps, type PanelElement, type PanelProps, type PopoverElement, type PopoverProps, type RadioGroupElement, type RadioGroupProps, type RadioInputProps, type SliderElement, type SliderProps, StateChangeEventDetail, type StateElement, type StateProps, type TabChangeEventDetail, type ToggleElement, type ToggleProps, type TooltipElement, type TooltipProps, __JSX_TYPES_LOADED__ };
|
package/build/jsx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/jsx.ts"],"sourcesContent":["/**\n * JSX type declarations for @easemate/web-kit\n *\n * Import this module to get JSX IntrinsicElements type support:\n * ```ts\n * import '@easemate/web-kit/react/jsx';\n * ```\n */\n\n// Import React types to enable proper module augmentation\n// This ensures 'react' and 'react/jsx-runtime' are resolvable for augmentation\nimport type {} from 'react';\nimport type {} from 'react/jsx-dev-runtime';\nimport type {} from 'react/jsx-runtime';\nimport type { StateChangeEventDetail } from '../elements/state/index';\n\n// Re-export for convenience\nexport type { StateChangeEventDetail };\n\n// Event detail types\nexport interface TabChangeEventDetail {\n index: number;\n id: string;\n event: Event;\n}\n\nexport interface ControlEventDetail<T = unknown> {\n name?: string;\n value: T;\n event: Event;\n}\n\n// Ref types\ntype RefCallback<T> = (instance: T | null) => void;\ntype RefObject<T> = { current: T | null };\ntype Ref<T> = RefCallback<T> | RefObject<T> | null;\n\n// Event handler type\ntype CustomEventHandler<T = unknown> = (event: CustomEvent<T>) => void;\n\n// Base HTML attributes shared by all elements\ninterface BaseHTMLAttributes {\n // React's key prop for list rendering\n key?: string | number | null;\n id?: string;\n class?: string;\n className?: string;\n style?: string | Partial<CSSStyleDeclaration>;\n slot?: string;\n hidden?: boolean;\n tabIndex?: number;\n title?: string;\n name?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-hidden'?: boolean | 'true' | 'false';\n 'aria-disabled'?: boolean | 'true' | 'false';\n 'data-testid'?: string;\n onClick?: (event: MouseEvent) => void;\n onFocus?: (event: FocusEvent) => void;\n onBlur?: (event: FocusEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onKeyUp?: (event: KeyboardEvent) => void;\n children?: unknown;\n}\n\n// Element ref interfaces\nexport interface StateElement extends HTMLElement {\n getState(): Record<string, unknown>;\n get(name: string): unknown;\n set(name: string, value: unknown): void;\n reset(): void;\n}\n\nexport interface PanelElement extends HTMLElement {\n collapsed?: boolean;\n setActiveTab(indexOrId: number | string): void;\n getActiveTab(): { index: number; id: string } | null;\n}\n\nexport interface SliderElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ToggleElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CheckboxElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n}\n\nexport interface InputElement extends HTMLElement {\n value?: string | null;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n focus(): void;\n blur(): void;\n}\n\nexport interface NumberInputElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ColorInputElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface DropdownElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n open?: boolean;\n}\n\nexport interface ButtonElement extends HTMLElement {\n disabled?: boolean;\n type?: string;\n variant?: string;\n}\n\nexport interface FieldElement extends HTMLElement {\n label?: string;\n}\n\nexport interface TooltipElement extends HTMLElement {\n content?: string;\n placement?: string;\n}\n\nexport interface PopoverElement extends HTMLElement {\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface RadioGroupElement extends HTMLElement {\n value?: string;\n}\n\nexport interface CurveElement extends HTMLElement {\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n snapToGrid?: boolean;\n}\n\n// Props interfaces\nexport interface StateProps extends BaseHTMLAttributes {\n ref?: Ref<StateElement>;\n onStateChange?: CustomEventHandler<StateChangeEventDetail>;\n}\n\nexport interface PanelProps extends BaseHTMLAttributes {\n ref?: Ref<PanelElement>;\n collapsed?: boolean;\n onTabChange?: CustomEventHandler<TabChangeEventDetail>;\n}\n\nexport interface SliderProps extends BaseHTMLAttributes {\n ref?: Ref<SliderElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ToggleProps extends BaseHTMLAttributes {\n ref?: Ref<ToggleElement>;\n checked?: boolean;\n disabled?: boolean;\n onToggle?: CustomEventHandler<ControlEventDetail<boolean>>;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface CheckboxProps extends BaseHTMLAttributes {\n ref?: Ref<CheckboxElement>;\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface InputProps extends BaseHTMLAttributes {\n ref?: Ref<InputElement>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface NumberInputProps extends BaseHTMLAttributes {\n ref?: Ref<NumberInputElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ColorInputProps extends BaseHTMLAttributes {\n ref?: Ref<ColorInputElement>;\n value?: string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface DropdownProps extends BaseHTMLAttributes {\n ref?: Ref<DropdownElement>;\n value?: string;\n disabled?: boolean;\n open?: boolean;\n placement?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface ButtonProps extends BaseHTMLAttributes {\n ref?: Ref<ButtonElement>;\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n variant?: 'primary' | 'secondary' | 'ghost';\n pill?: boolean;\n block?: string;\n fullWidth?: boolean;\n}\n\nexport interface FieldProps extends BaseHTMLAttributes {\n ref?: Ref<FieldElement>;\n label?: string;\n inline?: boolean;\n}\n\nexport interface TooltipProps extends BaseHTMLAttributes {\n ref?: Ref<TooltipElement>;\n content?: string;\n placement?: string;\n delay?: number | string;\n}\n\nexport interface PopoverProps extends BaseHTMLAttributes {\n ref?: Ref<PopoverElement>;\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginProps extends BaseHTMLAttributes {\n ref?: Ref<OriginElement>;\n value?: string;\n disabled?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioGroupProps extends BaseHTMLAttributes {\n ref?: Ref<RadioGroupElement>;\n value?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioInputProps extends BaseHTMLAttributes {\n value?: string;\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CurveProps extends BaseHTMLAttributes {\n ref?: Ref<CurveElement>;\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n 'easing-type'?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n 'show-grid'?: boolean;\n snapToGrid?: boolean;\n 'snap-to-grid'?: boolean;\n gridSize?: number | string;\n 'grid-size'?: number | string;\n}\n\nexport interface CodeProps extends BaseHTMLAttributes {\n language?: string;\n}\n\nexport interface MonitorProps extends BaseHTMLAttributes {}\n\nexport interface MonitorFpsProps extends BaseHTMLAttributes {\n interval?: number | string;\n}\n\nexport interface LogoLoaderProps extends BaseHTMLAttributes {\n intro?: 'none' | 'simple' | 'full';\n playing?: boolean;\n}\n\n// JSX IntrinsicElements\nexport interface EaseElements {\n 'ease-state': StateProps;\n 'ease-panel': PanelProps;\n 'ease-slider': SliderProps;\n 'ease-toggle': ToggleProps;\n 'ease-checkbox': CheckboxProps;\n 'ease-input': InputProps;\n 'ease-number-input': NumberInputProps;\n 'ease-color-input': ColorInputProps;\n 'ease-color-picker': ColorInputProps;\n 'ease-dropdown': DropdownProps;\n 'ease-button': ButtonProps;\n 'ease-field': FieldProps;\n 'ease-tooltip': TooltipProps;\n 'ease-popover': PopoverProps;\n 'ease-origin': OriginProps;\n 'ease-radio-group': RadioGroupProps;\n 'ease-radio-input': RadioInputProps;\n 'ease-curve': CurveProps;\n 'ease-code': CodeProps;\n 'ease-monitor': MonitorProps;\n 'ease-monitor-fps': MonitorFpsProps;\n 'ease-logo-loader': LogoLoaderProps;\n}\n\n// Augment global JSX namespace\n// This provides type support in both React and non-React environments\ndeclare global {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's JSX namespace for React 17/18/19 (classic JSX transform)\ndeclare module 'react' {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-runtime for React 17+ (new JSX transform)\n// This is required for Next.js App Router and other projects using the new transform\ndeclare module 'react/jsx-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-dev-runtime for development mode\ndeclare module 'react/jsx-dev-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Runtime marker to ensure this module is processed by TypeScript\n// This is needed because purely type-only modules may not trigger augmentation\nexport const __JSX_TYPES_LOADED__ = true;\n"],"mappings":";AAuXO,IAAMA,uBAAuB;","names":["__JSX_TYPES_LOADED__"]}
|
|
1
|
+
{"version":3,"sources":["../src/react/jsx.ts"],"sourcesContent":["/**\n * JSX type declarations for @easemate/web-kit\n *\n * Import this module to get JSX IntrinsicElements type support:\n * ```ts\n * import '@easemate/web-kit/react/jsx';\n * ```\n */\n\n// Import React types to enable proper module augmentation\n// This ensures 'react' and 'react/jsx-runtime' are resolvable for augmentation\nimport type {} from 'react';\nimport type {} from 'react/jsx-dev-runtime';\nimport type {} from 'react/jsx-runtime';\nimport type { StateChangeEventDetail } from '../elements/state/index';\n\n// Re-export for convenience\nexport type { StateChangeEventDetail };\n\n// Event detail types\nexport interface TabChangeEventDetail {\n index: number;\n id: string;\n event: Event;\n}\n\nexport interface ControlEventDetail<T = unknown> {\n name?: string;\n value: T;\n event: Event;\n}\n\n// Ref types\ntype RefCallback<T> = (instance: T | null) => void;\ntype RefObject<T> = { current: T | null };\ntype Ref<T> = RefCallback<T> | RefObject<T> | null;\n\n// Event handler type\ntype CustomEventHandler<T = unknown> = (event: CustomEvent<T>) => void;\n\n// Base HTML attributes shared by all elements\ninterface BaseHTMLAttributes {\n // React's key prop for list rendering\n key?: string | number | null;\n id?: string;\n class?: string;\n className?: string;\n style?: string | Partial<CSSStyleDeclaration>;\n slot?: string;\n hidden?: boolean;\n tabIndex?: number;\n title?: string;\n name?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-hidden'?: boolean | 'true' | 'false';\n 'aria-disabled'?: boolean | 'true' | 'false';\n 'data-testid'?: string;\n onClick?: (event: MouseEvent) => void;\n onFocus?: (event: FocusEvent) => void;\n onBlur?: (event: FocusEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onKeyUp?: (event: KeyboardEvent) => void;\n children?: unknown;\n}\n\n// Element ref interfaces\nexport interface StateElement extends HTMLElement {\n getState(): Record<string, unknown>;\n get(name: string): unknown;\n set(name: string, value: unknown): void;\n reset(): void;\n}\n\nexport interface PanelElement extends HTMLElement {\n collapsed?: boolean;\n setActiveTab(indexOrId: number | string): void;\n getActiveTab(): { index: number; id: string } | null;\n}\n\nexport interface SliderElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ToggleElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CheckboxElement extends HTMLElement {\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n}\n\nexport interface InputElement extends HTMLElement {\n value?: string | null;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n focus(): void;\n blur(): void;\n}\n\nexport interface NumberInputElement extends HTMLElement {\n value?: number | null;\n min?: number | null;\n max?: number | null;\n step?: number | null;\n disabled?: boolean;\n}\n\nexport interface ColorInputElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface DropdownElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n open?: boolean;\n}\n\nexport interface ButtonElement extends HTMLElement {\n disabled?: boolean;\n type?: string;\n variant?: string;\n}\n\nexport interface FieldElement extends HTMLElement {\n label?: string;\n}\n\nexport interface TooltipElement extends HTMLElement {\n content?: string;\n placement?: string;\n}\n\nexport interface PopoverElement extends HTMLElement {\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginElement extends HTMLElement {\n value?: string;\n disabled?: boolean;\n}\n\nexport interface RadioGroupElement extends HTMLElement {\n value?: string;\n}\n\nexport interface CurveElement extends HTMLElement {\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n snapToGrid?: boolean;\n}\n\n// Props interfaces\nexport interface StateProps extends BaseHTMLAttributes {\n ref?: Ref<StateElement>;\n onStateChange?: CustomEventHandler<StateChangeEventDetail>;\n}\n\nexport interface PanelProps extends BaseHTMLAttributes {\n ref?: Ref<PanelElement>;\n collapsed?: boolean;\n onTabChange?: CustomEventHandler<TabChangeEventDetail>;\n}\n\nexport interface SliderProps extends BaseHTMLAttributes {\n ref?: Ref<SliderElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ToggleProps extends BaseHTMLAttributes {\n ref?: Ref<ToggleElement>;\n checked?: boolean;\n disabled?: boolean;\n onToggle?: CustomEventHandler<ControlEventDetail<boolean>>;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface CheckboxProps extends BaseHTMLAttributes {\n ref?: Ref<CheckboxElement>;\n checked?: boolean;\n disabled?: boolean;\n indeterminate?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<boolean>>;\n}\n\nexport interface InputProps extends BaseHTMLAttributes {\n ref?: Ref<InputElement>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n type?: string;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface NumberInputProps extends BaseHTMLAttributes {\n ref?: Ref<NumberInputElement>;\n value?: number | string;\n min?: number | string;\n max?: number | string;\n step?: number | string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<number>>;\n onChange?: CustomEventHandler<ControlEventDetail<number>>;\n}\n\nexport interface ColorInputProps extends BaseHTMLAttributes {\n ref?: Ref<ColorInputElement>;\n value?: string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface DropdownProps extends BaseHTMLAttributes {\n ref?: Ref<DropdownElement>;\n value?: string;\n disabled?: boolean;\n open?: boolean;\n placement?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface ButtonProps extends BaseHTMLAttributes {\n ref?: Ref<ButtonElement>;\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n variant?: 'primary' | 'secondary' | 'ghost';\n pill?: boolean;\n block?: string;\n fullWidth?: boolean;\n}\n\nexport interface FieldProps extends BaseHTMLAttributes {\n ref?: Ref<FieldElement>;\n label?: string;\n inline?: boolean;\n}\n\nexport interface TooltipProps extends BaseHTMLAttributes {\n ref?: Ref<TooltipElement>;\n content?: string;\n placement?: string;\n delay?: number | string;\n}\n\nexport interface PopoverProps extends BaseHTMLAttributes {\n ref?: Ref<PopoverElement>;\n open?: boolean;\n placement?: string;\n}\n\nexport interface OriginProps extends BaseHTMLAttributes {\n ref?: Ref<OriginElement>;\n value?: string;\n disabled?: boolean;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioGroupProps extends BaseHTMLAttributes {\n ref?: Ref<RadioGroupElement>;\n value?: string;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\nexport interface RadioInputProps extends BaseHTMLAttributes {\n value?: string;\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport interface CurveProps extends BaseHTMLAttributes {\n ref?: Ref<CurveElement>;\n name?: string;\n easingType?: 'cubic-bezier' | 'linear';\n 'easing-type'?: 'cubic-bezier' | 'linear';\n showGrid?: boolean;\n 'show-grid'?: boolean;\n snapToGrid?: boolean;\n 'snap-to-grid'?: boolean;\n gridSize?: number | string;\n 'grid-size'?: number | string;\n}\n\nexport interface CodeProps extends BaseHTMLAttributes {\n language?: string;\n}\n\nexport interface MonitorProps extends BaseHTMLAttributes {}\n\nexport interface MonitorFpsProps extends BaseHTMLAttributes {\n interval?: number | string;\n}\n\nexport interface LogoLoaderProps extends BaseHTMLAttributes {\n intro?: 'wave' | 'particle';\n loading?: boolean;\n size?: number | string;\n}\n\nexport interface ColorPickerProps extends BaseHTMLAttributes {\n ref?: Ref<ColorInputElement>;\n value?: string;\n disabled?: boolean;\n onInput?: CustomEventHandler<ControlEventDetail<string>>;\n onChange?: CustomEventHandler<ControlEventDetail<string>>;\n}\n\n// Base interface for all icon components\nexport interface IconProps extends BaseHTMLAttributes {}\n\n// JSX IntrinsicElements\nexport interface EaseElements {\n // Layout & State\n 'ease-state': StateProps;\n 'ease-panel': PanelProps;\n 'ease-field': FieldProps;\n 'ease-popover': PopoverProps;\n 'ease-tooltip': TooltipProps;\n\n // Controls\n 'ease-slider': SliderProps;\n 'ease-toggle': ToggleProps;\n 'ease-checkbox': CheckboxProps;\n 'ease-input': InputProps;\n 'ease-number-input': NumberInputProps;\n 'ease-color-input': ColorInputProps;\n 'ease-color-picker': ColorPickerProps;\n 'ease-dropdown': DropdownProps;\n 'ease-button': ButtonProps;\n 'ease-origin': OriginProps;\n 'ease-radio-group': RadioGroupProps;\n 'ease-radio-input': RadioInputProps;\n\n // Advanced\n 'ease-curve': CurveProps;\n 'ease-code': CodeProps;\n\n // Display\n 'ease-monitor': MonitorProps;\n 'ease-monitor-fps': MonitorFpsProps;\n 'ease-logo-loader': LogoLoaderProps;\n\n // Icons - Interface\n 'ease-icon-anchor-add': IconProps;\n 'ease-icon-anchor-remove': IconProps;\n 'ease-icon-arrow-up': IconProps;\n 'ease-icon-arrows-vertical': IconProps;\n 'ease-icon-bezier': IconProps;\n 'ease-icon-bezier-angle': IconProps;\n 'ease-icon-bezier-distribute': IconProps;\n 'ease-icon-bezier-length': IconProps;\n 'ease-icon-bezier-mirror': IconProps;\n 'ease-icon-check': IconProps;\n 'ease-icon-circle-arrow-left': IconProps;\n 'ease-icon-circle-arrow-right': IconProps;\n 'ease-icon-code': IconProps;\n 'ease-icon-dots': IconProps;\n 'ease-icon-mention': IconProps;\n 'ease-icon-minus': IconProps;\n 'ease-icon-picker': IconProps;\n 'ease-icon-plus': IconProps;\n 'ease-icon-settings': IconProps;\n\n // Icons - Animation\n 'ease-icon-chevron': IconProps;\n 'ease-icon-clear': IconProps;\n 'ease-icon-grid': IconProps;\n 'ease-icon-loading': IconProps;\n 'ease-icon-snap': IconProps;\n}\n\n// Augment global JSX namespace\n// This provides type support in both React and non-React environments\ndeclare global {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's JSX namespace for React 17/18/19 (classic JSX transform)\ndeclare module 'react' {\n namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-runtime for React 17+ (new JSX transform)\n// This is required for Next.js App Router and other projects using the new transform\ndeclare module 'react/jsx-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Augment React's jsx-dev-runtime for development mode\ndeclare module 'react/jsx-dev-runtime' {\n export namespace JSX {\n interface IntrinsicElements extends EaseElements {}\n }\n}\n\n// Runtime marker to ensure this module is processed by TypeScript\n// This is needed because purely type-only modules may not trigger augmentation\nexport const __JSX_TYPES_LOADED__ = true;\n"],"mappings":";AAsaO,IAAMA,uBAAuB;","names":["__JSX_TYPES_LOADED__"]}
|