origam 2.18.15 → 2.18.17

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.
Files changed (42) hide show
  1. package/dist/src/assets/css/main.css +1 -1
  2. package/dist/src/assets/css/tokens/dark.css +374 -26
  3. package/dist/src/assets/css/tokens/light.css +187 -13
  4. package/dist/src/assets/scss/tokens/_dark.scss +374 -26
  5. package/dist/src/assets/scss/tokens/_light.scss +187 -13
  6. package/dist/src/components/Bracket/OrigamBracket.vue +15 -0
  7. package/dist/src/components/Bracket/OrigamBracketMatch.vue +22 -1
  8. package/dist/src/components/Btn/OrigamBtn.vue +39 -2
  9. package/dist/src/components/Btn/OrigamBtnGroup.vue +5 -0
  10. package/dist/src/components/Card/OrigamCard.vue +42 -35
  11. package/dist/src/components/Chart/OrigamChartAxis.vue +10 -0
  12. package/dist/src/components/Chart/OrigamChartBoxPlot.vue +3 -3
  13. package/dist/src/components/Chart/OrigamChartCandlestick.vue +2 -2
  14. package/dist/src/components/Chart/OrigamChartCartesian.vue +1 -1
  15. package/dist/src/components/DataTable/OrigamDataTable.vue +1 -1
  16. package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +3 -3
  17. package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +11 -4
  18. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +1 -1
  19. package/dist/src/components/DataTable/OrigamDataTableRow.vue +6 -1
  20. package/dist/src/components/DataTable/OrigamDataTableRows.vue +3 -3
  21. package/dist/src/components/Grid/OrigamGrid.vue +19 -0
  22. package/dist/src/components/List/OrigamListItem.vue +7 -0
  23. package/dist/src/components/List/OrigamListSubheader.vue +5 -0
  24. package/dist/src/composables/Commons/defaults.composable.d.ts +51 -0
  25. package/dist/src/composables/DataTable/headers.composable.d.ts +4 -4
  26. package/dist/src/consts/EmptyState/empty-state.const.d.ts +2 -16
  27. package/dist/src/interfaces/Commons/installed-theme.interface.cjs +1 -0
  28. package/dist/src/interfaces/Commons/installed-theme.interface.d.ts +26 -0
  29. package/dist/src/interfaces/Commons/installed-theme.interface.js +0 -0
  30. package/dist/src/interfaces/Commons/semantic-tree.interface.cjs +1 -0
  31. package/dist/src/interfaces/Commons/semantic-tree.interface.d.ts +30 -0
  32. package/dist/src/interfaces/Commons/semantic-tree.interface.js +0 -0
  33. package/dist/src/interfaces/Commons/theme.interface.d.ts +1 -1
  34. package/dist/src/interfaces/EmptyState/empty-state.interface.d.ts +13 -0
  35. package/dist/src/interfaces/index.cjs +22 -0
  36. package/dist/src/interfaces/index.d.ts +2 -0
  37. package/dist/src/interfaces/index.js +2 -0
  38. package/dist/src/types/Commons/installed-theme.type.d.ts +2 -27
  39. package/dist/src/types/Commons/semantic-tree.type.d.ts +0 -29
  40. package/dist/src/types/tokens.type.d.ts +1 -1
  41. package/dist/src/utils/Commons/apply-theme.util.d.ts +1 -1
  42. package/package.json +1 -1
