@fluid-app/portal-sdk 0.1.263 → 0.1.265
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/{FluidProvider-CAtUtrHk.mjs → FluidProvider-CjBaajXT.mjs} +143 -22
- package/dist/FluidProvider-CjBaajXT.mjs.map +1 -0
- package/dist/{FluidProvider-CZan7yJ3.cjs → FluidProvider-lgII8Oel.cjs} +143 -22
- package/dist/FluidProvider-lgII8Oel.cjs.map +1 -0
- package/dist/{MessagingScreen-QDJm0Pyl.cjs → MessagingScreen-B1RaTiK3.cjs} +3 -3
- package/dist/MessagingScreen-B1RaTiK3.cjs.map +1 -0
- package/dist/{MessagingScreen-XB3cov5J.cjs → MessagingScreen-BvNefjAW.cjs} +2 -2
- package/dist/{MessagingScreen-CgT-5OV9.mjs → MessagingScreen-I6KNH5mG.mjs} +3 -3
- package/dist/MessagingScreen-I6KNH5mG.mjs.map +1 -0
- package/dist/{MessagingScreen-Cez2xufk.mjs → MessagingScreen-ulyB4v7S.mjs} +2 -3
- package/dist/{MySiteScreen-CFnu_zYS.cjs → MySiteScreen-BGE15I3O.cjs} +1 -1
- package/dist/{MySiteScreen-BgbNtw0X.cjs → MySiteScreen-CjxVYCy3.cjs} +2 -2
- package/dist/MySiteScreen-CjxVYCy3.cjs.map +1 -0
- package/dist/{MySiteScreen-D1dfEszo.mjs → MySiteScreen-UnihGvkl.mjs} +2 -2
- package/dist/MySiteScreen-UnihGvkl.mjs.map +1 -0
- package/dist/{OrdersScreen-BhYkPQXn.cjs → OrdersScreen-Bkvv2kD8.cjs} +6 -6
- package/dist/OrdersScreen-Bkvv2kD8.cjs.map +1 -0
- package/dist/{OrdersScreen-B-Gb3TB-.cjs → OrdersScreen-CiqE8fWy.cjs} +1 -1
- package/dist/{OrdersScreen-BQ_YwexM.mjs → OrdersScreen-D97Q-_Aj.mjs} +6 -6
- package/dist/OrdersScreen-D97Q-_Aj.mjs.map +1 -0
- package/dist/{ProfileScreen-IJRZfp5T.cjs → ProfileScreen-B7QchKri.cjs} +2 -2
- package/dist/{ProfileScreen-BMbRpzpb.mjs → ProfileScreen-CAyyvXRF.mjs} +2 -2
- package/dist/{ProfileScreen-BMbRpzpb.mjs.map → ProfileScreen-CAyyvXRF.mjs.map} +1 -1
- package/dist/{ProfileScreen-BHgZHUVb.mjs → ProfileScreen-CLs7I118.mjs} +2 -3
- package/dist/{ProfileScreen-DZd0iacf.cjs → ProfileScreen-I7c6sZTN.cjs} +2 -2
- package/dist/{ProfileScreen-DZd0iacf.cjs.map → ProfileScreen-I7c6sZTN.cjs.map} +1 -1
- package/dist/{ShareablesScreen-DN7qFaOj.mjs → ShareablesScreen-CpMBwPc7.mjs} +0 -2
- package/dist/{ShopScreen-nGPQtrue.cjs → ShopScreen-CyQu9_l4.cjs} +2 -2
- package/dist/{ShopScreen-DSN_Krki.mjs → ShopScreen-Dxwt-CT6.mjs} +2 -4
- package/dist/{ShopScreen-DwOTNR_g.cjs → ShopScreen-bybdzvHB.cjs} +2 -2
- package/dist/{ShopScreen-DwOTNR_g.cjs.map → ShopScreen-bybdzvHB.cjs.map} +1 -1
- package/dist/{ShopScreen-BVx_M-iK.mjs → ShopScreen-zGLod99Z.mjs} +2 -2
- package/dist/{ShopScreen-BVx_M-iK.mjs.map → ShopScreen-zGLod99Z.mjs.map} +1 -1
- package/dist/index.cjs +19 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +21 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/styles/globals.css +2 -1
- package/dist/FluidProvider-CAtUtrHk.mjs.map +0 -1
- package/dist/FluidProvider-CZan7yJ3.cjs.map +0 -1
- package/dist/MessagingScreen-CgT-5OV9.mjs.map +0 -1
- package/dist/MessagingScreen-QDJm0Pyl.cjs.map +0 -1
- package/dist/MySiteScreen-BgbNtw0X.cjs.map +0 -1
- package/dist/MySiteScreen-D1dfEszo.mjs.map +0 -1
- package/dist/OrdersScreen-BQ_YwexM.mjs.map +0 -1
- package/dist/OrdersScreen-BhYkPQXn.cjs.map +0 -1
|
@@ -5715,6 +5715,61 @@ function resolveTheme(def) {
|
|
|
5715
5715
|
};
|
|
5716
5716
|
}
|
|
5717
5717
|
//#endregion
|
|
5718
|
+
//#region ../../platform/ui-primitives/src/tokens/manifest.ts
|
|
5719
|
+
const TOKEN_MANIFEST = {
|
|
5720
|
+
colors: [
|
|
5721
|
+
"background",
|
|
5722
|
+
"foreground",
|
|
5723
|
+
"card",
|
|
5724
|
+
"card-foreground",
|
|
5725
|
+
"popover",
|
|
5726
|
+
"popover-foreground",
|
|
5727
|
+
"primary",
|
|
5728
|
+
"primary-foreground",
|
|
5729
|
+
"secondary",
|
|
5730
|
+
"secondary-foreground",
|
|
5731
|
+
"muted",
|
|
5732
|
+
"muted-foreground",
|
|
5733
|
+
"accent",
|
|
5734
|
+
"accent-foreground",
|
|
5735
|
+
"destructive",
|
|
5736
|
+
"destructive-foreground",
|
|
5737
|
+
"border",
|
|
5738
|
+
"input",
|
|
5739
|
+
"ring",
|
|
5740
|
+
"chart-1",
|
|
5741
|
+
"chart-2",
|
|
5742
|
+
"chart-3",
|
|
5743
|
+
"chart-4",
|
|
5744
|
+
"chart-5",
|
|
5745
|
+
"sidebar",
|
|
5746
|
+
"sidebar-foreground",
|
|
5747
|
+
"sidebar-primary",
|
|
5748
|
+
"sidebar-primary-foreground",
|
|
5749
|
+
"sidebar-accent",
|
|
5750
|
+
"sidebar-accent-foreground",
|
|
5751
|
+
"sidebar-border",
|
|
5752
|
+
"sidebar-ring",
|
|
5753
|
+
"contrast"
|
|
5754
|
+
],
|
|
5755
|
+
radii: [
|
|
5756
|
+
"",
|
|
5757
|
+
"sm",
|
|
5758
|
+
"md",
|
|
5759
|
+
"lg",
|
|
5760
|
+
"xl"
|
|
5761
|
+
],
|
|
5762
|
+
merchantCustomizable: [
|
|
5763
|
+
"background",
|
|
5764
|
+
"foreground",
|
|
5765
|
+
"primary",
|
|
5766
|
+
"secondary",
|
|
5767
|
+
"accent",
|
|
5768
|
+
"muted",
|
|
5769
|
+
"destructive"
|
|
5770
|
+
]
|
|
5771
|
+
};
|
|
5772
|
+
//#endregion
|
|
5718
5773
|
//#region ../../platform/theme-engine/src/tailwind-overrides.ts
|
|
5719
5774
|
const OVERRIDES = {
|
|
5720
5775
|
"--color-gray-50": "var(--color-muted)",
|
|
@@ -5808,30 +5863,96 @@ function emitNonColorVars(theme) {
|
|
|
5808
5863
|
for (const key of RADIUS_KEYS) lines.push(`--radius-${camelToKebab(key)}: ${theme.radii[key]};`);
|
|
5809
5864
|
return lines;
|
|
5810
5865
|
}
|
|
5866
|
+
const MERCHANT_CUSTOMIZABLE = new Set(TOKEN_MANIFEST.merchantCustomizable);
|
|
5867
|
+
/**
|
|
5868
|
+
* Names that theme-engine emits via emitColorVars (the merchant-customizable
|
|
5869
|
+
* base set) and their derived `-foreground` siblings. Used to skip duplicate
|
|
5870
|
+
* emission of `--color-{name}` from the manifest derivation pass.
|
|
5871
|
+
*
|
|
5872
|
+
* Typed as `Set<string>` because the synthesized `${name}-foreground` strings
|
|
5873
|
+
* include `"background-foreground"` / `"foreground-foreground"`, which are not
|
|
5874
|
+
* members of `SemanticTokenName`. Membership checks against the manifest still
|
|
5875
|
+
* work because `Set.has(string)` accepts the wider type.
|
|
5876
|
+
*/
|
|
5877
|
+
const EMITTED_BY_COLOR_VARS = new Set([...SEMANTIC_COLOR_NAMES, ...SEMANTIC_COLOR_NAMES.map((n) => `${n}-foreground`)]);
|
|
5878
|
+
/**
|
|
5879
|
+
* Resolve the alias expression for a non-merchant-customizable token.
|
|
5880
|
+
*
|
|
5881
|
+
* Returns `null` for tokens that should fall through to the canonical default
|
|
5882
|
+
* defined in `ui-primitives.css` (chart palette is intentionally not merchant-themed).
|
|
5883
|
+
*
|
|
5884
|
+
* The exhaustive switch is the fail-fast guarantee: TypeScript rejects this
|
|
5885
|
+
* file if a non-customizable token in the manifest is missing a case here.
|
|
5886
|
+
*/
|
|
5887
|
+
function aliasFor(token) {
|
|
5888
|
+
switch (token) {
|
|
5889
|
+
case "card": return "var(--color-muted)";
|
|
5890
|
+
case "card-foreground": return "var(--color-muted-foreground)";
|
|
5891
|
+
case "popover": return "var(--color-background)";
|
|
5892
|
+
case "popover-foreground": return "var(--color-foreground)";
|
|
5893
|
+
case "border": return "color-mix(in oklch, var(--color-background), var(--color-foreground) 15%)";
|
|
5894
|
+
case "input": return "var(--color-border)";
|
|
5895
|
+
case "ring": return "var(--color-primary)";
|
|
5896
|
+
case "chart-1":
|
|
5897
|
+
case "chart-2":
|
|
5898
|
+
case "chart-3":
|
|
5899
|
+
case "chart-4":
|
|
5900
|
+
case "chart-5": return null;
|
|
5901
|
+
case "sidebar": return "var(--color-muted)";
|
|
5902
|
+
case "sidebar-foreground": return "var(--color-muted-foreground)";
|
|
5903
|
+
case "sidebar-primary": return "var(--color-primary)";
|
|
5904
|
+
case "sidebar-primary-foreground": return "var(--color-primary-foreground)";
|
|
5905
|
+
case "sidebar-accent": return "var(--color-accent)";
|
|
5906
|
+
case "sidebar-accent-foreground": return "var(--color-accent-foreground)";
|
|
5907
|
+
case "sidebar-border": return "var(--color-border)";
|
|
5908
|
+
case "sidebar-ring": return "var(--color-primary)";
|
|
5909
|
+
case "contrast": return "var(--color-foreground)";
|
|
5910
|
+
}
|
|
5911
|
+
}
|
|
5912
|
+
/**
|
|
5913
|
+
* Build the alias block emitted at the top of every `[data-theme]` rule.
|
|
5914
|
+
*
|
|
5915
|
+
* For each canonical token in `TOKEN_MANIFEST.colors`:
|
|
5916
|
+
* - merchant-customizable tokens: `--color-{name}` is emitted by `emitColorVars`
|
|
5917
|
+
* from the resolved theme; this function only emits the short-name alias
|
|
5918
|
+
* (`--{name}: var(--color-{name})`) for compatibility with consumers that
|
|
5919
|
+
* reference short names.
|
|
5920
|
+
* - non-customizable tokens: emit both `--color-{name}: <alias>` and the
|
|
5921
|
+
* short-name alias, unless `aliasFor` returns null. Returning null is the
|
|
5922
|
+
* intentional pass-through signal: ui-primitives.css already maps `--color-{name}`
|
|
5923
|
+
* to `var(--{name})` via `@theme inline`, so emitting `--{name}: var(--color-{name})`
|
|
5924
|
+
* inside `[data-theme]` would create a circular var() reference and resolve
|
|
5925
|
+
* to an invalid value (chart-1..5 would render transparent under any theme).
|
|
5926
|
+
*
|
|
5927
|
+
* Two static aliases (`--color-background-foreground`, `--color-foreground-foreground`)
|
|
5928
|
+
* are not regular `-foreground` siblings; they are emitted explicitly because
|
|
5929
|
+
* they swap the bg/fg pair rather than reading from a paired field.
|
|
5930
|
+
*/
|
|
5931
|
+
function buildAliasBlock() {
|
|
5932
|
+
const lines = ["--color-background-foreground: var(--color-foreground);", "--color-foreground-foreground: var(--color-background);"];
|
|
5933
|
+
for (const token of TOKEN_MANIFEST.colors) {
|
|
5934
|
+
if (MERCHANT_CUSTOMIZABLE.has(token)) {
|
|
5935
|
+
lines.push(`--${token}: var(--color-${token});`);
|
|
5936
|
+
continue;
|
|
5937
|
+
}
|
|
5938
|
+
if (EMITTED_BY_COLOR_VARS.has(token)) {
|
|
5939
|
+
lines.push(`--${token}: var(--color-${token});`);
|
|
5940
|
+
continue;
|
|
5941
|
+
}
|
|
5942
|
+
const alias = aliasFor(token);
|
|
5943
|
+
if (alias === null) continue;
|
|
5944
|
+
lines.push(`--color-${token}: ${alias};`);
|
|
5945
|
+
lines.push(`--${token}: var(--color-${token});`);
|
|
5946
|
+
}
|
|
5947
|
+
return lines;
|
|
5948
|
+
}
|
|
5811
5949
|
/**
|
|
5812
|
-
* Static
|
|
5813
|
-
*
|
|
5950
|
+
* Static alias variables emitted at the top of every theme rule.
|
|
5951
|
+
* Derived from the canonical token manifest so new canonical tokens reach
|
|
5952
|
+
* merchant theming automatically.
|
|
5814
5953
|
*/
|
|
5815
5954
|
const globalCSSOverride = [
|
|
5816
|
-
|
|
5817
|
-
"--color-foreground-foreground: var(--color-background);",
|
|
5818
|
-
"--color-contrast: var(--color-foreground);",
|
|
5819
|
-
...SEMANTIC_COLOR_NAMES.map((value) => `--${value}: var(--color-${value});`),
|
|
5820
|
-
...SEMANTIC_COLOR_NAMES.map((value) => `--${value}-foreground: var(--color-${value}-foreground);`),
|
|
5821
|
-
"--sidebar-ring: var(--color-primary);",
|
|
5822
|
-
"--sidebar-border: var(--color-border);",
|
|
5823
|
-
"--sidebar-accent-foreground: var(--color-accent-foreground);",
|
|
5824
|
-
"--sidebar-accent: var(--color-accent);",
|
|
5825
|
-
"--sidebar-primary-foreground: var(--color-primary-foreground);",
|
|
5826
|
-
"--sidebar-primary: var(--color-primary);",
|
|
5827
|
-
"--sidebar-foreground: var(--color-muted-foreground);",
|
|
5828
|
-
"--sidebar: var(--color-muted);",
|
|
5829
|
-
"--border: color-mix(in oklch, var(--color-background), var(--color-foreground) 15%);",
|
|
5830
|
-
"--ring: var(--color-primary);",
|
|
5831
|
-
"--popover: var(--color-background);",
|
|
5832
|
-
"--popover-foreground: var(--color-foreground);",
|
|
5833
|
-
"--card: var(--color-muted);",
|
|
5834
|
-
"--card-foreground: var(--color-muted-foreground);",
|
|
5955
|
+
...buildAliasBlock(),
|
|
5835
5956
|
"--radius-sm: var(--radius-small);",
|
|
5836
5957
|
"--radius-md: var(--radius-medium);",
|
|
5837
5958
|
"--radius-lg: var(--radius-large);",
|
|
@@ -7100,4 +7221,4 @@ function useFluidContext() {
|
|
|
7100
7221
|
//#endregion
|
|
7101
7222
|
export { parseColor as A, deleteDatabase as B, DEFAULT_THEME_ID as C, deriveDarkVariant as D, generateThemeCSS as E, SEMANTIC_COLOR_NAMES as F, ApiError as I, useLanguagesApi as L, FONT_FAMILY_KEYS as M, FONT_SIZE_KEYS as N, getForegroundColor as O, RADIUS_KEYS as P, useAppDefinitionApi as R, DEFAULT_SPACING as S, getDefaultThemeDefinition as T, serialiseTheme as _, createScreen as a, DEFAULT_FONT_SIZES as b, FluidThemeProvider as c, removeAllThemes as d, removeTheme as f, deserialiseTheme as g, transformThemes as h, widgetPropertySchemas as i, resolveTheme as j, mergeDarkOverrides as k, useThemeContext as l, getActiveThemeId as m, useFluidContext as n, createWidgetFromShareable as o, buildThemeDefinition as p, DEFAULT_SDK_WIDGET_REGISTRY as r, createWidgetRegistry as s, FluidProvider as t, applyTheme as u, DEFAULT_COLORS as v, DEFAULT_THEME_NAME as w, DEFAULT_RADII as x, DEFAULT_FONT_FAMILIES as y, createPersister as z };
|
|
7102
7223
|
|
|
7103
|
-
//# sourceMappingURL=FluidProvider-
|
|
7224
|
+
//# sourceMappingURL=FluidProvider-CjBaajXT.mjs.map
|