@almadar/ui 6.29.0 → 6.30.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/{EntityBindingContext-UyeCfEBS.d.cts → EntityBindingContext-ChCONv2W.d.cts} +1 -50
- package/dist/{EntityBindingContext-UyeCfEBS.d.ts → EntityBindingContext-ChCONv2W.d.ts} +1 -50
- package/dist/avl/index.cjs +5 -6
- package/dist/avl/index.js +5 -6
- package/dist/components/index.cjs +4 -5
- package/dist/components/index.js +4 -5
- package/dist/context/index.cjs +135 -105
- package/dist/context/index.d.cts +2 -60
- package/dist/context/index.d.ts +2 -60
- package/dist/context/index.js +135 -105
- package/dist/lib/index.cjs +455 -0
- package/dist/lib/index.d.cts +42 -1
- package/dist/lib/index.d.ts +42 -1
- package/dist/lib/index.js +438 -1
- package/dist/marketing/index.cjs +4 -5
- package/dist/marketing/index.js +4 -5
- package/dist/providers/index.cjs +143 -116
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +143 -116
- package/dist/runtime/index.cjs +5 -6
- package/dist/runtime/index.d.cts +2 -2
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +5 -6
- package/dist/themeTokens-DVRwufw8.d.cts +112 -0
- package/dist/themeTokens-DVRwufw8.d.ts +112 -0
- package/package.json +6 -5
- package/scripts/audit-tailwind-safelist.ts +4 -0
- package/tailwind-preset.cjs +155 -28
- package/themes/almadar-website.css +37 -107
- package/themes/almadar.css +37 -108
- package/themes/atelier.css +145 -240
- package/themes/bloomberg-dense.css +145 -252
- package/themes/clay.css +39 -137
- package/themes/comic.css +39 -145
- package/themes/corporate.css +39 -131
- package/themes/game-adventure.css +22 -87
- package/themes/game-rpg.css +22 -84
- package/themes/game-sci-fi.css +22 -88
- package/themes/game-ui-pack.css +22 -85
- package/themes/gazette.css +43 -135
- package/themes/glass.css +39 -148
- package/themes/kiosk.css +51 -146
- package/themes/linear-clean.css +145 -215
- package/themes/minimalist.css +39 -125
- package/themes/neon.css +39 -132
- package/themes/notion-editorial.css +145 -215
- package/themes/prism.css +37 -100
- package/themes/retro.css +39 -130
- package/themes/terminal.css +61 -152
- package/themes/trait-wars.css +121 -285
- package/themes/wireframe.css +41 -128
package/dist/providers/index.js
CHANGED
|
@@ -13789,11 +13789,10 @@ var init_HeroSection = __esm({
|
|
|
13789
13789
|
};
|
|
13790
13790
|
backgroundStyles = {
|
|
13791
13791
|
dark: "bg-foreground text-background",
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
].join(" "),
|
|
13792
|
+
// A single bracket value: joining this as two array entries put a space
|
|
13793
|
+
// inside the class (Tailwind splits utilities on whitespace), so neither
|
|
13794
|
+
// half was a valid utility and the gradient rendered as nothing.
|
|
13795
|
+
gradient: "bg-[radial-gradient(ellipse_at_top,var(--color-primary)/0.08,transparent_60%),radial-gradient(ellipse_at_bottom_right,var(--color-accent)/0.06,transparent_50%)] bg-background",
|
|
13797
13796
|
subtle: "bg-muted/30"
|
|
13798
13797
|
};
|
|
13799
13798
|
MarketingImage = ({ src, alt, className }) => /* @__PURE__ */ jsx(
|
|
@@ -54123,17 +54122,127 @@ function OrbitalProvider({
|
|
|
54123
54122
|
OrbitalProvider.displayName = "OrbitalProvider";
|
|
54124
54123
|
|
|
54125
54124
|
// lib/themeTokens.ts
|
|
54125
|
+
function applyFlat(obj, table, vars) {
|
|
54126
|
+
if (!obj) return;
|
|
54127
|
+
for (const { cssVar, key } of table) {
|
|
54128
|
+
const value = obj[key];
|
|
54129
|
+
if (value !== void 0) vars[cssVar] = value;
|
|
54130
|
+
}
|
|
54131
|
+
}
|
|
54132
|
+
var DENSITY_SPACING_VARS = [
|
|
54133
|
+
{ cssVar: "--space-0", key: "space0" },
|
|
54134
|
+
{ cssVar: "--space-1", key: "space1" },
|
|
54135
|
+
{ cssVar: "--space-2", key: "space2" },
|
|
54136
|
+
{ cssVar: "--space-3", key: "space3" },
|
|
54137
|
+
{ cssVar: "--space-4", key: "space4" },
|
|
54138
|
+
{ cssVar: "--space-5", key: "space5" },
|
|
54139
|
+
{ cssVar: "--space-6", key: "space6" },
|
|
54140
|
+
{ cssVar: "--space-7", key: "space7" },
|
|
54141
|
+
{ cssVar: "--space-8", key: "space8" },
|
|
54142
|
+
{ cssVar: "--space-9", key: "space9" },
|
|
54143
|
+
{ cssVar: "--space-10", key: "space10" },
|
|
54144
|
+
{ cssVar: "--space-11", key: "space11" },
|
|
54145
|
+
{ cssVar: "--space-12", key: "space12" }
|
|
54146
|
+
];
|
|
54147
|
+
var DENSITY_ELEMENT_VARS = [
|
|
54148
|
+
{ cssVar: "--button-height-sm", key: "buttonHeightSm" },
|
|
54149
|
+
{ cssVar: "--button-height-md", key: "buttonHeightMd" },
|
|
54150
|
+
{ cssVar: "--button-height-lg", key: "buttonHeightLg" },
|
|
54151
|
+
{ cssVar: "--input-height-sm", key: "inputHeightSm" },
|
|
54152
|
+
{ cssVar: "--input-height-md", key: "inputHeightMd" },
|
|
54153
|
+
{ cssVar: "--input-height-lg", key: "inputHeightLg" },
|
|
54154
|
+
{ cssVar: "--row-height-compact", key: "rowHeightCompact" },
|
|
54155
|
+
{ cssVar: "--row-height-normal", key: "rowHeightNormal" },
|
|
54156
|
+
{ cssVar: "--row-height-spacious", key: "rowHeightSpacious" },
|
|
54157
|
+
{ cssVar: "--card-padding-sm", key: "cardPaddingSm" },
|
|
54158
|
+
{ cssVar: "--card-padding-md", key: "cardPaddingMd" },
|
|
54159
|
+
{ cssVar: "--card-padding-lg", key: "cardPaddingLg" },
|
|
54160
|
+
{ cssVar: "--dialog-padding", key: "dialogPadding" },
|
|
54161
|
+
{ cssVar: "--section-gap", key: "sectionGap" }
|
|
54162
|
+
];
|
|
54163
|
+
var TYPE_FAMILY_VARS = [
|
|
54164
|
+
{ cssVar: "--font-family-display", key: "displayFamily" },
|
|
54165
|
+
{ cssVar: "--font-family-body", key: "bodyFamily" },
|
|
54166
|
+
{ cssVar: "--font-family-mono", key: "monoFamily" }
|
|
54167
|
+
];
|
|
54168
|
+
var TYPE_SIZE_KEYS = [
|
|
54169
|
+
"xs",
|
|
54170
|
+
"sm",
|
|
54171
|
+
"base",
|
|
54172
|
+
"lg",
|
|
54173
|
+
"xl",
|
|
54174
|
+
"2xl",
|
|
54175
|
+
"3xl",
|
|
54176
|
+
"4xl",
|
|
54177
|
+
"display-1",
|
|
54178
|
+
"display-2"
|
|
54179
|
+
];
|
|
54180
|
+
var TYPE_INTENT_VARS = [
|
|
54181
|
+
{ key: "headingMajor", cssName: "heading-major" },
|
|
54182
|
+
{ key: "headingMinor", cssName: "heading-minor" },
|
|
54183
|
+
{ key: "bodyEmphasis", cssName: "body-emphasis" },
|
|
54184
|
+
{ key: "bodyDefault", cssName: "body-default" },
|
|
54185
|
+
{ key: "bodyQuiet", cssName: "body-quiet" },
|
|
54186
|
+
{ key: "caption", cssName: "caption" },
|
|
54187
|
+
{ key: "numeric", cssName: "numeric" }
|
|
54188
|
+
];
|
|
54189
|
+
var MOTION_DURATION_KEYS = [
|
|
54190
|
+
"instant",
|
|
54191
|
+
"fast",
|
|
54192
|
+
"normal",
|
|
54193
|
+
"slow",
|
|
54194
|
+
"dramatic"
|
|
54195
|
+
];
|
|
54196
|
+
var MOTION_EASING_KEYS = [
|
|
54197
|
+
"linear",
|
|
54198
|
+
"standard",
|
|
54199
|
+
"emphasized",
|
|
54200
|
+
"spring"
|
|
54201
|
+
];
|
|
54202
|
+
var MOTION_INTENT_VARS = [
|
|
54203
|
+
{ key: "enter", cssName: "enter" },
|
|
54204
|
+
{ key: "exit", cssName: "exit" },
|
|
54205
|
+
{ key: "hover", cssName: "hover" },
|
|
54206
|
+
{ key: "press", cssName: "press" },
|
|
54207
|
+
{ key: "expand", cssName: "expand" },
|
|
54208
|
+
{ key: "transition", cssName: "transition" }
|
|
54209
|
+
];
|
|
54210
|
+
var ICONOGRAPHY_VARS = [
|
|
54211
|
+
{ cssVar: "--icon-family", key: "family" },
|
|
54212
|
+
{ cssVar: "--icon-stroke-width", key: "strokeWidth" },
|
|
54213
|
+
{ cssVar: "--icon-default-size", key: "defaultSize" }
|
|
54214
|
+
];
|
|
54215
|
+
var ELEVATION_VARS = [
|
|
54216
|
+
{ cssVar: "--elevation-card", key: "cardElevation" },
|
|
54217
|
+
{ cssVar: "--elevation-popover", key: "popoverElevation" },
|
|
54218
|
+
{ cssVar: "--elevation-dialog", key: "dialogElevation" },
|
|
54219
|
+
{ cssVar: "--elevation-toast", key: "toastElevation" }
|
|
54220
|
+
];
|
|
54221
|
+
var GEOMETRY_VARS = [
|
|
54222
|
+
{ cssVar: "--radius-container", key: "radiusContainer" },
|
|
54223
|
+
{ cssVar: "--radius-interactive", key: "radiusInteractive" },
|
|
54224
|
+
{ cssVar: "--radius-pill", key: "radiusPill" },
|
|
54225
|
+
{ cssVar: "--border-hairline", key: "borderHairline" },
|
|
54226
|
+
{ cssVar: "--border-standard", key: "borderStandard" },
|
|
54227
|
+
{ cssVar: "--border-heavy", key: "borderHeavy" }
|
|
54228
|
+
];
|
|
54229
|
+
var LEGACY_PREFIXES = {
|
|
54230
|
+
colors: "--color-",
|
|
54231
|
+
radii: "--radius-",
|
|
54232
|
+
spacing: "--space-",
|
|
54233
|
+
shadows: "--shadow-"
|
|
54234
|
+
};
|
|
54126
54235
|
function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
|
|
54127
54236
|
const vars = {};
|
|
54128
54237
|
const isDark = mode === "dark";
|
|
54129
54238
|
const pickColors = isDark && darkVariant?.colors ? darkVariant.colors : tokens.colors;
|
|
54130
54239
|
if (pickColors) {
|
|
54131
54240
|
for (const [key, value] of Object.entries(pickColors)) {
|
|
54132
|
-
vars[
|
|
54241
|
+
vars[`${LEGACY_PREFIXES.colors}${key}`] = value;
|
|
54133
54242
|
}
|
|
54134
54243
|
if (isDark && darkVariant?.colors && tokens.colors) {
|
|
54135
54244
|
for (const [key, value] of Object.entries(tokens.colors)) {
|
|
54136
|
-
const varName =
|
|
54245
|
+
const varName = `${LEGACY_PREFIXES.colors}${key}`;
|
|
54137
54246
|
if (!(varName in vars)) vars[varName] = value;
|
|
54138
54247
|
}
|
|
54139
54248
|
}
|
|
@@ -54141,13 +54250,13 @@ function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
|
|
|
54141
54250
|
const pickRadii = isDark && darkVariant?.radii ? darkVariant.radii : tokens.radii;
|
|
54142
54251
|
if (pickRadii) {
|
|
54143
54252
|
for (const [key, value] of Object.entries(pickRadii)) {
|
|
54144
|
-
vars[
|
|
54253
|
+
vars[`${LEGACY_PREFIXES.radii}${key}`] = value;
|
|
54145
54254
|
}
|
|
54146
54255
|
}
|
|
54147
54256
|
const pickSpacing = isDark && darkVariant?.spacing ? darkVariant.spacing : tokens.spacing;
|
|
54148
54257
|
if (pickSpacing) {
|
|
54149
54258
|
for (const [key, value] of Object.entries(pickSpacing)) {
|
|
54150
|
-
vars[
|
|
54259
|
+
vars[`${LEGACY_PREFIXES.spacing}${key}`] = value;
|
|
54151
54260
|
}
|
|
54152
54261
|
}
|
|
54153
54262
|
const pickTypography = isDark && darkVariant?.typography ? darkVariant.typography : tokens.typography;
|
|
@@ -54159,7 +54268,7 @@ function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
|
|
|
54159
54268
|
const pickShadows = isDark && darkVariant?.shadows ? darkVariant.shadows : tokens.shadows;
|
|
54160
54269
|
if (pickShadows) {
|
|
54161
54270
|
for (const [key, value] of Object.entries(pickShadows)) {
|
|
54162
|
-
vars[
|
|
54271
|
+
vars[`${LEGACY_PREFIXES.shadows}${key}`] = value;
|
|
54163
54272
|
}
|
|
54164
54273
|
}
|
|
54165
54274
|
const pickDensity = isDark && darkVariant?.density ? darkVariant.density : tokens.density;
|
|
@@ -54178,46 +54287,8 @@ function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
|
|
|
54178
54287
|
}
|
|
54179
54288
|
function emitDensity(density, vars) {
|
|
54180
54289
|
if (!density) return;
|
|
54181
|
-
|
|
54182
|
-
|
|
54183
|
-
const pairs2 = [
|
|
54184
|
-
["0", s.space0],
|
|
54185
|
-
["1", s.space1],
|
|
54186
|
-
["2", s.space2],
|
|
54187
|
-
["3", s.space3],
|
|
54188
|
-
["4", s.space4],
|
|
54189
|
-
["5", s.space5],
|
|
54190
|
-
["6", s.space6],
|
|
54191
|
-
["7", s.space7],
|
|
54192
|
-
["8", s.space8],
|
|
54193
|
-
["9", s.space9],
|
|
54194
|
-
["10", s.space10],
|
|
54195
|
-
["11", s.space11],
|
|
54196
|
-
["12", s.space12]
|
|
54197
|
-
];
|
|
54198
|
-
for (const [k, v] of pairs2) {
|
|
54199
|
-
if (v !== void 0) vars[`--space-${k}`] = v;
|
|
54200
|
-
}
|
|
54201
|
-
}
|
|
54202
|
-
const pairs = [
|
|
54203
|
-
["button-height-sm", density.buttonHeightSm],
|
|
54204
|
-
["button-height-md", density.buttonHeightMd],
|
|
54205
|
-
["button-height-lg", density.buttonHeightLg],
|
|
54206
|
-
["input-height-sm", density.inputHeightSm],
|
|
54207
|
-
["input-height-md", density.inputHeightMd],
|
|
54208
|
-
["input-height-lg", density.inputHeightLg],
|
|
54209
|
-
["row-height-compact", density.rowHeightCompact],
|
|
54210
|
-
["row-height-normal", density.rowHeightNormal],
|
|
54211
|
-
["row-height-spacious", density.rowHeightSpacious],
|
|
54212
|
-
["card-padding-sm", density.cardPaddingSm],
|
|
54213
|
-
["card-padding-md", density.cardPaddingMd],
|
|
54214
|
-
["card-padding-lg", density.cardPaddingLg],
|
|
54215
|
-
["dialog-padding", density.dialogPadding],
|
|
54216
|
-
["section-gap", density.sectionGap]
|
|
54217
|
-
];
|
|
54218
|
-
for (const [k, v] of pairs) {
|
|
54219
|
-
if (v !== void 0) vars[`--${k}`] = v;
|
|
54220
|
-
}
|
|
54290
|
+
applyFlat(density.spacing, DENSITY_SPACING_VARS, vars);
|
|
54291
|
+
applyFlat(density, DENSITY_ELEMENT_VARS, vars);
|
|
54221
54292
|
}
|
|
54222
54293
|
function typeSizeKeyStr(k) {
|
|
54223
54294
|
return k;
|
|
@@ -54234,24 +54305,11 @@ function emitTypeIntent(name, intent, vars) {
|
|
|
54234
54305
|
}
|
|
54235
54306
|
function emitTypeScale(ts, vars) {
|
|
54236
54307
|
if (!ts) return;
|
|
54237
|
-
|
|
54238
|
-
if (ts.bodyFamily !== void 0) vars["--font-family-body"] = ts.bodyFamily;
|
|
54239
|
-
if (ts.monoFamily !== void 0) vars["--font-family-mono"] = ts.monoFamily;
|
|
54308
|
+
applyFlat(ts, TYPE_FAMILY_VARS, vars);
|
|
54240
54309
|
if (ts.scale) {
|
|
54241
54310
|
const s = ts.scale;
|
|
54242
|
-
const
|
|
54243
|
-
|
|
54244
|
-
["sm", s.sm],
|
|
54245
|
-
["base", s.base],
|
|
54246
|
-
["lg", s.lg],
|
|
54247
|
-
["xl", s.xl],
|
|
54248
|
-
["2xl", s["2xl"]],
|
|
54249
|
-
["3xl", s["3xl"]],
|
|
54250
|
-
["4xl", s["4xl"]],
|
|
54251
|
-
["display-1", s["display-1"]],
|
|
54252
|
-
["display-2", s["display-2"]]
|
|
54253
|
-
];
|
|
54254
|
-
for (const [k, entry] of pairs) {
|
|
54311
|
+
for (const k of TYPE_SIZE_KEYS) {
|
|
54312
|
+
const entry = s[k];
|
|
54255
54313
|
if (entry !== void 0) {
|
|
54256
54314
|
vars[`--text-${k}`] = entry.size;
|
|
54257
54315
|
vars[`--leading-${k}`] = entry.lineHeight;
|
|
@@ -54260,13 +54318,10 @@ function emitTypeScale(ts, vars) {
|
|
|
54260
54318
|
}
|
|
54261
54319
|
if (ts.intents) {
|
|
54262
54320
|
const i = ts.intents;
|
|
54263
|
-
|
|
54264
|
-
|
|
54265
|
-
|
|
54266
|
-
|
|
54267
|
-
if (i.bodyQuiet) emitTypeIntent("body-quiet", i.bodyQuiet, vars);
|
|
54268
|
-
if (i.caption) emitTypeIntent("caption", i.caption, vars);
|
|
54269
|
-
if (i.numeric) emitTypeIntent("numeric", i.numeric, vars);
|
|
54321
|
+
for (const { key, cssName } of TYPE_INTENT_VARS) {
|
|
54322
|
+
const intent = i[key];
|
|
54323
|
+
if (intent) emitTypeIntent(cssName, intent, vars);
|
|
54324
|
+
}
|
|
54270
54325
|
}
|
|
54271
54326
|
}
|
|
54272
54327
|
function emitMotionIntent(name, intent, vars) {
|
|
@@ -54277,60 +54332,34 @@ function emitMotion(m, vars) {
|
|
|
54277
54332
|
if (!m) return;
|
|
54278
54333
|
if (m.durations) {
|
|
54279
54334
|
const d = m.durations;
|
|
54280
|
-
const
|
|
54281
|
-
|
|
54282
|
-
["fast", d.fast],
|
|
54283
|
-
["normal", d.normal],
|
|
54284
|
-
["slow", d.slow],
|
|
54285
|
-
["dramatic", d.dramatic]
|
|
54286
|
-
];
|
|
54287
|
-
for (const [k, v] of pairs) {
|
|
54335
|
+
for (const k of MOTION_DURATION_KEYS) {
|
|
54336
|
+
const v = d[k];
|
|
54288
54337
|
if (v !== void 0) vars[`--duration-${k}`] = v;
|
|
54289
54338
|
}
|
|
54290
54339
|
}
|
|
54291
54340
|
if (m.easings) {
|
|
54292
54341
|
const e = m.easings;
|
|
54293
|
-
const
|
|
54294
|
-
|
|
54295
|
-
["standard", e.standard],
|
|
54296
|
-
["emphasized", e.emphasized],
|
|
54297
|
-
["spring", e.spring]
|
|
54298
|
-
];
|
|
54299
|
-
for (const [k, v] of pairs) {
|
|
54342
|
+
for (const k of MOTION_EASING_KEYS) {
|
|
54343
|
+
const v = e[k];
|
|
54300
54344
|
if (v !== void 0) vars[`--easing-${k}`] = v;
|
|
54301
54345
|
}
|
|
54302
54346
|
}
|
|
54303
54347
|
if (m.intents) {
|
|
54304
54348
|
const i = m.intents;
|
|
54305
|
-
|
|
54306
|
-
|
|
54307
|
-
|
|
54308
|
-
|
|
54309
|
-
if (i.expand) emitMotionIntent("expand", i.expand, vars);
|
|
54310
|
-
if (i.transition) emitMotionIntent("transition", i.transition, vars);
|
|
54349
|
+
for (const { key, cssName } of MOTION_INTENT_VARS) {
|
|
54350
|
+
const intent = i[key];
|
|
54351
|
+
if (intent) emitMotionIntent(cssName, intent, vars);
|
|
54352
|
+
}
|
|
54311
54353
|
}
|
|
54312
54354
|
}
|
|
54313
54355
|
function emitIconography(i, vars) {
|
|
54314
|
-
|
|
54315
|
-
if (i.family !== void 0) vars["--icon-family"] = i.family;
|
|
54316
|
-
if (i.strokeWidth !== void 0) vars["--icon-stroke-width"] = i.strokeWidth;
|
|
54317
|
-
if (i.defaultSize !== void 0) vars["--icon-default-size"] = i.defaultSize;
|
|
54356
|
+
applyFlat(i, ICONOGRAPHY_VARS, vars);
|
|
54318
54357
|
}
|
|
54319
54358
|
function emitElevation(e, vars) {
|
|
54320
|
-
|
|
54321
|
-
if (e.cardElevation !== void 0) vars["--elevation-card"] = e.cardElevation;
|
|
54322
|
-
if (e.popoverElevation !== void 0) vars["--elevation-popover"] = e.popoverElevation;
|
|
54323
|
-
if (e.dialogElevation !== void 0) vars["--elevation-dialog"] = e.dialogElevation;
|
|
54324
|
-
if (e.toastElevation !== void 0) vars["--elevation-toast"] = e.toastElevation;
|
|
54359
|
+
applyFlat(e, ELEVATION_VARS, vars);
|
|
54325
54360
|
}
|
|
54326
54361
|
function emitGeometry(g, vars) {
|
|
54327
|
-
|
|
54328
|
-
if (g.radiusContainer !== void 0) vars["--radius-container"] = g.radiusContainer;
|
|
54329
|
-
if (g.radiusInteractive !== void 0) vars["--radius-interactive"] = g.radiusInteractive;
|
|
54330
|
-
if (g.radiusPill !== void 0) vars["--radius-pill"] = g.radiusPill;
|
|
54331
|
-
if (g.borderHairline !== void 0) vars["--border-hairline"] = g.borderHairline;
|
|
54332
|
-
if (g.borderStandard !== void 0) vars["--border-standard"] = g.borderStandard;
|
|
54333
|
-
if (g.borderHeavy !== void 0) vars["--border-heavy"] = g.borderHeavy;
|
|
54362
|
+
applyFlat(g, GEOMETRY_VARS, vars);
|
|
54334
54363
|
}
|
|
54335
54364
|
function resolveThemeForRuntime(theme) {
|
|
54336
54365
|
if (theme === void 0) return void 0;
|
|
@@ -54934,8 +54963,8 @@ function ServerBridgeProvider({
|
|
|
54934
54963
|
dataEntities,
|
|
54935
54964
|
data: responseData,
|
|
54936
54965
|
entityByTrait: result.entityByTrait,
|
|
54937
|
-
emittedEvents: result.emittedEvents
|
|
54938
|
-
emitted: result.emittedEvents
|
|
54966
|
+
emittedEvents: result.emittedEvents.map((e) => e.event),
|
|
54967
|
+
emitted: result.emittedEvents.map((e) => ({ event: e.event, ...e.payload !== void 0 && { payload: e.payload } })),
|
|
54939
54968
|
effectResults: result.effectResults,
|
|
54940
54969
|
error: result.error
|
|
54941
54970
|
};
|
|
@@ -54970,10 +54999,8 @@ function ServerBridgeProvider({
|
|
|
54970
54999
|
effects.push({ type: "navigate-back", traitName });
|
|
54971
55000
|
}
|
|
54972
55001
|
}
|
|
54973
|
-
|
|
54974
|
-
|
|
54975
|
-
reEmitServerEvent(eventBus, emitted, orbitalName);
|
|
54976
|
-
}
|
|
55002
|
+
for (const emitted of stampLocallyDeliveredEchoes(event, result.emittedEvents, locallyEmitted ?? [])) {
|
|
55003
|
+
reEmitServerEvent(eventBus, emitted, orbitalName);
|
|
54977
55004
|
}
|
|
54978
55005
|
} else if (result.error) {
|
|
54979
55006
|
xOrbitalLog.warn("response:fail", {
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -13942,11 +13942,10 @@ var init_HeroSection = __esm({
|
|
|
13942
13942
|
};
|
|
13943
13943
|
backgroundStyles = {
|
|
13944
13944
|
dark: "bg-foreground text-background",
|
|
13945
|
-
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
13949
|
-
].join(" "),
|
|
13945
|
+
// A single bracket value: joining this as two array entries put a space
|
|
13946
|
+
// inside the class (Tailwind splits utilities on whitespace), so neither
|
|
13947
|
+
// half was a valid utility and the gradient rendered as nothing.
|
|
13948
|
+
gradient: "bg-[radial-gradient(ellipse_at_top,var(--color-primary)/0.08,transparent_60%),radial-gradient(ellipse_at_bottom_right,var(--color-accent)/0.06,transparent_50%)] bg-background",
|
|
13950
13949
|
subtle: "bg-muted/30"
|
|
13951
13950
|
};
|
|
13952
13951
|
MarketingImage = ({ src, alt, className }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -54981,7 +54980,7 @@ function normalizeChild(child) {
|
|
|
54981
54980
|
function effectResultsToTraces(results) {
|
|
54982
54981
|
if (!results) return [];
|
|
54983
54982
|
return results.map((r) => {
|
|
54984
|
-
const resultId = r.data
|
|
54983
|
+
const resultId = typeof r.data === "object" && r.data !== null && !Array.isArray(r.data) && "id" in r.data && typeof r.data.id === "string" ? r.data.id : void 0;
|
|
54985
54984
|
const outcome = r.denied ? "denied" : r.success ? "success" : "failed";
|
|
54986
54985
|
return {
|
|
54987
54986
|
type: r.effect,
|
package/dist/runtime/index.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ import * as _almadar_runtime from '@almadar/runtime';
|
|
|
5
5
|
import { TraitState, TransitionResult, EffectHandlers } from '@almadar/runtime';
|
|
6
6
|
import { K as KeyCaptureTable } from '../useKeyboardRouter-CVn8lfiX.cjs';
|
|
7
7
|
import { c as useUISlots } from '../UISlotContext-BlRDbHDy.cjs';
|
|
8
|
-
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-
|
|
9
|
-
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-
|
|
8
|
+
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-ChCONv2W.cjs';
|
|
9
|
+
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-ChCONv2W.cjs';
|
|
10
10
|
import '../verificationRegistry-DTrKDRoa.cjs';
|
|
11
11
|
export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
|
|
12
12
|
import React__default, { ReactNode } from 'react';
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import * as _almadar_runtime from '@almadar/runtime';
|
|
|
5
5
|
import { TraitState, TransitionResult, EffectHandlers } from '@almadar/runtime';
|
|
6
6
|
import { K as KeyCaptureTable } from '../useKeyboardRouter-B1pIi9jo.js';
|
|
7
7
|
import { c as useUISlots } from '../UISlotContext-CB89mv7N.js';
|
|
8
|
-
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-
|
|
9
|
-
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-
|
|
8
|
+
import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-ChCONv2W.js';
|
|
9
|
+
export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-ChCONv2W.js';
|
|
10
10
|
import '../verificationRegistry-Cwa52VyK.js';
|
|
11
11
|
export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
|
|
12
12
|
import React__default, { ReactNode } from 'react';
|
package/dist/runtime/index.js
CHANGED
|
@@ -13868,11 +13868,10 @@ var init_HeroSection = __esm({
|
|
|
13868
13868
|
};
|
|
13869
13869
|
backgroundStyles = {
|
|
13870
13870
|
dark: "bg-foreground text-background",
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13874
|
-
|
|
13875
|
-
].join(" "),
|
|
13871
|
+
// A single bracket value: joining this as two array entries put a space
|
|
13872
|
+
// inside the class (Tailwind splits utilities on whitespace), so neither
|
|
13873
|
+
// half was a valid utility and the gradient rendered as nothing.
|
|
13874
|
+
gradient: "bg-[radial-gradient(ellipse_at_top,var(--color-primary)/0.08,transparent_60%),radial-gradient(ellipse_at_bottom_right,var(--color-accent)/0.06,transparent_50%)] bg-background",
|
|
13876
13875
|
subtle: "bg-muted/30"
|
|
13877
13876
|
};
|
|
13878
13877
|
MarketingImage = ({ src, alt, className }) => /* @__PURE__ */ jsx(
|
|
@@ -54907,7 +54906,7 @@ function normalizeChild(child) {
|
|
|
54907
54906
|
function effectResultsToTraces(results) {
|
|
54908
54907
|
if (!results) return [];
|
|
54909
54908
|
return results.map((r) => {
|
|
54910
|
-
const resultId = r.data
|
|
54909
|
+
const resultId = typeof r.data === "object" && r.data !== null && !Array.isArray(r.data) && "id" in r.data && typeof r.data.id === "string" ? r.data.id : void 0;
|
|
54911
54910
|
const outcome = r.denied ? "denied" : r.success ? "success" : "failed";
|
|
54912
54911
|
return {
|
|
54913
54912
|
type: r.effect,
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ThemeRef, ThemeDefinition, ThemeTokens, ThemeVariant, DensityTokens, ElevationTokens, GeometryTokens, IconographyTokens, MotionDurationKey, MotionEasingKey, MotionIntentMap, TypeScaleTokens, TypeIntentMap, TypeSizeKey } from '@almadar/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* themeTokens — runtime mirror of the orbital compiler's theme codegen.
|
|
5
|
+
*
|
|
6
|
+
* The compile path (orbital-rust/crates/orbital-shell-typescript/src/codegen/theme.rs)
|
|
7
|
+
* reads `OrbitalDefinition.theme.tokens` and emits CSS custom-property
|
|
8
|
+
* declarations into a `[data-theme="<name>-<mode>"]` block. The runtime
|
|
9
|
+
* does not parse compiled CSS — it reads the same `tokens` object directly
|
|
10
|
+
* and produces the same `{ '--color-primary': '…', '--radius-md': '…' }` map
|
|
11
|
+
* that the compiler emits.
|
|
12
|
+
*
|
|
13
|
+
* Keeping the two paths byte-identical at the variable level is the contract:
|
|
14
|
+
* editing tokens via the Studio Design System tab must produce the exact
|
|
15
|
+
* same rendered result as editing them in source and running `orbital
|
|
16
|
+
* compile`. The mapping rules here mirror `generate_tokens_css` /
|
|
17
|
+
* `generate_tokens_css_dark` (theme.rs:122–351).
|
|
18
|
+
*
|
|
19
|
+
* Compile vs runtime difference (intentional):
|
|
20
|
+
* - Compile emits the FULL set: schema overrides on top of defaults. This is
|
|
21
|
+
* needed because the compiled CSS replaces the theme entirely.
|
|
22
|
+
* - Runtime emits ONLY the keys present in `tokens` (and `variants.dark`).
|
|
23
|
+
* Missing keys cascade from the parent `[data-theme]` rule on the document
|
|
24
|
+
* element. The provider scopes overrides to an orbital subtree without
|
|
25
|
+
* shadowing inherited defaults.
|
|
26
|
+
*
|
|
27
|
+
* The per-axis var tables below (`DENSITY_SPACING_VARS`, `TYPE_INTENT_VARS`, …)
|
|
28
|
+
* are the ONE mapping between a typed-axis field and its CSS variable name.
|
|
29
|
+
* `themeTokensToCssVars` reads them forward (token → CSS); `almadar-core`'s
|
|
30
|
+
* one-time `scripts/migrate-css-themes.ts` reads them in reverse (CSS →
|
|
31
|
+
* token) to build `packages/almadar-core/themes/*.json` from the checked-in
|
|
32
|
+
* preset CSS — see that script for the inverse direction.
|
|
33
|
+
*
|
|
34
|
+
* @packageDocumentation
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/** Resolved color mode. Mirrors `ThemeContext.resolvedMode`. */
|
|
38
|
+
type ThemeMode = 'light' | 'dark';
|
|
39
|
+
/** The keys of `T` whose value is a plain (optional) string — excludes
|
|
40
|
+
* nested-object fields like `DensityTokens['spacing']` or
|
|
41
|
+
* `TypeScaleTokens['scale']`, which are never single CSS values. */
|
|
42
|
+
type StringValueKey<T> = {
|
|
43
|
+
[K in keyof T]-?: T[K] extends string | undefined ? K : never;
|
|
44
|
+
}[keyof T] & string;
|
|
45
|
+
/** One flat scalar field on an axis object and the CSS var name it maps to. */
|
|
46
|
+
interface FlatVarEntry<T> {
|
|
47
|
+
readonly cssVar: string;
|
|
48
|
+
readonly key: StringValueKey<T>;
|
|
49
|
+
}
|
|
50
|
+
/** Density axis — spacing scale steps (`density.spacing.space<N>` → `--space-<N>`). */
|
|
51
|
+
declare const DENSITY_SPACING_VARS: ReadonlyArray<FlatVarEntry<NonNullable<DensityTokens['spacing']>>>;
|
|
52
|
+
/** Density axis — per-element heights + paddings. */
|
|
53
|
+
declare const DENSITY_ELEMENT_VARS: ReadonlyArray<FlatVarEntry<DensityTokens>>;
|
|
54
|
+
/** Type axis — family triplet. */
|
|
55
|
+
declare const TYPE_FAMILY_VARS: ReadonlyArray<FlatVarEntry<TypeScaleTokens>>;
|
|
56
|
+
/** Type axis — size scale keys, ordered exactly as emitted. Each pairs `--text-<k>` / `--leading-<k>`. */
|
|
57
|
+
declare const TYPE_SIZE_KEYS: ReadonlyArray<TypeSizeKey>;
|
|
58
|
+
/** Type axis — intent names, ordered exactly as emitted. Each is 3 vars: `-size` / `-weight` / `-leading`. */
|
|
59
|
+
declare const TYPE_INTENT_VARS: ReadonlyArray<{
|
|
60
|
+
key: keyof TypeIntentMap & string;
|
|
61
|
+
cssName: string;
|
|
62
|
+
}>;
|
|
63
|
+
/** Motion axis — duration palette keys, ordered exactly as emitted. */
|
|
64
|
+
declare const MOTION_DURATION_KEYS: ReadonlyArray<MotionDurationKey>;
|
|
65
|
+
/** Motion axis — easing palette keys, ordered exactly as emitted. */
|
|
66
|
+
declare const MOTION_EASING_KEYS: ReadonlyArray<MotionEasingKey>;
|
|
67
|
+
/** Motion axis — intent names, ordered exactly as emitted. Each is 2 vars: `-duration` / `-easing`. */
|
|
68
|
+
declare const MOTION_INTENT_VARS: ReadonlyArray<{
|
|
69
|
+
key: keyof MotionIntentMap & string;
|
|
70
|
+
cssName: string;
|
|
71
|
+
}>;
|
|
72
|
+
/** Iconography axis — flat fields. */
|
|
73
|
+
declare const ICONOGRAPHY_VARS: ReadonlyArray<FlatVarEntry<IconographyTokens>>;
|
|
74
|
+
/** Elevation axis — flat fields. */
|
|
75
|
+
declare const ELEVATION_VARS: ReadonlyArray<FlatVarEntry<ElevationTokens>>;
|
|
76
|
+
/** Geometry axis — flat fields. */
|
|
77
|
+
declare const GEOMETRY_VARS: ReadonlyArray<FlatVarEntry<GeometryTokens>>;
|
|
78
|
+
/** Legacy free-form map prefixes (`ThemeTokens.colors`/`radii`/`spacing`/`shadows`). `typography` has no prefix — see below. */
|
|
79
|
+
declare const LEGACY_PREFIXES: {
|
|
80
|
+
readonly colors: "--color-";
|
|
81
|
+
readonly radii: "--radius-";
|
|
82
|
+
readonly spacing: "--space-";
|
|
83
|
+
readonly shadows: "--shadow-";
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Convert `ThemeTokens` (+ optional dark variant) into a CSS custom-property
|
|
87
|
+
* map keyed by variable name (e.g. `--color-primary`).
|
|
88
|
+
*
|
|
89
|
+
* Mapping rules (mirror theme.rs):
|
|
90
|
+
* - `tokens.colors.<k>` → `--color-<k>`
|
|
91
|
+
* - `tokens.radii.<k>` → `--radius-<k>`
|
|
92
|
+
* - `tokens.spacing.<k>` → `--space-<k>`
|
|
93
|
+
* - `tokens.typography.<k>` → `--<k>` (keys already include their `font-`/
|
|
94
|
+
* `letter-`/`line-` prefix)
|
|
95
|
+
* - `tokens.shadows.<k>` → `--shadow-<k>` (schema key has no prefix)
|
|
96
|
+
*
|
|
97
|
+
* In `'dark'` mode, the `darkVariant` overrides are merged on top of the
|
|
98
|
+
* base tokens per category — same precedence the Rust compiler uses
|
|
99
|
+
* (`generate_tokens_css_dark`). Categories not present in `darkVariant` fall
|
|
100
|
+
* back to the base tokens.
|
|
101
|
+
*/
|
|
102
|
+
declare function themeTokensToCssVars(tokens: ThemeTokens, mode?: ThemeMode, darkVariant?: ThemeVariant): Record<string, string>;
|
|
103
|
+
/**
|
|
104
|
+
* `ThemeRef` is `ThemeDefinition | string`. When it's a string, it's an
|
|
105
|
+
* unresolved import reference (e.g. `"Ocean.theme"`) that should have been
|
|
106
|
+
* inlined by the compiler's import phase before runtime. If we still see a
|
|
107
|
+
* string here, the upstream resolution path didn't run — return `undefined`
|
|
108
|
+
* rather than guess. `OrbitalThemeProvider` falls through to passthrough.
|
|
109
|
+
*/
|
|
110
|
+
declare function resolveThemeForRuntime(theme: ThemeRef | undefined): ThemeDefinition | undefined;
|
|
111
|
+
|
|
112
|
+
export { DENSITY_ELEMENT_VARS as D, ELEVATION_VARS as E, type FlatVarEntry as F, GEOMETRY_VARS as G, ICONOGRAPHY_VARS as I, LEGACY_PREFIXES as L, MOTION_DURATION_KEYS as M, type StringValueKey as S, type ThemeMode as T, DENSITY_SPACING_VARS as a, MOTION_EASING_KEYS as b, MOTION_INTENT_VARS as c, TYPE_FAMILY_VARS as d, TYPE_INTENT_VARS as e, TYPE_SIZE_KEYS as f, resolveThemeForRuntime as r, themeTokensToCssVars as t };
|