domma-js 0.55.0 → 0.57.0
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/assets/types/generated/public/assets/flags/africa.d.ts +6 -0
- package/assets/types/generated/public/assets/flags/americas.d.ts +6 -0
- package/assets/types/generated/public/assets/flags/asia.d.ts +6 -0
- package/assets/types/generated/public/assets/flags/europe.d.ts +9 -0
- package/assets/types/generated/public/assets/flags/index.d.ts +11 -0
- package/assets/types/generated/public/assets/flags/oceania.d.ts +2 -0
- package/assets/types/generated/public/assets/icons/buildings.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/code.d.ts +2 -0
- package/assets/types/generated/public/assets/icons/commerce.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/communication.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/devices.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/emojis.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/files.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/finance.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/forms.d.ts +5 -0
- package/assets/types/generated/public/assets/icons/health.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/index.d.ts +24 -0
- package/assets/types/generated/public/assets/icons/media.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/navigation.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/seasonal.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/social.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/sport.d.ts +6 -0
- package/assets/types/generated/public/assets/icons/status.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/transport.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/ui.d.ts +7 -0
- package/assets/types/generated/public/assets/icons/weather.d.ts +6 -0
- package/assets/types/generated/src/auth.d.ts +424 -0
- package/assets/types/generated/src/avatar.d.ts +270 -0
- package/assets/types/generated/src/binding-source.d.ts +58 -0
- package/assets/types/generated/src/butterfly-drawing.d.ts +2 -0
- package/assets/types/generated/src/component-factory.d.ts +150 -0
- package/assets/types/generated/src/component.d.ts +162 -0
- package/assets/types/generated/src/components/back-to-top.d.ts +150 -0
- package/assets/types/generated/src/components/badge.d.ts +208 -0
- package/assets/types/generated/src/components/card.d.ts +189 -0
- package/assets/types/generated/src/components/command-palette.d.ts +352 -0
- package/assets/types/generated/src/components/dropzone.d.ts +342 -0
- package/assets/types/generated/src/components/focus-trap.d.ts +238 -0
- package/assets/types/generated/src/components/loader.d.ts +133 -0
- package/assets/types/generated/src/components/modal.d.ts +341 -0
- package/assets/types/generated/src/components/range-slider.d.ts +267 -0
- package/assets/types/generated/src/components/shared.d.ts +91 -0
- package/assets/types/generated/src/components/split-pane.d.ts +239 -0
- package/assets/types/generated/src/components/toast.d.ts +284 -0
- package/assets/types/generated/src/components/tooltip.d.ts +200 -0
- package/assets/types/generated/src/components/virtual-list.d.ts +340 -0
- package/assets/types/generated/src/config.d.ts +193 -0
- package/assets/types/generated/src/context-cursor.d.ts +69 -0
- package/assets/types/generated/src/context-menu.d.ts +596 -0
- package/assets/types/generated/src/dates.d.ts +367 -0
- package/assets/types/generated/src/dom.d.ts +1221 -0
- package/assets/types/generated/src/effects.d.ts +1281 -0
- package/assets/types/generated/src/elements.d.ts +4996 -0
- package/assets/types/generated/src/escape.d.ts +5 -0
- package/assets/types/generated/src/flags-bundle.d.ts +4 -0
- package/assets/types/generated/src/flags.d.ts +338 -0
- package/assets/types/generated/src/forms.d.ts +1060 -0
- package/assets/types/generated/src/globals.d.ts +45 -0
- package/assets/types/generated/src/http.d.ts +131 -0
- package/assets/types/generated/src/i18n.d.ts +261 -0
- package/assets/types/generated/src/icons.d.ts +213 -0
- package/assets/types/generated/src/index.d.ts +249 -0
- package/assets/types/generated/src/input-group.d.ts +135 -0
- package/assets/types/generated/src/models.d.ts +968 -0
- package/assets/types/generated/src/popover.d.ts +412 -0
- package/assets/types/generated/src/router.d.ts +344 -0
- package/assets/types/generated/src/safe-url.d.ts +10 -0
- package/assets/types/generated/src/sanitize.d.ts +97 -0
- package/assets/types/generated/src/schema-builder.d.ts +420 -0
- package/assets/types/generated/src/skeleton.d.ts +135 -0
- package/assets/types/generated/src/smooth-caret.d.ts +61 -0
- package/assets/types/generated/src/sortable.d.ts +369 -0
- package/assets/types/generated/src/storage.d.ts +93 -0
- package/assets/types/generated/src/tables.d.ts +901 -0
- package/assets/types/generated/src/theme.d.ts +277 -0
- package/assets/types/generated/src/ticker-tape-drawing.d.ts +2 -0
- package/assets/types/generated/src/treeview.d.ts +504 -0
- package/assets/types/generated/src/utils.d.ts +1667 -0
- package/assets/types/generated/src/web-components/base/domma-element.d.ts +134 -0
- package/assets/types/generated/src/web-components/index.d.ts +14 -0
- package/assets/types/generated/vendor/domma-reactive.d.ts +587 -0
- package/assets/types/index.d.ts +104 -216
- package/package.json +5 -2
- package/public/dist/bundles/domma-complete.css +1084 -14
- package/public/dist/bundles/domma-data-focused.css +1084 -14
- package/public/dist/bundles/domma-essentials.css +1084 -14
- package/public/dist/bundles/domma-full.css +1084 -14
- package/public/dist/bundles/domma-minimal.css +8 -8
- package/public/dist/domma-flags.esm.js +3 -3
- package/public/dist/domma-flags.esm.js.map +1 -1
- package/public/dist/domma-flags.min.js +3 -3
- package/public/dist/domma-flags.min.js.map +1 -1
- package/public/dist/domma-syntax.min.js +3 -3
- package/public/dist/domma.css +3 -3
- package/public/dist/domma.esm.js +5 -5
- package/public/dist/domma.esm.js.map +1 -1
- package/public/dist/domma.min.js +5 -5
- package/public/dist/domma.min.js.map +1 -1
- package/public/dist/elements.css +1073 -3
- package/public/dist/grid.css +3 -3
- package/public/dist/syntax.css +3 -3
- package/public/dist/themes/domma-themes.css +3 -3
- package/templates/kickstart/frontend/types/domma.d.ts +2 -1
- package/assets/types/config.d.ts +0 -136
- package/assets/types/dates.d.ts +0 -209
- package/assets/types/dom.d.ts +0 -448
- package/assets/types/elements.d.ts +0 -682
- package/assets/types/flags.d.ts +0 -130
- package/assets/types/http.d.ts +0 -97
- package/assets/types/icons.d.ts +0 -147
- package/assets/types/models.d.ts +0 -260
- package/assets/types/smooth-caret.d.ts +0 -12
- package/assets/types/storage.d.ts +0 -93
- package/assets/types/tables.d.ts +0 -327
- package/assets/types/theme.d.ts +0 -137
- package/assets/types/utils.d.ts +0 -675
package/assets/types/flags.d.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domma Flags Module - TypeScript Declarations
|
|
3
|
-
* Nation flags as inline SVG, keyed by ISO 3166-1 alpha-2 code.
|
|
4
|
-
*
|
|
5
|
-
* Opt-in module: load domma-flags.min.js after domma.min.js.
|
|
6
|
-
* Exposes the FL global and Domma.flags / Domma.FL.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export type FlagRegion = 'europe' | 'americas' | 'africa' | 'asia' | 'oceania' | string;
|
|
10
|
-
|
|
11
|
-
export type FlagShape = 'rect' | 'rounded' | 'square' | 'circle';
|
|
12
|
-
|
|
13
|
-
/** A single overlay primitive used to compose a flag. */
|
|
14
|
-
export interface FlagOverlay {
|
|
15
|
-
type: 'rect' | 'circle' | 'ellipse' | 'line' | 'path' | 'star' | 'crescent' | 'group';
|
|
16
|
-
fill?: string;
|
|
17
|
-
stroke?: string;
|
|
18
|
-
strokeWidth?: number;
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** A flag definition - either raw SVG markup or a compact descriptor. */
|
|
23
|
-
export interface FlagDefinition {
|
|
24
|
-
/** Country name */
|
|
25
|
-
name: string;
|
|
26
|
-
/** Region group (defaults to 'custom' when registered) */
|
|
27
|
-
region?: FlagRegion;
|
|
28
|
-
/** Raw inner SVG markup (60×40 canvas) */
|
|
29
|
-
svg?: string;
|
|
30
|
-
/** Solid background colour */
|
|
31
|
-
bg?: string;
|
|
32
|
-
/** Stripe descriptor */
|
|
33
|
-
stripes?: {
|
|
34
|
-
dir?: 'h' | 'v';
|
|
35
|
-
colors: string[];
|
|
36
|
-
weights?: number[];
|
|
37
|
-
};
|
|
38
|
-
/** Nordic (offset) cross descriptor */
|
|
39
|
-
cross?: {
|
|
40
|
-
bg: string;
|
|
41
|
-
colour: string;
|
|
42
|
-
border?: string;
|
|
43
|
-
thickness?: number;
|
|
44
|
-
};
|
|
45
|
-
/** Overlay primitives drawn on top */
|
|
46
|
-
overlays?: FlagOverlay[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** Options for rendering a flag. */
|
|
50
|
-
export interface FlagRenderOptions {
|
|
51
|
-
/** Height in px; width follows the 3:2 aspect (default 24) */
|
|
52
|
-
size?: number;
|
|
53
|
-
/** Explicit width override */
|
|
54
|
-
width?: number;
|
|
55
|
-
/** Explicit height override */
|
|
56
|
-
height?: number;
|
|
57
|
-
/** Output shape (default 'rect') */
|
|
58
|
-
shape?: FlagShape;
|
|
59
|
-
/** Add a hairline border; pass a colour string to customise */
|
|
60
|
-
border?: boolean | string;
|
|
61
|
-
/** Extra CSS classes */
|
|
62
|
-
class?: string;
|
|
63
|
-
/** Accessible title (defaults to the country name) */
|
|
64
|
-
title?: string;
|
|
65
|
-
/** Additional SVG attributes */
|
|
66
|
-
attrs?: Record<string, string>;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface FlagInjectOptions extends FlagRenderOptions {
|
|
70
|
-
/** Where to place the flag relative to the target (default 'prepend') */
|
|
71
|
-
position?: 'prepend' | 'append' | 'replace';
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface FlagRegionMeta {
|
|
75
|
-
name: string;
|
|
76
|
-
description?: string;
|
|
77
|
-
codes: string[];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** The flag registry (FL / Domma.flags). */
|
|
81
|
-
export interface Flags {
|
|
82
|
-
/** Render a flag as an SVG element. */
|
|
83
|
-
render(code: string, options?: FlagRenderOptions): SVGElement | null;
|
|
84
|
-
|
|
85
|
-
/** Get a flag as an HTML string. */
|
|
86
|
-
html(code: string, options?: FlagRenderOptions): string;
|
|
87
|
-
|
|
88
|
-
/** Inject a flag into a target element or selector. */
|
|
89
|
-
inject(target: string | HTMLElement, code: string, options?: FlagInjectOptions): SVGElement | null;
|
|
90
|
-
|
|
91
|
-
/** Replace all [data-flag] elements within a container with SVGs. */
|
|
92
|
-
scan(container?: HTMLElement | string): number;
|
|
93
|
-
|
|
94
|
-
/** Register (or override) a flag. */
|
|
95
|
-
register(code: string, definition: FlagDefinition): Flags;
|
|
96
|
-
|
|
97
|
-
/** Remove a registered flag. */
|
|
98
|
-
unregister(code: string): boolean;
|
|
99
|
-
|
|
100
|
-
/** Whether a flag exists. */
|
|
101
|
-
has(code: string): boolean;
|
|
102
|
-
|
|
103
|
-
/** Get a flag definition. */
|
|
104
|
-
get(code: string): FlagDefinition | null;
|
|
105
|
-
|
|
106
|
-
/** Get the country name for a code. */
|
|
107
|
-
name(code: string): string | null;
|
|
108
|
-
|
|
109
|
-
/** List flag codes, optionally filtered by region. */
|
|
110
|
-
list(region?: FlagRegion): string[];
|
|
111
|
-
|
|
112
|
-
/** List all regions with metadata. */
|
|
113
|
-
listRegions(): Record<string, FlagRegionMeta>;
|
|
114
|
-
|
|
115
|
-
/** Total number of flags. */
|
|
116
|
-
count(): number;
|
|
117
|
-
|
|
118
|
-
/** Search flags by code or country name. */
|
|
119
|
-
search(query: string): string[];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export const flags: Flags;
|
|
123
|
-
|
|
124
|
-
declare global {
|
|
125
|
-
/**
|
|
126
|
-
* FL - Domma Flags (opt-in module)
|
|
127
|
-
* Nation flags as inline SVG, keyed by ISO 3166-1 alpha-2 code.
|
|
128
|
-
*/
|
|
129
|
-
const FL: Flags;
|
|
130
|
-
}
|
package/assets/types/http.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domma HTTP Module - TypeScript Declarations
|
|
3
|
-
* Fetch-based HTTP client
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface RequestOptions extends Omit<RequestInit, 'body'> {
|
|
7
|
-
/** Request body - will be JSON.stringify'd if object */
|
|
8
|
-
body?: any;
|
|
9
|
-
/** Request headers */
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
/** Request timeout in ms */
|
|
12
|
-
timeout?: number;
|
|
13
|
-
/** Base URL to prepend */
|
|
14
|
-
baseUrl?: string;
|
|
15
|
-
/** Query parameters */
|
|
16
|
-
params?: Record<string, string | number | boolean>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface HttpResponse<T = any> {
|
|
20
|
-
/** Response data */
|
|
21
|
-
data: T;
|
|
22
|
-
/** HTTP status code */
|
|
23
|
-
status: number;
|
|
24
|
-
/** Status text */
|
|
25
|
-
statusText: string;
|
|
26
|
-
/** Response headers */
|
|
27
|
-
headers: Headers;
|
|
28
|
-
/** Original response object */
|
|
29
|
-
response: Response;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface Http {
|
|
33
|
-
/**
|
|
34
|
-
* Make a generic HTTP request
|
|
35
|
-
* @param url - Request URL
|
|
36
|
-
* @param options - Request options
|
|
37
|
-
* @returns Promise resolving to response data
|
|
38
|
-
*/
|
|
39
|
-
request<T = any>(url: string, options?: RequestOptions): Promise<T>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Make a GET request
|
|
43
|
-
* @param url - Request URL
|
|
44
|
-
* @param options - Request options
|
|
45
|
-
* @returns Promise resolving to response data
|
|
46
|
-
*/
|
|
47
|
-
get<T = any>(url: string, options?: RequestOptions): Promise<T>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Make a POST request
|
|
51
|
-
* @param url - Request URL
|
|
52
|
-
* @param data - Request body data
|
|
53
|
-
* @param options - Request options
|
|
54
|
-
* @returns Promise resolving to response data
|
|
55
|
-
*/
|
|
56
|
-
post<T = any>(url: string, data?: any, options?: RequestOptions): Promise<T>;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Make a PUT request
|
|
60
|
-
* @param url - Request URL
|
|
61
|
-
* @param data - Request body data
|
|
62
|
-
* @param options - Request options
|
|
63
|
-
* @returns Promise resolving to response data
|
|
64
|
-
*/
|
|
65
|
-
put<T = any>(url: string, data?: any, options?: RequestOptions): Promise<T>;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Make a PATCH request
|
|
69
|
-
* @param url - Request URL
|
|
70
|
-
* @param data - Request body data
|
|
71
|
-
* @param options - Request options
|
|
72
|
-
* @returns Promise resolving to response data
|
|
73
|
-
*/
|
|
74
|
-
patch<T = any>(url: string, data?: any, options?: RequestOptions): Promise<T>;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Make a DELETE request
|
|
78
|
-
* @param url - Request URL
|
|
79
|
-
* @param options - Request options
|
|
80
|
-
* @returns Promise resolving to response data
|
|
81
|
-
*/
|
|
82
|
-
delete<T = any>(url: string, options?: RequestOptions): Promise<T>;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Set default options for all requests
|
|
86
|
-
* @param options - Default options to apply
|
|
87
|
-
*/
|
|
88
|
-
setDefaults(options: RequestOptions): void;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Get current default options
|
|
92
|
-
* @returns Default options object
|
|
93
|
-
*/
|
|
94
|
-
getDefaults(): RequestOptions;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export declare const http: Http;
|
package/assets/types/icons.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domma Icons Module - TypeScript Declarations
|
|
3
|
-
* SVG icon library with categories and rendering
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type IconCategory =
|
|
7
|
-
| 'ui'
|
|
8
|
-
| 'navigation'
|
|
9
|
-
| 'media'
|
|
10
|
-
| 'communication'
|
|
11
|
-
| 'files'
|
|
12
|
-
| 'social'
|
|
13
|
-
| 'status'
|
|
14
|
-
| 'commerce';
|
|
15
|
-
|
|
16
|
-
export interface IconDefinition {
|
|
17
|
-
/** SVG path or full SVG content */
|
|
18
|
-
svg: string;
|
|
19
|
-
/** Icon category */
|
|
20
|
-
category?: IconCategory;
|
|
21
|
-
/** Icon tags for search */
|
|
22
|
-
tags?: string[];
|
|
23
|
-
/** ViewBox dimensions */
|
|
24
|
-
viewBox?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface RenderOptions {
|
|
28
|
-
/** Icon size in pixels or CSS value */
|
|
29
|
-
size?: number | string;
|
|
30
|
-
/** Icon colour */
|
|
31
|
-
color?: string;
|
|
32
|
-
/** Additional CSS class */
|
|
33
|
-
className?: string;
|
|
34
|
-
/** Additional inline styles */
|
|
35
|
-
style?: Record<string, string>;
|
|
36
|
-
/** Accessible label */
|
|
37
|
-
ariaLabel?: string;
|
|
38
|
-
/** Custom attributes */
|
|
39
|
-
attrs?: Record<string, string>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface Icons {
|
|
43
|
-
/**
|
|
44
|
-
* Render an icon as an SVG element
|
|
45
|
-
* @param name - Icon name
|
|
46
|
-
* @param options - Render options
|
|
47
|
-
* @returns SVG element or null if not found
|
|
48
|
-
*/
|
|
49
|
-
render(name: string, options?: RenderOptions): SVGElement | null;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Get icon as HTML string
|
|
53
|
-
* @param name - Icon name
|
|
54
|
-
* @param options - Render options
|
|
55
|
-
* @returns SVG HTML string or empty string if not found
|
|
56
|
-
*/
|
|
57
|
-
html(name: string, options?: RenderOptions): string;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Inject icon into a DOM element
|
|
61
|
-
* @param selector - Target element selector or element
|
|
62
|
-
* @param name - Icon name
|
|
63
|
-
* @param options - Render options
|
|
64
|
-
* @returns The target element or null
|
|
65
|
-
*/
|
|
66
|
-
inject(selector: string | HTMLElement, name: string, options?: RenderOptions): HTMLElement | null;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Scan DOM for icon placeholders and inject icons
|
|
70
|
-
* @param container - Container to scan (default: document)
|
|
71
|
-
* @param attribute - Data attribute to look for (default: 'data-icon')
|
|
72
|
-
* @returns Number of icons injected
|
|
73
|
-
*/
|
|
74
|
-
scan(container?: HTMLElement | Document, attribute?: string): number;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Register a custom icon
|
|
78
|
-
* @param name - Icon name
|
|
79
|
-
* @param definition - Icon definition (SVG string or full definition)
|
|
80
|
-
*/
|
|
81
|
-
register(name: string, definition: string | IconDefinition): void;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Unregister an icon
|
|
85
|
-
* @param name - Icon name
|
|
86
|
-
* @returns true if icon was removed
|
|
87
|
-
*/
|
|
88
|
-
unregister(name: string): boolean;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Check if an icon exists
|
|
92
|
-
* @param name - Icon name
|
|
93
|
-
* @returns true if icon exists
|
|
94
|
-
*/
|
|
95
|
-
has(name: string): boolean;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Get icon definition
|
|
99
|
-
* @param name - Icon name
|
|
100
|
-
* @returns Icon definition or undefined
|
|
101
|
-
*/
|
|
102
|
-
get(name: string): IconDefinition | undefined;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* List all icon names
|
|
106
|
-
* @param category - Optional category filter
|
|
107
|
-
* @returns Array of icon names
|
|
108
|
-
*/
|
|
109
|
-
list(category?: IconCategory): string[];
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* List all categories
|
|
113
|
-
* @returns Array of category names
|
|
114
|
-
*/
|
|
115
|
-
listCategories(): IconCategory[];
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Get total icon count
|
|
119
|
-
* @param category - Optional category filter
|
|
120
|
-
* @returns Number of icons
|
|
121
|
-
*/
|
|
122
|
-
count(category?: IconCategory): number;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Search icons by name or tags
|
|
126
|
-
* @param query - Search query
|
|
127
|
-
* @returns Array of matching icon names
|
|
128
|
-
*/
|
|
129
|
-
search(query: string): string[];
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Create an SVG sprite sheet
|
|
133
|
-
* @param icons - Array of icon names (default: all icons)
|
|
134
|
-
* @returns SVG sprite element
|
|
135
|
-
*/
|
|
136
|
-
createSprite(icons?: string[]): SVGElement;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Use an icon from a sprite sheet
|
|
140
|
-
* @param name - Icon name
|
|
141
|
-
* @param options - Render options
|
|
142
|
-
* @returns SVG use element HTML string
|
|
143
|
-
*/
|
|
144
|
-
use(name: string, options?: RenderOptions): string;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export declare const icons: Icons;
|
package/assets/types/models.d.ts
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domma Models Module - TypeScript Declarations
|
|
3
|
-
* Pub/Sub events and reactive data binding
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type TypeValidator = (value: any) => boolean;
|
|
7
|
-
|
|
8
|
-
export interface FieldDefinition {
|
|
9
|
-
type?: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'any';
|
|
10
|
-
default?: any;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
min?: number;
|
|
13
|
-
max?: number;
|
|
14
|
-
minLength?: number;
|
|
15
|
-
maxLength?: number;
|
|
16
|
-
pattern?: RegExp;
|
|
17
|
-
validate?: (value: any) => boolean | string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface Schema {
|
|
21
|
-
[field: string]: FieldDefinition;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ValidationResult {
|
|
25
|
-
valid: boolean;
|
|
26
|
-
errors: Array<{ field: string; error: string }>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface ModelOptions {
|
|
30
|
-
persist?: string;
|
|
31
|
-
autoSave?: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface ChangeEvent {
|
|
35
|
-
field: string;
|
|
36
|
-
newValue: any;
|
|
37
|
-
oldValue: any;
|
|
38
|
-
model: Model;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type ChangeCallback = (event: ChangeEvent) => void;
|
|
42
|
-
export type FieldChangeCallback = (newValue: any, oldValue: any, model: Model) => void;
|
|
43
|
-
export type UnsubscribeFn = () => void;
|
|
44
|
-
|
|
45
|
-
export interface BindingOptions {
|
|
46
|
-
format?: (value: any) => any;
|
|
47
|
-
parse?: (value: any) => any;
|
|
48
|
-
twoWay?: boolean;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* A lazily-evaluated, dependency-tracked derived value.
|
|
53
|
-
*/
|
|
54
|
-
export interface ComputedRef<T = any> {
|
|
55
|
-
/** Current value, recomputing only if a dependency changed. */
|
|
56
|
-
get(): T;
|
|
57
|
-
|
|
58
|
-
/** Current value without registering a dependency on the caller. */
|
|
59
|
-
peek(): T;
|
|
60
|
-
|
|
61
|
-
/** Unlink from the dependency graph. */
|
|
62
|
-
dispose(): void;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface ComputedOptions<T = any> {
|
|
66
|
-
/** Debug label used in console warnings. */
|
|
67
|
-
label?: string;
|
|
68
|
-
|
|
69
|
-
/** Called with the new value whenever it changes. */
|
|
70
|
-
onChange?: (value: T) => void;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface EffectOptions {
|
|
74
|
-
/** Debug label used in console warnings. */
|
|
75
|
-
label?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Reactive Model class
|
|
80
|
-
*/
|
|
81
|
-
export declare class Model {
|
|
82
|
-
constructor(schema: Schema, data?: Record<string, any>, options?: ModelOptions);
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Get field value or all data.
|
|
86
|
-
* Reads inside a computed or effect are tracked as dependencies.
|
|
87
|
-
*/
|
|
88
|
-
get(): Record<string, any>;
|
|
89
|
-
get(field: string): any;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Read-tracked, write-through view of the model's data.
|
|
93
|
-
* Property reads register a dependency; writes route through set(),
|
|
94
|
-
* preserving validation, change notification and persistence.
|
|
95
|
-
*/
|
|
96
|
-
tracked(): Record<string, any>;
|
|
97
|
-
|
|
98
|
-
/** Set field value(s) */
|
|
99
|
-
set(field: string, value: any): Model;
|
|
100
|
-
set(data: Record<string, any>): Model;
|
|
101
|
-
|
|
102
|
-
/** Validate all fields */
|
|
103
|
-
validate(): ValidationResult;
|
|
104
|
-
|
|
105
|
-
/** Get model data as JSON */
|
|
106
|
-
toJSON(): Record<string, any>;
|
|
107
|
-
|
|
108
|
-
/** Subscribe to any change; callback receives {field, newValue, oldValue, model} */
|
|
109
|
-
onChange(callback: ChangeCallback): UnsubscribeFn;
|
|
110
|
-
|
|
111
|
-
/** Subscribe to changes on a single field; callback receives the same change object */
|
|
112
|
-
onChange(field: string, callback: ChangeCallback): UnsubscribeFn;
|
|
113
|
-
|
|
114
|
-
/** Subscribe to specific field change */
|
|
115
|
-
onFieldChange(field: string, callback: FieldChangeCallback): UnsubscribeFn;
|
|
116
|
-
|
|
117
|
-
/** Reset model to initial data */
|
|
118
|
-
reset(clearStorage?: boolean): Model;
|
|
119
|
-
|
|
120
|
-
/** Destroy model and cleanup */
|
|
121
|
-
destroy(clearStorage?: boolean): void;
|
|
122
|
-
|
|
123
|
-
// Persistence Methods
|
|
124
|
-
|
|
125
|
-
/** Manually save model to localStorage */
|
|
126
|
-
save(): boolean;
|
|
127
|
-
|
|
128
|
-
/** Manually load model from localStorage */
|
|
129
|
-
load(): boolean;
|
|
130
|
-
|
|
131
|
-
/** Clear persisted data from localStorage */
|
|
132
|
-
clearStorage(): boolean;
|
|
133
|
-
|
|
134
|
-
/** Get the persistence key */
|
|
135
|
-
getPersistKey(): string | null;
|
|
136
|
-
|
|
137
|
-
/** Check if model is persisted */
|
|
138
|
-
isPersisted(): boolean;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface Store {
|
|
142
|
-
/** Get current state */
|
|
143
|
-
getState(): Record<string, any>;
|
|
144
|
-
|
|
145
|
-
/** Update state with partial updates */
|
|
146
|
-
setState(updates: Record<string, any>): void;
|
|
147
|
-
|
|
148
|
-
/** Subscribe to state changes */
|
|
149
|
-
subscribe(listener: (state: Record<string, any>, oldState: Record<string, any>) => void): UnsubscribeFn;
|
|
150
|
-
|
|
151
|
-
/** Reset state to initial or new state */
|
|
152
|
-
reset(newState?: Record<string, any>): void;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface TypeValidators {
|
|
156
|
-
string: TypeValidator;
|
|
157
|
-
number: TypeValidator;
|
|
158
|
-
boolean: TypeValidator;
|
|
159
|
-
array: TypeValidator;
|
|
160
|
-
object: TypeValidator;
|
|
161
|
-
date: TypeValidator;
|
|
162
|
-
any: TypeValidator;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface Models {
|
|
166
|
-
// ============================================
|
|
167
|
-
// Pub/Sub Event System
|
|
168
|
-
// ============================================
|
|
169
|
-
|
|
170
|
-
/** Subscribe to an event */
|
|
171
|
-
subscribe(event: string, callback: (data: any) => void): UnsubscribeFn;
|
|
172
|
-
|
|
173
|
-
/** Alias for subscribe */
|
|
174
|
-
on(event: string, callback: (data: any) => void): UnsubscribeFn;
|
|
175
|
-
|
|
176
|
-
/** Unsubscribe from an event */
|
|
177
|
-
unsubscribe(event: string, callback: (data: any) => void): void;
|
|
178
|
-
|
|
179
|
-
/** Alias for unsubscribe */
|
|
180
|
-
off(event: string, callback: (data: any) => void): void;
|
|
181
|
-
|
|
182
|
-
/** Publish an event */
|
|
183
|
-
publish(event: string, data?: any): void;
|
|
184
|
-
|
|
185
|
-
/** Alias for publish */
|
|
186
|
-
emit(event: string, data?: any): void;
|
|
187
|
-
|
|
188
|
-
/** Subscribe to an event once */
|
|
189
|
-
once(event: string, callback: (data: any) => void): UnsubscribeFn;
|
|
190
|
-
|
|
191
|
-
/** Clear event listeners */
|
|
192
|
-
clear(event?: string): void;
|
|
193
|
-
|
|
194
|
-
// ============================================
|
|
195
|
-
// Model Creation
|
|
196
|
-
// ============================================
|
|
197
|
-
|
|
198
|
-
/** Create a new reactive model */
|
|
199
|
-
create(schema: Schema, initialData?: Record<string, any>, options?: ModelOptions): Model;
|
|
200
|
-
|
|
201
|
-
/** Extend a blueprint with additional fields */
|
|
202
|
-
extend(...blueprints: Schema[]): Schema;
|
|
203
|
-
|
|
204
|
-
/** Pick specific fields from a blueprint */
|
|
205
|
-
pick(blueprint: Schema, fields: string[]): Schema;
|
|
206
|
-
|
|
207
|
-
/** Omit specific fields from a blueprint */
|
|
208
|
-
omit(blueprint: Schema, fields: string[]): Schema;
|
|
209
|
-
|
|
210
|
-
// ============================================
|
|
211
|
-
// Dependency-Tracked Reactivity
|
|
212
|
-
// ============================================
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Create a lazily-evaluated derived value that tracks whatever it reads.
|
|
216
|
-
* The body must be synchronous - tracking stops at the first `await`.
|
|
217
|
-
*/
|
|
218
|
-
computed<T = any>(fn: () => T, options?: ComputedOptions<T>): ComputedRef<T>;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Run a function now, and again whenever any field it read changes.
|
|
222
|
-
* Re-runs are batched into a single microtask flush.
|
|
223
|
-
* Returns a function that stops the effect.
|
|
224
|
-
*/
|
|
225
|
-
effect(fn: () => void, options?: EffectOptions): UnsubscribeFn;
|
|
226
|
-
|
|
227
|
-
/** Read values without registering them as dependencies. */
|
|
228
|
-
untracked<T = any>(fn: () => T): T;
|
|
229
|
-
|
|
230
|
-
/** Settle pending reactive work immediately instead of on the microtask. */
|
|
231
|
-
flush(): void;
|
|
232
|
-
|
|
233
|
-
// ============================================
|
|
234
|
-
// Type Validators
|
|
235
|
-
// ============================================
|
|
236
|
-
|
|
237
|
-
types: TypeValidators;
|
|
238
|
-
|
|
239
|
-
// ============================================
|
|
240
|
-
// DOM Binding
|
|
241
|
-
// ============================================
|
|
242
|
-
|
|
243
|
-
/** Bind a model field to DOM element(s) */
|
|
244
|
-
bind(model: Model, field: string, selector: string | HTMLElement, options?: BindingOptions): UnsubscribeFn;
|
|
245
|
-
|
|
246
|
-
// ============================================
|
|
247
|
-
// Store (Simple State Management)
|
|
248
|
-
// ============================================
|
|
249
|
-
|
|
250
|
-
/** Get or create a named store */
|
|
251
|
-
store(name: string, initialState?: Record<string, any>): Store;
|
|
252
|
-
|
|
253
|
-
/** Get an existing store */
|
|
254
|
-
getStore(name: string): Store | undefined;
|
|
255
|
-
|
|
256
|
-
/** Remove a store */
|
|
257
|
-
removeStore(name: string): void;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export declare const models: Models;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type CaretPreference = 'auto' | 'smooth' | 'native';
|
|
2
|
-
export interface SmoothCaretHandle {
|
|
3
|
-
refresh(): void;
|
|
4
|
-
destroy(): void;
|
|
5
|
-
}
|
|
6
|
-
export interface SmoothCaret {
|
|
7
|
-
attach(element: HTMLInputElement | HTMLTextAreaElement | HTMLElement): SmoothCaretHandle;
|
|
8
|
-
install(root?: Document | HTMLElement | ShadowRoot): {destroy(): void};
|
|
9
|
-
getPreference(): CaretPreference;
|
|
10
|
-
setPreference(value: CaretPreference): void;
|
|
11
|
-
}
|
|
12
|
-
export declare const smoothCaret: SmoothCaret;
|