@g9tm/lynxcontrols-foundation 1.4.7 → 1.5.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/dist/.tsbuildinfo +1 -1
- package/dist/culture/strings.d.ts +2 -0
- package/dist/culture/strings.d.ts.map +1 -1
- package/dist/culture/strings.js +8 -4
- package/dist/culture/strings.js.map +1 -1
- package/dist/enums/index.d.ts +5 -1
- package/dist/enums/index.d.ts.map +1 -1
- package/dist/enums/index.js +2 -1
- package/dist/enums/index.js.map +1 -1
- package/dist/icons/generated/glyph-svg.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/route/address.d.ts +68 -0
- package/dist/route/address.d.ts.map +1 -0
- package/dist/route/address.js +282 -0
- package/dist/route/address.js.map +1 -0
- package/dist/route/catalogue.d.ts +131 -0
- package/dist/route/catalogue.d.ts.map +1 -0
- package/dist/route/catalogue.js +236 -0
- package/dist/route/catalogue.js.map +1 -0
- package/dist/route/index.d.ts +7 -0
- package/dist/route/index.d.ts.map +1 -0
- package/dist/route/index.js +6 -0
- package/dist/route/journey.d.ts +147 -0
- package/dist/route/journey.d.ts.map +1 -0
- package/dist/route/journey.js +345 -0
- package/dist/route/journey.js.map +1 -0
- package/dist/route/resolve.d.ts +43 -0
- package/dist/route/resolve.d.ts.map +1 -0
- package/dist/route/resolve.js +116 -0
- package/dist/route/resolve.js.map +1 -0
- package/dist/route/sink.d.ts +62 -0
- package/dist/route/sink.d.ts.map +1 -0
- package/dist/route/sink.js +11 -0
- package/dist/route/sink.js.map +1 -0
- package/dist/route/view.d.ts +60 -0
- package/dist/route/view.d.ts.map +1 -0
- package/dist/route/view.js +104 -0
- package/dist/route/view.js.map +1 -0
- package/dist/services/contracts.d.ts +6 -0
- package/dist/services/contracts.d.ts.map +1 -1
- package/dist/services/contracts.js.map +1 -1
- package/dist/tokens/generated/metrics.d.ts +4 -0
- package/dist/tokens/generated/metrics.d.ts.map +1 -1
- package/dist/tokens/generated/metrics.js +8 -0
- package/dist/tokens/generated/metrics.js.map +1 -1
- package/dist/tokens/generated/palettes.js.map +1 -1
- package/docs/api.md +72 -1
- package/docs/migration/Core.Controls.Shared.md +5 -0
- package/docs/migration/Core.Localization.md +1 -0
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route/sink.js","sources":["../../src/route/sink.ts"],"sourcesContent":["import type { G9Segment } from './address';\n\n// What a place that is OPEN tells the router (the route sink). The sheet service, the tab view, the host and the app's\n// own places declare themselves through this small contract (`G9Capabilities.route`), so the controls depend on the\n// contract, never on the router.\n\n/** Where a place is drawn: decides which open place is on top. Bottom to top. */\nexport type G9PlaceLayer = 'root' | 'page' | 'mode' | 'inner' | 'sheet' | 'popup';\n\n/** Every layer, bottom to top. */\nexport const g9PlaceLayers: readonly G9PlaceLayer[] = Object.freeze([\n 'root',\n 'page',\n 'mode',\n 'inner',\n 'sheet',\n 'popup',\n]);\n\n/** One change a write would make, as a person reads it (the confirmation before a guided save lists these). */\nexport interface G9ChangeLine {\n readonly action: 'create' | 'update' | 'delete' | 'send' | 'other';\n /** What it is about: «گزارش مشاهده»، «بستهٔ PK-12». */\n readonly subject: string;\n /** For an update: which field. */\n readonly field?: string;\n readonly from?: string | null;\n readonly to?: string | null;\n /** A consequence the person must know («۱۲ نمونهٔ این بسته هم حذف میشود»). */\n readonly note?: string;\n}\n\n/** A place that is open right now, as it declares itself. */\nexport interface G9PlaceDeclaration {\n /** Read again on every `touch()`: a segment may carry live view parameters (search, sort). */\n readonly segment: G9Segment | (() => G9Segment);\n readonly layer: G9PlaceLayer;\n /** Order inside the layer (the sheet stack index). Default 0. */\n readonly order?: number;\n /** Logical ancestors that are not open themselves, root first (a mode drawn on the map tab but living under a task). */\n readonly under?: readonly G9Segment[];\n /** The breadcrumb of the live place (its real title). Default: the catalogue's title. */\n title?(): string | null | undefined;\n /** Extra view state of this place (scroll marks are collected by the router). */\n view?(): Readonly<Record<string, string>> | undefined;\n applyView?(view: Readonly<Record<string, string>>): void | Promise<void>;\n /** How the router leaves this place. Absent = the router cannot close it. */\n close?(): void | Promise<void>;\n /** Unsaved work: the router asks before closing it. */\n canLeave?(): true | { readonly dirty: true; readonly message?: string };\n /** What saving this place would change (the guided-save confirmation). */\n describeChanges?(): readonly G9ChangeLine[];\n /** Physical facts for snapshots and reports, never part of the address (the surface it is drawn on, the open site). */\n facts?(): Readonly<Record<string, string | number | boolean | null>>;\n /**\n * False while the place is open but not on screen — the content of a background tab (a site left open on the map\n * while the person is on another tab). A hidden place is not part of the location; going to it opens it again (its\n * `open` brings it forward). Read on every recompute: call `touch()` when it changes. Absent = always shown.\n */\n shown?(): boolean;\n}\n\n/** The handle of one declaration. */\nexport interface G9PlaceHandle {\n readonly token: number;\n /** The place's own state changed (view parameters, title): the router re-reads it. */\n touch(): void;\n /** The place closed. Idempotent. */\n remove(): void;\n}\n\n/** The router as places see it (`G9Capabilities.route`). */\nexport interface G9RouteSink {\n declare(declaration: G9PlaceDeclaration): G9PlaceHandle;\n}\n"],"names":["g9PlaceLayers","Object"],"mappings":"AAUO,MAAMA,gBAAyCC,OAAO,MAAM,CAAC;IAClE;IACA;IACA;IACA;IACA;IACA;CACD"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** What is first in view in one scroller. */
|
|
2
|
+
export type G9ScrollMark =
|
|
3
|
+
/** A list: the first visible row's item key; `offset` = share (0..1) of that row's height already scrolled past. */
|
|
4
|
+
{
|
|
5
|
+
readonly by: 'item';
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly offset: number;
|
|
8
|
+
}
|
|
9
|
+
/** A scroll view: the first visible registered anchor; `offset` as above. */
|
|
10
|
+
| {
|
|
11
|
+
readonly by: 'anchor';
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly offset: number;
|
|
14
|
+
}
|
|
15
|
+
/** Last resort: share (0..1) of the scrollable range. */
|
|
16
|
+
| {
|
|
17
|
+
readonly by: 'ratio';
|
|
18
|
+
readonly ratio: number;
|
|
19
|
+
}
|
|
20
|
+
/** At the top, or nothing to scroll on this screen. */
|
|
21
|
+
| {
|
|
22
|
+
readonly by: 'start';
|
|
23
|
+
};
|
|
24
|
+
/** How exactly a view was put back. */
|
|
25
|
+
export type G9ViewApplied = 'exact' | 'degraded' | 'skipped';
|
|
26
|
+
/** The view state of one segment of a snapshot. */
|
|
27
|
+
export interface G9SegmentView {
|
|
28
|
+
readonly view?: Readonly<Record<string, string>>;
|
|
29
|
+
/** Scroll marks by scroller id. */
|
|
30
|
+
readonly scroll?: Readonly<Record<string, G9ScrollMark>>;
|
|
31
|
+
}
|
|
32
|
+
/** Everything open, as data (JSON). */
|
|
33
|
+
export interface G9Snapshot {
|
|
34
|
+
readonly v: 1;
|
|
35
|
+
/** The unique address, canonical. */
|
|
36
|
+
readonly address: string;
|
|
37
|
+
readonly general: string;
|
|
38
|
+
/** The focused anchor. */
|
|
39
|
+
readonly target?: string;
|
|
40
|
+
/** Per segment of the address. */
|
|
41
|
+
readonly views: readonly G9SegmentView[];
|
|
42
|
+
readonly facts: Readonly<Record<string, string | number | boolean | null>>;
|
|
43
|
+
/** When it was taken (ms since the epoch). */
|
|
44
|
+
readonly at: number;
|
|
45
|
+
/** The app version that took it. */
|
|
46
|
+
readonly app: string;
|
|
47
|
+
/** The catalogue hash: a snapshot is not applied across another catalogue. */
|
|
48
|
+
readonly catalogue: string;
|
|
49
|
+
}
|
|
50
|
+
/** A scroll mark from untrusted data, clamped; null when it is not one. */
|
|
51
|
+
export declare function toScrollMark(x: unknown): G9ScrollMark | null;
|
|
52
|
+
/** The snapshot in untrusted data (stored preferences, a QA command), or null when it is not a valid one. */
|
|
53
|
+
export declare function parseSnapshot(x: unknown): G9Snapshot | null;
|
|
54
|
+
/** Why a snapshot may not be applied now, or null when it may. */
|
|
55
|
+
export declare function snapshotRefusal(snapshot: G9Snapshot, now: {
|
|
56
|
+
readonly at: number;
|
|
57
|
+
readonly catalogue: string;
|
|
58
|
+
readonly maxAgeMs: number;
|
|
59
|
+
}): 'catalogue' | 'stale' | 'future' | null;
|
|
60
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/route/view.ts"],"names":[],"mappings":"AAOA,6CAA6C;AAC7C,MAAM,MAAM,YAAY;AACtB,oHAAoH;AAClH;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACxE,6EAA6E;GAC3E;IAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACzE,yDAAyD;GACvD;IAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAClD,uDAAuD;GACrD;IAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;CAAE,CAAC;AAE7B,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,mCAAmC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;CAC1D;AAED,uCAAuC;AACvC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,qCAAqC;IACrC,QAAQ,C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|
7
|
+
const offset = 'number' == typeof m.offset && Number.isFinite(m.offset) ? clamp01(m.offset) : 0;
|
|
8
|
+
switch(m.by){
|
|
9
|
+
case 'item':
|
|
10
|
+
return 'string' == typeof m.key && m.key.length > 0 && m.key.length <= 128 ? {
|
|
11
|
+
by: 'item',
|
|
12
|
+
key: m.key,
|
|
13
|
+
offset
|
|
14
|
+
} : null;
|
|
15
|
+
case 'anchor':
|
|
16
|
+
return 'string' == typeof m.id && TOKEN.test(m.id) ? {
|
|
17
|
+
by: 'anchor',
|
|
18
|
+
id: m.id,
|
|
19
|
+
offset
|
|
20
|
+
} : null;
|
|
21
|
+
case 'ratio':
|
|
22
|
+
return 'number' == typeof m.ratio && Number.isFinite(m.ratio) ? {
|
|
23
|
+
by: 'ratio',
|
|
24
|
+
ratio: clamp01(m.ratio)
|
|
25
|
+
} : null;
|
|
26
|
+
case 'start':
|
|
27
|
+
return {
|
|
28
|
+
by: 'start'
|
|
29
|
+
};
|
|
30
|
+
default:
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function stringRecord(x, maxKeys, maxValue) {
|
|
35
|
+
if (!x || 'object' != typeof x || Array.isArray(x)) return null;
|
|
36
|
+
const out = {};
|
|
37
|
+
const keys = Object.keys(x);
|
|
38
|
+
if (keys.length > maxKeys) return null;
|
|
39
|
+
for (const k of keys){
|
|
40
|
+
const v = x[k];
|
|
41
|
+
if (!TOKEN.test(k) || 'string' != typeof v || v.length > maxValue) return null;
|
|
42
|
+
out[k] = v;
|
|
43
|
+
}
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
function parseSnapshot(x) {
|
|
47
|
+
if (!x || 'object' != typeof x) return null;
|
|
48
|
+
const s = x;
|
|
49
|
+
if (1 !== s.v || 'string' != typeof s.address || 'number' != typeof s.at || 'string' != typeof s.catalogue || 'string' != typeof s.app) return null;
|
|
50
|
+
const parsed = tryParseAddress(s.address);
|
|
51
|
+
if (!parsed.ok) return null;
|
|
52
|
+
if (!Array.isArray(s.views) || s.views.length > parsed.address.segments.length) return null;
|
|
53
|
+
const views = [];
|
|
54
|
+
for (const raw of s.views){
|
|
55
|
+
if (!raw || 'object' != typeof raw) return null;
|
|
56
|
+
const r = raw;
|
|
57
|
+
const out = {};
|
|
58
|
+
if (void 0 !== r.view) {
|
|
59
|
+
const view = stringRecord(r.view, 16, 512);
|
|
60
|
+
if (!view) return null;
|
|
61
|
+
out.view = view;
|
|
62
|
+
}
|
|
63
|
+
if (void 0 !== r.scroll) {
|
|
64
|
+
if (!r.scroll || 'object' != typeof r.scroll) return null;
|
|
65
|
+
const scroll = {};
|
|
66
|
+
const keys = Object.keys(r.scroll);
|
|
67
|
+
if (keys.length > 16) return null;
|
|
68
|
+
for (const k of keys){
|
|
69
|
+
const mark = toScrollMark(r.scroll[k]);
|
|
70
|
+
if (!TOKEN.test(k) || !mark) return null;
|
|
71
|
+
scroll[k] = mark;
|
|
72
|
+
}
|
|
73
|
+
out.scroll = scroll;
|
|
74
|
+
}
|
|
75
|
+
views.push(out);
|
|
76
|
+
}
|
|
77
|
+
const facts = {};
|
|
78
|
+
if (s.facts && 'object' == typeof s.facts) {
|
|
79
|
+
for (const [k, v] of Object.entries(s.facts))if (null === v || 'string' == typeof v || 'number' == typeof v || 'boolean' == typeof v) facts[k] = v;
|
|
80
|
+
}
|
|
81
|
+
const snapshot = {
|
|
82
|
+
v: 1,
|
|
83
|
+
address: s.address,
|
|
84
|
+
general: 'string' == typeof s.general ? s.general : '',
|
|
85
|
+
...'string' == typeof s.target && TOKEN.test(s.target) ? {
|
|
86
|
+
target: s.target
|
|
87
|
+
} : {},
|
|
88
|
+
views,
|
|
89
|
+
facts,
|
|
90
|
+
at: s.at,
|
|
91
|
+
app: s.app,
|
|
92
|
+
catalogue: s.catalogue
|
|
93
|
+
};
|
|
94
|
+
return snapshot;
|
|
95
|
+
}
|
|
96
|
+
function snapshotRefusal(snapshot, now) {
|
|
97
|
+
if (snapshot.catalogue !== now.catalogue) return 'catalogue';
|
|
98
|
+
if (snapshot.at > now.at + 60000) return 'future';
|
|
99
|
+
if (now.at - snapshot.at > now.maxAgeMs) return 'stale';
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
export { parseSnapshot, snapshotRefusal, toScrollMark };
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route/view.js","sources":["../../src/route/view.ts"],"sourcesContent":["import { tryParseAddress } from './address';\n\n// The view state of a place, and the snapshot of everything open (pure). A scroll position is never a pixel offset:\n// pixels mean something else on another screen size, a virtual list may not have laid the row out, and a screen that\n// is tall enough may not scroll at all. A mark names WHAT is first in view — a list row by its item key, a registered\n// control by its anchor id — and how much of it is already scrolled past, as a share of its own height.\n\n/** What is first in view in one scroller. */\nexport type G9ScrollMark =\n /** A list: the first visible row's item key; `offset` = share (0..1) of that row's height already scrolled past. */\n | { readonly by: 'item'; readonly key: string; readonly offset: number }\n /** A scroll view: the first visible registered anchor; `offset` as above. */\n | { readonly by: 'anchor'; readonly id: string; readonly offset: number }\n /** Last resort: share (0..1) of the scrollable range. */\n | { readonly by: 'ratio'; readonly ratio: number }\n /** At the top, or nothing to scroll on this screen. */\n | { readonly by: 'start' };\n\n/** How exactly a view was put back. */\nexport type G9ViewApplied = 'exact' | 'degraded' | 'skipped';\n\n/** The view state of one segment of a snapshot. */\nexport interface G9SegmentView {\n readonly view?: Readonly<Record<string, string>>;\n /** Scroll marks by scroller id. */\n readonly scroll?: Readonly<Record<string, G9ScrollMark>>;\n}\n\n/** Everything open, as data (JSON). */\nexport interface G9Snapshot {\n readonly v: 1;\n /** The unique address, canonical. */\n readonly address: string;\n readonly general: string;\n /** The focused anchor. */\n readonly target?: string;\n /** Per segment of the address. */\n readonly views: readonly G9SegmentView[];\n readonly facts: Readonly<Record<string, string | number | boolean | null>>;\n /** When it was taken (ms since the epoch). */\n readonly at: number;\n /** The app version that took it. */\n readonly app: string;\n /** The catalogue hash: a snapshot is not applied across another catalogue. */\n readonly catalogue: string;\n}\n\nconst clamp01 = (n: number) => (n < 0 ? 0 : n > 1 ? 1 : n);\nconst TOKEN = /^[A-Za-z0-9._:\\-~]{1,128}$/;\n\n/** A scroll mark from untrusted data, clamped; null when it is not one. */\nexport function toScrollMark(x: unknown): G9ScrollMark | null {\n if (!x || typeof x !== 'object') return null;\n const m = x as Record<string, unknown>;\n const offset = typeof m.offset === 'number' && Number.isFinite(m.offset) ? clamp01(m.offset) : 0;\n switch (m.by) {\n case 'item':\n return typeof m.key === 'string' && m.key.length > 0 && m.key.length <= 128\n ? { by: 'item', key: m.key, offset }\n : null;\n case 'anchor':\n return typeof m.id === 'string' && TOKEN.test(m.id) ? { by: 'anchor', id: m.id, offset } : null;\n case 'ratio':\n return typeof m.ratio === 'number' && Number.isFinite(m.ratio) ? { by: 'ratio', ratio: clamp01(m.ratio) } : null;\n case 'start':\n return { by: 'start' };\n default:\n return null;\n }\n}\n\nfunction stringRecord(x: unknown, maxKeys: number, maxValue: number): Record<string, string> | null {\n if (!x || typeof x !== 'object' || Array.isArray(x)) return null;\n const out: Record<string, string> = {};\n const keys = Object.keys(x);\n if (keys.length > maxKeys) return null;\n for (const k of keys) {\n const v = (x as Record<string, unknown>)[k];\n if (!TOKEN.test(k) || typeof v !== 'string' || v.length > maxValue) return null;\n out[k] = v;\n }\n return out;\n}\n\n/** The snapshot in untrusted data (stored preferences, a QA command), or null when it is not a valid one. */\nexport function parseSnapshot(x: unknown): G9Snapshot | null {\n if (!x || typeof x !== 'object') return null;\n const s = x as Record<string, unknown>;\n if (\n s.v !== 1 ||\n typeof s.address !== 'string' ||\n typeof s.at !== 'number' ||\n typeof s.catalogue !== 'string' ||\n typeof s.app !== 'string'\n )\n return null;\n const parsed = tryParseAddress(s.address);\n if (!parsed.ok) return null;\n if (!Array.isArray(s.views) || s.views.length > parsed.address.segments.length) return null;\n const views: G9SegmentView[] = [];\n for (const raw of s.views) {\n if (!raw || typeof raw !== 'object') return null;\n const r = raw as Record<string, unknown>;\n const out: { view?: Record<string, string>; scroll?: Record<string, G9ScrollMark> } = {};\n if (r.view !== undefined) {\n const view = stringRecord(r.view, 16, 512);\n if (!view) return null;\n out.view = view;\n }\n if (r.scroll !== undefined) {\n if (!r.scroll || typeof r.scroll !== 'object') return null;\n const scroll: Record<string, G9ScrollMark> = {};\n const keys = Object.keys(r.scroll);\n if (keys.length > 16) return null;\n for (const k of keys) {\n const mark = toScrollMark((r.scroll as Record<string, unknown>)[k]);\n if (!TOKEN.test(k) || !mark) return null;\n scroll[k] = mark;\n }\n out.scroll = scroll;\n }\n views.push(out);\n }\n const facts: Record<string, string | number | boolean | null> = {};\n if (s.facts && typeof s.facts === 'object') {\n for (const [k, v] of Object.entries(s.facts as Record<string, unknown>)) {\n if (v === null || typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') facts[k] = v;\n }\n }\n const snapshot: G9Snapshot = {\n v: 1,\n address: s.address,\n general: typeof s.general === 'string' ? s.general : '',\n ...(typeof s.target === 'string' && TOKEN.test(s.target) ? { target: s.target } : {}),\n views,\n facts,\n at: s.at,\n app: s.app,\n catalogue: s.catalogue,\n };\n return snapshot;\n}\n\n/** Why a snapshot may not be applied now, or null when it may. */\nexport function snapshotRefusal(\n snapshot: G9Snapshot,\n now: { readonly at: number; readonly catalogue: string; readonly maxAgeMs: number },\n): 'catalogue' | 'stale' | 'future' | null {\n if (snapshot.catalogue !== now.catalogue) return 'catalogue';\n if (snapshot.at > now.at + 60000) return 'future';\n if (now.at - snapshot.at > now.maxAgeMs) return 'stale';\n return null;\n}\n"],"names":["clamp01","n","TOKEN","toScrollMark","x","m","offset","Number","stringRecord","maxKeys","maxValue","Array","out","keys","Object","k","v","parseSnapshot","s","parsed","tryParseAddress","views","raw","r","undefined","view","scroll","mark","facts","snapshot","snapshotRefusal","now"],"mappings":";AA+CA,MAAMA,UAAU,CAACC,IAAeA,IAAI,IAAI,IAAIA,IAAI,IAA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G9Error } from '../errors.js';
|
|
2
|
+
import type { G9RouteSink } from '../route/sink.js';
|
|
2
3
|
import type { G9AbortSignal } from './abort.js';
|
|
3
4
|
import type { G9Clock } from './clock.js';
|
|
4
5
|
import type { G9PreferenceStore } from './preferences.js';
|
|
@@ -177,6 +178,11 @@ export interface G9Capabilities {
|
|
|
177
178
|
readonly speech?: G9SpeechToText;
|
|
178
179
|
readonly scanner?: G9Scanner;
|
|
179
180
|
readonly media?: G9MediaProvider;
|
|
181
|
+
/**
|
|
182
|
+
* The router places declare themselves to (`@g9tm/lynxcontrols/route` makes one). Optional: without it sheets, tab views
|
|
183
|
+
* and hosts work as before and a `route` option only reports a one-time diagnostics warning.
|
|
184
|
+
*/
|
|
185
|
+
readonly route?: G9RouteSink;
|
|
180
186
|
}
|
|
181
187
|
/** The name of a capability. */
|
|
182
188
|
export type G9CapabilityName = keyof G9Capabilities;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/services/contracts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,8GAA8G;AAC9G,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAErE,wCAAwC;AACxC,MAAM,WAAW,qBAAqB;IACpC,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,gFAAgF;IAChF,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,8FAA8F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AG,OAAO,CAEhG;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,gBAAgB,EAC1D,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,EACjC,IAAI,EAAE,CAAC,GACN,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAIhC;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,QAAQ,IAAI,cAAc,CAEhH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/contracts.js","sources":["../../src/services/contracts.ts"],"sourcesContent":["// Platform capability contracts (plan/specs/01-Architecture.md §8). Foundation defines the shapes only; the app\n// supplies implementations through the WP02 provider (`<G9Provider services={…}>`), platform adapters live in the\n// native and Lynxtron packages (WP12–WP14), and the features that use them (fields' dictation WP03, barcode WP09,\n// IntroCarousel WP09) own the behaviour. Nothing here requests a permission or touches a native module.\nimport { G9Error } from '../errors';\nimport type { G9AbortSignal } from './abort';\nimport type { G9Clock } from './clock';\nimport type { G9PreferenceStore } from './preferences';\n\n/** Result of asking for a runtime permission. `'restricted'`: blocked by policy, the user cannot grant it. */\nexport type G9PermissionStatus = 'granted' | 'denied' | 'restricted';\n\n/** Options of one dictation session. */\nexport interface G9SpeechToTextOptions {\n /** BCP 47 locale the recogniser listens for (from the culture, e.g. `'fa-IR'`). */\n readonly locale: string;\n /** Aborting stops listening; the session then settles with `{ status: 'cancelled' }`. */\n readonly signal?: G9AbortSignal;\n /** Interim hypotheses while the user speaks, when the platform reports them. */\n readonly onPartialResult?: (text: string) => void;\n}\n\n/** How a dictation session ended. Expected outcomes are results, not errors (specs/03 §7). */\nexport type G9SpeechToTextResult =\n | { readonly status: 'recognized'; readonly text: string }\n | { readonly status: 'cancelled' }\n | { readonly status: 'no-match' }\n | { readonly status: 'denied' };\n\n/**\n * Speech recognition for dictation into fields (MAUI `IG9SpeechToText`). Optional: without it the microphone\n * affordance is hidden. A platform fault rejects with a `G9Error`.\n */\nexport interface G9SpeechToText {\n /** Whether a recogniser exists for this locale on this device (no permission prompt). */\n isAvailable(locale: string): Promise<boolean>;\n /** Asks for microphone and speech permission (only ever from a user action). */\n requestPermission(): Promise<G9PermissionStatus>;\n /** Listens once and settles exactly once. */\n listen(options: G9SpeechToTextOptions): Promise<G9SpeechToTextResult>;\n}\n\n/** Options of one scan. */\nexport interface G9ScanOptions {\n /** Symbologies to accept (e.g. `'qr'`, `'ean13'`, `'code128'`); empty or absent means every one the scanner has. */\n readonly formats?: ReadonlyArray<string>;\n /** Aborting closes the scanner; the scan then settles with `{ status: 'cancelled' }`. */\n readonly signal?: G9AbortSignal;\n}\n\n/** How a scan ended. */\nexport type G9ScanResult =\n | { readonly status: 'scanned'; readonly text: string; readonly format: string }\n | { readonly status: 'cancelled' }\n | { readonly status: 'denied' };\n\n/** Barcode/QR scanning supplied by the app (WP09 barcode package). Optional: without it the scan action is hidden. */\nexport interface G9Scanner {\n /** Whether a camera scanner is usable on this device (no permission prompt). */\n isAvailable(): Promise<boolean>;\n /** Opens the scanner and settles exactly once. */\n scan(options?: G9ScanOptions): Promise<G9ScanResult>;\n}\n\n/** A media reference as the app describes it (an asset name, a file or a remote URI). */\nexport type G9MediaSource =\n | { readonly kind: 'image'; readonly uri: string }\n | { readonly kind: 'image'; readonly asset: string }\n | { readonly kind: 'video'; readonly uri: string }\n | { readonly kind: 'video'; readonly asset: string };\n\n/** A source resolved to something the platform can display; `uri` is what `<image>`/the video XElement load. */\nexport interface G9ResolvedMedia {\n readonly kind: 'image' | 'video';\n readonly uri: string;\n /** Intrinsic size when known, so layout can reserve space before the first frame. */\n readonly width?: number;\n readonly height?: number;\n}\n\n/** What a {@link G9MediaPlayer} tells its owner. */\nexport type G9MediaPlayerEvent =\n /** The first frame is ready to show. */\n | { readonly type: 'ready' }\n /** A looping video is about to end (`seconds` left); the owner may fade out. */\n | { readonly type: 'nearEnd'; readonly seconds: number }\n /** A looping video restarted from the beginning; the owner may fade back in. */\n | { readonly type: 'looped' }\n /** Playback failed; the owner falls back to the slide image. */\n | { readonly type: 'error'; readonly error: unknown };\n\n/** Options of {@link G9MediaProvider.createPlayer}. */\nexport interface G9MediaPlayerOptions {\n readonly loop?: boolean;\n readonly muted?: boolean;\n /** Best-effort seek applied once after the media opened (MAUI `InitialVideoStartSeconds`). */\n readonly startSeconds?: number;\n /** How early `nearEnd` fires, in seconds. */\n readonly nearEndSeconds?: number;\n}\n\n/**\n * One video player created by the app's media provider. `view` is what the control renders (the platform video\n * XElement the host registered, built by the app); the control never names a video tag itself.\n */\nexport interface G9MediaPlayer {\n /** The element to render (a ReactNode built by the app's provider; foundation keeps it opaque). */\n readonly view: unknown;\n play(): void;\n pause(): void;\n /** Releases the native player; idempotent. */\n dispose(): void;\n /** Subscribes to player events; returns the unsubscribe function. */\n subscribe(listener: (event: G9MediaPlayerEvent) => void): () => void;\n}\n\n/**\n * Resolves image and video sources for IntroCarousel and other media controls (WP09). Video is part of the contract on\n * every target, desktop included (decision D14 is open; no scope reduction is accepted). A provider that cannot play\n * video yet omits `createPlayer` or returns `false` from `supportsVideo`; controls then show the slide image and say\n * why (`'video-unsupported'`).\n */\nexport interface G9MediaProvider {\n resolve(source: G9MediaSource, options?: { readonly signal?: G9AbortSignal }): Promise<G9ResolvedMedia>;\n /** Whether this target can play video now (no permission prompt). Absent = `createPlayer` decides. */\n supportsVideo?(): boolean;\n /** Creates a player for a resolved video. The control disposes it on slide change, deactivation and unmount. */\n createPlayer?(media: G9ResolvedMedia, options?: G9MediaPlayerOptions): G9MediaPlayer;\n}\n\n/** Safe-area insets in logical pixels. */\nexport interface G9SafeInsets {\n readonly top: number;\n readonly end: number;\n readonly bottom: number;\n readonly start: number;\n}\n\n/** Android soft-input policy while a flow needs it (MAUI `G9KeyboardHelper.UseAndroidPanSoftInputMode`). */\nexport type G9SoftInputMode = 'pan' | 'resize';\n\n/**\n * Host integration the provider and overlays need (MAUI page/window plumbing), supplied by the native host. Required.\n * The system back press does not go through this object: the host sends a global event (default `g9:back`, specs/02\n * §4) and the provider dispatches it to the active `G9Host`; `exit` is what happens when nothing handled it.\n */\nexport interface G9HostServices {\n /** Leaves the app the platform way (Android moves the task to the back; desktop closes the window). */\n exit(): void;\n /** Hides the soft keyboard and clears focus (MAUI `G9KeyboardHelper.HideKeyboardAndClearFocus`). */\n hideKeyboard(): void;\n /** Current safe-area insets. */\n getSafeInsets(): G9SafeInsets;\n /** Called when the insets change (rotation, window resize). Returns an unsubscribe function. */\n subscribeSafeInsets(listener: (insets: G9SafeInsets) => void): () => void;\n /**\n * Switches the window's soft-input mode (Android only; `'resize'` is the app default). Hosts on platforms without\n * soft-input modes (iOS, desktop) omit it, which is where MAUI's helper was a no-op too.\n */\n setSoftInputMode?(mode: G9SoftInputMode): void;\n}\n\n/** Every service the app can supply. Required ones are listed in {@link g9RequiredCapabilities}. */\nexport interface G9Capabilities {\n readonly clock: G9Clock;\n readonly preferences: G9PreferenceStore;\n readonly host: G9HostServices;\n readonly speech?: G9SpeechToText;\n readonly scanner?: G9Scanner;\n readonly media?: G9MediaProvider;\n}\n\n/** The name of a capability. */\nexport type G9CapabilityName = keyof G9Capabilities;\n\n/** Capabilities without which the provider cannot mount. */\nexport const g9RequiredCapabilities: ReadonlyArray<G9CapabilityName> = Object.freeze(['clock', 'preferences', 'host']);\n\n/** Thrown when code needs a capability the app did not supply (specs/03 §7: `G9CapabilityMissingError('speech')`). */\nexport class G9CapabilityMissingError extends G9Error {\n /** The missing capability. */\n readonly capability: string;\n\n constructor(capability: string, message?: string) {\n super('capability-missing', message ?? `The '${capability}' service is not available; supply it to G9Provider.`);\n this.name = 'G9CapabilityMissingError';\n this.capability = capability;\n }\n}\n\n/** `true` when the capability is present (optional features use this to hide themselves). */\nexport function hasCapability(services: Partial<G9Capabilities>, name: G9CapabilityName): boolean {\n return services[name] != null;\n}\n\n/** The capability, or throws {@link G9CapabilityMissingError} naming it. */\nexport function requireCapability<K extends G9CapabilityName>(\n services: Partial<G9Capabilities>,\n name: K,\n): NonNullable<G9Capabilities[K]> {\n const service = services[name];\n if (service == null) throw new G9CapabilityMissingError(name);\n return service as NonNullable<G9Capabilities[K]>;\n}\n\n/**\n * Checks every required capability at once (the provider calls this at mount).\n * @throws {G9CapabilityMissingError} for the first missing one, in {@link g9RequiredCapabilities} order.\n */\nexport function assertRequiredCapabilities(services: Partial<G9Capabilities>): asserts services is G9Capabilities {\n for (const name of g9RequiredCapabilities) requireCapability(services, name);\n}\n"],"names":["g9RequiredCapabilities","Object","G9CapabilityMissingError","G9Error","capability","message","hasCapability","services","name","requireCapability","service","assertRequiredCapabilities"],"mappings":";;;;;;;;;;;AAgLO,MAAMA,yBAA0DC,OAAO,MAAM,CAAC;IAAC;IAAS;IAAe;CAAO;AAG9G,MAAMC,iCAAiCC;IAI5C,YAAYC,UAAkB,EAAEC,OAAgB,CAAE;QAChD,KAAK,CAAC,sBAAsBA,QAAAA,UAAAA,UAAW,CAAC,KAAK,EAAED,WAAW,oDAAoD,CAAC,GAHjH,uBAAS,cAAT;QAIE,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,CAAC,UAAU,GAAGA;IACpB;AACF;AAGO,SAASE,cAAcC,QAAiC,EAAEC,IAAsB;IACrF,OAAOD,AAAkB,QAAlBA,QAAQ,CAACC,KAAK;AACvB;AAGO,SAASC,kBACdF,QAAiC,EACjCC,IAAO;IAEP,MAAME,UAAUH,QAAQ,CAACC,KAAK;IAC9B,IAAIE,AAAW,QAAXA,SAAiB,MAAM,IAAIR,yBAAyBM;IACxD,OAAOE;AACT;AAMO,SAASC,2BAA2BJ,QAAiC;IAC1E,KAAK,MAAMC,QAAQR,uBAAwBS,kBAAkBF,UAAUC;AACzE"}
|
|
1
|
+
{"version":3,"file":"services/contracts.js","sources":["../../src/services/contracts.ts"],"sourcesContent":["// Platform capability contracts (plan/specs/01-Architecture.md §8). Foundation defines the shapes only; the app\n// supplies implementations through the WP02 provider (`<G9Provider services={…}>`), platform adapters live in the\n// native and Lynxtron packages (WP12–WP14), and the features that use them (fields' dictation WP03, barcode WP09,\n// IntroCarousel WP09) own the behaviour. Nothing here requests a permission or touches a native module.\nimport { G9Error } from '../errors';\nimport type { G9RouteSink } from '../route/sink';\nimport type { G9AbortSignal } from './abort';\nimport type { G9Clock } from './clock';\nimport type { G9PreferenceStore } from './preferences';\n\n/** Result of asking for a runtime permission. `'restricted'`: blocked by policy, the user cannot grant it. */\nexport type G9PermissionStatus = 'granted' | 'denied' | 'restricted';\n\n/** Options of one dictation session. */\nexport interface G9SpeechToTextOptions {\n /** BCP 47 locale the recogniser listens for (from the culture, e.g. `'fa-IR'`). */\n readonly locale: string;\n /** Aborting stops listening; the session then settles with `{ status: 'cancelled' }`. */\n readonly signal?: G9AbortSignal;\n /** Interim hypotheses while the user speaks, when the platform reports them. */\n readonly onPartialResult?: (text: string) => void;\n}\n\n/** How a dictation session ended. Expected outcomes are results, not errors (specs/03 §7). */\nexport type G9SpeechToTextResult =\n | { readonly status: 'recognized'; readonly text: string }\n | { readonly status: 'cancelled' }\n | { readonly status: 'no-match' }\n | { readonly status: 'denied' };\n\n/**\n * Speech recognition for dictation into fields (MAUI `IG9SpeechToText`). Optional: without it the microphone\n * affordance is hidden. A platform fault rejects with a `G9Error`.\n */\nexport interface G9SpeechToText {\n /** Whether a recogniser exists for this locale on this device (no permission prompt). */\n isAvailable(locale: string): Promise<boolean>;\n /** Asks for microphone and speech permission (only ever from a user action). */\n requestPermission(): Promise<G9PermissionStatus>;\n /** Listens once and settles exactly once. */\n listen(options: G9SpeechToTextOptions): Promise<G9SpeechToTextResult>;\n}\n\n/** Options of one scan. */\nexport interface G9ScanOptions {\n /** Symbologies to accept (e.g. `'qr'`, `'ean13'`, `'code128'`); empty or absent means every one the scanner has. */\n readonly formats?: ReadonlyArray<string>;\n /** Aborting closes the scanner; the scan then settles with `{ status: 'cancelled' }`. */\n readonly signal?: G9AbortSignal;\n}\n\n/** How a scan ended. */\nexport type G9ScanResult =\n | { readonly status: 'scanned'; readonly text: string; readonly format: string }\n | { readonly status: 'cancelled' }\n | { readonly status: 'denied' };\n\n/** Barcode/QR scanning supplied by the app (WP09 barcode package). Optional: without it the scan action is hidden. */\nexport interface G9Scanner {\n /** Whether a camera scanner is usable on this device (no permission prompt). */\n isAvailable(): Promise<boolean>;\n /** Opens the scanner and settles exactly once. */\n scan(options?: G9ScanOptions): Promise<G9ScanResult>;\n}\n\n/** A media reference as the app describes it (an asset name, a file or a remote URI). */\nexport type G9MediaSource =\n | { readonly kind: 'image'; readonly uri: string }\n | { readonly kind: 'image'; readonly asset: string }\n | { readonly kind: 'video'; readonly uri: string }\n | { readonly kind: 'video'; readonly asset: string };\n\n/** A source resolved to something the platform can display; `uri` is what `<image>`/the video XElement load. */\nexport interface G9ResolvedMedia {\n readonly kind: 'image' | 'video';\n readonly uri: string;\n /** Intrinsic size when known, so layout can reserve space before the first frame. */\n readonly width?: number;\n readonly height?: number;\n}\n\n/** What a {@link G9MediaPlayer} tells its owner. */\nexport type G9MediaPlayerEvent =\n /** The first frame is ready to show. */\n | { readonly type: 'ready' }\n /** A looping video is about to end (`seconds` left); the owner may fade out. */\n | { readonly type: 'nearEnd'; readonly seconds: number }\n /** A looping video restarted from the beginning; the owner may fade back in. */\n | { readonly type: 'looped' }\n /** Playback failed; the owner falls back to the slide image. */\n | { readonly type: 'error'; readonly error: unknown };\n\n/** Options of {@link G9MediaProvider.createPlayer}. */\nexport interface G9MediaPlayerOptions {\n readonly loop?: boolean;\n readonly muted?: boolean;\n /** Best-effort seek applied once after the media opened (MAUI `InitialVideoStartSeconds`). */\n readonly startSeconds?: number;\n /** How early `nearEnd` fires, in seconds. */\n readonly nearEndSeconds?: number;\n}\n\n/**\n * One video player created by the app's media provider. `view` is what the control renders (the platform video\n * XElement the host registered, built by the app); the control never names a video tag itself.\n */\nexport interface G9MediaPlayer {\n /** The element to render (a ReactNode built by the app's provider; foundation keeps it opaque). */\n readonly view: unknown;\n play(): void;\n pause(): void;\n /** Releases the native player; idempotent. */\n dispose(): void;\n /** Subscribes to player events; returns the unsubscribe function. */\n subscribe(listener: (event: G9MediaPlayerEvent) => void): () => void;\n}\n\n/**\n * Resolves image and video sources for IntroCarousel and other media controls (WP09). Video is part of the contract on\n * every target, desktop included (decision D14 is open; no scope reduction is accepted). A provider that cannot play\n * video yet omits `createPlayer` or returns `false` from `supportsVideo`; controls then show the slide image and say\n * why (`'video-unsupported'`).\n */\nexport interface G9MediaProvider {\n resolve(source: G9MediaSource, options?: { readonly signal?: G9AbortSignal }): Promise<G9ResolvedMedia>;\n /** Whether this target can play video now (no permission prompt). Absent = `createPlayer` decides. */\n supportsVideo?(): boolean;\n /** Creates a player for a resolved video. The control disposes it on slide change, deactivation and unmount. */\n createPlayer?(media: G9ResolvedMedia, options?: G9MediaPlayerOptions): G9MediaPlayer;\n}\n\n/** Safe-area insets in logical pixels. */\nexport interface G9SafeInsets {\n readonly top: number;\n readonly end: number;\n readonly bottom: number;\n readonly start: number;\n}\n\n/** Android soft-input policy while a flow needs it (MAUI `G9KeyboardHelper.UseAndroidPanSoftInputMode`). */\nexport type G9SoftInputMode = 'pan' | 'resize';\n\n/**\n * Host integration the provider and overlays need (MAUI page/window plumbing), supplied by the native host. Required.\n * The system back press does not go through this object: the host sends a global event (default `g9:back`, specs/02\n * §4) and the provider dispatches it to the active `G9Host`; `exit` is what happens when nothing handled it.\n */\nexport interface G9HostServices {\n /** Leaves the app the platform way (Android moves the task to the back; desktop closes the window). */\n exit(): void;\n /** Hides the soft keyboard and clears focus (MAUI `G9KeyboardHelper.HideKeyboardAndClearFocus`). */\n hideKeyboard(): void;\n /** Current safe-area insets. */\n getSafeInsets(): G9SafeInsets;\n /** Called when the insets change (rotation, window resize). Returns an unsubscribe function. */\n subscribeSafeInsets(listener: (insets: G9SafeInsets) => void): () => void;\n /**\n * Switches the window's soft-input mode (Android only; `'resize'` is the app default). Hosts on platforms without\n * soft-input modes (iOS, desktop) omit it, which is where MAUI's helper was a no-op too.\n */\n setSoftInputMode?(mode: G9SoftInputMode): void;\n}\n\n/** Every service the app can supply. Required ones are listed in {@link g9RequiredCapabilities}. */\nexport interface G9Capabilities {\n readonly clock: G9Clock;\n readonly preferences: G9PreferenceStore;\n readonly host: G9HostServices;\n readonly speech?: G9SpeechToText;\n readonly scanner?: G9Scanner;\n readonly media?: G9MediaProvider;\n /**\n * The router places declare themselves to (`@g9tm/lynxcontrols/route` makes one). Optional: without it sheets, tab views\n * and hosts work as before and a `route` option only reports a one-time diagnostics warning.\n */\n readonly route?: G9RouteSink;\n}\n\n/** The name of a capability. */\nexport type G9CapabilityName = keyof G9Capabilities;\n\n/** Capabilities without which the provider cannot mount. */\nexport const g9RequiredCapabilities: ReadonlyArray<G9CapabilityName> = Object.freeze(['clock', 'preferences', 'host']);\n\n/** Thrown when code needs a capability the app did not supply (specs/03 §7: `G9CapabilityMissingError('speech')`). */\nexport class G9CapabilityMissingError extends G9Error {\n /** The missing capability. */\n readonly capability: string;\n\n constructor(capability: string, message?: string) {\n super('capability-missing', message ?? `The '${capability}' service is not available; supply it to G9Provider.`);\n this.name = 'G9CapabilityMissingError';\n this.capability = capability;\n }\n}\n\n/** `true` when the capability is present (optional features use this to hide themselves). */\nexport function hasCapability(services: Partial<G9Capabilities>, name: G9CapabilityName): boolean {\n return services[name] != null;\n}\n\n/** The capability, or throws {@link G9CapabilityMissingError} naming it. */\nexport function requireCapability<K extends G9CapabilityName>(\n services: Partial<G9Capabilities>,\n name: K,\n): NonNullable<G9Capabilities[K]> {\n const service = services[name];\n if (service == null) throw new G9CapabilityMissingError(name);\n return service as NonNullable<G9Capabilities[K]>;\n}\n\n/**\n * Checks every required capability at once (the provider calls this at mount).\n * @throws {G9CapabilityMissingError} for the first missing one, in {@link g9RequiredCapabilities} order.\n */\nexport function assertRequiredCapabilities(services: Partial<G9Capabilities>): asserts services is G9Capabilities {\n for (const name of g9RequiredCapabilities) requireCapability(services, name);\n}\n"],"names":["g9RequiredCapabilities","Object","G9CapabilityMissingError","G9Error","capability","message","hasCapability","services","name","requireCapability","service","assertRequiredCapabilities"],"mappings":";;;;;;;;;;;AAsLO,MAAMA,yBAA0DC,OAAO,MAAM,CAAC;IAAC;IAAS;IAAe;CAAO;AAG9G,MAAMC,iCAAiCC;IAI5C,YAAYC,UAAkB,EAAEC,OAAgB,CAAE;QAChD,KAAK,CAAC,sBAAsBA,QAAAA,UAAAA,UAAW,CAAC,KAAK,EAAED,WAAW,oDAAoD,CAAC,GAHjH,uBAAS,cAAT;QAIE,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,CAAC,UAAU,GAAGA;IACpB;AACF;AAGO,SAASE,cAAcC,QAAiC,EAAEC,IAAsB;IACrF,OAAOD,AAAkB,QAAlBA,QAAQ,CAACC,KAAK;AACvB;AAGO,SAASC,kBACdF,QAAiC,EACjCC,IAAO;IAEP,MAAME,UAAUH,QAAQ,CAACC,KAAK;IAC9B,IAAIE,AAAW,QAAXA,SAAiB,MAAM,IAAIR,yBAAyBM;IACxD,OAAOE;AACT;AAMO,SAASC,2BAA2BJ,QAAiC;IAC1E,KAAK,MAAMC,QAAQR,uBAAwBS,kBAAkBF,UAAUC;AACzE"}
|
|
@@ -69,6 +69,9 @@ export declare const G9Metrics: {
|
|
|
69
69
|
readonly ChipHeight: 36;
|
|
70
70
|
readonly ChipHorizontalPadding: 14;
|
|
71
71
|
readonly ChipFontSize: 13;
|
|
72
|
+
readonly SegmentHeight: 44;
|
|
73
|
+
readonly SegmentFontSize: 14;
|
|
74
|
+
readonly SegmentCornerRadius: 10;
|
|
72
75
|
readonly ChipIconSize: 16;
|
|
73
76
|
readonly ChipSpacing: 6;
|
|
74
77
|
readonly ChipSelectionAnimationMs: 140;
|
|
@@ -100,6 +103,7 @@ export declare const G9Metrics: {
|
|
|
100
103
|
readonly SelectionMinHeight: 220;
|
|
101
104
|
readonly SelectionRowFontSize: 14;
|
|
102
105
|
readonly SelectionIconSize: 18;
|
|
106
|
+
readonly SelectionAvatarSize: 28;
|
|
103
107
|
readonly SelectionCheckBoxSize: 20;
|
|
104
108
|
readonly SelectionCheckRadius: 6;
|
|
105
109
|
readonly CheckBoxSize: 20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/metrics.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/tokens/generated/metrics.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgLZ,CAAC;AACX,uCAAuC;AACvC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAC;AAElD,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE;IAAE,QAAQ,EAAE,CAAC,IAAI,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE;CAgL3E,CAAC"}
|
|
@@ -65,6 +65,9 @@ const G9Metrics = {
|
|
|
65
65
|
ChipHeight: 36,
|
|
66
66
|
ChipHorizontalPadding: 14,
|
|
67
67
|
ChipFontSize: 13,
|
|
68
|
+
SegmentHeight: 44,
|
|
69
|
+
SegmentFontSize: 14,
|
|
70
|
+
SegmentCornerRadius: 10,
|
|
68
71
|
ChipIconSize: 16,
|
|
69
72
|
ChipSpacing: 6,
|
|
70
73
|
ChipSelectionAnimationMs: 140,
|
|
@@ -96,6 +99,7 @@ const G9Metrics = {
|
|
|
96
99
|
SelectionMinHeight: 220,
|
|
97
100
|
SelectionRowFontSize: 14,
|
|
98
101
|
SelectionIconSize: 18,
|
|
102
|
+
SelectionAvatarSize: 28,
|
|
99
103
|
SelectionCheckBoxSize: 20,
|
|
100
104
|
SelectionCheckRadius: 6,
|
|
101
105
|
CheckBoxSize: 20,
|
|
@@ -238,6 +242,9 @@ const g9MetricUnits = {
|
|
|
238
242
|
ChipHeight: 'px',
|
|
239
243
|
ChipHorizontalPadding: 'px',
|
|
240
244
|
ChipFontSize: 'px',
|
|
245
|
+
SegmentHeight: 'px',
|
|
246
|
+
SegmentFontSize: 'px',
|
|
247
|
+
SegmentCornerRadius: 'px',
|
|
241
248
|
ChipIconSize: 'px',
|
|
242
249
|
ChipSpacing: 'px',
|
|
243
250
|
ChipSelectionAnimationMs: 'ms',
|
|
@@ -269,6 +276,7 @@ const g9MetricUnits = {
|
|
|
269
276
|
SelectionMinHeight: 'px',
|
|
270
277
|
SelectionRowFontSize: 'px',
|
|
271
278
|
SelectionIconSize: 'px',
|
|
279
|
+
SelectionAvatarSize: 'px',
|
|
272
280
|
SelectionCheckBoxSize: 'px',
|
|
273
281
|
SelectionCheckRadius: 'px',
|
|
274
282
|
CheckBoxSize: 'px',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens/generated/metrics.js","sources":["../../../src/tokens/generated/metrics.ts"],"sourcesContent":["// GENERATED by scripts/gen-tokens.mjs from plan/golden/metrics.json — do not edit; run `npm run gen:tokens`.\n// Golden source: G9Metrics (https://github.com/ImanKari/G9MAUIControls/blob/1e5db3fb19209406865434b48a4890651dbbd66a/G9MAUIControls/Controls/Shared/G9Metrics.cs).\n\n/**\n * Shared visual metric defaults of the G9 controls (MAUI `G9Metrics`), every public static value in declaration\n * order. Lengths are logical pixels, `…Ms` values are milliseconds, scales/opacities are plain numbers.\n */\nexport const G9Metrics = {\n RadiusXs: 6,\n RadiusSm: 8,\n RadiusMd: 12,\n RadiusLg: 16,\n RadiusXl: 20,\n RadiusPill: 999,\n ControlHeight: 52,\n ButtonHeightSmall: 36,\n ButtonHeightMedium: 44,\n ButtonHeightLarge: 48,\n ButtonHeightHero: 52,\n InputHorizontalPadding: 14,\n InputIconSize: 20,\n LeadingIconOuterMargin: 12,\n LeadingIconInnerMargin: 8,\n TrailingIconOuterMargin: 12,\n TrailingIconInnerMargin: 8,\n LeadingIconSlotWidth: 40,\n TrailingIconSlotWidth: 40,\n EditorTrailingIconBottomInset: 8,\n EditorTrailingSlotHeight: 36,\n InputLabelLeadingIconOffset: 26,\n FloatingLabelFloatedExtraX: 8,\n OutlineNotchTextGap: 8,\n FloatingLabelFontSizeFloat: 11,\n FloatingLabelFontSizeRest: 15,\n FloatingLabelHeight: 22,\n FloatingLabelFloatedY: -11,\n FloatingLabelRestScale: 1,\n FloatingLabelFloatedScale: 0.78,\n FloatingLabelDurationMs: 160,\n FloatingLabelClearance: 6,\n HelperFontSize: 11.5,\n CounterFontSize: 11,\n OutlinedFieldStrokeThickness: 1.5,\n OutlinedFieldEmphasisStrokeThickness: 2.5,\n OutlinedFieldFocusHaloThickness: 6,\n FocusRingOpacity: 0.22,\n ButtonFontSmall: 12,\n ButtonFontMedium: 14,\n ButtonFontLarge: 15,\n ButtonFontHero: 16,\n SwitchWidth: 56,\n SwitchHeight: 32,\n SwitchThumb: 24,\n SwitchThumbPressed: 30,\n SliderHeight: 104,\n SliderHeightCompact: 36,\n SliderTrackY: 52,\n SliderTrackHeight: 8,\n SliderThumbRadius: 14,\n SliderHorizontalInset: 16,\n SliderLabelGap: 18,\n PinCellWidth: 44,\n PinCellHeight: 52,\n PinCellStrokeThickness: 1.4,\n PinCellStrokeThicknessFocused: 2,\n PinCellCornerRadius: 10,\n PinCellSpacing: 8,\n PinSeparatorSpacing: 6,\n PinCellFontSize: 22,\n PinSeparatorFontSize: 22,\n ProgressBarHeight: 10,\n ChipHeight: 36,\n ChipHorizontalPadding: 14,\n ChipFontSize: 13,\n ChipIconSize: 16,\n ChipSpacing: 6,\n ChipSelectionAnimationMs: 140,\n ChipCheckmarkAnimationMs: 120,\n TabBarHeight: 52,\n TabBarInnerPadding: 4,\n TabBarRadius: 26,\n TabPillVerticalInset: 2,\n TabPillRadius: 18,\n TabCellHorizontalPadding: 16,\n TabBarToContentGap: 8,\n TabFontSize: 13,\n TabIconSize: 16,\n TabBadgeHeight: 18,\n TabContentRadius: 16,\n TabUnderlineThickness: 2.5,\n TabBarEdgeLineThickness: 1,\n TabSeparatorThickness: 1,\n TabSeparatorVerticalInset: 12,\n TabContentDefaultPadding: 20,\n DrumColumnHeight: 220,\n DrumRowHeight: 44,\n DrumLabelFontSize: 10,\n DrumSelectedFontSize: 17,\n DrumUnselectedFontSize: 16,\n SelectionRowHeight: 52,\n SelectionRowHorizontalPadding: 16,\n SelectionMaxHeight: 520,\n SelectionMinHeight: 220,\n SelectionRowFontSize: 14,\n SelectionIconSize: 18,\n SelectionCheckBoxSize: 20,\n SelectionCheckRadius: 6,\n CheckBoxSize: 20,\n CheckBoxCornerRadius: 6,\n CheckBoxStrokeThickness: 2,\n CheckBoxMarkStrokeThickness: 2,\n CheckBoxHaloDiameter: 40,\n CheckBoxLabelSpacing: 2,\n CheckBoxLabelVerticalPadding: 12,\n CheckBoxLabelFontSize: 14,\n CheckBoxToggleDurationMs: 200,\n CheckBoxMorphDurationMs: 150,\n NavCardIconBadgeSize: 38,\n NavCardPaddingX: 14,\n NavCardPaddingY: 12,\n NavCardTitleFontSize: 14,\n NavCardSubtitleFontSize: 11.5,\n NavCardValueFontSize: 13,\n NavCardChevronSize: 24,\n NavCardComingSoonFontSize: 10,\n NavCardComingSoonPaddingX: 7,\n NavCardComingSoonPaddingY: 3.5,\n NavCardComingSoonRadius: 11,\n SeparatorTitleFontSize: 10,\n SeparatorIconSize: 12,\n ExpanderHeaderHeight: 48,\n ExpanderTitleFontSize: 15,\n ExpanderIconSize: 20,\n ExpanderChevronSize: 22,\n ExpanderHeaderSpacing: 10,\n ExpanderContentTopGap: 8,\n ExpanderHeaderPaddingX: 14,\n ExpanderChevronRotationMs: 220,\n ExpanderContentAnimationMs: 220,\n CascadePanelAnimationMs: 280,\n CascadePanelHeaderHeight: 48,\n CascadePanelHeaderFontSize: 15,\n CascadePanelBackIconSize: 22,\n CascadePanelHeaderPadding: 8,\n CascadePanelParallaxFraction: 0.18,\n CascadePanelUnderlayDimOpacity: 0.55,\n PressDurationMs: 80,\n ReleaseDurationMs: 150,\n HoverDurationMs: 80,\n RippleDurationMs: 350,\n IconPressScaleTo: 0.92,\n TabIndicatorDurationMs: 240,\n TabContentTransitionMs: 160,\n SwitchToggleDurationMs: 240,\n ProgressValueDurationMs: 300,\n IndeterminateFrameMs: 16,\n IndeterminateStep: 0.012,\n IntroOverlayOpacity: 0.52,\n IntroOverlayTopOpacityRatio: 0.4,\n IntroStartupCoverFadeDurationMs: 320,\n IntroInitialVideoSeekTimeoutMs: 900,\n IntroMediaFadeInDurationMs: 420,\n IntroMediaFadeOutDurationMs: 420,\n IntroLogoWidth: 192,\n IntroLogoHeight: 34,\n IntroTitleFontSize: 18,\n IntroSubtitleFontSize: 14,\n IntroNavFontSize: 14,\n IntroStepActiveWidth: 28,\n IntroStepInactiveWidth: 20,\n IntroStepHeight: 4,\n IntroStepSpacing: 6,\n IntroChromePadding: 20,\n IntroHeaderTopPadding: 16,\n IntroLogoTopMargin: 48,\n IntroTextBottomMargin: 12,\n IntroNavMinTouchHeight: 48,\n IntroNavMinTouchWidth: 72,\n IntroContentBottomPadding: 24,\n} as const;\n/** The name of a `G9Metrics` value. */\nexport type G9MetricName = keyof typeof G9Metrics;\n\n/** The CSS unit each metric is emitted with by `toMetricCssVariables`. */\nexport const g9MetricUnits: { readonly [K in G9MetricName]: 'px' | 'ms' | '' } = {\n RadiusXs: 'px',\n RadiusSm: 'px',\n RadiusMd: 'px',\n RadiusLg: 'px',\n RadiusXl: 'px',\n RadiusPill: 'px',\n ControlHeight: 'px',\n ButtonHeightSmall: 'px',\n ButtonHeightMedium: 'px',\n ButtonHeightLarge: 'px',\n ButtonHeightHero: 'px',\n InputHorizontalPadding: 'px',\n InputIconSize: 'px',\n LeadingIconOuterMargin: 'px',\n LeadingIconInnerMargin: 'px',\n TrailingIconOuterMargin: 'px',\n TrailingIconInnerMargin: 'px',\n LeadingIconSlotWidth: 'px',\n TrailingIconSlotWidth: 'px',\n EditorTrailingIconBottomInset: 'px',\n EditorTrailingSlotHeight: 'px',\n InputLabelLeadingIconOffset: 'px',\n FloatingLabelFloatedExtraX: 'px',\n OutlineNotchTextGap: 'px',\n FloatingLabelFontSizeFloat: 'px',\n FloatingLabelFontSizeRest: 'px',\n FloatingLabelHeight: 'px',\n FloatingLabelFloatedY: 'px',\n FloatingLabelRestScale: '',\n FloatingLabelFloatedScale: '',\n FloatingLabelDurationMs: 'ms',\n FloatingLabelClearance: 'px',\n HelperFontSize: 'px',\n CounterFontSize: 'px',\n OutlinedFieldStrokeThickness: 'px',\n OutlinedFieldEmphasisStrokeThickness: 'px',\n OutlinedFieldFocusHaloThickness: 'px',\n FocusRingOpacity: '',\n ButtonFontSmall: 'px',\n ButtonFontMedium: 'px',\n ButtonFontLarge: 'px',\n ButtonFontHero: 'px',\n SwitchWidth: 'px',\n SwitchHeight: 'px',\n SwitchThumb: 'px',\n SwitchThumbPressed: 'px',\n SliderHeight: 'px',\n SliderHeightCompact: 'px',\n SliderTrackY: 'px',\n SliderTrackHeight: 'px',\n SliderThumbRadius: 'px',\n SliderHorizontalInset: 'px',\n SliderLabelGap: 'px',\n PinCellWidth: 'px',\n PinCellHeight: 'px',\n PinCellStrokeThickness: 'px',\n PinCellStrokeThicknessFocused: 'px',\n PinCellCornerRadius: 'px',\n PinCellSpacing: 'px',\n PinSeparatorSpacing: 'px',\n PinCellFontSize: 'px',\n PinSeparatorFontSize: 'px',\n ProgressBarHeight: 'px',\n ChipHeight: 'px',\n ChipHorizontalPadding: 'px',\n ChipFontSize: 'px',\n ChipIconSize: 'px',\n ChipSpacing: 'px',\n ChipSelectionAnimationMs: 'ms',\n ChipCheckmarkAnimationMs: 'ms',\n TabBarHeight: 'px',\n TabBarInnerPadding: 'px',\n TabBarRadius: 'px',\n TabPillVerticalInset: 'px',\n TabPillRadius: 'px',\n TabCellHorizontalPadding: 'px',\n TabBarToContentGap: 'px',\n TabFontSize: 'px',\n TabIconSize: 'px',\n TabBadgeHeight: 'px',\n TabContentRadius: 'px',\n TabUnderlineThickness: 'px',\n TabBarEdgeLineThickness: 'px',\n TabSeparatorThickness: 'px',\n TabSeparatorVerticalInset: 'px',\n TabContentDefaultPadding: 'px',\n DrumColumnHeight: 'px',\n DrumRowHeight: 'px',\n DrumLabelFontSize: 'px',\n DrumSelectedFontSize: 'px',\n DrumUnselectedFontSize: 'px',\n SelectionRowHeight: 'px',\n SelectionRowHorizontalPadding: 'px',\n SelectionMaxHeight: 'px',\n SelectionMinHeight: 'px',\n SelectionRowFontSize: 'px',\n SelectionIconSize: 'px',\n SelectionCheckBoxSize: 'px',\n SelectionCheckRadius: 'px',\n CheckBoxSize: 'px',\n CheckBoxCornerRadius: 'px',\n CheckBoxStrokeThickness: 'px',\n CheckBoxMarkStrokeThickness: 'px',\n CheckBoxHaloDiameter: 'px',\n CheckBoxLabelSpacing: 'px',\n CheckBoxLabelVerticalPadding: 'px',\n CheckBoxLabelFontSize: 'px',\n CheckBoxToggleDurationMs: 'ms',\n CheckBoxMorphDurationMs: 'ms',\n NavCardIconBadgeSize: 'px',\n NavCardPaddingX: 'px',\n NavCardPaddingY: 'px',\n NavCardTitleFontSize: 'px',\n NavCardSubtitleFontSize: 'px',\n NavCardValueFontSize: 'px',\n NavCardChevronSize: 'px',\n NavCardComingSoonFontSize: 'px',\n NavCardComingSoonPaddingX: 'px',\n NavCardComingSoonPaddingY: 'px',\n NavCardComingSoonRadius: 'px',\n SeparatorTitleFontSize: 'px',\n SeparatorIconSize: 'px',\n ExpanderHeaderHeight: 'px',\n ExpanderTitleFontSize: 'px',\n ExpanderIconSize: 'px',\n ExpanderChevronSize: 'px',\n ExpanderHeaderSpacing: 'px',\n ExpanderContentTopGap: 'px',\n ExpanderHeaderPaddingX: 'px',\n ExpanderChevronRotationMs: 'ms',\n ExpanderContentAnimationMs: 'ms',\n CascadePanelAnimationMs: 'ms',\n CascadePanelHeaderHeight: 'px',\n CascadePanelHeaderFontSize: 'px',\n CascadePanelBackIconSize: 'px',\n CascadePanelHeaderPadding: 'px',\n CascadePanelParallaxFraction: '',\n CascadePanelUnderlayDimOpacity: '',\n PressDurationMs: 'ms',\n ReleaseDurationMs: 'ms',\n HoverDurationMs: 'ms',\n RippleDurationMs: 'ms',\n IconPressScaleTo: '',\n TabIndicatorDurationMs: 'ms',\n TabContentTransitionMs: 'ms',\n SwitchToggleDurationMs: 'ms',\n ProgressValueDurationMs: 'ms',\n IndeterminateFrameMs: 'ms',\n IndeterminateStep: '',\n IntroOverlayOpacity: '',\n IntroOverlayTopOpacityRatio: '',\n IntroStartupCoverFadeDurationMs: 'ms',\n IntroInitialVideoSeekTimeoutMs: 'ms',\n IntroMediaFadeInDurationMs: 'ms',\n IntroMediaFadeOutDurationMs: 'ms',\n IntroLogoWidth: 'px',\n IntroLogoHeight: 'px',\n IntroTitleFontSize: 'px',\n IntroSubtitleFontSize: 'px',\n IntroNavFontSize: 'px',\n IntroStepActiveWidth: 'px',\n IntroStepInactiveWidth: 'px',\n IntroStepHeight: 'px',\n IntroStepSpacing: 'px',\n IntroChromePadding: 'px',\n IntroHeaderTopPadding: 'px',\n IntroLogoTopMargin: 'px',\n IntroTextBottomMargin: 'px',\n IntroNavMinTouchHeight: 'px',\n IntroNavMinTouchWidth: 'px',\n IntroContentBottomPadding: 'px',\n};\n"],"names":["G9Metrics","g9MetricUnits"],"mappings":"AAOO,MAAMA,YAAY;IACvB,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,kBAAkB;IAClB,wBAAwB;IACxB,eAAe;IACf,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,yBA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,uBAAuB;IACvB,0BAA0B;IAC1B,yBAAyB;IACzB,sBAAsB;IACtB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,yBAAyB;IACzB,sBAAsB;IACtB,oBAAoB;IACpB,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,yBAAyB;IACzB,wBAAwB;IACxB,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,kBAAkB;IAClB,qBAAqB;IACrB,uBAAuB;IACvB,uBAAuB;IACvB,wBAAwB;IACxB,2BAA2B;IAC3B,4BAA4B;IAC5B,yBAAyB;IACzB,0BAA0B;IAC1B,4BAA4B;IAC5B,0BAA0B;IAC1B,2BAA2B;IAC3B,8BAA8B;IAC9B,gCAAgC;IAChC,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,6BAA6B;IAC7B,iCAAiC;IACjC,gCAAgC;IAChC,4BAA4B;IAC5B,6BAA6B;IAC7B,gBAAgB;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,uBAAuB;IACvB,kBAAkB;IAClB,sBAAsB;IACtB,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,uBAAuB;IACvB,2BAA2B;AAC7B"}
|
|
1
|
+
{"version":3,"file":"tokens/generated/metrics.js","sources":["../../../src/tokens/generated/metrics.ts"],"sourcesContent":["// GENERATED by scripts/gen-tokens.mjs from plan/golden/metrics.json — do not edit; run `npm run gen:tokens`.\n// Golden source: G9Metrics (https://github.com/ImanKari/G9MAUIControls/blob/f0603d40e5d50609a15b88104faff6b2066f30b6/G9MAUIControls/Controls/Shared/G9Metrics.cs).\n\n/**\n * Shared visual metric defaults of the G9 controls (MAUI `G9Metrics`), every public static value in declaration\n * order. Lengths are logical pixels, `…Ms` values are milliseconds, scales/opacities are plain numbers.\n */\nexport const G9Metrics = {\n RadiusXs: 6,\n RadiusSm: 8,\n RadiusMd: 12,\n RadiusLg: 16,\n RadiusXl: 20,\n RadiusPill: 999,\n ControlHeight: 52,\n ButtonHeightSmall: 36,\n ButtonHeightMedium: 44,\n ButtonHeightLarge: 48,\n ButtonHeightHero: 52,\n InputHorizontalPadding: 14,\n InputIconSize: 20,\n LeadingIconOuterMargin: 12,\n LeadingIconInnerMargin: 8,\n TrailingIconOuterMargin: 12,\n TrailingIconInnerMargin: 8,\n LeadingIconSlotWidth: 40,\n TrailingIconSlotWidth: 40,\n EditorTrailingIconBottomInset: 8,\n EditorTrailingSlotHeight: 36,\n InputLabelLeadingIconOffset: 26,\n FloatingLabelFloatedExtraX: 8,\n OutlineNotchTextGap: 8,\n FloatingLabelFontSizeFloat: 11,\n FloatingLabelFontSizeRest: 15,\n FloatingLabelHeight: 22,\n FloatingLabelFloatedY: -11,\n FloatingLabelRestScale: 1,\n FloatingLabelFloatedScale: 0.78,\n FloatingLabelDurationMs: 160,\n FloatingLabelClearance: 6,\n HelperFontSize: 11.5,\n CounterFontSize: 11,\n OutlinedFieldStrokeThickness: 1.5,\n OutlinedFieldEmphasisStrokeThickness: 2.5,\n OutlinedFieldFocusHaloThickness: 6,\n FocusRingOpacity: 0.22,\n ButtonFontSmall: 12,\n ButtonFontMedium: 14,\n ButtonFontLarge: 15,\n ButtonFontHero: 16,\n SwitchWidth: 56,\n SwitchHeight: 32,\n SwitchThumb: 24,\n SwitchThumbPressed: 30,\n SliderHeight: 104,\n SliderHeightCompact: 36,\n SliderTrackY: 52,\n SliderTrackHeight: 8,\n SliderThumbRadius: 14,\n SliderHorizontalInset: 16,\n SliderLabelGap: 18,\n PinCellWidth: 44,\n PinCellHeight: 52,\n PinCellStrokeThickness: 1.4,\n PinCellStrokeThicknessFocused: 2,\n PinCellCornerRadius: 10,\n PinCellSpacing: 8,\n PinSeparatorSpacing: 6,\n PinCellFontSize: 22,\n PinSeparatorFontSize: 22,\n ProgressBarHeight: 10,\n ChipHeight: 36,\n ChipHorizontalPadding: 14,\n ChipFontSize: 13,\n SegmentHeight: 44,\n SegmentFontSize: 14,\n SegmentCornerRadius: 10,\n ChipIconSize: 16,\n ChipSpacing: 6,\n ChipSelectionAnimationMs: 140,\n ChipCheckmarkAnimationMs: 120,\n TabBarHeight: 52,\n TabBarInnerPadding: 4,\n TabBarRadius: 26,\n TabPillVerticalInset: 2,\n TabPillRadius: 18,\n TabCellHorizontalPadding: 16,\n TabBarToContentGap: 8,\n TabFontSize: 13,\n TabIconSize: 16,\n TabBadgeHeight: 18,\n TabContentRadius: 16,\n TabUnderlineThickness: 2.5,\n TabBarEdgeLineThickness: 1,\n TabSeparatorThickness: 1,\n TabSeparatorVerticalInset: 12,\n TabContentDefaultPadding: 20,\n DrumColumnHeight: 220,\n DrumRowHeight: 44,\n DrumLabelFontSize: 10,\n DrumSelectedFontSize: 17,\n DrumUnselectedFontSize: 16,\n SelectionRowHeight: 52,\n SelectionRowHorizontalPadding: 16,\n SelectionMaxHeight: 520,\n SelectionMinHeight: 220,\n SelectionRowFontSize: 14,\n SelectionIconSize: 18,\n SelectionAvatarSize: 28,\n SelectionCheckBoxSize: 20,\n SelectionCheckRadius: 6,\n CheckBoxSize: 20,\n CheckBoxCornerRadius: 6,\n CheckBoxStrokeThickness: 2,\n CheckBoxMarkStrokeThickness: 2,\n CheckBoxHaloDiameter: 40,\n CheckBoxLabelSpacing: 2,\n CheckBoxLabelVerticalPadding: 12,\n CheckBoxLabelFontSize: 14,\n CheckBoxToggleDurationMs: 200,\n CheckBoxMorphDurationMs: 150,\n NavCardIconBadgeSize: 38,\n NavCardPaddingX: 14,\n NavCardPaddingY: 12,\n NavCardTitleFontSize: 14,\n NavCardSubtitleFontSize: 11.5,\n NavCardValueFontSize: 13,\n NavCardChevronSize: 24,\n NavCardComingSoonFontSize: 10,\n NavCardComingSoonPaddingX: 7,\n NavCardComingSoonPaddingY: 3.5,\n NavCardComingSoonRadius: 11,\n SeparatorTitleFontSize: 10,\n SeparatorIconSize: 12,\n ExpanderHeaderHeight: 48,\n ExpanderTitleFontSize: 15,\n ExpanderIconSize: 20,\n ExpanderChevronSize: 22,\n ExpanderHeaderSpacing: 10,\n ExpanderContentTopGap: 8,\n ExpanderHeaderPaddingX: 14,\n ExpanderChevronRotationMs: 220,\n ExpanderContentAnimationMs: 220,\n CascadePanelAnimationMs: 280,\n CascadePanelHeaderHeight: 48,\n CascadePanelHeaderFontSize: 15,\n CascadePanelBackIconSize: 22,\n CascadePanelHeaderPadding: 8,\n CascadePanelParallaxFraction: 0.18,\n CascadePanelUnderlayDimOpacity: 0.55,\n PressDurationMs: 80,\n ReleaseDurationMs: 150,\n HoverDurationMs: 80,\n RippleDurationMs: 350,\n IconPressScaleTo: 0.92,\n TabIndicatorDurationMs: 240,\n TabContentTransitionMs: 160,\n SwitchToggleDurationMs: 240,\n ProgressValueDurationMs: 300,\n IndeterminateFrameMs: 16,\n IndeterminateStep: 0.012,\n IntroOverlayOpacity: 0.52,\n IntroOverlayTopOpacityRatio: 0.4,\n IntroStartupCoverFadeDurationMs: 320,\n IntroInitialVideoSeekTimeoutMs: 900,\n IntroMediaFadeInDurationMs: 420,\n IntroMediaFadeOutDurationMs: 420,\n IntroLogoWidth: 192,\n IntroLogoHeight: 34,\n IntroTitleFontSize: 18,\n IntroSubtitleFontSize: 14,\n IntroNavFontSize: 14,\n IntroStepActiveWidth: 28,\n IntroStepInactiveWidth: 20,\n IntroStepHeight: 4,\n IntroStepSpacing: 6,\n IntroChromePadding: 20,\n IntroHeaderTopPadding: 16,\n IntroLogoTopMargin: 48,\n IntroTextBottomMargin: 12,\n IntroNavMinTouchHeight: 48,\n IntroNavMinTouchWidth: 72,\n IntroContentBottomPadding: 24,\n} as const;\n/** The name of a `G9Metrics` value. */\nexport type G9MetricName = keyof typeof G9Metrics;\n\n/** The CSS unit each metric is emitted with by `toMetricCssVariables`. */\nexport const g9MetricUnits: { readonly [K in G9MetricName]: 'px' | 'ms' | '' } = {\n RadiusXs: 'px',\n RadiusSm: 'px',\n RadiusMd: 'px',\n RadiusLg: 'px',\n RadiusXl: 'px',\n RadiusPill: 'px',\n ControlHeight: 'px',\n ButtonHeightSmall: 'px',\n ButtonHeightMedium: 'px',\n ButtonHeightLarge: 'px',\n ButtonHeightHero: 'px',\n InputHorizontalPadding: 'px',\n InputIconSize: 'px',\n LeadingIconOuterMargin: 'px',\n LeadingIconInnerMargin: 'px',\n TrailingIconOuterMargin: 'px',\n TrailingIconInnerMargin: 'px',\n LeadingIconSlotWidth: 'px',\n TrailingIconSlotWidth: 'px',\n EditorTrailingIconBottomInset: 'px',\n EditorTrailingSlotHeight: 'px',\n InputLabelLeadingIconOffset: 'px',\n FloatingLabelFloatedExtraX: 'px',\n OutlineNotchTextGap: 'px',\n FloatingLabelFontSizeFloat: 'px',\n FloatingLabelFontSizeRest: 'px',\n FloatingLabelHeight: 'px',\n FloatingLabelFloatedY: 'px',\n FloatingLabelRestScale: '',\n FloatingLabelFloatedScale: '',\n FloatingLabelDurationMs: 'ms',\n FloatingLabelClearance: 'px',\n HelperFontSize: 'px',\n CounterFontSize: 'px',\n OutlinedFieldStrokeThickness: 'px',\n OutlinedFieldEmphasisStrokeThickness: 'px',\n OutlinedFieldFocusHaloThickness: 'px',\n FocusRingOpacity: '',\n ButtonFontSmall: 'px',\n ButtonFontMedium: 'px',\n ButtonFontLarge: 'px',\n ButtonFontHero: 'px',\n SwitchWidth: 'px',\n SwitchHeight: 'px',\n SwitchThumb: 'px',\n SwitchThumbPressed: 'px',\n SliderHeight: 'px',\n SliderHeightCompact: 'px',\n SliderTrackY: 'px',\n SliderTrackHeight: 'px',\n SliderThumbRadius: 'px',\n SliderHorizontalInset: 'px',\n SliderLabelGap: 'px',\n PinCellWidth: 'px',\n PinCellHeight: 'px',\n PinCellStrokeThickness: 'px',\n PinCellStrokeThicknessFocused: 'px',\n PinCellCornerRadius: 'px',\n PinCellSpacing: 'px',\n PinSeparatorSpacing: 'px',\n PinCellFontSize: 'px',\n PinSeparatorFontSize: 'px',\n ProgressBarHeight: 'px',\n ChipHeight: 'px',\n ChipHorizontalPadding: 'px',\n ChipFontSize: 'px',\n SegmentHeight: 'px',\n SegmentFontSize: 'px',\n SegmentCornerRadius: 'px',\n ChipIconSize: 'px',\n ChipSpacing: 'px',\n ChipSelectionAnimationMs: 'ms',\n ChipCheckmarkAnimationMs: 'ms',\n TabBarHeight: 'px',\n TabBarInnerPadding: 'px',\n TabBarRadius: 'px',\n TabPillVerticalInset: 'px',\n TabPillRadius: 'px',\n TabCellHorizontalPadding: 'px',\n TabBarToContentGap: 'px',\n TabFontSize: 'px',\n TabIconSize: 'px',\n TabBadgeHeight: 'px',\n TabContentRadius: 'px',\n TabUnderlineThickness: 'px',\n TabBarEdgeLineThickness: 'px',\n TabSeparatorThickness: 'px',\n TabSeparatorVerticalInset: 'px',\n TabContentDefaultPadding: 'px',\n DrumColumnHeight: 'px',\n DrumRowHeight: 'px',\n DrumLabelFontSize: 'px',\n DrumSelectedFontSize: 'px',\n DrumUnselectedFontSize: 'px',\n SelectionRowHeight: 'px',\n SelectionRowHorizontalPadding: 'px',\n SelectionMaxHeight: 'px',\n SelectionMinHeight: 'px',\n SelectionRowFontSize: 'px',\n SelectionIconSize: 'px',\n SelectionAvatarSize: 'px',\n SelectionCheckBoxSize: 'px',\n SelectionCheckRadius: 'px',\n CheckBoxSize: 'px',\n CheckBoxCornerRadius: 'px',\n CheckBoxStrokeThickness: 'px',\n CheckBoxMarkStrokeThickness: 'px',\n CheckBoxHaloDiameter: 'px',\n CheckBoxLabelSpacing: 'px',\n CheckBoxLabelVerticalPadding: 'px',\n CheckBoxLabelFontSize: 'px',\n CheckBoxToggleDurationMs: 'ms',\n CheckBoxMorphDurationMs: 'ms',\n NavCardIconBadgeSize: 'px',\n NavCardPaddingX: 'px',\n NavCardPaddingY: 'px',\n NavCardTitleFontSize: 'px',\n NavCardSubtitleFontSize: 'px',\n NavCardValueFontSize: 'px',\n NavCardChevronSize: 'px',\n NavCardComingSoonFontSize: 'px',\n NavCardComingSoonPaddingX: 'px',\n NavCardComingSoonPaddingY: 'px',\n NavCardComingSoonRadius: 'px',\n SeparatorTitleFontSize: 'px',\n SeparatorIconSize: 'px',\n ExpanderHeaderHeight: 'px',\n ExpanderTitleFontSize: 'px',\n ExpanderIconSize: 'px',\n ExpanderChevronSize: 'px',\n ExpanderHeaderSpacing: 'px',\n ExpanderContentTopGap: 'px',\n ExpanderHeaderPaddingX: 'px',\n ExpanderChevronRotationMs: 'ms',\n ExpanderContentAnimationMs: 'ms',\n CascadePanelAnimationMs: 'ms',\n CascadePanelHeaderHeight: 'px',\n CascadePanelHeaderFontSize: 'px',\n CascadePanelBackIconSize: 'px',\n CascadePanelHeaderPadding: 'px',\n CascadePanelParallaxFraction: '',\n CascadePanelUnderlayDimOpacity: '',\n PressDurationMs: 'ms',\n ReleaseDurationMs: 'ms',\n HoverDurationMs: 'ms',\n RippleDurationMs: 'ms',\n IconPressScaleTo: '',\n TabIndicatorDurationMs: 'ms',\n TabContentTransitionMs: 'ms',\n SwitchToggleDurationMs: 'ms',\n ProgressValueDurationMs: 'ms',\n IndeterminateFrameMs: 'ms',\n IndeterminateStep: '',\n IntroOverlayOpacity: '',\n IntroOverlayTopOpacityRatio: '',\n IntroStartupCoverFadeDurationMs: 'ms',\n IntroInitialVideoSeekTimeoutMs: 'ms',\n IntroMediaFadeInDurationMs: 'ms',\n IntroMediaFadeOutDurationMs: 'ms',\n IntroLogoWidth: 'px',\n IntroLogoHeight: 'px',\n IntroTitleFontSize: 'px',\n IntroSubtitleFontSize: 'px',\n IntroNavFontSize: 'px',\n IntroStepActiveWidth: 'px',\n IntroStepInactiveWidth: 'px',\n IntroStepHeight: 'px',\n IntroStepSpacing: 'px',\n IntroChromePadding: 'px',\n IntroHeaderTopPadding: 'px',\n IntroLogoTopMargin: 'px',\n IntroTextBottomMargin: 'px',\n IntroNavMinTouchHeight: 'px',\n IntroNavMinTouchWidth: 'px',\n IntroContentBottomPadding: 'px',\n};\n"],"names":["G9Metrics","g9MetricUnits"],"mappings":"AAOO,MAAMA,YAAY;IACvB,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,kBAAkB;IAClB,wBAAwB;IACxB,eAAe;IACf,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,yBAAyB;IACzB,sBAAsB;IACtB,uBAAuB;IACvB,+BAA+B;IAC/B,0BAA0B;IAC1B,6BAA6B;IAC7B,4BAA4B;IAC5B,qBAAqB;IACrB,4BAA4B;IAC5B,2BAA2B;IAC3B,qBAAqB;IACrB,uBAAuB;IACvB,wBAAwB;IACxB,2BAA2B;IAC3B,yBAAyB;IACzB,wBAAwB;IACxB,gBAAgB;IAChB,iBAAiB;IACjB,8BAA8B;IAC9B,sCAAsC;IACtC,iCAAiC;IACjC,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,aAAa;IACb,oBAAoB;IACpB,cAAc;IACd,qBAAqB;IACrB,cAAc;IACd,mBAAmB;IACnB,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,+BAA+B;IAC/B,qBAAqB;IACrB,gBAAgB;IAChB,qBAAqB;IACrB,iBAAiB;IACjB,sBAAsB;IACtB,mBAAmB;IACnB,YAAY;IACZ,uBAAuB;IACvB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,qBAAqB;IACrB,cAAc;IACd,aAAa;IACb,0BAA0B;IAC1B,0BAA0B;IAC1B,cAAc;IACd,oBAAoB;IACpB,cAAc;IACd,sBAAsB;IACtB,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;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,uBAAuB;IACvB,kBAAkB;IAClB,sBAAsB;IACtB,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;IACpB,uBAAuB;IACvB,wBAAwB;IACxB,uBAAuB;IACvB,2BAA2B;AAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens/generated/palettes.js","sources":["../../../src/tokens/generated/palettes.ts"],"sourcesContent":["// GENERATED by scripts/gen-tokens.mjs from plan/golden/theme-palettes.json — do not edit; run `npm run gen:tokens`.\n// Golden source: G9Theme.Light.xaml / G9Theme.Dark.xaml (https://github.com/ImanKari/G9MAUIControls/blob/1e5db3fb19209406865434b48a4890651dbbd66a/G9MAUIControls/Theming/).\n\n/**\n * The colour tokens of the G9 theme in MAUI declaration order (MAUI `G9ColorToken`). Values keep the MAUI names so\n * `G9ColorToken.Primary === 'Primary'`; the CSS variable is `--g9-primary` (see `cssVariableName`).\n */\nexport const G9ColorToken = {\n Primary: 'Primary',\n OnPrimary: 'OnPrimary',\n PrimaryContainer: 'PrimaryContainer',\n OnPrimaryContainer: 'OnPrimaryContainer',\n PrimaryBorder: 'PrimaryBorder',\n PrimaryHover: 'PrimaryHover',\n PrimaryPressed: 'PrimaryPressed',\n Secondary: 'Secondary',\n OnSecondary: 'OnSecondary',\n SecondaryContainer: 'SecondaryContainer',\n OnSecondaryContainer: 'OnSecondaryContainer',\n SecondaryBorder: 'SecondaryBorder',\n Tertiary: 'Tertiary',\n OnTertiary: 'OnTertiary',\n TertiaryContainer: 'TertiaryContainer',\n OnTertiaryContainer: 'OnTertiaryContainer',\n TertiaryBorder: 'TertiaryBorder',\n Quaternary: 'Quaternary',\n OnQuaternary: 'OnQuaternary',\n QuaternaryContainer: 'QuaternaryContainer',\n OnQuaternaryContainer: 'OnQuaternaryContainer',\n QuaternaryBorder: 'QuaternaryBorder',\n Error: 'Error',\n OnError: 'OnError',\n ErrorContainer: 'ErrorContainer',\n OnErrorContainer: 'OnErrorContainer',\n ErrorBorder: 'ErrorBorder',\n Warning: 'Warning',\n OnWarning: 'OnWarning',\n WarningContainer: 'WarningContainer',\n OnWarningContainer: 'OnWarningContainer',\n WarningBorder: 'WarningBorder',\n Success: 'Success',\n OnSuccess: 'OnSuccess',\n SuccessContainer: 'SuccessContainer',\n OnSuccessContainer: 'OnSuccessContainer',\n SuccessBorder: 'SuccessBorder',\n Info: 'Info',\n OnInfo: 'OnInfo',\n InfoContainer: 'InfoContainer',\n OnInfoContainer: 'OnInfoContainer',\n InfoBorder: 'InfoBorder',\n Outline: 'Outline',\n OutlineVariant: 'OutlineVariant',\n OutlineBorder: 'OutlineBorder',\n Background: 'Background',\n OnBackground: 'OnBackground',\n BackgroundSecondary: 'BackgroundSecondary',\n Surface: 'Surface',\n OnSurface: 'OnSurface',\n SurfaceVariant: 'SurfaceVariant',\n OnSurfaceVariant: 'OnSurfaceVariant',\n SurfaceBorder: 'SurfaceBorder',\n InverseSurface: 'InverseSurface',\n InverseOnSurface: 'InverseOnSurface',\n InversePrimary: 'InversePrimary',\n SurfaceContainerHighest: 'SurfaceContainerHighest',\n SurfaceContainerHigh: 'SurfaceContainerHigh',\n SurfaceContainer: 'SurfaceContainer',\n SurfaceContainerLow: 'SurfaceContainerLow',\n SurfaceContainerLowest: 'SurfaceContainerLowest',\n SurfaceBright: 'SurfaceBright',\n SurfaceDim: 'SurfaceDim',\n Scrim: 'Scrim',\n ScrimLight: 'ScrimLight',\n Overlay: 'Overlay',\n OverlayLight: 'OverlayLight',\n TextPrimary: 'TextPrimary',\n TextSecondary: 'TextSecondary',\n TextTertiary: 'TextTertiary',\n TextDisabled: 'TextDisabled',\n White: 'White',\n Black: 'Black',\n Light: 'Light',\n Dark: 'Dark',\n Divider: 'Divider',\n DividerStrong: 'DividerStrong',\n Focus: 'Focus',\n FocusVisible: 'FocusVisible',\n Disabled: 'Disabled',\n DisabledContainer: 'DisabledContainer',\n CardBackground: 'CardBackground',\n CardBorder: 'CardBorder',\n CardElevated: 'CardElevated',\n Default: 'Default',\n OnDefault: 'OnDefault',\n DefaultContainer: 'DefaultContainer',\n OnDefaultContainer: 'OnDefaultContainer',\n DefaultBorder: 'DefaultBorder',\n DefaultHover: 'DefaultHover',\n DefaultPressed: 'DefaultPressed',\n InputBackground: 'InputBackground',\n InputBorder: 'InputBorder',\n InputBorderFocused: 'InputBorderFocused',\n InputPlaceholder: 'InputPlaceholder',\n} as const;\nexport type G9ColorToken = (typeof G9ColorToken)[keyof typeof G9ColorToken];\n\n/** One CSS colour per token: a complete palette (MAUI `G9PaletteValues`). */\nexport type G9PaletteValues = { readonly [K in G9ColorToken]: string };\n\n/** Every token, in declaration order. */\nexport const g9ColorTokens: readonly G9ColorToken[] = [\n 'Primary',\n 'OnPrimary',\n 'PrimaryContainer',\n 'OnPrimaryContainer',\n 'PrimaryBorder',\n 'PrimaryHover',\n 'PrimaryPressed',\n 'Secondary',\n 'OnSecondary',\n 'SecondaryContainer',\n 'OnSecondaryContainer',\n 'SecondaryBorder',\n 'Tertiary',\n 'OnTertiary',\n 'TertiaryContainer',\n 'OnTertiaryContainer',\n 'TertiaryBorder',\n 'Quaternary',\n 'OnQuaternary',\n 'QuaternaryContainer',\n 'OnQuaternaryContainer',\n 'QuaternaryBorder',\n 'Error',\n 'OnError',\n 'ErrorContainer',\n 'OnErrorContainer',\n 'ErrorBorder',\n 'Warning',\n 'OnWarning',\n 'WarningContainer',\n 'OnWarningContainer',\n 'WarningBorder',\n 'Success',\n 'OnSuccess',\n 'SuccessContainer',\n 'OnSuccessContainer',\n 'SuccessBorder',\n 'Info',\n 'OnInfo',\n 'InfoContainer',\n 'OnInfoContainer',\n 'InfoBorder',\n 'Outline',\n 'OutlineVariant',\n 'OutlineBorder',\n 'Background',\n 'OnBackground',\n 'BackgroundSecondary',\n 'Surface',\n 'OnSurface',\n 'SurfaceVariant',\n 'OnSurfaceVariant',\n 'SurfaceBorder',\n 'InverseSurface',\n 'InverseOnSurface',\n 'InversePrimary',\n 'SurfaceContainerHighest',\n 'SurfaceContainerHigh',\n 'SurfaceContainer',\n 'SurfaceContainerLow',\n 'SurfaceContainerLowest',\n 'SurfaceBright',\n 'SurfaceDim',\n 'Scrim',\n 'ScrimLight',\n 'Overlay',\n 'OverlayLight',\n 'TextPrimary',\n 'TextSecondary',\n 'TextTertiary',\n 'TextDisabled',\n 'White',\n 'Black',\n 'Light',\n 'Dark',\n 'Divider',\n 'DividerStrong',\n 'Focus',\n 'FocusVisible',\n 'Disabled',\n 'DisabledContainer',\n 'CardBackground',\n 'CardBorder',\n 'CardElevated',\n 'Default',\n 'OnDefault',\n 'DefaultContainer',\n 'OnDefaultContainer',\n 'DefaultBorder',\n 'DefaultHover',\n 'DefaultPressed',\n 'InputBackground',\n 'InputBorder',\n 'InputBorderFocused',\n 'InputPlaceholder',\n];\n\n/** The stock light palette (MAUI `G9Theme.Light.xaml`). */\nexport const g9LightPalette: G9PaletteValues = {\n Primary: '#349D57',\n OnPrimary: '#FFFFFF',\n PrimaryContainer: '#D6F0DF',\n OnPrimaryContainer: '#0E3B1E',\n PrimaryBorder: '#2D8A4C',\n PrimaryHover: '#2D8A4C',\n PrimaryPressed: '#267A42',\n Secondary: '#4A7C3F',\n OnSecondary: '#FFFFFF',\n SecondaryContainer: '#E3F0DF',\n OnSecondaryContainer: '#16310F',\n SecondaryBorder: '#3C6633',\n Tertiary: '#3A7DB5',\n OnTertiary: '#FFFFFF',\n TertiaryContainer: '#D8EAF7',\n OnTertiaryContainer: '#0A2A44',\n TertiaryBorder: '#316596',\n Quaternary: '#7B5EA7',\n OnQuaternary: '#FFFFFF',\n QuaternaryContainer: '#EAE1F5',\n OnQuaternaryContainer: '#2E1F45',\n QuaternaryBorder: '#6B4F92',\n Error: '#C8364B',\n OnError: '#FFFFFF',\n ErrorContainer: '#FADCE0',\n OnErrorContainer: '#5A0814',\n ErrorBorder: '#A82A3D',\n Warning: '#C77A14',\n OnWarning: '#FFFFFF',\n WarningContainer: '#FBEED5',\n OnWarningContainer: '#4A2E05',\n WarningBorder: '#A8650F',\n Success: '#2F8B4A',\n OnSuccess: '#FFFFFF',\n SuccessContainer: '#E2F3E8',\n OnSuccessContainer: '#0C3019',\n SuccessBorder: '#267A3E',\n Info: '#2B6FB3',\n OnInfo: '#FFFFFF',\n InfoContainer: '#DCE9F7',\n OnInfoContainer: '#0B2D4D',\n InfoBorder: '#245E99',\n Outline: '#C3C7C3',\n OutlineVariant: '#DDE0DD',\n OutlineBorder: '#989E98',\n Background: '#F7F8F7',\n OnBackground: '#181A18',\n BackgroundSecondary: '#EEEFEE',\n Surface: '#FFFFFF',\n OnSurface: '#181A18',\n SurfaceVariant: '#EFF1EF',\n OnSurfaceVariant: '#525852',\n SurfaceBorder: '#DDE0DD',\n InverseSurface: '#14181A',\n InverseOnSurface: '#F4F6F4',\n InversePrimary: '#7BD88F',\n SurfaceContainerHighest: '#E6E8E6',\n SurfaceContainerHigh: '#ECEEEC',\n SurfaceContainer: '#F1F2F1',\n SurfaceContainerLow: '#F7F8F7',\n SurfaceContainerLowest: '#FFFFFF',\n SurfaceBright: '#FFFFFF',\n SurfaceDim: '#E4E6E4',\n Scrim: 'rgba(0, 0, 0, 0.6)',\n ScrimLight: 'rgba(0, 0, 0, 0.4)',\n Overlay: 'rgba(0, 0, 0, 0.078431375)',\n OverlayLight: 'rgba(0, 0, 0, 0.039215688)',\n TextPrimary: '#181A18',\n TextSecondary: '#525852',\n TextTertiary: '#6E756E',\n TextDisabled: '#C3C7C3',\n White: '#FFFFFF',\n Black: '#000000',\n Light: '#EEEEEE',\n Dark: '#222222',\n Divider: '#EEEFEE',\n DividerStrong: '#DDE0DD',\n Focus: '#349D57',\n FocusVisible: 'rgba(52, 157, 87, 0.34901962)',\n Disabled: '#C3C7C3',\n DisabledContainer: '#EEEFEE',\n CardBackground: '#FFFFFF',\n CardBorder: '#DDE0DD',\n CardElevated: '#FFFFFF',\n Default: '#EEEFEE',\n OnDefault: '#181A18',\n DefaultContainer: '#DDE0DD',\n OnDefaultContainer: '#181A18',\n DefaultBorder: '#C3C7C3',\n DefaultHover: '#DDE0DD',\n DefaultPressed: '#C3C7C3',\n InputBackground: '#FFFFFF',\n InputBorder: '#C3C7C3',\n InputBorderFocused: '#349D57',\n InputPlaceholder: '#989E98',\n};\n\n/** The stock dark palette (MAUI `G9Theme.Dark.xaml`). */\nexport const g9DarkPalette: G9PaletteValues = {\n Primary: '#45A664',\n OnPrimary: '#062814',\n PrimaryContainer: '#173E25',\n OnPrimaryContainer: '#BDE5C9',\n PrimaryBorder: '#338E51',\n PrimaryHover: '#52B271',\n PrimaryPressed: '#338E51',\n Secondary: '#6BBD5A',\n OnSecondary: '#0C2207',\n SecondaryContainer: '#1A3016',\n OnSecondaryContainer: '#C8E6BF',\n SecondaryBorder: '#2C4A23',\n Tertiary: '#6AAEE0',\n OnTertiary: '#04243F',\n TertiaryContainer: '#0E2540',\n OnTertiaryContainer: '#C2E0F7',\n TertiaryBorder: '#1E456B',\n Quaternary: '#A78BD1',\n OnQuaternary: '#2A1B40',\n QuaternaryContainer: '#2E2340',\n OnQuaternaryContainer: '#E0D4F0',\n QuaternaryBorder: '#4A3A66',\n Error: '#E66478',\n OnError: '#2C0B12',\n ErrorContainer: '#461620',\n OnErrorContainer: '#F7CDD4',\n ErrorBorder: '#7A2734',\n Warning: '#E3A04B',\n OnWarning: '#2A1A05',\n WarningContainer: '#3D2A0E',\n OnWarningContainer: '#F7DEB5',\n WarningBorder: '#6B4A1C',\n Success: '#4BBD6B',\n OnSuccess: '#062814',\n SuccessContainer: '#173E25',\n OnSuccessContainer: '#BDE5C9',\n SuccessBorder: '#2A7E46',\n Info: '#6BA6E0',\n OnInfo: '#07203A',\n InfoContainer: '#142F4D',\n OnInfoContainer: '#C2DBF7',\n InfoBorder: '#27517D',\n Outline: '#3D423D',\n OutlineVariant: '#272A27',\n OutlineBorder: '#525852',\n Background: '#0C0D0C',\n OnBackground: '#F4F6F4',\n BackgroundSecondary: '#15171A',\n Surface: '#15171A',\n OnSurface: '#F4F6F4',\n SurfaceVariant: '#22262A',\n OnSurfaceVariant: '#C3C7C3',\n SurfaceBorder: '#272A27',\n InverseSurface: '#F4F6F4',\n InverseOnSurface: '#14181A',\n InversePrimary: '#349D57',\n SurfaceContainerHighest: '#2A2E32',\n SurfaceContainerHigh: '#22262A',\n SurfaceContainer: '#1B1E20',\n SurfaceContainerLow: '#15171A',\n SurfaceContainerLowest: '#101113',\n SurfaceBright: '#2A2E32',\n SurfaceDim: '#0C0D0C',\n Scrim: 'rgba(0, 0, 0, 0.8)',\n ScrimLight: 'rgba(0, 0, 0, 0.6)',\n Overlay: 'rgba(0, 0, 0, 0.2)',\n OverlayLight: 'rgba(0, 0, 0, 0.101960786)',\n TextPrimary: '#F4F6F4',\n TextSecondary: '#C3C7C3',\n TextTertiary: '#989E98',\n TextDisabled: '#525852',\n White: '#FFFFFF',\n Black: '#000000',\n Light: '#EEEEEE',\n Dark: '#222222',\n Divider: '#1F2222',\n DividerStrong: '#272A27',\n Focus: '#45A664',\n FocusVisible: 'rgba(75, 189, 107, 0.4)',\n Disabled: '#525852',\n DisabledContainer: '#1B1E20',\n CardBackground: '#15171A',\n CardBorder: '#272A27',\n CardElevated: '#1B1E20',\n Default: '#22262A',\n OnDefault: '#F4F6F4',\n DefaultContainer: '#2A2E32',\n OnDefaultContainer: '#F4F6F4',\n DefaultBorder: '#3D423D',\n DefaultHover: '#2A2E32',\n DefaultPressed: '#3D423D',\n InputBackground: '#15171A',\n InputBorder: '#3D423D',\n InputBorderFocused: '#45A664',\n InputPlaceholder: '#989E98',\n};\n"],"names":["G9ColorToken","g9ColorTokens","g9LightPalette","g9DarkPalette"],"mappings":"AAOO,MAAMA,eAAe;IAC1B,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;IAClB,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,kBAAkB;IAClB,aAAa;IACb,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,MAAM;IACN,QAAQ;IACR,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,SAAS;IACT,cAAc;IACd,aAAa;IACb,eAAe;IACf,cAAc;IACd,cAAc;IACd,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,eAAe;IACf,OAAO;IACP,cAAc;IACd,UAAU;IACV,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,aAAa;IACb,oBAAoB;IACpB,kBAAkB;AACpB;AAOO,MAAMC,gBAAyC;IACpD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAGM,MAAMC,iBAAkC;IAC7C,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;IAClB,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,kBAAkB;IAClB,aAAa;IACb,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,MAAM;IACN,QAAQ;IACR,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,SAAS;IACT,cAAc;IACd,aAAa;IACb,eAAe;IACf,cAAc;IACd,cAAc;I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,OAAO;IACP,MAAM;IACN,SAAS;IACT,eAAe;IACf,OAAO;IACP,cAAc;IACd,UAAU;IACV,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,aAAa;IACb,oBAAoB;IACpB,kBAAkB;AACpB"}
|
|
1
|
+
{"version":3,"file":"tokens/generated/palettes.js","sources":["../../../src/tokens/generated/palettes.ts"],"sourcesContent":["// GENERATED by scripts/gen-tokens.mjs from plan/golden/theme-palettes.json — do not edit; run `npm run gen:tokens`.\n// Golden source: G9Theme.Light.xaml / G9Theme.Dark.xaml (https://github.com/ImanKari/G9MAUIControls/blob/f0603d40e5d50609a15b88104faff6b2066f30b6/G9MAUIControls/Theming/).\n\n/**\n * The colour tokens of the G9 theme in MAUI declaration order (MAUI `G9ColorToken`). Values keep the MAUI names so\n * `G9ColorToken.Primary === 'Primary'`; the CSS variable is `--g9-primary` (see `cssVariableName`).\n */\nexport const G9ColorToken = {\n Primary: 'Primary',\n OnPrimary: 'OnPrimary',\n PrimaryContainer: 'PrimaryContainer',\n OnPrimaryContainer: 'OnPrimaryContainer',\n PrimaryBorder: 'PrimaryBorder',\n PrimaryHover: 'PrimaryHover',\n PrimaryPressed: 'PrimaryPressed',\n Secondary: 'Secondary',\n OnSecondary: 'OnSecondary',\n SecondaryContainer: 'SecondaryContainer',\n OnSecondaryContainer: 'OnSecondaryContainer',\n SecondaryBorder: 'SecondaryBorder',\n Tertiary: 'Tertiary',\n OnTertiary: 'OnTertiary',\n TertiaryContainer: 'TertiaryContainer',\n OnTertiaryContainer: 'OnTertiaryContainer',\n TertiaryBorder: 'TertiaryBorder',\n Quaternary: 'Quaternary',\n OnQuaternary: 'OnQuaternary',\n QuaternaryContainer: 'QuaternaryContainer',\n OnQuaternaryContainer: 'OnQuaternaryContainer',\n QuaternaryBorder: 'QuaternaryBorder',\n Error: 'Error',\n OnError: 'OnError',\n ErrorContainer: 'ErrorContainer',\n OnErrorContainer: 'OnErrorContainer',\n ErrorBorder: 'ErrorBorder',\n Warning: 'Warning',\n OnWarning: 'OnWarning',\n WarningContainer: 'WarningContainer',\n OnWarningContainer: 'OnWarningContainer',\n WarningBorder: 'WarningBorder',\n Success: 'Success',\n OnSuccess: 'OnSuccess',\n SuccessContainer: 'SuccessContainer',\n OnSuccessContainer: 'OnSuccessContainer',\n SuccessBorder: 'SuccessBorder',\n Info: 'Info',\n OnInfo: 'OnInfo',\n InfoContainer: 'InfoContainer',\n OnInfoContainer: 'OnInfoContainer',\n InfoBorder: 'InfoBorder',\n Outline: 'Outline',\n OutlineVariant: 'OutlineVariant',\n OutlineBorder: 'OutlineBorder',\n Background: 'Background',\n OnBackground: 'OnBackground',\n BackgroundSecondary: 'BackgroundSecondary',\n Surface: 'Surface',\n OnSurface: 'OnSurface',\n SurfaceVariant: 'SurfaceVariant',\n OnSurfaceVariant: 'OnSurfaceVariant',\n SurfaceBorder: 'SurfaceBorder',\n InverseSurface: 'InverseSurface',\n InverseOnSurface: 'InverseOnSurface',\n InversePrimary: 'InversePrimary',\n SurfaceContainerHighest: 'SurfaceContainerHighest',\n SurfaceContainerHigh: 'SurfaceContainerHigh',\n SurfaceContainer: 'SurfaceContainer',\n SurfaceContainerLow: 'SurfaceContainerLow',\n SurfaceContainerLowest: 'SurfaceContainerLowest',\n SurfaceBright: 'SurfaceBright',\n SurfaceDim: 'SurfaceDim',\n Scrim: 'Scrim',\n ScrimLight: 'ScrimLight',\n Overlay: 'Overlay',\n OverlayLight: 'OverlayLight',\n TextPrimary: 'TextPrimary',\n TextSecondary: 'TextSecondary',\n TextTertiary: 'TextTertiary',\n TextDisabled: 'TextDisabled',\n White: 'White',\n Black: 'Black',\n Light: 'Light',\n Dark: 'Dark',\n Divider: 'Divider',\n DividerStrong: 'DividerStrong',\n Focus: 'Focus',\n FocusVisible: 'FocusVisible',\n Disabled: 'Disabled',\n DisabledContainer: 'DisabledContainer',\n CardBackground: 'CardBackground',\n CardBorder: 'CardBorder',\n CardElevated: 'CardElevated',\n Default: 'Default',\n OnDefault: 'OnDefault',\n DefaultContainer: 'DefaultContainer',\n OnDefaultContainer: 'OnDefaultContainer',\n DefaultBorder: 'DefaultBorder',\n DefaultHover: 'DefaultHover',\n DefaultPressed: 'DefaultPressed',\n InputBackground: 'InputBackground',\n InputBorder: 'InputBorder',\n InputBorderFocused: 'InputBorderFocused',\n InputPlaceholder: 'InputPlaceholder',\n} as const;\nexport type G9ColorToken = (typeof G9ColorToken)[keyof typeof G9ColorToken];\n\n/** One CSS colour per token: a complete palette (MAUI `G9PaletteValues`). */\nexport type G9PaletteValues = { readonly [K in G9ColorToken]: string };\n\n/** Every token, in declaration order. */\nexport const g9ColorTokens: readonly G9ColorToken[] = [\n 'Primary',\n 'OnPrimary',\n 'PrimaryContainer',\n 'OnPrimaryContainer',\n 'PrimaryBorder',\n 'PrimaryHover',\n 'PrimaryPressed',\n 'Secondary',\n 'OnSecondary',\n 'SecondaryContainer',\n 'OnSecondaryContainer',\n 'SecondaryBorder',\n 'Tertiary',\n 'OnTertiary',\n 'TertiaryContainer',\n 'OnTertiaryContainer',\n 'TertiaryBorder',\n 'Quaternary',\n 'OnQuaternary',\n 'QuaternaryContainer',\n 'OnQuaternaryContainer',\n 'QuaternaryBorder',\n 'Error',\n 'OnError',\n 'ErrorContainer',\n 'OnErrorContainer',\n 'ErrorBorder',\n 'Warning',\n 'OnWarning',\n 'WarningContainer',\n 'OnWarningContainer',\n 'WarningBorder',\n 'Success',\n 'OnSuccess',\n 'SuccessContainer',\n 'OnSuccessContainer',\n 'SuccessBorder',\n 'Info',\n 'OnInfo',\n 'InfoContainer',\n 'OnInfoContainer',\n 'InfoBorder',\n 'Outline',\n 'OutlineVariant',\n 'OutlineBorder',\n 'Background',\n 'OnBackground',\n 'BackgroundSecondary',\n 'Surface',\n 'OnSurface',\n 'SurfaceVariant',\n 'OnSurfaceVariant',\n 'SurfaceBorder',\n 'InverseSurface',\n 'InverseOnSurface',\n 'InversePrimary',\n 'SurfaceContainerHighest',\n 'SurfaceContainerHigh',\n 'SurfaceContainer',\n 'SurfaceContainerLow',\n 'SurfaceContainerLowest',\n 'SurfaceBright',\n 'SurfaceDim',\n 'Scrim',\n 'ScrimLight',\n 'Overlay',\n 'OverlayLight',\n 'TextPrimary',\n 'TextSecondary',\n 'TextTertiary',\n 'TextDisabled',\n 'White',\n 'Black',\n 'Light',\n 'Dark',\n 'Divider',\n 'DividerStrong',\n 'Focus',\n 'FocusVisible',\n 'Disabled',\n 'DisabledContainer',\n 'CardBackground',\n 'CardBorder',\n 'CardElevated',\n 'Default',\n 'OnDefault',\n 'DefaultContainer',\n 'OnDefaultContainer',\n 'DefaultBorder',\n 'DefaultHover',\n 'DefaultPressed',\n 'InputBackground',\n 'InputBorder',\n 'InputBorderFocused',\n 'InputPlaceholder',\n];\n\n/** The stock light palette (MAUI `G9Theme.Light.xaml`). */\nexport const g9LightPalette: G9PaletteValues = {\n Primary: '#349D57',\n OnPrimary: '#FFFFFF',\n PrimaryContainer: '#D6F0DF',\n OnPrimaryContainer: '#0E3B1E',\n PrimaryBorder: '#2D8A4C',\n PrimaryHover: '#2D8A4C',\n PrimaryPressed: '#267A42',\n Secondary: '#4A7C3F',\n OnSecondary: '#FFFFFF',\n SecondaryContainer: '#E3F0DF',\n OnSecondaryContainer: '#16310F',\n SecondaryBorder: '#3C6633',\n Tertiary: '#3A7DB5',\n OnTertiary: '#FFFFFF',\n TertiaryContainer: '#D8EAF7',\n OnTertiaryContainer: '#0A2A44',\n TertiaryBorder: '#316596',\n Quaternary: '#7B5EA7',\n OnQuaternary: '#FFFFFF',\n QuaternaryContainer: '#EAE1F5',\n OnQuaternaryContainer: '#2E1F45',\n QuaternaryBorder: '#6B4F92',\n Error: '#C8364B',\n OnError: '#FFFFFF',\n ErrorContainer: '#FADCE0',\n OnErrorContainer: '#5A0814',\n ErrorBorder: '#A82A3D',\n Warning: '#C77A14',\n OnWarning: '#FFFFFF',\n WarningContainer: '#FBEED5',\n OnWarningContainer: '#4A2E05',\n WarningBorder: '#A8650F',\n Success: '#2F8B4A',\n OnSuccess: '#FFFFFF',\n SuccessContainer: '#E2F3E8',\n OnSuccessContainer: '#0C3019',\n SuccessBorder: '#267A3E',\n Info: '#2B6FB3',\n OnInfo: '#FFFFFF',\n InfoContainer: '#DCE9F7',\n OnInfoContainer: '#0B2D4D',\n InfoBorder: '#245E99',\n Outline: '#C3C7C3',\n OutlineVariant: '#DDE0DD',\n OutlineBorder: '#989E98',\n Background: '#F7F8F7',\n OnBackground: '#181A18',\n BackgroundSecondary: '#EEEFEE',\n Surface: '#FFFFFF',\n OnSurface: '#181A18',\n SurfaceVariant: '#EFF1EF',\n OnSurfaceVariant: '#525852',\n SurfaceBorder: '#DDE0DD',\n InverseSurface: '#14181A',\n InverseOnSurface: '#F4F6F4',\n InversePrimary: '#7BD88F',\n SurfaceContainerHighest: '#E6E8E6',\n SurfaceContainerHigh: '#ECEEEC',\n SurfaceContainer: '#F1F2F1',\n SurfaceContainerLow: '#F7F8F7',\n SurfaceContainerLowest: '#FFFFFF',\n SurfaceBright: '#FFFFFF',\n SurfaceDim: '#E4E6E4',\n Scrim: 'rgba(0, 0, 0, 0.6)',\n ScrimLight: 'rgba(0, 0, 0, 0.4)',\n Overlay: 'rgba(0, 0, 0, 0.078431375)',\n OverlayLight: 'rgba(0, 0, 0, 0.039215688)',\n TextPrimary: '#181A18',\n TextSecondary: '#525852',\n TextTertiary: '#6E756E',\n TextDisabled: '#C3C7C3',\n White: '#FFFFFF',\n Black: '#000000',\n Light: '#EEEEEE',\n Dark: '#222222',\n Divider: '#EEEFEE',\n DividerStrong: '#DDE0DD',\n Focus: '#349D57',\n FocusVisible: 'rgba(52, 157, 87, 0.34901962)',\n Disabled: '#C3C7C3',\n DisabledContainer: '#EEEFEE',\n CardBackground: '#FFFFFF',\n CardBorder: '#DDE0DD',\n CardElevated: '#FFFFFF',\n Default: '#EEEFEE',\n OnDefault: '#181A18',\n DefaultContainer: '#DDE0DD',\n OnDefaultContainer: '#181A18',\n DefaultBorder: '#C3C7C3',\n DefaultHover: '#DDE0DD',\n DefaultPressed: '#C3C7C3',\n InputBackground: '#FFFFFF',\n InputBorder: '#C3C7C3',\n InputBorderFocused: '#349D57',\n InputPlaceholder: '#989E98',\n};\n\n/** The stock dark palette (MAUI `G9Theme.Dark.xaml`). */\nexport const g9DarkPalette: G9PaletteValues = {\n Primary: '#45A664',\n OnPrimary: '#062814',\n PrimaryContainer: '#173E25',\n OnPrimaryContainer: '#BDE5C9',\n PrimaryBorder: '#338E51',\n PrimaryHover: '#52B271',\n PrimaryPressed: '#338E51',\n Secondary: '#6BBD5A',\n OnSecondary: '#0C2207',\n SecondaryContainer: '#1A3016',\n OnSecondaryContainer: '#C8E6BF',\n SecondaryBorder: '#2C4A23',\n Tertiary: '#6AAEE0',\n OnTertiary: '#04243F',\n TertiaryContainer: '#0E2540',\n OnTertiaryContainer: '#C2E0F7',\n TertiaryBorder: '#1E456B',\n Quaternary: '#A78BD1',\n OnQuaternary: '#2A1B40',\n QuaternaryContainer: '#2E2340',\n OnQuaternaryContainer: '#E0D4F0',\n QuaternaryBorder: '#4A3A66',\n Error: '#E66478',\n OnError: '#2C0B12',\n ErrorContainer: '#461620',\n OnErrorContainer: '#F7CDD4',\n ErrorBorder: '#7A2734',\n Warning: '#E3A04B',\n OnWarning: '#2A1A05',\n WarningContainer: '#3D2A0E',\n OnWarningContainer: '#F7DEB5',\n WarningBorder: '#6B4A1C',\n Success: '#4BBD6B',\n OnSuccess: '#062814',\n SuccessContainer: '#173E25',\n OnSuccessContainer: '#BDE5C9',\n SuccessBorder: '#2A7E46',\n Info: '#6BA6E0',\n OnInfo: '#07203A',\n InfoContainer: '#142F4D',\n OnInfoContainer: '#C2DBF7',\n InfoBorder: '#27517D',\n Outline: '#3D423D',\n OutlineVariant: '#272A27',\n OutlineBorder: '#525852',\n Background: '#0C0D0C',\n OnBackground: '#F4F6F4',\n BackgroundSecondary: '#15171A',\n Surface: '#15171A',\n OnSurface: '#F4F6F4',\n SurfaceVariant: '#22262A',\n OnSurfaceVariant: '#C3C7C3',\n SurfaceBorder: '#272A27',\n InverseSurface: '#F4F6F4',\n InverseOnSurface: '#14181A',\n InversePrimary: '#349D57',\n SurfaceContainerHighest: '#2A2E32',\n SurfaceContainerHigh: '#22262A',\n SurfaceContainer: '#1B1E20',\n SurfaceContainerLow: '#15171A',\n SurfaceContainerLowest: '#101113',\n SurfaceBright: '#2A2E32',\n SurfaceDim: '#0C0D0C',\n Scrim: 'rgba(0, 0, 0, 0.8)',\n ScrimLight: 'rgba(0, 0, 0, 0.6)',\n Overlay: 'rgba(0, 0, 0, 0.2)',\n OverlayLight: 'rgba(0, 0, 0, 0.101960786)',\n TextPrimary: '#F4F6F4',\n TextSecondary: '#C3C7C3',\n TextTertiary: '#989E98',\n TextDisabled: '#525852',\n White: '#FFFFFF',\n Black: '#000000',\n Light: '#EEEEEE',\n Dark: '#222222',\n Divider: '#1F2222',\n DividerStrong: '#272A27',\n Focus: '#45A664',\n FocusVisible: 'rgba(75, 189, 107, 0.4)',\n Disabled: '#525852',\n DisabledContainer: '#1B1E20',\n CardBackground: '#15171A',\n CardBorder: '#272A27',\n CardElevated: '#1B1E20',\n Default: '#22262A',\n OnDefault: '#F4F6F4',\n DefaultContainer: '#2A2E32',\n OnDefaultContainer: '#F4F6F4',\n DefaultBorder: '#3D423D',\n DefaultHover: '#2A2E32',\n DefaultPressed: '#3D423D',\n InputBackground: '#15171A',\n InputBorder: '#3D423D',\n InputBorderFocused: '#45A664',\n InputPlaceholder: '#989E98',\n};\n"],"names":["G9ColorToken","g9ColorTokens","g9LightPalette","g9DarkPalette"],"mappings":"AAOO,MAAMA,eAAe;IAC1B,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;IAClB,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,kBAAkB;IAClB,aAAa;IACb,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,MAAM;IACN,QAAQ;IACR,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,SAAS;IACT,cAAc;IACd,aAAa;IACb,eAAe;IACf,cAAc;IACd,cAAc;IACd,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,SAAS;IACT,eAAe;IACf,OAAO;IACP,cAAc;IACd,UAAU;IACV,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,aAAa;IACb,oBAAoB;IACpB,kBAAkB;AACpB;AAOO,MAAMC,gBAAyC;IACpD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAGM,MAAMC,iBAAkC;IAC7C,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;IAClB,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,kBAAkB;IAClB,aAAa;IACb,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,SAAS;IACT,WAAW;IACX,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;IACf,MAAM;IACN,QAAQ;IACR,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,SAAS;IACT,cAAc;IACd,aAAa;IACb,eAAe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