@@ -209,7 +209,7 @@ defineExpose({
209
209
  }
210
210
 
211
211
  &#{$this}--sortable {
212
- cursor: var(--origam-data-table-sortable---cursor, var(--origam-data-table__sortable---cursor, pointer));
212
+ cursor: var(--origam-data-table-header-cell--sortable---cursor, pointer);
213
213
 
214
214
  &:hover {
215
215
  #{$this}__sort-icon {
@@ -262,7 +262,12 @@ defineExpose({
262
262
  column-gap: 4px;
263
263
  display: grid;
264
264
  grid-template-columns: repeat(2, 1fr);
265
- min-height: var(--origam-data-table-row--mobile__column-min-height, var(--origam-data-table-row--mobile__column, var(--origam-data-table__row---mobile-column-min-height, 52px)));
265
+ // C2 (#597) — l'echelon intermediaire
266
+ // `var(--origam-data-table-row--mobile__column, …)` a ete RETIRE :
267
+ // le premier echelon est declare dans les feuilles (52px), donc il
268
+ // resout toujours et l'intermediaire etait inatteignable. Mesure
269
+ // avant/apres : `min-height` = 52px de part et d'autre.
270
+ min-height: var(--origam-data-table-row--mobile__column-min-height, var(--origam-data-table__row---mobile-column-min-height, 52px));
266
271
 
267
272
  &:not(:last-child) {
268
273
  border-bottom: 0;
@@ -280,12 +280,12 @@ defineExpose({
280
280
  <style lang="scss" scoped>
281
281
  .origam-data-table-rows {
282
282
  &--no-data {
283
- text-align: var(--origam-data-table-empty---text-align, var(--origam-data-table__empty---text-align, center));
284
- color: var(--origam-data-table-rows--no-data---color, var(--origam-data-table__empty---color, var(--origam-color__text---secondary)));
283
+ text-align: var(--origam-data-table-rows--no-data---text-align, center);
284
+ color: var(--origam-data-table-rows--no-data---color, var(--origam-color__text---secondary));
285
285
  }
286
286
 
287
287
  &--loading {
288
- color: var(--origam-data-table-rows--loading---color, var(--origam-data-table---loading-row-color, var(--origam-color__text---secondary)));
288
+ color: var(--origam-data-table-rows--loading---color, var(--origam-color__text---secondary));
289
289
  }
290
290
 
291
291
  &--skeleton {
@@ -216,6 +216,25 @@ defineExpose({
216
216
  grid-auto-columns: var(--origam-grid---auto-columns, auto);
217
217
  grid-auto-rows: var(--origam-grid---auto-rows, auto);
218
218
  gap: var(--origam-grid---gap, var(--origam-grid---gap-md));
219
+ // ⛔ C2 (#597) — `--origam-grid---column-gap` et `---row-gap` restent NON
220
+ // DECLARES, a dessein, et ils sont les SEULS de ce bloc dans ce cas
221
+ // (mesure : les 8 autres sont declares dans light.css, ces deux-la a 0).
222
+ //
223
+ // La difference n'est pas la forme du repli, c'est QUI le repli designe :
224
+ //
225
+ // - les 8 autres lisent LEUR PROPRE token, que `gridStyles` ci-dessus
226
+ // ecrit en style INLINE sur l'element. La declaration de l'element bat
227
+ // celle de `:root`, donc la prop continue d'agir et la declaration de
228
+ // feuille est inoffensive.
229
+ // - ces deux-ci lisent le token DU VOISIN en repli
230
+ // (`var(--origam-grid---column-gap, var(--origam-grid---gap))`), et
231
+ // c'est `--origam-grid---gap` — lui aussi ecrit inline par la prop
232
+ // `gap` — qui porte la valeur utile. Les declarer a `:root` ferait
233
+ // resoudre le premier echelon et la chaine NE CONSULTERAIT JAMAIS
234
+ // `---gap` : la prop `gap` cesserait d'agir sur les deux gouttieres.
235
+ //
236
+ // Faux positif de la garde, qui compare des noms et non des chaines de
237
+ // repli.
219
238
  column-gap: var(--origam-grid---column-gap, var(--origam-grid---gap));
220
239
  row-gap: var(--origam-grid---row-gap, var(--origam-grid---gap));
221
240
  align-items: var(--origam-grid---align-items, stretch);
@@ -685,6 +685,13 @@ defineExpose({
685
685
  }
686
686
 
687
687
  &__overlay {
688
+ // ⛔ C2 (#597, deja tranche en PR #586) — `--origam-list-item__overlay
689
+ // ---background-color` et `---transition-timing-function` restent NON
690
+ // DECLARES, a dessein : leur second echelon
691
+ // (`--origam-list__item---overlay-*`) est, lui, declare et type
692
+ // (`TTokenName`). Declarer le premier echelon a `:root` le figerait et
693
+ // MASQUERAIT DEFINITIVEMENT ce crochet de theming public. La garde
694
+ // compare des noms, pas des chaines de repli : faux positif, pas dette.
688
695
  background-color: var(--origam-list-item__overlay---background-color, var(--origam-list__item---overlay-background-color, currentColor));
689
696
  border-radius: var(--origam-list-item__overlay---border-radius, inherit);
690
697
  opacity: var(--origam-list-item__overlay---opacity, var(--origam-list__item---overlay-opacity, 0));
@@ -133,6 +133,11 @@ defineExpose({
133
133
  background: inherit;
134
134
  color: var(--origam-list-subheader---color, var(--origam-color__text---secondary));
135
135
  display: flex;
136
+ // ⛔ C2 (#597, deja tranche en PR #586) — `--origam-list-subheader
137
+ // ---font-size` reste NON DECLARE, a dessein : il est ECRIT PAR LE PARENT
138
+ // (`OrigamList.vue`, variante `nav`) et son second echelon
139
+ // `--origam-list__subheader---font-size` est declare et type. Le declarer a
140
+ // `:root` masquerait definitivement ce second crochet.
136
141
  font-size: var(--origam-list-subheader---font-size, var(--origam-list__subheader---font-size, 0.875rem));
137
142
  font-weight: var(--origam-list-subheader---font-weight, 400);
138
143
  line-height: var(--origam-list-subheader---line-height, 1.375rem);
@@ -1,5 +1,56 @@
1
1
  import { type MaybeRefOrGetter, type Ref } from 'vue';
2
2
  import type { IDefault } from '../../interfaces/DefaultsProvider/defaults-provider.interface';
3
+ /*********************************************************
4
+ * POURQUOI `useDefaults` RESTE, sans aucun appelant interne (#544)
5
+ *
6
+ * @description
7
+ * ⛔ TRANCHE PAR LA MESURE, 2026-09-29 — NE PAS ROUVRIR. #544 le classait
8
+ * « doublon du resolveur ADR-005, plus aucun appelant, a retirer ». Zero
9
+ * appelant est exact : les 40 derniers sont partis sous #363, et un grep dans
10
+ * `packages/ds/src` ne remonte que des mentions en commentaire. La conclusion,
11
+ * elle, est FAUSSE — ce n'est pas un doublon.
12
+ *
13
+ * @description
14
+ * `installThemePropsResolver` a une limitation STRUCTURELLE, documentee dans
15
+ * `theme-props-resolver.composable.ts` (section « Known limitation »). Ce n'est
16
+ * pas un oubli mais le sequencement de Vue : le hook ecrit dans `beforeCreate`,
17
+ * qui s'execute APRES le retour de `setup()`. Un prop lu UNE FOIS,
18
+ * SYNCHRONEMENT, au top level de `setup()` — hors `computed()`,
19
+ * `watchEffect()` ou fonction de rendu — capture donc la valeur d'AVANT le
20
+ * patch : le theme ne l'atteint jamais, et rien n'avertit.
21
+ *
22
+ * @description
23
+ * `useDefaults` n'a PAS cette lacune : le getter de son `computed` s'evalue a
24
+ * l'acces `.value`, a n'importe quel instant, la ref de defauts etant deja
25
+ * injectee au moment ou `setup()` tourne. C'est donc le SEUL echappatoire pour
26
+ * un prop qui doit etre lu tot — precisement le piege qui avait casse les props
27
+ * thematises de 16 composants a travers `useLink` et `useVModel`, jusqu'a ce
28
+ * que les deux soient rendus paresseux.
29
+ *
30
+ * @description
31
+ * S'y ajoute une surface publique reelle : `useDefaults` a une page de doc
32
+ * dediee (`packages/docs/composables/useDefaults.md`) et est cite par
33
+ * `docs/guide/composables.md` et `docs/composables/Commons.md`. C'est
34
+ * exactement le controle que #544 reclamait, et qui avait deja evite une
35
+ * suppression fautive sur `useCountdown` et `provideLocale`.
36
+ *
37
+ * @description
38
+ * ⚠️ La lacune est EPINGLEE PAR UNE PAIRE APPARIEE de tests, qui est la preuve
39
+ * executable que ce composable n'est pas redondant —
40
+ * `packages/tests/TU/origam/setup-level-prop-reads.spec.ts` :
41
+ * it('WITHOUT useDefaults, a value read eagerly in setup() misses the theme')
42
+ * it('WITH useDefaults, the same eager read sees the theme')
43
+ * La spec cite meme un cas reel du catalogue :
44
+ * `useClipboard({ feedbackDuration: props.feedbackDuration })` dans
45
+ * `OrigamClipboard`. `probe/preexisting-eager-reads.spec.ts` couvre le meme axe.
46
+ * Retirer `useDefaults` retire le temoin, donc la preuve.
47
+ *
48
+ * @description
49
+ * ⛔ Et le rayon d'action est large : 35 fichiers sous `packages/tests/TU`
50
+ * referencent `useDefaults` (mesure, 2026-09-29). Une note anterieure de session
51
+ * avancait « 3 specs, 23 tests » — chiffre de memoire, FAUX, et c'est exactement
52
+ * le genre d'affirmation non remesuree qui a fait ouvrir #544.
53
+ ********************************************************/
3
54
  /**
4
55
  * Component-side hook: resolve `props` against the closest DefaultsProvider.
5
56
  *
@@ -39,10 +39,10 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
39
39
  sort?: TDataTableCompareFunction | undefined;
40
40
  filter?: import("../../types").TFilterFunction | undefined;
41
41
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
42
- mobile?: boolean | undefined;
43
42
  headerProps?: any;
44
43
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
45
44
  sortRaw?: TDataTableCompareFunction | undefined;
45
+ mobile?: boolean | undefined;
46
46
  }[][], IInternalDataTableHeader[][] | {
47
47
  key: string | null;
48
48
  value: import("../../types").TSelectItemKey | null;
@@ -62,10 +62,10 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
62
62
  sort?: TDataTableCompareFunction | undefined;
63
63
  filter?: import("../../types").TFilterFunction | undefined;
64
64
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
65
- mobile?: boolean | undefined;
66
65
  headerProps?: any;
67
66
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
68
67
  sortRaw?: TDataTableCompareFunction | undefined;
68
+ mobile?: boolean | undefined;
69
69
  }[][]>;
70
70
  columns: Ref<{
71
71
  key: string | null;
@@ -86,10 +86,10 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
86
86
  sort?: TDataTableCompareFunction | undefined;
87
87
  filter?: import("../../types").TFilterFunction | undefined;
88
88
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
89
- mobile?: boolean | undefined;
90
89
  headerProps?: any;
91
90
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
92
91
  sortRaw?: TDataTableCompareFunction | undefined;
92
+ mobile?: boolean | undefined;
93
93
  }[], IInternalDataTableHeader[] | {
94
94
  key: string | null;
95
95
  value: import("../../types").TSelectItemKey | null;
@@ -109,10 +109,10 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
109
109
  sort?: TDataTableCompareFunction | undefined;
110
110
  filter?: import("../../types").TFilterFunction | undefined;
111
111
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
112
- mobile?: boolean | undefined;
113
112
  headerProps?: any;
114
113
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
115
114
  sortRaw?: TDataTableCompareFunction | undefined;
115
+ mobile?: boolean | undefined;
116
116
  }[]>;
117
117
  sortFunctions: Ref<Record<string, TDataTableCompareFunction>, Record<string, TDataTableCompareFunction>>;
118
118
  sortRawFunctions: Ref<Record<string, TDataTableCompareFunction>, Record<string, TDataTableCompareFunction>>;
@@ -1,6 +1,5 @@
1
- import type { TIntent } from '../../types/Commons/intent.type';
2
- import type { TEmptyStateAlign, TEmptyStatePreset, TEmptyStateSize } from '../../types/EmptyState/empty-state.type';
3
- import type { TIcon } from '../../types/Icon/icon.type';
1
+ import type { IEmptyStatePresetConfig } from "../../interfaces";
2
+ import type { TEmptyStateAlign, TEmptyStatePreset, TEmptyStateSize } from '../../types';
4
3
  /**
5
4
  * Closed list of valid `preset` values for `<OrigamEmptyState>`.
6
5
  * Exposed so stories / consumers can iterate the matrix without
@@ -15,17 +14,4 @@ export declare const EMPTY_STATE_SIZES: ReadonlyArray<TEmptyStateSize>;
15
14
  * Closed list of valid `align` values.
16
15
  */
17
16
  export declare const EMPTY_STATE_ALIGNS: ReadonlyArray<TEmptyStateAlign>;
18
- /**
19
- * Per-preset bundle: default icon + semantic intent.
20
- *
21
- * Consumers can override either side at the prop level (`icon` and
22
- * `iconColor`) without leaving the preset — the preset is the
23
- * "starting point", not a lock. The map is intentionally a plain
24
- * object so brand consumers can extend it through a defaults provider
25
- * in the future without touching the type.
26
- */
27
- export interface IEmptyStatePresetConfig {
28
- icon: TIcon;
29
- intent: TIntent;
30
- }
31
17
  export declare const EMPTY_STATE_PRESET_CONFIG: Record<TEmptyStatePreset, IEmptyStatePresetConfig>;
@@ -0,0 +1,26 @@
1
+ import type { TModeResolved } from "../../types";
2
+ /**
3
+ * Summary of one installed brand theme, derived from the `IOrigamTheme[]`
4
+ * objects passed to `createOrigam({ themes })`. Several `IOrigamTheme` objects
5
+ * may share the same `name` (one per mode); they are collapsed into a single
6
+ * entry whose `modes` lists every concrete mode that brand was installed for.
7
+ *
8
+ * Consumers (e.g. a theme switcher) map over this list instead of hard-coding
9
+ * the available brands — the list is the single source of truth for "what was
10
+ * installed".
11
+ */
12
+ export interface IInstalledTheme {
13
+ /** Brand name, applied as `data-theme="<name>"`. */
14
+ name: string;
15
+ /** Concrete modes this brand ships (`'light'` / `'dark'`). */
16
+ modes: TModeResolved[];
17
+ /**
18
+ * Human-readable label for UI. Defaults to `name` when no installed object
19
+ * for this brand provided a `label`.
20
+ */
21
+ label: string;
22
+ /** Short description for UI, when an installed object provided one. */
23
+ description?: string;
24
+ /** CSS background for a brand swatch preview, when provided. */
25
+ swatch?: string;
26
+ }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,30 @@
1
+ import type { TSemanticLeaf } from "../../types";
2
+ export interface ISemanticTree {
3
+ [key: string]: TSemanticLeaf | ISemanticTree;
4
+ }
5
+ /**
6
+ * Structured token-configuration bucket — THE way to author a theme's global
7
+ * design tokens (the JSON that generates every global `--origam-*` variable).
8
+ *
9
+ * Each key is a friendly token GROUP whose nested tree resolves to the matching
10
+ * `--origam-*` namespace through the shared naming grammar:
11
+ * - `color` → `--origam-color-*` (`color.surface.default`, `color.text.primary`, `color.action.primary.bg`, …)
12
+ * - `rounded` → `--origam-radius-*` (`rounded.sm`, `rounded.md`, `rounded.lg`, …)
13
+ * - `border` → `--origam-border-*` (`border.width.thin`, …)
14
+ * - `typo` → `--origam-font-*` (`typo.family.sans`, `typo.size.md`, `typo.weight.bold`, …)
15
+ * - `shadow` → `--origam-shadow-*` (`shadow.sm`, `shadow.md`, …)
16
+ * - `spacing` → `--origam-space-*` (`spacing.4`, `spacing.12`, …)
17
+ * - `motion` → `--origam-motion-*` (`motion.duration.fast`, `motion.easing.standard`, …)
18
+ *
19
+ * A leaf value is free-form CSS for its slot (a color slot also accepts a
20
+ * gradient). Plain JSON — fully serialisable for Theme-Builder round-trips.
21
+ */
22
+ export interface IThemeVars {
23
+ color?: ISemanticTree;
24
+ rounded?: ISemanticTree;
25
+ border?: ISemanticTree;
26
+ typo?: ISemanticTree;
27
+ shadow?: ISemanticTree;
28
+ spacing?: ISemanticTree;
29
+ motion?: ISemanticTree;
30
+ }
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
- import type { IThemeVars } from '../../types/Commons/semantic-tree.type';
2
+ import type { IThemeVars } from './semantic-tree.interface';
3
3
  import type { TThemeVars } from '../../types/Commons/token-tree.type';
4
4
  import type { TMode, TTheme } from '../../types/Commons/theme.type';
5
5
  import type { IDefault } from '../DefaultsProvider/defaults-provider.interface';
@@ -3,6 +3,19 @@ import type { ITypographyProps } from '../Commons/typography.interface';
3
3
  import type { TEmptyStateAlign, TEmptyStatePreset, TEmptyStateSize } from '../../types/EmptyState/empty-state.type';
4
4
  import type { TIcon } from '../../types/Icon/icon.type';
5
5
  import type { TIntent } from '../../types/Commons/intent.type';
6
+ /**
7
+ * Per-preset bundle: default icon + semantic intent.
8
+ *
9
+ * Consumers can override either side at the prop level (`icon` and
10
+ * `iconColor`) without leaving the preset — the preset is the
11
+ * "starting point", not a lock. The map is intentionally a plain
12
+ * object so brand consumers can extend it through a defaults provider
13
+ * in the future without touching the type.
14
+ */
15
+ export interface IEmptyStatePresetConfig {
16
+ icon: TIcon;
17
+ intent: TIntent;
18
+ }
6
19
  /**
7
20
  * Props for `<OrigamEmptyState>` — placeholder shown when a list, table
8
21
  * or collection has nothing to render.
@@ -784,6 +784,17 @@ Object.keys(_intersect).forEach(function (key) {
784
784
  }
785
785
  });
786
786
  });
787
+ var _installedTheme = require("./Commons/installed-theme.interface.cjs");
788
+ Object.keys(_installedTheme).forEach(function (key) {
789
+ if (key === "default" || key === "__esModule") return;
790
+ if (key in exports && exports[key] === _installedTheme[key]) return;
791
+ Object.defineProperty(exports, key, {
792
+ enumerable: true,
793
+ get: function () {
794
+ return _installedTheme[key];
795
+ }
796
+ });
797
+ });
787
798
  var _item = require("./Commons/item.interface.cjs");
788
799
  Object.keys(_item).forEach(function (key) {
789
800
  if (key === "default" || key === "__esModule") return;
@@ -993,6 +1004,17 @@ Object.keys(_scroll).forEach(function (key) {
993
1004
  }
994
1005
  });
995
1006
  });
1007
+ var _semanticTree = require("./Commons/semantic-tree.interface.cjs");
1008
+ Object.keys(_semanticTree).forEach(function (key) {
1009
+ if (key === "default" || key === "__esModule") return;
1010
+ if (key in exports && exports[key] === _semanticTree[key]) return;
1011
+ Object.defineProperty(exports, key, {
1012
+ enumerable: true,
1013
+ get: function () {
1014
+ return _semanticTree[key];
1015
+ }
1016
+ });
1017
+ });
996
1018
  var _size = require("./Commons/size.interface.cjs");
997
1019
  Object.keys(_size).forEach(function (key) {
998
1020
  if (key === "default" || key === "__esModule") return;
@@ -69,6 +69,7 @@ export * from './Commons/group.interface';
69
69
  export * from './Commons/hotkey.interface';
70
70
  export * from './Commons/hover.interface';
71
71
  export * from './Commons/intersect.interface';
72
+ export * from './Commons/installed-theme.interface';
72
73
  export * from './Commons/item.interface';
73
74
  export * from './Commons/justify.interface';
74
75
  export * from './Commons/layout.interface';
@@ -88,6 +89,7 @@ export * from './Commons/ripple.interface';
88
89
  export * from './Commons/rounded.interface';
89
90
  export * from './Commons/router.interface';
90
91
  export * from './Commons/scroll.interface';
92
+ export * from './Commons/semantic-tree.interface';
91
93
  export * from './Commons/size.interface';
92
94
  export * from './Commons/stack.interface';
93
95
  export * from './Commons/state-effect.interface';
@@ -69,6 +69,7 @@ export * from "./Commons/group.interface.js";
69
69
  export * from "./Commons/hotkey.interface.js";
70
70
  export * from "./Commons/hover.interface.js";
71
71
  export * from "./Commons/intersect.interface.js";
72
+ export * from "./Commons/installed-theme.interface.js";
72
73
  export * from "./Commons/item.interface.js";
73
74
  export * from "./Commons/justify.interface.js";
74
75
  export * from "./Commons/layout.interface.js";
@@ -88,6 +89,7 @@ export * from "./Commons/ripple.interface.js";
88
89
  export * from "./Commons/rounded.interface.js";
89
90
  export * from "./Commons/router.interface.js";
90
91
  export * from "./Commons/scroll.interface.js";
92
+ export * from "./Commons/semantic-tree.interface.js";
91
93
  export * from "./Commons/size.interface.js";
92
94
  export * from "./Commons/stack.interface.js";
93
95
  export * from "./Commons/state-effect.interface.js";
@@ -1,31 +1,6 @@
1
- import type { TModeResolved } from './theme.type';
2
- /**
3
- * Summary of one installed brand theme, derived from the `IOrigamTheme[]`
4
- * objects passed to `createOrigam({ themes })`. Several `IOrigamTheme` objects
5
- * may share the same `name` (one per mode); they are collapsed into a single
6
- * entry whose `modes` lists every concrete mode that brand was installed for.
7
- *
8
- * Consumers (e.g. a theme switcher) map over this list instead of hard-coding
9
- * the available brands — the list is the single source of truth for "what was
10
- * installed".
11
- */
12
- export interface TInstalledTheme {
13
- /** Brand name, applied as `data-theme="<name>"`. */
14
- name: string;
15
- /** Concrete modes this brand ships (`'light'` / `'dark'`). */
16
- modes: TModeResolved[];
17
- /**
18
- * Human-readable label for UI. Defaults to `name` when no installed object
19
- * for this brand provided a `label`.
20
- */
21
- label: string;
22
- /** Short description for UI, when an installed object provided one. */
23
- description?: string;
24
- /** CSS background for a brand swatch preview, when provided. */
25
- swatch?: string;
26
- }
1
+ import type { IInstalledTheme } from "../../interfaces/Commons/installed-theme.interface";
27
2
  /**
28
3
  * The full installed-themes list provided by `createOrigam` and read back via
29
4
  * `useInstalledThemes()`.
30
5
  */
31
- export type TInstalledThemes = TInstalledTheme[];
6
+ export type TInstalledThemes = IInstalledTheme[];
@@ -17,32 +17,3 @@
17
17
  * round-trip it without losing fidelity.
18
18
  */
19
19
  export type TSemanticLeaf = string | number;
20
- export interface ISemanticTree {
21
- [key: string]: TSemanticLeaf | ISemanticTree;
22
- }
23
- /**
24
- * Structured token-configuration bucket — THE way to author a theme's global
25
- * design tokens (the JSON that generates every global `--origam-*` variable).
26
- *
27
- * Each key is a friendly token GROUP whose nested tree resolves to the matching
28
- * `--origam-*` namespace through the shared naming grammar:
29
- * - `color` → `--origam-color-*` (`color.surface.default`, `color.text.primary`, `color.action.primary.bg`, …)
30
- * - `rounded` → `--origam-radius-*` (`rounded.sm`, `rounded.md`, `rounded.lg`, …)
31
- * - `border` → `--origam-border-*` (`border.width.thin`, …)
32
- * - `typo` → `--origam-font-*` (`typo.family.sans`, `typo.size.md`, `typo.weight.bold`, …)
33
- * - `shadow` → `--origam-shadow-*` (`shadow.sm`, `shadow.md`, …)
34
- * - `spacing` → `--origam-space-*` (`spacing.4`, `spacing.12`, …)
35
- * - `motion` → `--origam-motion-*` (`motion.duration.fast`, `motion.easing.standard`, …)
36
- *
37
- * A leaf value is free-form CSS for its slot (a color slot also accepts a
38
- * gradient). Plain JSON — fully serialisable for Theme-Builder round-trips.
39
- */
40
- export interface IThemeVars {
41
- color?: ISemanticTree;
42
- rounded?: ISemanticTree;
43
- border?: ISemanticTree;
44
- typo?: ISemanticTree;
45
- shadow?: ISemanticTree;
46
- spacing?: ISemanticTree;
47
- motion?: ISemanticTree;
48
- }