@omerdlw/base-framework 3.4.1 → 4.0.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/ambient/index.js +4 -5
- package/dist/background/index.js +3 -4
- package/dist/{chunk-DC4XZPDK.js → chunk-3FSDBJ7V.js} +4 -4
- package/dist/{chunk-DC4XZPDK.js.map → chunk-3FSDBJ7V.js.map} +1 -1
- package/dist/{chunk-GTJMM32W.js → chunk-5TQSH6KE.js} +6 -7
- package/dist/chunk-5TQSH6KE.js.map +1 -0
- package/dist/{chunk-DGVRHX3C.js → chunk-6P3F4JU3.js} +5 -6
- package/dist/{chunk-DGVRHX3C.js.map → chunk-6P3F4JU3.js.map} +1 -1
- package/dist/{chunk-3JLG24KI.js → chunk-AKPH5CEJ.js} +199 -9
- package/dist/chunk-AKPH5CEJ.js.map +1 -0
- package/dist/{chunk-KRHH3UQ6.js → chunk-AWLK2I56.js} +7 -8
- package/dist/{chunk-KRHH3UQ6.js.map → chunk-AWLK2I56.js.map} +1 -1
- package/dist/{chunk-M36DFIJ6.js → chunk-C527JOJQ.js} +4 -4
- package/dist/{chunk-M36DFIJ6.js.map → chunk-C527JOJQ.js.map} +1 -1
- package/dist/{chunk-E2QQJZYY.js → chunk-EXB7VFD3.js} +4 -4
- package/dist/{chunk-E2QQJZYY.js.map → chunk-EXB7VFD3.js.map} +1 -1
- package/dist/chunk-FG2AKFXP.js +108 -0
- package/dist/chunk-FG2AKFXP.js.map +1 -0
- package/dist/chunk-GA5SZ6E2.js +17 -0
- package/dist/{chunk-2E6OASVV.js.map → chunk-GA5SZ6E2.js.map} +1 -1
- package/dist/chunk-GG2ILNK2.js +44 -0
- package/dist/chunk-GG2ILNK2.js.map +1 -0
- package/dist/{chunk-VMR7ZKIF.js → chunk-JA75E4BG.js} +5 -5
- package/dist/{chunk-VMR7ZKIF.js.map → chunk-JA75E4BG.js.map} +1 -1
- package/dist/{chunk-BLWJZHRL.js → chunk-QZA5AIT6.js} +6 -9
- package/dist/chunk-QZA5AIT6.js.map +1 -0
- package/dist/{chunk-ST7QOM4O.js → chunk-T53WFIZN.js} +3 -3
- package/dist/{chunk-ST7QOM4O.js.map → chunk-T53WFIZN.js.map} +1 -1
- package/dist/{chunk-KN4KOTC7.js → chunk-WVED7PDH.js} +4 -4
- package/dist/{chunk-KN4KOTC7.js.map → chunk-WVED7PDH.js.map} +1 -1
- package/dist/{chunk-HPJWMBUS.js → chunk-XIFQMK2Z.js} +34 -37
- package/dist/chunk-XIFQMK2Z.js.map +1 -0
- package/dist/{chunk-7A47AXKI.js → chunk-YKHAFHB7.js} +4 -5
- package/dist/{chunk-7A47AXKI.js.map → chunk-YKHAFHB7.js.map} +1 -1
- package/dist/context-menu/index.js +7 -10
- package/dist/controls/index.js +3 -3
- package/dist/core/error/boundary.d.ts.map +1 -1
- package/dist/core/provider/index.d.ts +3 -8
- package/dist/core/provider/index.d.ts.map +1 -1
- package/dist/dock/index.js +6 -9
- package/dist/error/index.js +2 -5
- package/dist/foundation/recipes/index.d.ts +0 -7
- package/dist/foundation/recipes/index.d.ts.map +1 -1
- package/dist/index.js +15 -18
- package/dist/loading/index.js +2 -4
- package/dist/modal/index.js +10 -12
- package/dist/modal/index.js.map +1 -1
- package/dist/modules/dock/card/icon.d.ts.map +1 -1
- package/dist/modules/dock/card/use-card.d.ts +38 -38
- package/dist/modules/dock/media/controls.d.ts.map +1 -1
- package/dist/modules/dock/motion.d.ts +24 -24
- package/dist/modules/dock/status/model.d.ts.map +1 -1
- package/dist/modules/dock/surface/controls.d.ts.map +1 -1
- package/dist/modules/dock/surface/header-button.d.ts.map +1 -1
- package/dist/modules/dock/theme.d.ts +14 -14
- package/dist/modules/index.js +13 -16
- package/dist/modules/modal/container.d.ts.map +1 -1
- package/dist/notification/index.js +4 -4
- package/dist/overlay-ZCMQVNYT.js +12 -0
- package/dist/{overlay-YMLS3SAQ.js.map → overlay-ZCMQVNYT.js.map} +1 -1
- package/dist/provider/index.js +3 -8
- package/dist/react/theme/index.d.ts +7 -2
- package/dist/react/theme/index.d.ts.map +1 -1
- package/dist/react/theme/parts.d.ts +89 -0
- package/dist/react/theme/parts.d.ts.map +1 -0
- package/dist/recipes/index.js +1 -115
- package/dist/recipes/index.js.map +1 -1
- package/dist/theme/index.js +1 -1
- package/docs/README.md +11 -12
- package/docs/architecture-and-rules.md +8 -8
- package/docs/core-engine.md +11 -13
- package/docs/custom-modules.md +1 -1
- package/docs/design.md +60 -153
- package/docs/getting-started.md +3 -5
- package/docs/modules/README.md +1 -1
- package/docs/modules/background.md +1 -1
- package/docs/modules/context-menu.md +1 -1
- package/docs/modules/dock.md +23 -23
- package/docs/modules/error-boundary.md +1 -1
- package/docs/modules/loading.md +1 -1
- package/docs/modules/modal.md +1 -1
- package/package.json +1 -7
- package/templates/AGENTS.md +4 -3
- package/MIGRATION.md +0 -99
- package/dist/chunk-2E6OASVV.js +0 -17
- package/dist/chunk-3JLG24KI.js.map +0 -1
- package/dist/chunk-6LWCTP2Y.js +0 -448
- package/dist/chunk-6LWCTP2Y.js.map +0 -1
- package/dist/chunk-BLWJZHRL.js.map +0 -1
- package/dist/chunk-EBNZXYLT.js +0 -704
- package/dist/chunk-EBNZXYLT.js.map +0 -1
- package/dist/chunk-FLYL76ZT.js +0 -139
- package/dist/chunk-FLYL76ZT.js.map +0 -1
- package/dist/chunk-GTJMM32W.js.map +0 -1
- package/dist/chunk-HPJWMBUS.js.map +0 -1
- package/dist/chunk-ICFPSAJZ.js +0 -112
- package/dist/chunk-ICFPSAJZ.js.map +0 -1
- package/dist/chunk-S2ZOLTTS.js +0 -140
- package/dist/chunk-S2ZOLTTS.js.map +0 -1
- package/dist/foundation/recipes/anatomy.d.ts +0 -139
- package/dist/foundation/recipes/anatomy.d.ts.map +0 -1
- package/dist/foundation/recipes/define.d.ts +0 -133
- package/dist/foundation/recipes/define.d.ts.map +0 -1
- package/dist/overlay-YMLS3SAQ.js +0 -14
- package/dist/react/ui/components/avatar.d.ts +0 -10
- package/dist/react/ui/components/avatar.d.ts.map +0 -1
- package/dist/react/ui/components/button.d.ts +0 -6
- package/dist/react/ui/components/button.d.ts.map +0 -1
- package/dist/react/ui/components/carousel.d.ts +0 -27
- package/dist/react/ui/components/carousel.d.ts.map +0 -1
- package/dist/react/ui/components/checkbox.d.ts +0 -10
- package/dist/react/ui/components/checkbox.d.ts.map +0 -1
- package/dist/react/ui/components/icon.d.ts +0 -6
- package/dist/react/ui/components/icon.d.ts.map +0 -1
- package/dist/react/ui/components/image.d.ts +0 -6
- package/dist/react/ui/components/image.d.ts.map +0 -1
- package/dist/react/ui/components/indicator.d.ts +0 -55
- package/dist/react/ui/components/indicator.d.ts.map +0 -1
- package/dist/react/ui/components/input.d.ts +0 -10
- package/dist/react/ui/components/input.d.ts.map +0 -1
- package/dist/react/ui/components/loader.d.ts +0 -10
- package/dist/react/ui/components/loader.d.ts.map +0 -1
- package/dist/react/ui/components/segmented.d.ts +0 -6
- package/dist/react/ui/components/segmented.d.ts.map +0 -1
- package/dist/react/ui/components/select/options.d.ts +0 -22
- package/dist/react/ui/components/select/options.d.ts.map +0 -1
- package/dist/react/ui/components/select/select.d.ts +0 -6
- package/dist/react/ui/components/select/select.d.ts.map +0 -1
- package/dist/react/ui/components/skeleton.d.ts +0 -10
- package/dist/react/ui/components/skeleton.d.ts.map +0 -1
- package/dist/react/ui/components/switch.d.ts +0 -6
- package/dist/react/ui/components/switch.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip/group.d.ts +0 -35
- package/dist/react/ui/components/tooltip/group.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip/placement.d.ts +0 -42
- package/dist/react/ui/components/tooltip/placement.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip/slot.d.ts +0 -23
- package/dist/react/ui/components/tooltip/slot.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip/tooltip.d.ts +0 -13
- package/dist/react/ui/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/react/ui/index.d.ts +0 -20
- package/dist/react/ui/index.d.ts.map +0 -1
- package/dist/react/ui/provider.d.ts +0 -22
- package/dist/react/ui/provider.d.ts.map +0 -1
- package/dist/react/ui/types.d.ts +0 -341
- package/dist/react/ui/types.d.ts.map +0 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -2259
- package/dist/ui/index.js.map +0 -1
|
@@ -5,6 +5,151 @@ import { MotionConfig, useReducedMotion } from 'motion/react';
|
|
|
5
5
|
import { use } from 'react';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
function PlainButton(t0) {
|
|
9
|
+
const $ = c(6);
|
|
10
|
+
let props;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({
|
|
14
|
+
type: t1,
|
|
15
|
+
...props
|
|
16
|
+
} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = props;
|
|
19
|
+
$[2] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
props = $[1];
|
|
22
|
+
t1 = $[2];
|
|
23
|
+
}
|
|
24
|
+
const type = t1 === void 0 ? "button" : t1;
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[3] !== props || $[4] !== type) {
|
|
27
|
+
t2 = /* @__PURE__ */ jsx("button", { type, ...props });
|
|
28
|
+
$[3] = props;
|
|
29
|
+
$[4] = type;
|
|
30
|
+
$[5] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
t2 = $[5];
|
|
33
|
+
}
|
|
34
|
+
return t2;
|
|
35
|
+
}
|
|
36
|
+
var Nothing = () => null;
|
|
37
|
+
function Untipped({
|
|
38
|
+
children
|
|
39
|
+
}) {
|
|
40
|
+
return children;
|
|
41
|
+
}
|
|
42
|
+
var PLAIN = Object.freeze({
|
|
43
|
+
Button: PlainButton,
|
|
44
|
+
Icon: Nothing,
|
|
45
|
+
Spinner: Nothing,
|
|
46
|
+
Tooltip: Untipped
|
|
47
|
+
});
|
|
48
|
+
var NO_ICONS = Object.freeze({});
|
|
49
|
+
var ComponentsContext = getOrCreateGlobalContext("ThemeComponentsContext", PLAIN);
|
|
50
|
+
var IconsContext = getOrCreateGlobalContext("ThemeIconsContext", NO_ICONS);
|
|
51
|
+
function mergeComponents(parent, own) {
|
|
52
|
+
return own ? Object.freeze({
|
|
53
|
+
...parent,
|
|
54
|
+
...own
|
|
55
|
+
}) : parent;
|
|
56
|
+
}
|
|
57
|
+
function useThemeComponents() {
|
|
58
|
+
return use(ComponentsContext);
|
|
59
|
+
}
|
|
60
|
+
function useIconName() {
|
|
61
|
+
const icons = use(IconsContext);
|
|
62
|
+
return (source) => icons[source] ?? source;
|
|
63
|
+
}
|
|
64
|
+
function ThemeIcon(t0) {
|
|
65
|
+
const $ = c(10);
|
|
66
|
+
let icon;
|
|
67
|
+
let props;
|
|
68
|
+
if ($[0] !== t0) {
|
|
69
|
+
({
|
|
70
|
+
icon,
|
|
71
|
+
...props
|
|
72
|
+
} = t0);
|
|
73
|
+
$[0] = t0;
|
|
74
|
+
$[1] = icon;
|
|
75
|
+
$[2] = props;
|
|
76
|
+
} else {
|
|
77
|
+
icon = $[1];
|
|
78
|
+
props = $[2];
|
|
79
|
+
}
|
|
80
|
+
const {
|
|
81
|
+
Icon
|
|
82
|
+
} = use(ComponentsContext);
|
|
83
|
+
const name = useIconName();
|
|
84
|
+
let t1;
|
|
85
|
+
if ($[3] !== icon || $[4] !== name) {
|
|
86
|
+
t1 = name(icon);
|
|
87
|
+
$[3] = icon;
|
|
88
|
+
$[4] = name;
|
|
89
|
+
$[5] = t1;
|
|
90
|
+
} else {
|
|
91
|
+
t1 = $[5];
|
|
92
|
+
}
|
|
93
|
+
let t2;
|
|
94
|
+
if ($[6] !== Icon || $[7] !== props || $[8] !== t1) {
|
|
95
|
+
t2 = /* @__PURE__ */ jsx(Icon, { icon: t1, ...props });
|
|
96
|
+
$[6] = Icon;
|
|
97
|
+
$[7] = props;
|
|
98
|
+
$[8] = t1;
|
|
99
|
+
$[9] = t2;
|
|
100
|
+
} else {
|
|
101
|
+
t2 = $[9];
|
|
102
|
+
}
|
|
103
|
+
return t2;
|
|
104
|
+
}
|
|
105
|
+
function ThemeButton(props) {
|
|
106
|
+
const $ = c(3);
|
|
107
|
+
const {
|
|
108
|
+
Button
|
|
109
|
+
} = use(ComponentsContext);
|
|
110
|
+
let t0;
|
|
111
|
+
if ($[0] !== Button || $[1] !== props) {
|
|
112
|
+
t0 = /* @__PURE__ */ jsx(Button, { ...props });
|
|
113
|
+
$[0] = Button;
|
|
114
|
+
$[1] = props;
|
|
115
|
+
$[2] = t0;
|
|
116
|
+
} else {
|
|
117
|
+
t0 = $[2];
|
|
118
|
+
}
|
|
119
|
+
return t0;
|
|
120
|
+
}
|
|
121
|
+
function ThemeSpinner(props) {
|
|
122
|
+
const $ = c(3);
|
|
123
|
+
const {
|
|
124
|
+
Spinner
|
|
125
|
+
} = use(ComponentsContext);
|
|
126
|
+
let t0;
|
|
127
|
+
if ($[0] !== Spinner || $[1] !== props) {
|
|
128
|
+
t0 = /* @__PURE__ */ jsx(Spinner, { ...props });
|
|
129
|
+
$[0] = Spinner;
|
|
130
|
+
$[1] = props;
|
|
131
|
+
$[2] = t0;
|
|
132
|
+
} else {
|
|
133
|
+
t0 = $[2];
|
|
134
|
+
}
|
|
135
|
+
return t0;
|
|
136
|
+
}
|
|
137
|
+
function ThemeTooltip(props) {
|
|
138
|
+
const $ = c(3);
|
|
139
|
+
const {
|
|
140
|
+
Tooltip
|
|
141
|
+
} = use(ComponentsContext);
|
|
142
|
+
let t0;
|
|
143
|
+
if ($[0] !== Tooltip || $[1] !== props) {
|
|
144
|
+
t0 = /* @__PURE__ */ jsx(Tooltip, { ...props });
|
|
145
|
+
$[0] = Tooltip;
|
|
146
|
+
$[1] = props;
|
|
147
|
+
$[2] = t0;
|
|
148
|
+
} else {
|
|
149
|
+
t0 = $[2];
|
|
150
|
+
}
|
|
151
|
+
return t0;
|
|
152
|
+
}
|
|
8
153
|
function defineThemeSpec(id) {
|
|
9
154
|
return Object.freeze({
|
|
10
155
|
id
|
|
@@ -60,9 +205,11 @@ function MotionProvider(t0) {
|
|
|
60
205
|
return t2;
|
|
61
206
|
}
|
|
62
207
|
function ThemeProvider(t0) {
|
|
63
|
-
const $ = c(
|
|
208
|
+
const $ = c(21);
|
|
64
209
|
const {
|
|
65
210
|
children,
|
|
211
|
+
components,
|
|
212
|
+
icons,
|
|
66
213
|
motion,
|
|
67
214
|
themes
|
|
68
215
|
} = t0;
|
|
@@ -88,16 +235,59 @@ function ThemeProvider(t0) {
|
|
|
88
235
|
t2 = $[5];
|
|
89
236
|
}
|
|
90
237
|
const content = t2;
|
|
238
|
+
const parentComponents = use(ComponentsContext);
|
|
239
|
+
const parentIcons = use(IconsContext);
|
|
91
240
|
let t3;
|
|
92
|
-
if ($[6] !==
|
|
93
|
-
t3 =
|
|
94
|
-
$[6] =
|
|
95
|
-
$[7] =
|
|
241
|
+
if ($[6] !== components || $[7] !== parentComponents) {
|
|
242
|
+
t3 = mergeComponents(parentComponents, components);
|
|
243
|
+
$[6] = components;
|
|
244
|
+
$[7] = parentComponents;
|
|
96
245
|
$[8] = t3;
|
|
97
246
|
} else {
|
|
98
247
|
t3 = $[8];
|
|
99
248
|
}
|
|
100
|
-
|
|
249
|
+
const parts = t3;
|
|
250
|
+
let t4;
|
|
251
|
+
if ($[9] !== icons || $[10] !== parentIcons) {
|
|
252
|
+
t4 = icons ? Object.freeze({
|
|
253
|
+
...parentIcons,
|
|
254
|
+
...icons
|
|
255
|
+
}) : parentIcons;
|
|
256
|
+
$[9] = icons;
|
|
257
|
+
$[10] = parentIcons;
|
|
258
|
+
$[11] = t4;
|
|
259
|
+
} else {
|
|
260
|
+
t4 = $[11];
|
|
261
|
+
}
|
|
262
|
+
const names = t4;
|
|
263
|
+
let t5;
|
|
264
|
+
if ($[12] !== content || $[13] !== names) {
|
|
265
|
+
t5 = /* @__PURE__ */ jsx(IconsContext, { value: names, children: content });
|
|
266
|
+
$[12] = content;
|
|
267
|
+
$[13] = names;
|
|
268
|
+
$[14] = t5;
|
|
269
|
+
} else {
|
|
270
|
+
t5 = $[14];
|
|
271
|
+
}
|
|
272
|
+
let t6;
|
|
273
|
+
if ($[15] !== parts || $[16] !== t5) {
|
|
274
|
+
t6 = /* @__PURE__ */ jsx(ComponentsContext, { value: parts, children: t5 });
|
|
275
|
+
$[15] = parts;
|
|
276
|
+
$[16] = t5;
|
|
277
|
+
$[17] = t6;
|
|
278
|
+
} else {
|
|
279
|
+
t6 = $[17];
|
|
280
|
+
}
|
|
281
|
+
let t7;
|
|
282
|
+
if ($[18] !== configs || $[19] !== t6) {
|
|
283
|
+
t7 = /* @__PURE__ */ jsx(ThemeContext, { value: configs, children: t6 });
|
|
284
|
+
$[18] = configs;
|
|
285
|
+
$[19] = t6;
|
|
286
|
+
$[20] = t7;
|
|
287
|
+
} else {
|
|
288
|
+
t7 = $[20];
|
|
289
|
+
}
|
|
290
|
+
return t7;
|
|
101
291
|
}
|
|
102
292
|
function _temp(entry) {
|
|
103
293
|
return [entry.id, entry.config];
|
|
@@ -162,6 +352,6 @@ function ModuleMotionConfig(t0) {
|
|
|
162
352
|
return t1;
|
|
163
353
|
}
|
|
164
354
|
|
|
165
|
-
export { ModuleMotionConfig, ThemeProvider, defineTheme, defineThemeSpec, useModuleMotion, useMotionTokens, useOptionalModuleMotion, useTheme };
|
|
166
|
-
//# sourceMappingURL=chunk-
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
355
|
+
export { ModuleMotionConfig, ThemeButton, ThemeIcon, ThemeProvider, ThemeSpinner, ThemeTooltip, defineTheme, defineThemeSpec, useIconName, useModuleMotion, useMotionTokens, useOptionalModuleMotion, useTheme, useThemeComponents };
|
|
356
|
+
//# sourceMappingURL=chunk-AKPH5CEJ.js.map
|
|
357
|
+
//# sourceMappingURL=chunk-AKPH5CEJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/theme/parts.tsx","../src/react/theme/index.tsx"],"names":["PlainButton","t0","$","_c","props","t1","type","undefined","t2","Nothing","Untipped","children","PLAIN","Object","freeze","Button","Icon","Spinner","Tooltip","NO_ICONS","ComponentsContext","getOrCreateGlobalContext","IconsContext","mergeComponents","parent","own","useThemeComponents","use","useIconName","icons","source","ThemeIcon","icon","name","ThemeButton","ThemeSpinner","ThemeTooltip","defineThemeSpec","id","defineTheme","spec","config","EMPTY","Map","ThemeContext","DEFAULT_MOTION","defineMotion","NO_MOTION_PROVIDER","reduced","tempo","NEUTRAL_TEMPO","tokens","MotionContext","MotionProvider","prefersReduced","useReducedMotion","reducedMotion","still","state","jsx","ThemeProvider","components","motion","themes","map","_temp","configs","inheritsMotion","providesMotion","Boolean","content","parentComponents","parentIcons","t3","parts","t4","names","t5","t6","t7","entry","missingTheme","Error","useTheme","get","slots","styles","motionTokens","WeakMap","useMotionTokens","getOrInsert","resolvedMotion","resolveModuleMotion","byConfig","retimeModuleMotion","useModuleMotion","useOptionalModuleMotion","ModuleMotionConfig"],"mappings":";;;;;;;AAkGA,SAAAA,YAAAC,EAAAA,EAAA;AAAA,EAAA,MAAAC,CAAAA,GAAAC,EAAA,CAAA,CAAA;AAAA,EAAA,IAAAC,KAAAA;AAAA,EAAA,IAAAC,EAAAA;AAAA,EAAA,IAAAH,CAAAA,CAAA,CAAA,CAAA,KAAAD,EAAAA,EAAA;AAAqB,IAAA,CAAA;MAAAK,IAAAA,EAAAD,EAAAA;MAAA,GAAAD;KAAA,GAAAH,EAAAA;AAA+CC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAD,EAAAA;AAAAC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAE,KAAAA;AAAAF,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAG,EAAAA;EAAA,CAAA,MAAA;AAAAD,IAAAA,KAAAA,GAAAF,EAAA,CAAA,CAAA;AAAAG,IAAAA,EAAAA,GAAAH,EAAA,CAAA,CAAA;AAAA,EA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EAAA,OAAO8B,mBAAAA,CAAoBlC,OAAOI,MAAM,CAAA;AAC1C;AAWO,SAAAmC,mBAAAhG,EAAAA,EAAA;AAAA,EAAA,MAAAC,CAAAA,GAAAC,EAAA,CAAA,CAAA;AAA4B,EAAA,MAAA;AAAAQ,IAAAA;GAAA,GAAAV,EAAAA;AACjC,EAAA,MAAA;AAAAkD,IAAAA;AAAA,GAAA,GAAmBxB,IAAIyB,aAAa,CAAA;AAAE,EAAA,IAAA/C,EAAAA;AAAA,EAAA,IAAAH,CAAAA,CAAA,CAAA,CAAA,KAAAS,QAAAA,IAAAT,EAAA,CAAA,CAAA,KAAAiD,OAAAK,aAAAA,EAAA;AAEpCnD,IAAAA,EAAAA,mBAAAsD,GAAAA,CAAC,YAAA,EAAA,EAA4B,aAAA,EAAAR,MAAAA,CAAMK,eAAiB7C,QAAAA,EAAS,CAAA;AAAeT,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAS,QAAAA;AAAAT,IAAAA,CAAAA,CAAA,CAAA,IAAAiD,MAAAA,CAAAK,aAAAA;AAAAtD,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAG,EAAAA;EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAAA,GAAAH,EAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,OAA5EG,EAAAA;AAA4E","file":"chunk-AKPH5CEJ.js","sourcesContent":["\"use client\";\n\nimport {\n type ButtonHTMLAttributes,\n type ComponentType,\n type CSSProperties,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n type Ref,\n use,\n} from \"react\";\n\nimport { getOrCreateGlobalContext } from \"@/react/context\";\n\n// The framework draws no UI of its own. Where a module needs a button, an\n// icon, a spinner or a tooltip it renders the component the app hands to\n// `ThemeProvider` (`components`), and names its own icons by key (`icons`).\n\n/**\n * Props a module passes to the app's button. Module buttons carry no variant:\n * the look comes from the module theme's slot in `className`.\n */\nexport interface ThemeButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n [data: `data-${string}`]: string | number | boolean | undefined;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * Props a module passes to the app's icon: an icon name (the app's own, or\n * one of the framework's keys already resolved through `icons`) and a size in px.\n */\nexport interface ThemeIconProps {\n className?: string;\n color?: string;\n icon: string;\n onClick?: MouseEventHandler<HTMLElement>;\n size?: number;\n style?: CSSProperties;\n}\n\n/**\n * Props a module passes to the app's spinner.\n */\nexport interface ThemeSpinnerProps {\n className?: string;\n size?: number;\n}\n\n/**\n * Props a module passes to the app's tooltip; `children` is the trigger.\n */\nexport interface ThemeTooltipProps {\n children: ReactElement;\n className?: string;\n sideOffset?: number;\n text?: ReactNode;\n}\n\n/**\n * The components the modules draw with. Each one is optional: without it a\n * module renders a plain `<button>`, no icon, no spinner and no tooltip.\n */\nexport interface ThemeComponents {\n Button: ComponentType<ThemeButtonProps>;\n Icon: ComponentType<ThemeIconProps>;\n Spinner: ComponentType<ThemeSpinnerProps>;\n Tooltip: ComponentType<ThemeTooltipProps>;\n}\n\n/**\n * The icons the framework's own modules show, by key. The app maps each key\n * to an icon name its `Icon` understands; an unmapped key draws nothing.\n */\nexport type FrameworkIcon =\n | \"back\"\n | \"close\"\n | \"danger\"\n | \"error\"\n | \"forbidden\"\n | \"forward\"\n | \"next\"\n | \"pause\"\n | \"pip\"\n | \"play\"\n | \"repeat\"\n | \"rewind\"\n | \"volumeLoud\"\n | \"volumeMuted\"\n | \"volumeSmall\"\n | \"wifi\"\n | \"wifiOff\";\n\n/**\n * The app's icon name for each framework icon key.\n */\nexport type ThemeIcons = Readonly<Partial<Record<FrameworkIcon, string>>>;\n\nfunction PlainButton({ type = \"button\", ...props }: ThemeButtonProps) {\n return <button type={type} {...props} />;\n}\n\nconst Nothing = () => null;\n\nfunction Untipped({ children }: ThemeTooltipProps) {\n return children;\n}\n\nconst PLAIN: ThemeComponents = Object.freeze({\n Button: PlainButton,\n Icon: Nothing,\n Spinner: Nothing,\n Tooltip: Untipped,\n});\n\nconst NO_ICONS: ThemeIcons = Object.freeze({});\n\nexport const ComponentsContext = getOrCreateGlobalContext<ThemeComponents>(\n \"ThemeComponentsContext\",\n PLAIN,\n);\n\nexport const IconsContext = getOrCreateGlobalContext<ThemeIcons>(\n \"ThemeIconsContext\",\n NO_ICONS,\n);\n\n/**\n * Merges the app's components over the plain ones (or over the ones a parent\n * provider already set).\n */\nexport function mergeComponents(\n parent: ThemeComponents,\n own: Partial<ThemeComponents> | undefined,\n): ThemeComponents {\n return own ? Object.freeze({ ...parent, ...own }) : parent;\n}\n\n/**\n * The components the modules draw with.\n */\nexport function useThemeComponents(): ThemeComponents {\n return use(ComponentsContext);\n}\n\n/**\n * Resolves a framework icon key to the app's icon name; any other string (an\n * icon name the app gave a module) passes through unchanged.\n */\nexport function useIconName(): (source: string) => string {\n const icons = use(IconsContext);\n return (source) => icons[source as FrameworkIcon] ?? source;\n}\n\n/**\n * Draws an icon by name or framework key with the app's `Icon`.\n */\nexport function ThemeIcon({ icon, ...props }: ThemeIconProps) {\n const { Icon } = use(ComponentsContext);\n const name = useIconName();\n return <Icon icon={name(icon)} {...props} />;\n}\n\n/**\n * Draws a module button with the app's `Button`.\n */\nexport function ThemeButton(props: ThemeButtonProps) {\n const { Button } = use(ComponentsContext);\n return <Button {...props} />;\n}\n\n/**\n * Draws a spinner with the app's `Spinner`.\n */\nexport function ThemeSpinner(props: ThemeSpinnerProps) {\n const { Spinner } = use(ComponentsContext);\n return <Spinner {...props} />;\n}\n\n/**\n * Wraps a trigger in the app's `Tooltip`.\n */\nexport function ThemeTooltip(props: ThemeTooltipProps) {\n const { Tooltip } = use(ComponentsContext);\n return <Tooltip {...props} />;\n}\n","\"use client\";\n\nimport { MotionConfig, useReducedMotion } from \"motion/react\";\nimport { type CSSProperties, type ReactNode, use, useMemo } from \"react\";\n\nimport { getOrInsert } from \"@/foundation/utils/collections\";\nimport {\n defineMotion,\n type MotionClock,\n type MotionTokens,\n NEUTRAL_TEMPO,\n retimeModuleMotion,\n} from \"@/foundation/utils/tempo\";\nimport { getOrCreateGlobalContext } from \"@/react/context\";\n\nimport {\n ComponentsContext,\n IconsContext,\n mergeComponents,\n type ThemeComponents,\n type ThemeIcons,\n} from \"./parts\";\n\nexport {\n type FrameworkIcon,\n type ThemeButtonProps,\n type ThemeComponents,\n ThemeButton,\n ThemeIcon,\n type ThemeIconProps,\n type ThemeIcons,\n ThemeSpinner,\n type ThemeSpinnerProps,\n ThemeTooltip,\n type ThemeTooltipProps,\n useIconName,\n useThemeComponents,\n} from \"./parts\";\n\n// ---- Theme definitions ----\n\n/**\n * A theme's identity and, through its type parameters, its slot names and motion shape.\n */\nexport interface ThemeSpec<S extends string = string, M = never> {\n readonly id: string;\n readonly _slots?: S;\n readonly _motion?: M;\n}\n\ninterface ThemeVisuals<S extends string> {\n slots: Readonly<Record<S, string>>;\n styles?: Readonly<Partial<Record<S, CSSProperties>>>;\n}\n\n/**\n * The slot classes, styles and (when the spec has motion) motion of a theme.\n */\nexport type ThemeConfig<S extends string, M = never> = ThemeVisuals<S> &\n ([M] extends [never] ? { motion?: undefined } : { motion: M });\n\n/**\n * The slot classes and styles a component receives from `useTheme`.\n */\nexport interface ResolvedTheme<S extends string> {\n readonly slots: Readonly<Record<S, string>>;\n readonly styles: Readonly<Partial<Record<S, CSSProperties>>>;\n}\n\n/**\n * A theme id paired with its configuration, as passed to `ThemeProvider`.\n */\nexport interface ThemeEntry {\n readonly id: string;\n readonly config: ThemeVisuals<string> & { motion?: unknown };\n}\n\n/**\n * Declares a theme's identity with its slot names and optional motion type.\n */\nexport function defineThemeSpec<S extends string, M = never>(\n id: string,\n): ThemeSpec<S, M> {\n return Object.freeze({ id });\n}\n\n/**\n * Binds a configuration to a theme spec.\n */\nexport function defineTheme<S extends string, M = never>(\n spec: ThemeSpec<S, M>,\n config: ThemeConfig<NoInfer<S>, NoInfer<M>>,\n): ThemeEntry {\n return { id: spec.id, config };\n}\n\n// ---- Contexts and providers ----\n\nconst EMPTY: ReadonlyMap<string, ThemeEntry[\"config\"]> = new Map();\nconst ThemeContext = getOrCreateGlobalContext<\n ReadonlyMap<string, ThemeEntry[\"config\"]>\n>(\"ThemeContext\", EMPTY);\n\ninterface MotionState extends MotionClock {\n readonly tokens: MotionTokens;\n}\n\nconst DEFAULT_MOTION = defineMotion({});\nconst NO_MOTION_PROVIDER: MotionState = Object.freeze({\n reduced: false,\n tempo: NEUTRAL_TEMPO,\n tokens: DEFAULT_MOTION,\n});\nconst MotionContext = getOrCreateGlobalContext<MotionState>(\n \"MotionContext\",\n NO_MOTION_PROVIDER,\n);\n\ninterface MotionProviderProps {\n children?: ReactNode;\n tokens: MotionTokens;\n}\n\nfunction MotionProvider({ children, tokens }: MotionProviderProps) {\n const prefersReduced = useReducedMotion() === true;\n const reduced =\n tokens.reducedMotion === \"always\" ||\n (tokens.reducedMotion === \"user\" && prefersReduced);\n // stable identity: consumers subscribe by reference\n const state = useMemo<MotionState>(\n () =>\n Object.freeze({\n reduced,\n still: tokens.still,\n tempo: tokens.tempo,\n tokens,\n }),\n [reduced, tokens],\n );\n return <MotionContext value={state}>{children}</MotionContext>;\n}\n\ninterface ThemeProviderProps {\n children?: ReactNode;\n /** The button, icon, spinner and tooltip the modules draw with. */\n components?: Partial<ThemeComponents>;\n /** The app's icon name for each icon the framework's modules show. */\n icons?: ThemeIcons;\n motion?: MotionTokens;\n themes: readonly ThemeEntry[];\n}\n\n/**\n * Provides themes, and motion tokens when given, to the tree below it.\n */\nexport function ThemeProvider({\n children,\n components,\n icons,\n motion,\n themes,\n}: ThemeProviderProps) {\n // stable identity: consumers subscribe by reference\n const configs = useMemo(\n () => new Map(themes.map((entry) => [entry.id, entry.config])),\n [themes],\n );\n const inheritsMotion = use(MotionContext) !== NO_MOTION_PROVIDER;\n const providesMotion = Boolean(motion) || !inheritsMotion;\n const content = providesMotion ? (\n <MotionProvider tokens={motion ?? DEFAULT_MOTION}>\n {children}\n </MotionProvider>\n ) : (\n children\n );\n const parentComponents = use(ComponentsContext);\n const parentIcons = use(IconsContext);\n // stable identity: consumers subscribe by reference\n const parts = useMemo(\n () => mergeComponents(parentComponents, components),\n [components, parentComponents],\n );\n const names = useMemo(\n () => (icons ? Object.freeze({ ...parentIcons, ...icons }) : parentIcons),\n [icons, parentIcons],\n );\n return (\n <ThemeContext value={configs}>\n <ComponentsContext value={parts}>\n <IconsContext value={names}>{content}</IconsContext>\n </ComponentsContext>\n </ThemeContext>\n );\n}\n\n// ---- Hooks ----\n\nfunction missingTheme(id: string): Error {\n return new Error(\n `Theme \"${id}\" is missing. Ensure its theme configuration is provided to <ThemeProvider themes={[...]}> (e.g. in src/config/ or your theme setup).`,\n );\n}\n\n/**\n * Returns the slot classes and styles configured for a theme spec.\n */\nexport function useTheme<S extends string>(\n spec: ThemeSpec<S, unknown>,\n): ResolvedTheme<S> {\n const config = use(ThemeContext).get(spec.id);\n if (!config) throw missingTheme(spec.id);\n return {\n slots: config.slots,\n styles: config.styles ?? {},\n };\n}\n\n// Cached per motion state, so `useMotionTokens` returns a stable object without memo.\nconst motionTokens = new WeakMap<\n MotionState,\n MotionTokens & { readonly reduced: boolean }\n>();\n\n/**\n * Returns the current motion tokens plus whether motion is reduced.\n */\nexport function useMotionTokens<T extends MotionTokens = MotionTokens>(): T & {\n readonly reduced: boolean;\n} {\n const state = use(MotionContext);\n const tokens = getOrInsert(motionTokens, state, () => ({\n ...state.tokens,\n reduced: state.reduced,\n }));\n return tokens as T & { readonly reduced: boolean };\n}\n\n// Retimed module motion, cached per motion state and motion config.\nconst resolvedMotion = new WeakMap<MotionState, WeakMap<object, unknown>>();\n\nfunction resolveModuleMotion(state: MotionState, motion: object): unknown {\n const byConfig = getOrInsert(resolvedMotion, state, () => new WeakMap());\n return getOrInsert(byConfig, motion, () => retimeModuleMotion(motion, state));\n}\n\n/**\n * Returns a theme's motion, retimed to the current tempo; throws if it has none.\n */\nexport function useModuleMotion<M>(spec: ThemeSpec<string, M>): M {\n const config = use(ThemeContext).get(spec.id);\n const state = use(MotionContext);\n if (!config) throw missingTheme(spec.id);\n if (!config.motion || typeof config.motion !== \"object\") {\n throw new Error(\n `Motion for theme \"${spec.id}\" is missing. Add \\`motion\\` to its defineTheme(...) next to \\`slots\\` (see docs/theming.md).`,\n );\n }\n return resolveModuleMotion(state, config.motion) as M;\n}\n\n/**\n * Like `useModuleMotion`, but returns null when the theme has no motion.\n */\nexport function useOptionalModuleMotion<M>(\n spec: ThemeSpec<string, M>,\n): M | null {\n const motion = use(ThemeContext).get(spec.id)?.motion;\n const state = use(MotionContext);\n if (!motion || typeof motion !== \"object\") return null;\n return resolveModuleMotion(state, motion) as M;\n}\n\n// ---- Motion config ----\n\ninterface ModuleMotionConfigProps {\n children?: ReactNode;\n}\n\n/**\n * Applies the motion tokens' reduced-motion policy to motion components below it.\n */\nexport function ModuleMotionConfig({ children }: ModuleMotionConfigProps) {\n const { tokens } = use(MotionContext);\n return (\n <MotionConfig reducedMotion={tokens.reducedMotion}>{children}</MotionConfig>\n );\n}\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { useOptionalDockState } from './chunk-
|
|
2
|
-
import { useIsClient } from './chunk-
|
|
1
|
+
import { useOptionalDockState } from './chunk-XIFQMK2Z.js';
|
|
2
|
+
import { useIsClient } from './chunk-T53WFIZN.js';
|
|
3
3
|
import { defineModule, useRegistryEntries, useModuleRegistration } from './chunk-ED32WLAD.js';
|
|
4
4
|
import { useStore, useRequiredContext } from './chunk-JWUKAZ3A.js';
|
|
5
|
-
import {
|
|
6
|
-
import { defineThemeSpec, useTheme, useModuleMotion } from './chunk-3JLG24KI.js';
|
|
5
|
+
import { defineThemeSpec, useTheme, ThemeIcon, useModuleMotion } from './chunk-AKPH5CEJ.js';
|
|
7
6
|
import { createStore, toFiniteNumber, report, isBrowser, isImageIconSource } from './chunk-S67HGKJ2.js';
|
|
8
7
|
import { getOrCreateGlobalContext } from './chunk-J3VTDBC6.js';
|
|
9
8
|
import { isObject, toArray } from './chunk-YHWA7FXX.js';
|
|
@@ -944,7 +943,7 @@ function ContextMenuHeaderIcon(t0) {
|
|
|
944
943
|
}
|
|
945
944
|
let t1;
|
|
946
945
|
if ($[5] !== icon) {
|
|
947
|
-
t1 = typeof icon === "string" ? /* @__PURE__ */ jsx(
|
|
946
|
+
t1 = typeof icon === "string" ? /* @__PURE__ */ jsx(ThemeIcon, { icon, size: HEADER_ICON_SIZE }) : icon;
|
|
948
947
|
$[5] = icon;
|
|
949
948
|
$[6] = t1;
|
|
950
949
|
} else {
|
|
@@ -1080,7 +1079,7 @@ function ContextMenuItem(t0) {
|
|
|
1080
1079
|
const itemIconClassName = t2;
|
|
1081
1080
|
let t3;
|
|
1082
1081
|
if ($[8] !== item.icon || $[9] !== itemIconClassName) {
|
|
1083
|
-
t3 = typeof item.icon === "string" ? /* @__PURE__ */ jsx(
|
|
1082
|
+
t3 = typeof item.icon === "string" ? /* @__PURE__ */ jsx(ThemeIcon, { icon: item.icon, className: itemIconClassName, size: ITEM_ICON_SIZE }) : item.icon;
|
|
1084
1083
|
$[8] = item.icon;
|
|
1085
1084
|
$[9] = itemIconClassName;
|
|
1086
1085
|
$[10] = t3;
|
|
@@ -1428,5 +1427,5 @@ function defineContextMenu(definition = {}) {
|
|
|
1428
1427
|
}
|
|
1429
1428
|
|
|
1430
1429
|
export { CONTEXT_MENU_VISIBILITY_EVENT, CURRENT_PAGE_KEY, ContextMenuContext, ContextMenuGlobal, ContextMenuHeader, ContextMenuHeaderIcon, ContextMenuItem, ContextMenuProvider, ContextMenuRenderer, GLOBAL_MENU_KEY, INITIAL_POSITION, MENU_SCREEN_MARGIN, contextMenuModule, contextMenuTheme, createInitialMenuState, defineContextMenu, emitContextMenuVisibility, extractNodeText, getNextActiveIndex, isScrollLockKey, joinClassNames, positionMenu, prepareMenu, resolveAsBoolean, resolveAsValue, resolveContextMenu, resolveContextMenuPageMeta, resolveMenuHeader, resolveMenuItems, resolveNextOpenState, safeInvoke, useContextMenu, useContextMenuActions, useContextMenuContentModel, useContextMenuListener, useContextMenuRegistration, useContextMenuState, useMenuDismissal };
|
|
1431
|
-
//# sourceMappingURL=chunk-
|
|
1432
|
-
//# sourceMappingURL=chunk-
|
|
1430
|
+
//# sourceMappingURL=chunk-AWLK2I56.js.map
|
|
1431
|
+
//# sourceMappingURL=chunk-AWLK2I56.js.map
|