domma-js 0.56.0 → 0.58.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/README.md +2 -2
- 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 +339 -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 +4994 -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 +413 -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 +368 -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 +262 -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 -226
- package/package.json +5 -2
- package/public/dist/bundles/domma-complete.css +20 -14
- package/public/dist/bundles/domma-data-focused.css +20 -14
- package/public/dist/bundles/domma-essentials.css +20 -14
- package/public/dist/bundles/domma-full.css +20 -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 +9 -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/.claude/snippets.md +1 -1
- package/templates/kickstart/CLAUDE.md +1 -1
- package/templates/kickstart/frontend/types/domma.d.ts +7 -4
- package/templates/kickstart-spa/.claude/snippets.md +1 -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 -1168
- package/assets/types/flags.d.ts +0 -130
- package/assets/types/http.d.ts +0 -97
- package/assets/types/i18n.d.ts +0 -99
- 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/i18n.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domma i18n Module - TypeScript Declarations
|
|
3
|
-
* Translations, plurals and Intl formatting: `Domma.i18n`, plus `Domma.t()`.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/** A plural message: chosen by `params.count`; `=N` keys match exactly, `zero` matches 0. */
|
|
7
|
-
export interface I18nPluralForms {
|
|
8
|
-
zero?: string;
|
|
9
|
-
one?: string;
|
|
10
|
-
two?: string;
|
|
11
|
-
few?: string;
|
|
12
|
-
many?: string;
|
|
13
|
-
other: string;
|
|
14
|
-
/** Use ordinal rules (1st, 2nd, 3rd...) */
|
|
15
|
-
ordinal?: boolean;
|
|
16
|
-
[exact: `=${number}`]: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** A select message: `select` names the param whose value picks the form; `other` otherwise. */
|
|
20
|
-
export interface I18nSelectForms {
|
|
21
|
-
select: string;
|
|
22
|
-
other: string;
|
|
23
|
-
[value: string]: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** Nested message tree; nesting becomes dot keys. */
|
|
27
|
-
export interface I18nMessages {
|
|
28
|
-
[key: string]: string | number | boolean | I18nPluralForms | I18nSelectForms | I18nMessages;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface I18nTranslateOptions {
|
|
32
|
-
/** Translate in this locale instead of the current one */
|
|
33
|
-
locale?: string;
|
|
34
|
-
/** Returned (interpolated) when the key is missing, instead of the key */
|
|
35
|
-
default?: string;
|
|
36
|
-
/** Choose plural forms by ordinal rules */
|
|
37
|
-
ordinal?: boolean;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface I18nDetectOptions {
|
|
41
|
-
/** Sources in order. Default ['storage', 'navigator', 'html'] */
|
|
42
|
-
from?: Array<'storage' | 'navigator' | 'html'>;
|
|
43
|
-
/** S key: read in 'storage', and every later locale(code) is saved there */
|
|
44
|
-
storageKey?: string;
|
|
45
|
-
/** Only these locales (or their base language) are accepted */
|
|
46
|
-
supported?: string[];
|
|
47
|
-
/** Used when nothing matches (else the current locale stays) */
|
|
48
|
-
fallback?: string;
|
|
49
|
-
/** Set the found locale (default true) */
|
|
50
|
-
apply?: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface I18nChangeDetail { locale: string; previous: string; }
|
|
54
|
-
export interface I18nMissingDetail { key: string; locale: string; }
|
|
55
|
-
export interface I18nLoadedDetail { locale: string; messages: I18nMessages; }
|
|
56
|
-
|
|
57
|
-
type WithLocale<T> = T & { locale?: string };
|
|
58
|
-
|
|
59
|
-
export interface I18n {
|
|
60
|
-
/** Add (merge) messages for a locale */
|
|
61
|
-
add(locale: string, messages: I18nMessages): I18n;
|
|
62
|
-
/** Load JSON via H.get (`{locale}` in the URL is replaced) or a loader. Cached and deduped. */
|
|
63
|
-
load(locale: string, source: string | ((locale: string) => Promise<I18nMessages> | I18nMessages), options?: { reload?: boolean }): Promise<I18nMessages>;
|
|
64
|
-
/** Current locale */
|
|
65
|
-
locale(): string;
|
|
66
|
-
/** Set the locale: fires change, sets <html lang dir>, re-translates the document */
|
|
67
|
-
locale(code: string): string;
|
|
68
|
-
/** Fallback locales searched after the current one */
|
|
69
|
-
fallback(codes?: string | string[]): string[];
|
|
70
|
-
has(key: string, options?: { locale?: string }): boolean;
|
|
71
|
-
/** Plain text: params are not escaped */
|
|
72
|
-
t(key: string, params?: Record<string, any> | null, options?: I18nTranslateOptions): string;
|
|
73
|
-
/** HTML: the message's markup is kept, params are escaped */
|
|
74
|
-
html(key: string, params?: Record<string, any> | null, options?: I18nTranslateOptions): string;
|
|
75
|
-
/** Hook for a missing key; a returned string is used as the translation */
|
|
76
|
-
onMissing(fn: ((key: string, locale: string) => string | void) | null): I18n;
|
|
77
|
-
on(event: 'change', fn: (detail: I18nChangeDetail) => void): () => void;
|
|
78
|
-
on(event: 'missing', fn: (detail: I18nMissingDetail) => void): () => void;
|
|
79
|
-
on(event: 'loaded', fn: (detail: I18nLoadedDetail) => void): () => void;
|
|
80
|
-
off(event: 'change' | 'missing' | 'loaded', fn?: (...args: any[]) => void): I18n;
|
|
81
|
-
/** Locales that have messages */
|
|
82
|
-
locales(): string[];
|
|
83
|
-
/** Text direction of a locale (default: the current one) */
|
|
84
|
-
dir(code?: string): 'rtl' | 'ltr';
|
|
85
|
-
/** Fill [data-i18n], [data-i18n-html] (sanitised) and [data-i18n-attr] under root */
|
|
86
|
-
translate(root?: Element | Document | string | ArrayLike<Element>): number;
|
|
87
|
-
/** Pick and set a locale from storage / navigator / <html lang> */
|
|
88
|
-
detect(options?: I18nDetectOptions): string;
|
|
89
|
-
number(n: number | bigint, opts?: WithLocale<Intl.NumberFormatOptions>): string;
|
|
90
|
-
currency(n: number | bigint, code: string, opts?: WithLocale<Intl.NumberFormatOptions>): string;
|
|
91
|
-
/** Date, timestamp, string or a D() wrapper; '' when invalid */
|
|
92
|
-
date(d: Date | number | string | { toDate(): Date }, opts?: WithLocale<Intl.DateTimeFormatOptions>): string;
|
|
93
|
-
relative(value: number, unit: Intl.RelativeTimeFormatUnit, opts?: WithLocale<Intl.RelativeTimeFormatOptions>): string;
|
|
94
|
-
list(items: Iterable<string>, opts?: WithLocale<{ type?: 'conjunction' | 'disjunction' | 'unit'; style?: 'long' | 'short' | 'narrow' }>): string;
|
|
95
|
-
/** Forget all messages, loads, listeners and settings */
|
|
96
|
-
reset(): I18n;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export declare const i18n: I18n;
|
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;
|