origam 2.40.0 → 2.40.1

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 (41) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/src/components/Img/OrigamImg.vue +1 -0
  3. package/dist/src/composables/Commons/loader.composable.cjs +2 -2
  4. package/dist/src/composables/Commons/loader.composable.js +1 -1
  5. package/dist/src/composables/Commons/status.composable.cjs +4 -4
  6. package/dist/src/composables/Commons/status.composable.js +1 -1
  7. package/dist/src/composables/DataTable/headers.composable.d.ts +12 -12
  8. package/dist/src/composables/Icon/icon.composable.cjs +0 -7
  9. package/dist/src/composables/Icon/icon.composable.d.ts +0 -17
  10. package/dist/src/composables/Icon/icon.composable.js +0 -4
  11. package/dist/src/composables/Icon/iconsFull.composable.cjs +14 -0
  12. package/dist/src/composables/Icon/iconsFull.composable.d.ts +16 -0
  13. package/dist/src/composables/Icon/iconsFull.composable.js +6 -0
  14. package/dist/src/composables/index.cjs +12 -0
  15. package/dist/src/composables/index.d.ts +1 -0
  16. package/dist/src/composables/index.js +1 -0
  17. package/dist/src/consts/Commons/anchor.const.cjs +6 -6
  18. package/dist/src/consts/Commons/anchor.const.js +1 -1
  19. package/dist/src/consts/Commons/border.const.cjs +13 -12
  20. package/dist/src/consts/Commons/border.const.d.ts +1 -1
  21. package/dist/src/consts/Commons/border.const.js +2 -1
  22. package/dist/src/consts/Commons/color.const.cjs +3 -3
  23. package/dist/src/consts/Commons/color.const.js +1 -1
  24. package/dist/src/consts/Commons/density.const.cjs +2 -2
  25. package/dist/src/consts/Commons/density.const.js +1 -1
  26. package/dist/src/consts/Commons/dimension.const.cjs +2 -2
  27. package/dist/src/consts/Commons/dimension.const.js +1 -1
  28. package/dist/src/consts/Commons/rounded.const.cjs +2 -2
  29. package/dist/src/consts/Commons/rounded.const.js +1 -1
  30. package/dist/src/consts/Commons/size.const.cjs +2 -2
  31. package/dist/src/consts/Commons/size.const.js +1 -1
  32. package/dist/src/consts/Commons/spacing.const.cjs +26 -25
  33. package/dist/src/consts/Commons/spacing.const.js +2 -1
  34. package/dist/src/utils/Commons/anchor.util.cjs +2 -2
  35. package/dist/src/utils/Commons/anchor.util.d.ts +1 -1
  36. package/dist/src/utils/Commons/anchor.util.js +1 -1
  37. package/dist/src/utils/Commons/commons.util.cjs +5 -5
  38. package/dist/src/utils/Commons/commons.util.js +1 -1
  39. package/dist/src/utils/Commons/location.util.cjs +5 -5
  40. package/dist/src/utils/Commons/location.util.js +1 -1
  41. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -18,6 +18,19 @@ This project follows [Semantic Versioning](https://semver.org).
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [2.40.1] - 2026-11-21
22
+
23
+ ### Fixed — `origam-img` ne plante plus quand son élément n'est pas monté (#1394)
24
+
25
+ - `pollForSize` ne fait plus rien quand l'élément image est absent (`image.value` vaut `undefined`) : composant chargé en différé (`lazy-*`, `defineAsyncComponent`) dont le DOM n'est pas encore monté, auparavant `Cannot destructure property 'naturalHeight'` et page d'erreur. Test `TU/components/Img/img-lazy-1394.spec.ts`.
26
+
27
+ ### Fixed — `origam-btn` n'atteint plus le jeu d'icônes MDI sans icône (#1392)
28
+
29
+ - `createIcons` (qui étale `MDI_ALIASES`, soit l'enum `MDI_ICONS` de ~7 000 alias, ~430 Kio) sort de `composables/Icon/icon.composable.ts` vers `iconsFull.composable.ts`. Avant, tout composant important `useIcon` (Btn, Avatar, Chip…) atteignait `mdi.const.ts` par le graphe d'imports, icône demandée ou non. `createIcons` reste exporté par `origam/composables` : API inchangée.
30
+ - Les composants et helpers atteints depuis Btn, Icon et Avatar importent leurs enums par le fichier (`enums/Commons/loader.enum`) et non par le barrel `enums/index`, qui re-exporte `mdi.enum` : un import par le barrel suffisait à embarquer l'enum dans un build qui ne le tree-shake pas.
31
+ - `createIcons` : importer depuis `origam/composables`. Le chemin profond `composables/Icon/icon.composable` ne l'exporte plus.
32
+ - Garde `TU/origam/btn-no-mdi-1392.spec.ts` : le graphe d'imports de Btn, Icon et Avatar n'atteint ni `mdi.const.ts`, ni `createIcons`, ni `enums/index.ts`, ni `mdi.enum.ts`.
33
+
21
34
  ## [2.40.0] - 2026-11-21
22
35
 
23
36
  ### Added — jetons par mode, helper SSR `origam/ssr`, budget CSS (#1386)
@@ -844,6 +844,7 @@ onBeforeUnmount(() => {
844
844
  bootFrames.clear();
845
845
  });
846
846
  const pollForSize = (img, timeout = 100) => {
847
+ if (!img) return;
847
848
  const poll = () => {
848
849
  clearTimeout(timer);
849
850
  if (vm.isUnmounted) return;
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useLoader = useLoader;
7
7
  var _vue = require("vue");
8
- var _enums = require("../../enums/index.cjs");
8
+ var _loader = require("../../enums/Commons/loader.enum.cjs");
9
9
  var _getCurrentInstance = require("../../utils/Commons/getCurrentInstance.util.cjs");
10
- function useLoader(props, defaultKind = _enums.LOADER_KIND.CIRCULAR, name = (0, _getCurrentInstance.getCurrentInstanceName)()) {
10
+ function useLoader(props, defaultKind = _loader.LOADER_KIND.CIRCULAR, name = (0, _getCurrentInstance.getCurrentInstanceName)()) {
11
11
  const isLoading = (0, _vue.computed)(() => {
12
12
  const v = props.loading;
13
13
  if (v === false || v === void 0 || v === null) return false;
@@ -1,5 +1,5 @@
1
1
  import { computed } from "vue";
2
- import { LOADER_KIND } from "../../enums/index.js";
2
+ import { LOADER_KIND } from "../../enums/Commons/loader.enum.js";
3
3
  import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
4
4
  export function useLoader(props, defaultKind = LOADER_KIND.CIRCULAR, name = getCurrentInstanceName()) {
5
5
  const isLoading = computed(() => {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useStatus = useStatus;
7
- var _enums = require("../../enums/index.cjs");
7
+ var _status = require("../../enums/Commons/status.enum.cjs");
8
8
  var _getCurrentInstance = require("../../utils/Commons/getCurrentInstance.util.cjs");
9
9
  var _vue = require("vue");
10
10
  const STATUS_TO_INTENT = {
@@ -21,14 +21,14 @@ function useStatus(props, name = (0, _getCurrentInstance.getCurrentInstanceName)
21
21
  return props.status ? STATUS_TO_INTENT[props.status] ?? props.status : void 0;
22
22
  });
23
23
  const effectivePosition = (0, _vue.computed)(() => {
24
- return props.statusIconPosition ?? `${_enums.STATUS_POSITION.PREPEND}`;
24
+ return props.statusIconPosition ?? `${_status.STATUS_POSITION.PREPEND}`;
25
25
  });
26
26
  const prependIcon = (0, _vue.computed)(() => {
27
- if (!props.status || ![`${_enums.STATUS_POSITION.PREPEND}`, `${_enums.STATUS_POSITION.BOTH}`].includes(effectivePosition.value) || props.prependIcon) return props.prependIcon;
27
+ if (!props.status || ![`${_status.STATUS_POSITION.PREPEND}`, `${_status.STATUS_POSITION.BOTH}`].includes(effectivePosition.value) || props.prependIcon) return props.prependIcon;
28
28
  return statusIcon.value;
29
29
  });
30
30
  const appendIcon = (0, _vue.computed)(() => {
31
- if (!props.status || ![`${_enums.STATUS_POSITION.APPEND}`, `${_enums.STATUS_POSITION.BOTH}`].includes(effectivePosition.value) || props.appendIcon) return props.appendIcon;
31
+ if (!props.status || ![`${_status.STATUS_POSITION.APPEND}`, `${_status.STATUS_POSITION.BOTH}`].includes(effectivePosition.value) || props.appendIcon) return props.appendIcon;
32
32
  return statusIcon.value;
33
33
  });
34
34
  const icon = (0, _vue.computed)(() => {
@@ -1,4 +1,4 @@
1
- import { STATUS_POSITION } from "../../enums/index.js";
1
+ import { STATUS_POSITION } from "../../enums/Commons/status.enum.js";
2
2
  import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
3
3
  import { computed } from "vue";
4
4
  const STATUS_TO_INTENT = {
@@ -31,13 +31,13 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
31
31
  colspan?: number | undefined;
32
32
  rowspan?: number | undefined;
33
33
  children?: /*elided*/ any[] | undefined;
34
+ title?: string | undefined;
35
+ sort?: TDataTableCompareFunction | undefined;
36
+ filter?: import("../../types").TFilterFunction | undefined;
34
37
  maxWidth?: string | undefined;
35
38
  minWidth?: string | undefined;
36
39
  width?: number | string | undefined;
37
40
  fixed?: boolean | undefined;
38
- title?: string | undefined;
39
- sort?: TDataTableCompareFunction | undefined;
40
- filter?: import("../../types").TFilterFunction | undefined;
41
41
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
42
42
  headerProps?: any;
43
43
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
@@ -54,13 +54,13 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
54
54
  colspan?: number | undefined;
55
55
  rowspan?: number | undefined;
56
56
  children?: /*elided*/ any[] | undefined;
57
+ title?: string | undefined;
58
+ sort?: TDataTableCompareFunction | undefined;
59
+ filter?: import("../../types").TFilterFunction | undefined;
57
60
  maxWidth?: string | undefined;
58
61
  minWidth?: string | undefined;
59
62
  width?: number | string | undefined;
60
63
  fixed?: boolean | undefined;
61
- title?: string | undefined;
62
- sort?: TDataTableCompareFunction | undefined;
63
- filter?: import("../../types").TFilterFunction | undefined;
64
64
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
65
65
  headerProps?: any;
66
66
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
@@ -78,13 +78,13 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
78
78
  colspan?: number | undefined;
79
79
  rowspan?: number | undefined;
80
80
  children?: /*elided*/ any[] | undefined;
81
+ title?: string | undefined;
82
+ sort?: TDataTableCompareFunction | undefined;
83
+ filter?: import("../../types").TFilterFunction | undefined;
81
84
  maxWidth?: string | undefined;
82
85
  minWidth?: string | undefined;
83
86
  width?: number | string | undefined;
84
87
  fixed?: boolean | undefined;
85
- title?: string | undefined;
86
- sort?: TDataTableCompareFunction | undefined;
87
- filter?: import("../../types").TFilterFunction | undefined;
88
88
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
89
89
  headerProps?: any;
90
90
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
@@ -101,13 +101,13 @@ export declare function createHeaders(props: IDataTableHeaderProps, options?: {
101
101
  colspan?: number | undefined;
102
102
  rowspan?: number | undefined;
103
103
  children?: /*elided*/ any[] | undefined;
104
+ title?: string | undefined;
105
+ sort?: TDataTableCompareFunction | undefined;
106
+ filter?: import("../../types").TFilterFunction | undefined;
104
107
  maxWidth?: string | undefined;
105
108
  minWidth?: string | undefined;
106
109
  width?: number | string | undefined;
107
110
  fixed?: boolean | undefined;
108
- title?: string | undefined;
109
- sort?: TDataTableCompareFunction | undefined;
110
- filter?: import("../../types").TFilterFunction | undefined;
111
111
  align?: (import("../../enums").ALIGN.START | import("../../enums").ALIGN.END | import("../../enums").ALIGN.CENTER) | undefined;
112
112
  headerProps?: any;
113
113
  cellProps?: import("../../types").TDataTableHeaderCell | undefined;
@@ -3,12 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createIcons = createIcons;
7
6
  exports.createIconsCore = createIconsCore;
8
7
  exports.useIcon = void 0;
9
8
  var _vue = require("vue");
10
9
  var _index = require("../../components/Icon/index.cjs");
11
- var _mdi = require("../../consts/Commons/mdi.const.cjs");
12
10
  var _mdiCore = require("../../consts/Commons/mdi-core.const.cjs");
13
11
  var _icon = require("../../consts/Icon/icon.const.cjs");
14
12
  var _commons = require("../../utils/Commons/commons.util.cjs");
@@ -63,11 +61,6 @@ const useIcon = props => {
63
61
  };
64
62
  };
65
63
  exports.useIcon = useIcon;
66
- function createIcons(options) {
67
- return createIconsCore((0, _commons.mergeDeep)({
68
- aliases: _mdi.MDI_ALIASES
69
- }, options));
70
- }
71
64
  function createIconsCore(options) {
72
65
  return (0, _commons.mergeDeep)({
73
66
  defaultSet: "mdi",
@@ -17,23 +17,6 @@ import type { TIcon, TIconInstance, TIconOptions } from '../../types/Icon/icon.t
17
17
  export declare const useIcon: (props: Ref<TIcon | undefined>) => {
18
18
  iconData: import("vue").ComputedRef<TIconInstance>;
19
19
  };
20
- /*********************************************************
21
- * createIcons
22
- ********************************************************/
23
- /*********************************************************
24
- * createIcons
25
- *
26
- * @description
27
- * Construit la configuration d'icones fournie a l'application par
28
- * `createOrigam()` : jeu par defaut, jeux disponibles et alias. Les options du
29
- * consommateur sont fusionnees en profondeur sur les valeurs du DS, donc
30
- * declarer un alias n'efface pas les autres.
31
- *
32
- * @description
33
- * Le jeu par defaut est `mdi`, et les alias MDI sont pre-charges — c'est ce
34
- * qui permet d'ecrire `icon="mdi-account"` sans configuration prealable.
35
- ********************************************************/
36
- export declare function createIcons(options?: TIconOptions): Record<string, unknown>;
37
20
  /*********************************************************
38
21
  * createIconsCore (#1384)
39
22
  *
@@ -1,6 +1,5 @@
1
1
  import { computed, inject, unref } from "vue";
2
2
  import { OrigamComponentIcon, OrigamSvgIcon } from "../../components/Icon/index.js";
3
- import { MDI_ALIASES } from "../../consts/Commons/mdi.const.js";
4
3
  import { MDI, MDI_CORE_ALIASES } from "../../consts/Commons/mdi-core.const.js";
5
4
  import { DEFAULT_SETS, ORIGAM_ICONS_KEY } from "../../consts/Icon/icon.const.js";
6
5
  import { mergeDeep } from "../../utils/Commons/commons.util.js";
@@ -50,9 +49,6 @@ export const useIcon = (props) => {
50
49
  });
51
50
  return { iconData };
52
51
  };
53
- export function createIcons(options) {
54
- return createIconsCore(mergeDeep({ aliases: MDI_ALIASES }, options));
55
- }
56
52
  export function createIconsCore(options) {
57
53
  return mergeDeep({
58
54
  defaultSet: "mdi",
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createIcons = createIcons;
7
+ var _mdi = require("../../consts/Commons/mdi.const.cjs");
8
+ var _commons = require("../../utils/Commons/commons.util.cjs");
9
+ var _icon = require("./icon.composable.cjs");
10
+ function createIcons(options) {
11
+ return (0, _icon.createIconsCore)((0, _commons.mergeDeep)({
12
+ aliases: _mdi.MDI_ALIASES
13
+ }, options));
14
+ }
@@ -0,0 +1,16 @@
1
+ import type { TIconOptions } from '../../types/Icon/icon.type';
2
+ /*********************************************************
3
+ * createIcons
4
+ *
5
+ * @description
6
+ * Icon configuration provided by `createOrigam()`: default set, available sets
7
+ * and aliases, with the MDI aliases pre-loaded so `icon="mdi-account"` works
8
+ * with no setup. Consumer options are deep-merged over the DS values.
9
+ *
10
+ * @description
11
+ * (#1392) Lives apart from `useIcon` on purpose: it reaches `MDI_ALIASES` (the
12
+ * ~7 000-entry `MDI_ICONS` enum, ~430 Kio). In `icon.composable.ts`, every
13
+ * component importing `useIcon` (Btn, Avatar, Chip...) pulled the enum in
14
+ * through the module graph, icon or not.
15
+ ********************************************************/
16
+ export declare function createIcons(options?: TIconOptions): Record<string, unknown>;
@@ -0,0 +1,6 @@
1
+ import { MDI_ALIASES } from "../../consts/Commons/mdi.const.js";
2
+ import { mergeDeep } from "../../utils/Commons/commons.util.js";
3
+ import { createIconsCore } from "./icon.composable.js";
4
+ export function createIcons(options) {
5
+ return createIconsCore(mergeDeep({ aliases: MDI_ALIASES }, options));
6
+ }
@@ -1032,6 +1032,18 @@ Object.keys(_icon).forEach(function (key) {
1032
1032
  }
1033
1033
  });
1034
1034
  });
1035
+ var _iconsFull = require("./Icon/iconsFull.composable.cjs");
1036
+ Object.keys(_iconsFull).forEach(function (key) {
1037
+ if (key === "default" || key === "__esModule") return;
1038
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1039
+ if (key in exports && exports[key] === _iconsFull[key]) return;
1040
+ Object.defineProperty(exports, key, {
1041
+ enumerable: true,
1042
+ get: function () {
1043
+ return _iconsFull[key];
1044
+ }
1045
+ });
1046
+ });
1035
1047
  var _iconAccessibility = require("./Icon/iconAccessibility.composable.cjs");
1036
1048
  Object.keys(_iconAccessibility).forEach(function (key) {
1037
1049
  if (key === "default" || key === "__esModule") return;
@@ -83,6 +83,7 @@ export * from './Commons/virtual.composable';
83
83
  export * from './Commons/throttle.composable';
84
84
  export * from './Commons/audio.composable';
85
85
  export * from './Icon/icon.composable';
86
+ export * from './Icon/iconsFull.composable';
86
87
  export * from './Icon/iconAccessibility.composable';
87
88
  export * from './List/createList.composable';
88
89
  export * from './List/list.composable';
@@ -83,6 +83,7 @@ export * from "./Commons/virtual.composable.js";
83
83
  export * from "./Commons/throttle.composable.js";
84
84
  export * from "./Commons/audio.composable.js";
85
85
  export * from "./Icon/icon.composable.js";
86
+ export * from "./Icon/iconsFull.composable.js";
86
87
  export * from "./Icon/iconAccessibility.composable.js";
87
88
  export * from "./List/createList.composable.js";
88
89
  export * from "./List/list.composable.js";
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.INLINE_START_END_ARRAY = exports.INLINE_ARRAY = exports.DIRECTION_ARRAY = exports.BLOCK_START_END_ARRAY = exports.BLOCK_ARRAY = void 0;
7
- var _enums = require("../../enums/index.cjs");
8
- const BLOCK_ARRAY = exports.BLOCK_ARRAY = [_enums.BLOCK.TOP, _enums.BLOCK.BOTTOM];
9
- const INLINE_ARRAY = exports.INLINE_ARRAY = [_enums.INLINE.LEFT, _enums.INLINE.RIGHT];
10
- const BLOCK_START_END_ARRAY = exports.BLOCK_START_END_ARRAY = [...BLOCK_ARRAY, _enums.START_END.START, _enums.START_END.END];
11
- const INLINE_START_END_ARRAY = exports.INLINE_START_END_ARRAY = [...INLINE_ARRAY, _enums.START_END.START, _enums.START_END.END];
12
- const DIRECTION_ARRAY = exports.DIRECTION_ARRAY = [_enums.BLOCK.TOP, _enums.BLOCK.BOTTOM, _enums.INLINE.LEFT, _enums.INLINE.RIGHT];
7
+ var _anchor = require("../../enums/Commons/anchor.enum.cjs");
8
+ const BLOCK_ARRAY = exports.BLOCK_ARRAY = [_anchor.BLOCK.TOP, _anchor.BLOCK.BOTTOM];
9
+ const INLINE_ARRAY = exports.INLINE_ARRAY = [_anchor.INLINE.LEFT, _anchor.INLINE.RIGHT];
10
+ const BLOCK_START_END_ARRAY = exports.BLOCK_START_END_ARRAY = [...BLOCK_ARRAY, _anchor.START_END.START, _anchor.START_END.END];
11
+ const INLINE_START_END_ARRAY = exports.INLINE_START_END_ARRAY = [...INLINE_ARRAY, _anchor.START_END.START, _anchor.START_END.END];
12
+ const DIRECTION_ARRAY = exports.DIRECTION_ARRAY = [_anchor.BLOCK.TOP, _anchor.BLOCK.BOTTOM, _anchor.INLINE.LEFT, _anchor.INLINE.RIGHT];
@@ -1,4 +1,4 @@
1
- import { BLOCK, INLINE, START_END } from "../../enums/index.js";
1
+ import { BLOCK, INLINE, START_END } from "../../enums/Commons/anchor.enum.js";
2
2
  export const BLOCK_ARRAY = [BLOCK.TOP, BLOCK.BOTTOM];
3
3
  export const INLINE_ARRAY = [INLINE.LEFT, INLINE.RIGHT];
4
4
  export const BLOCK_START_END_ARRAY = [...BLOCK_ARRAY, START_END.START, START_END.END];
@@ -4,49 +4,50 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.BORDER_REGEX = exports.BORDER_PROP_KEYS = exports.BORDER_POSITION_MAP = exports.BORDER_LOGICAL_SIDE_MAP = exports.BORDER_LOGICAL_AXIS_MAP = exports.BORDER_KEYWORD_WIDTH = void 0;
7
- var _enums = require("../../enums/index.cjs");
8
- const BORDER_STYLE_ALTERNATION = Object.values(_enums.BORDER_STYLE).join("|");
7
+ var _anchor = require("../../enums/Commons/anchor.enum.cjs");
8
+ var _border = require("../../enums/Commons/border.enum.cjs");
9
+ const BORDER_STYLE_ALTERNATION = Object.values(_border.BORDER_STYLE).join("|");
9
10
  const BORDER_LENGTH_UNITS = "(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?";
10
11
  const BORDER_COLOR_GROUP = "(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\\(--[^)]+\\))|(?:(?:rgb|hsl|rgba)a?\\(.*\\))|(?:[A-Za-z]+))){0,4})";
11
12
  const BORDER_REGEX = exports.BORDER_REGEX = new RegExp(`^(?<width>(?: ?var\\(--[^)]+\\)(?= +(?:${BORDER_STYLE_ALTERNATION}))| ?(?:[0-9]+)${BORDER_LENGTH_UNITS}){0,4}) {0,1}(?<style>(?:(?: ?(?:${BORDER_STYLE_ALTERNATION}))+){0,4}) ?` + BORDER_COLOR_GROUP + "$");
12
13
  const BORDER_POSITION_MAP = exports.BORDER_POSITION_MAP = [{
13
- side: _enums.BLOCK.TOP,
14
+ side: _anchor.BLOCK.TOP,
14
15
  widthProp: "borderTop",
15
16
  colorProp: "borderTopColor"
16
17
  }, {
17
- side: _enums.INLINE.RIGHT,
18
+ side: _anchor.INLINE.RIGHT,
18
19
  widthProp: "borderRight",
19
20
  colorProp: "borderRightColor"
20
21
  }, {
21
- side: _enums.BLOCK.BOTTOM,
22
+ side: _anchor.BLOCK.BOTTOM,
22
23
  widthProp: "borderBottom",
23
24
  colorProp: "borderBottomColor"
24
25
  }, {
25
- side: _enums.INLINE.LEFT,
26
+ side: _anchor.INLINE.LEFT,
26
27
  widthProp: "borderLeft",
27
28
  colorProp: "borderLeftColor"
28
29
  }];
29
30
  const BORDER_LOGICAL_AXIS_MAP = exports.BORDER_LOGICAL_AXIS_MAP = [{
30
- axis: _enums.BORDER_LOGICAL_AXIS.BLOCK,
31
+ axis: _border.BORDER_LOGICAL_AXIS.BLOCK,
31
32
  widthProp: "borderBlock"
32
33
  }, {
33
- axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
34
+ axis: _border.BORDER_LOGICAL_AXIS.INLINE,
34
35
  widthProp: "borderInline"
35
36
  }];
36
37
  const BORDER_LOGICAL_SIDE_MAP = exports.BORDER_LOGICAL_SIDE_MAP = [{
37
- side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.START}`,
38
+ side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.START}`,
38
39
  widthProp: "borderBlockStart",
39
40
  colorProp: "borderBlockStartColor"
40
41
  }, {
41
- side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.END}`,
42
+ side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.END}`,
42
43
  widthProp: "borderBlockEnd",
43
44
  colorProp: "borderBlockEndColor"
44
45
  }, {
45
- side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.START}`,
46
+ side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.START}`,
46
47
  widthProp: "borderInlineStart",
47
48
  colorProp: "borderInlineStartColor"
48
49
  }, {
49
- side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.END}`,
50
+ side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.END}`,
50
51
  widthProp: "borderInlineEnd",
51
52
  colorProp: "borderInlineEndColor"
52
53
  }];
@@ -1,4 +1,4 @@
1
- import { BLOCK, INLINE } from '../../enums';
1
+ import { BLOCK, INLINE } from '../../enums/Commons/anchor.enum';
2
2
  import type { TBorderLogicalAxis, TBorderWidthKeyword } from '../../types/Commons/border.type';
3
3
  import type { TLogicalSide } from '../../types/Commons/anchor.type';
4
4
  export declare const BORDER_REGEX: RegExp;
@@ -1,4 +1,5 @@
1
- import { BLOCK, BORDER_LOGICAL_AXIS, BORDER_STYLE, INLINE, START_END } from "../../enums/index.js";
1
+ import { BLOCK, INLINE, START_END } from "../../enums/Commons/anchor.enum.js";
2
+ import { BORDER_LOGICAL_AXIS, BORDER_STYLE } from "../../enums/Commons/border.enum.js";
2
3
  const BORDER_STYLE_ALTERNATION = Object.values(BORDER_STYLE).join("|");
3
4
  const BORDER_LENGTH_UNITS = "(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?";
4
5
  const BORDER_COLOR_GROUP = "(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\\(--[^)]+\\))|(?:(?:rgb|hsl|rgba)a?\\(.*\\))|(?:[A-Za-z]+))){0,4})";
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SRGB_REVERSE_TRANSFORM = exports.SRGB_REVERSE_MATRIX = exports.SRGB_FORWARD_TRANSFORM = exports.SRGB_FORWARD_MATRIX = exports.SCALE_W_O_B = exports.SCALE_B_O_W = exports.REV_TXT = exports.REV_BG = exports.RCO = exports.NORM_TXT = exports.NORM_BG = exports.MAIN_TRC = exports.LO_CON_THRESH = exports.LO_CON_OFFSET = exports.LO_CON_FACTOR = exports.LO_CLIP = exports.GCO = exports.CSS_NAMED_COLORS = exports.CSS_COLOR_REGEX = exports.COLOR_UTILITY_INTENTS = exports.COLOR_MAPPERS = exports.COLOR_INTENTS = exports.COLOR_HOVER_MIX_PCT = exports.COLOR_DELTA_Y_MIN = exports.COLOR_DELTA = exports.COLOR_ACTIVE_MIX_PCT = exports.CIELAB_REVERSE_TRANSFORM = exports.CIELAB_FORWARD_TRANSFORM = exports.BLK_THRS = exports.BLK_CLMP = exports.BCO = void 0;
7
- var _enums = require("../../enums/index.cjs");
7
+ var _intent = require("../../enums/Commons/intent.enum.cjs");
8
8
  var _color = require("../../utils/Commons/color.util.cjs");
9
9
  const CSS_COLOR_REGEX = exports.CSS_COLOR_REGEX = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
10
10
  const CSS_NAMED_COLORS = exports.CSS_NAMED_COLORS = /* @__PURE__ */new Set(["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen",
@@ -60,8 +60,8 @@ exports.CIELAB_FORWARD_TRANSFORM = CIELAB_FORWARD_TRANSFORM;
60
60
  const CIELAB_REVERSE_TRANSFORM = t => t > COLOR_DELTA ? t ** 3 : 3 * COLOR_DELTA ** 2 * (t - 4 / 29);
61
61
  exports.CIELAB_REVERSE_TRANSFORM = CIELAB_REVERSE_TRANSFORM;
62
62
  const MAIN_TRC = exports.MAIN_TRC = 2.4;
63
- const COLOR_INTENTS = exports.COLOR_INTENTS = new Set(Object.values(_enums.INTENT));
64
- const COLOR_UTILITY_INTENTS = exports.COLOR_UTILITY_INTENTS = new Set(Object.values(_enums.INTENT).filter(intent => intent !== _enums.INTENT.GHOST));
63
+ const COLOR_INTENTS = exports.COLOR_INTENTS = new Set(Object.values(_intent.INTENT));
64
+ const COLOR_UTILITY_INTENTS = exports.COLOR_UTILITY_INTENTS = new Set(Object.values(_intent.INTENT).filter(intent => intent !== _intent.INTENT.GHOST));
65
65
  const COLOR_HOVER_MIX_PCT = exports.COLOR_HOVER_MIX_PCT = 20;
66
66
  const COLOR_ACTIVE_MIX_PCT = exports.COLOR_ACTIVE_MIX_PCT = 30;
67
67
  const RCO = exports.RCO = 0.2126729;
@@ -1,4 +1,4 @@
1
- import { INTENT } from "../../enums/index.js";
1
+ import { INTENT } from "../../enums/Commons/intent.enum.js";
2
2
  import { HSLtoRGB, HSVtoRGB } from "../../utils/Commons/color.util.js";
3
3
  export const CSS_COLOR_REGEX = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
4
4
  export const CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.PREDEFINED_DENSITY = void 0;
7
- var _enums = require("../../enums/index.cjs");
8
- const PREDEFINED_DENSITY = exports.PREDEFINED_DENSITY = [_enums.DENSITY.DEFAULT, _enums.DENSITY.COMPACT, _enums.DENSITY.COMFORTABLE];
7
+ var _density = require("../../enums/Commons/density.enum.cjs");
8
+ const PREDEFINED_DENSITY = exports.PREDEFINED_DENSITY = [_density.DENSITY.DEFAULT, _density.DENSITY.COMPACT, _density.DENSITY.COMFORTABLE];
@@ -1,4 +1,4 @@
1
- import { DENSITY } from "../../enums/index.js";
1
+ import { DENSITY } from "../../enums/Commons/density.enum.js";
2
2
  export const PREDEFINED_DENSITY = [
3
3
  DENSITY.DEFAULT,
4
4
  DENSITY.COMPACT,
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DIMENSIONS_ARRAY = void 0;
7
- var _enums = require("../../enums/index.cjs");
8
- const DIMENSIONS_ARRAY = exports.DIMENSIONS_ARRAY = [_enums.DIMENSIONS.HEIGHT, _enums.DIMENSIONS.MAX_HEIGHT, _enums.DIMENSIONS.MAX_WIDTH, _enums.DIMENSIONS.MIN_HEIGHT, _enums.DIMENSIONS.MIN_WIDTH, _enums.DIMENSIONS.WIDTH];
7
+ var _dimension = require("../../enums/Commons/dimension.enum.cjs");
8
+ const DIMENSIONS_ARRAY = exports.DIMENSIONS_ARRAY = [_dimension.DIMENSIONS.HEIGHT, _dimension.DIMENSIONS.MAX_HEIGHT, _dimension.DIMENSIONS.MAX_WIDTH, _dimension.DIMENSIONS.MIN_HEIGHT, _dimension.DIMENSIONS.MIN_WIDTH, _dimension.DIMENSIONS.WIDTH];
@@ -1,4 +1,4 @@
1
- import { DIMENSIONS } from "../../enums/index.js";
1
+ import { DIMENSIONS } from "../../enums/Commons/dimension.enum.js";
2
2
  export const DIMENSIONS_ARRAY = [
3
3
  DIMENSIONS.HEIGHT,
4
4
  DIMENSIONS.MAX_HEIGHT,
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.PREDIFINED_ROUNDED = exports.PREDEFINED_ROUNDED = exports.CUSTOM_BORDER_RADIUS_REGEX = exports.BORDER_RADIUS_REGEX = void 0;
7
- var _enums = require("../../enums/index.cjs");
7
+ var _rounded = require("../../enums/Commons/rounded.enum.cjs");
8
8
  const BORDER_RADIUS_REGEX = exports.BORDER_RADIUS_REGEX = /^(?<radius>(?: ?(?:0|(?:[0-9]+(?:\.[0-9]+)?)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr))){0,4})$/;
9
9
  const CUSTOM_BORDER_RADIUS_REGEX = exports.CUSTOM_BORDER_RADIUS_REGEX = /^(?:var|calc|clamp|min|max|env)\(.*\)$|^-?(?:0|[0-9]*\.?[0-9]+)(?:px|pt|pc|in|cm|mm|q|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|%)$/i;
10
- const PREDEFINED_ROUNDED = exports.PREDEFINED_ROUNDED = [_enums.ROUNDED.X_SMALL, _enums.ROUNDED.SMALL, _enums.ROUNDED.DEFAULT, _enums.ROUNDED.MEDIUM, _enums.ROUNDED.LARGE, _enums.ROUNDED.X_LARGE, _enums.ROUNDED.SHAPED, _enums.ROUNDED.SHAPED_INVERT];
10
+ const PREDEFINED_ROUNDED = exports.PREDEFINED_ROUNDED = [_rounded.ROUNDED.X_SMALL, _rounded.ROUNDED.SMALL, _rounded.ROUNDED.DEFAULT, _rounded.ROUNDED.MEDIUM, _rounded.ROUNDED.LARGE, _rounded.ROUNDED.X_LARGE, _rounded.ROUNDED.SHAPED, _rounded.ROUNDED.SHAPED_INVERT];
11
11
  const PREDIFINED_ROUNDED = exports.PREDIFINED_ROUNDED = PREDEFINED_ROUNDED;
@@ -1,4 +1,4 @@
1
- import { ROUNDED } from "../../enums/index.js";
1
+ import { ROUNDED } from "../../enums/Commons/rounded.enum.js";
2
2
  export const BORDER_RADIUS_REGEX = /^(?<radius>(?: ?(?:0|(?:[0-9]+(?:\.[0-9]+)?)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr))){0,4})$/;
3
3
  export const CUSTOM_BORDER_RADIUS_REGEX = /^(?:var|calc|clamp|min|max|env)\(.*\)$|^-?(?:0|[0-9]*\.?[0-9]+)(?:px|pt|pc|in|cm|mm|q|em|rem|ex|ch|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|%)$/i;
4
4
  export const PREDEFINED_ROUNDED = [
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SIZES_ARRAY = void 0;
7
- var _enums = require("../../enums/index.cjs");
8
- const SIZES_ARRAY = exports.SIZES_ARRAY = [_enums.SIZES.X_SMALL, _enums.SIZES.SMALL, _enums.SIZES.DEFAULT, _enums.SIZES.LARGE, _enums.SIZES.X_LARGE];
7
+ var _size = require("../../enums/Commons/size.enum.cjs");
8
+ const SIZES_ARRAY = exports.SIZES_ARRAY = [_size.SIZES.X_SMALL, _size.SIZES.SMALL, _size.SIZES.DEFAULT, _size.SIZES.LARGE, _size.SIZES.X_LARGE];
@@ -1,4 +1,4 @@
1
- import { SIZES } from "../../enums/index.js";
1
+ import { SIZES } from "../../enums/Commons/size.enum.js";
2
2
  export const SIZES_ARRAY = [
3
3
  SIZES.X_SMALL,
4
4
  SIZES.SMALL,
@@ -4,72 +4,73 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UTILITY_RADIUS_FALLBACK = exports.SPACING_SCALE_STEPS = exports.ROUNDED_LOGICAL_CORNER_MAP = exports.ROUNDED_CORNER_MAP = exports.PADDING_POSITION_MAP = exports.PADDING_LOGICAL_SIDE_MAP = exports.PADDING_LOGICAL_AXIS_MAP = exports.NAMED_RADIUS_TOKEN = exports.MARGIN_POSITION_MAP = exports.MARGIN_LOGICAL_SIDE_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = void 0;
7
- var _enums = require("../../enums/index.cjs");
7
+ var _anchor = require("../../enums/Commons/anchor.enum.cjs");
8
+ var _border = require("../../enums/Commons/border.enum.cjs");
8
9
  const SPACING_SCALE_STEPS = exports.SPACING_SCALE_STEPS = ["0", "1", "2", "3", "4", "5", "6", "8", "10", "12"];
9
10
  const PADDING_POSITION_MAP = exports.PADDING_POSITION_MAP = [{
10
- side: _enums.BLOCK.TOP,
11
+ side: _anchor.BLOCK.TOP,
11
12
  prop: "paddingTop"
12
13
  }, {
13
- side: _enums.INLINE.RIGHT,
14
+ side: _anchor.INLINE.RIGHT,
14
15
  prop: "paddingRight"
15
16
  }, {
16
- side: _enums.BLOCK.BOTTOM,
17
+ side: _anchor.BLOCK.BOTTOM,
17
18
  prop: "paddingBottom"
18
19
  }, {
19
- side: _enums.INLINE.LEFT,
20
+ side: _anchor.INLINE.LEFT,
20
21
  prop: "paddingLeft"
21
22
  }];
22
23
  const PADDING_LOGICAL_AXIS_MAP = exports.PADDING_LOGICAL_AXIS_MAP = [{
23
- axis: _enums.BORDER_LOGICAL_AXIS.BLOCK,
24
+ axis: _border.BORDER_LOGICAL_AXIS.BLOCK,
24
25
  prop: "paddingBlock"
25
26
  }, {
26
- axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
27
+ axis: _border.BORDER_LOGICAL_AXIS.INLINE,
27
28
  prop: "paddingInline"
28
29
  }];
29
30
  const PADDING_LOGICAL_SIDE_MAP = exports.PADDING_LOGICAL_SIDE_MAP = [{
30
- side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.START}`,
31
+ side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.START}`,
31
32
  prop: "paddingBlockStart"
32
33
  }, {
33
- side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.END}`,
34
+ side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.END}`,
34
35
  prop: "paddingBlockEnd"
35
36
  }, {
36
- side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.START}`,
37
+ side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.START}`,
37
38
  prop: "paddingInlineStart"
38
39
  }, {
39
- side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.END}`,
40
+ side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.END}`,
40
41
  prop: "paddingInlineEnd"
41
42
  }];
42
43
  const MARGIN_POSITION_MAP = exports.MARGIN_POSITION_MAP = [{
43
- side: _enums.BLOCK.TOP,
44
+ side: _anchor.BLOCK.TOP,
44
45
  prop: "marginTop"
45
46
  }, {
46
- side: _enums.INLINE.RIGHT,
47
+ side: _anchor.INLINE.RIGHT,
47
48
  prop: "marginRight"
48
49
  }, {
49
- side: _enums.BLOCK.BOTTOM,
50
+ side: _anchor.BLOCK.BOTTOM,
50
51
  prop: "marginBottom"
51
52
  }, {
52
- side: _enums.INLINE.LEFT,
53
+ side: _anchor.INLINE.LEFT,
53
54
  prop: "marginLeft"
54
55
  }];
55
56
  const MARGIN_LOGICAL_AXIS_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = [{
56
- axis: _enums.BORDER_LOGICAL_AXIS.BLOCK,
57
+ axis: _border.BORDER_LOGICAL_AXIS.BLOCK,
57
58
  prop: "marginBlock"
58
59
  }, {
59
- axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
60
+ axis: _border.BORDER_LOGICAL_AXIS.INLINE,
60
61
  prop: "marginInline"
61
62
  }];
62
63
  const MARGIN_LOGICAL_SIDE_MAP = exports.MARGIN_LOGICAL_SIDE_MAP = [{
63
- side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.START}`,
64
+ side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.START}`,
64
65
  prop: "marginBlockStart"
65
66
  }, {
66
- side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.END}`,
67
+ side: `${_border.BORDER_LOGICAL_AXIS.BLOCK}-${_anchor.START_END.END}`,
67
68
  prop: "marginBlockEnd"
68
69
  }, {
69
- side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.START}`,
70
+ side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.START}`,
70
71
  prop: "marginInlineStart"
71
72
  }, {
72
- side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.END}`,
73
+ side: `${_border.BORDER_LOGICAL_AXIS.INLINE}-${_anchor.START_END.END}`,
73
74
  prop: "marginInlineEnd"
74
75
  }];
75
76
  const ROUNDED_CORNER_MAP = exports.ROUNDED_CORNER_MAP = [{
@@ -86,16 +87,16 @@ const ROUNDED_CORNER_MAP = exports.ROUNDED_CORNER_MAP = [{
86
87
  prop: "roundedBottomRight"
87
88
  }];
88
89
  const ROUNDED_LOGICAL_CORNER_MAP = exports.ROUNDED_LOGICAL_CORNER_MAP = [{
89
- corner: `${_enums.START_END.START}-${_enums.START_END.START}`,
90
+ corner: `${_anchor.START_END.START}-${_anchor.START_END.START}`,
90
91
  prop: "roundedStartStart"
91
92
  }, {
92
- corner: `${_enums.START_END.START}-${_enums.START_END.END}`,
93
+ corner: `${_anchor.START_END.START}-${_anchor.START_END.END}`,
93
94
  prop: "roundedStartEnd"
94
95
  }, {
95
- corner: `${_enums.START_END.END}-${_enums.START_END.START}`,
96
+ corner: `${_anchor.START_END.END}-${_anchor.START_END.START}`,
96
97
  prop: "roundedEndStart"
97
98
  }, {
98
- corner: `${_enums.START_END.END}-${_enums.START_END.END}`,
99
+ corner: `${_anchor.START_END.END}-${_anchor.START_END.END}`,
99
100
  prop: "roundedEndEnd"
100
101
  }];
101
102
  const NAMED_RADIUS_TOKEN = exports.NAMED_RADIUS_TOKEN = {
@@ -1,4 +1,5 @@
1
- import { BLOCK, BORDER_LOGICAL_AXIS, INLINE, START_END } from "../../enums/index.js";
1
+ import { BLOCK, INLINE, START_END } from "../../enums/Commons/anchor.enum.js";
2
+ import { BORDER_LOGICAL_AXIS } from "../../enums/Commons/border.enum.js";
2
3
  export const SPACING_SCALE_STEPS = [
3
4
  "0",
4
5
  "1",
@@ -9,7 +9,7 @@ exports.flipSide = flipSide;
9
9
  exports.getAxis = getAxis;
10
10
  exports.parseAnchor = parseAnchor;
11
11
  var _anchor = require("../../consts/Commons/anchor.const.cjs");
12
- var _enums = require("../../enums/index.cjs");
12
+ var _drag = require("../../enums/Commons/drag.enum.cjs");
13
13
  function parseAnchor(anchor) {
14
14
  const [side, initialAlign] = anchor.split(" ");
15
15
  const align = !initialAlign ? _anchor.BLOCK_ARRAY.includes(side) ? "left" : _anchor.INLINE_ARRAY.includes(side) ? "top" : "center" : initialAlign;
@@ -49,5 +49,5 @@ function flipCorner(anchor) {
49
49
  };
50
50
  }
51
51
  function getAxis(anchor) {
52
- return _anchor.BLOCK_ARRAY.includes(anchor.side) ? _enums.AXIS.Y : _enums.AXIS.X;
52
+ return _anchor.BLOCK_ARRAY.includes(anchor.side) ? _drag.AXIS.Y : _drag.AXIS.X;
53
53
  }
@@ -1,4 +1,4 @@
1
- import { AXIS } from '../../enums';
1
+ import { AXIS } from '../../enums/Commons/drag.enum';
2
2
  import type { TAnchor, TParsedAnchor } from '../../types/Commons/anchor.type';
3
3
  /**
4
4
  * Parse anchor.
@@ -1,5 +1,5 @@
1
1
  import { BLOCK_ARRAY, INLINE_ARRAY } from "../../consts/Commons/anchor.const.js";
2
- import { AXIS } from "../../enums/index.js";
2
+ import { AXIS } from "../../enums/Commons/drag.enum.js";
3
3
  export function parseAnchor(anchor) {
4
4
  const [side, initialAlign] = anchor.split(" ");
5
5
  const align = !initialAlign ? BLOCK_ARRAY.includes(side) ? "left" : INLINE_ARRAY.includes(side) ? "top" : "center" : initialAlign;
@@ -54,7 +54,7 @@ exports.tryOnScopeDispose = tryOnScopeDispose;
54
54
  exports.wrapInArray = wrapInArray;
55
55
  var _vue = require("vue");
56
56
  var _commons = require("../../consts/Commons/commons.const.cjs");
57
- var _enums = require("../../enums/index.cjs");
57
+ var _commons2 = require("../../enums/Commons/commons.enum.cjs");
58
58
  var _getCurrentInstance = require("./getCurrentInstance.util.cjs");
59
59
  function convertToUnit(str, unit = "px") {
60
60
  if (str == null || str === "") {
@@ -261,15 +261,15 @@ function focusChild(el, location) {
261
261
  if (el === document.activeElement || !el.contains(document.activeElement)) {
262
262
  focusable[0]?.focus();
263
263
  }
264
- } else if (location === _enums.FOCUS_LOCATION.FIRST) {
264
+ } else if (location === _commons2.FOCUS_LOCATION.FIRST) {
265
265
  focusable[0]?.focus();
266
- } else if (location === _enums.FOCUS_LOCATION.LAST) {
266
+ } else if (location === _commons2.FOCUS_LOCATION.LAST) {
267
267
  focusable.at(-1)?.focus();
268
268
  } else if (typeof location === "number") {
269
269
  focusable[location]?.focus();
270
270
  } else {
271
271
  const _el = getNextElement(focusable, location);
272
- if (_el) _el.focus();else focusChild(el, location === _enums.FOCUS_LOCATION.NEXT ? _enums.FOCUS_LOCATION.FIRST : _enums.FOCUS_LOCATION.LAST);
272
+ if (_el) _el.focus();else focusChild(el, location === _commons2.FOCUS_LOCATION.NEXT ? _commons2.FOCUS_LOCATION.FIRST : _commons2.FOCUS_LOCATION.LAST);
273
273
  }
274
274
  }
275
275
  function focusableChildren(el, filterByTabIndex = true) {
@@ -279,7 +279,7 @@ function focusableChildren(el, filterByTabIndex = true) {
279
279
  function getNextElement(elements, location, condition) {
280
280
  let _el;
281
281
  let idx = elements.indexOf(document.activeElement);
282
- const inc = location === _enums.FOCUS_LOCATION.NEXT ? 1 : -1;
282
+ const inc = location === _commons2.FOCUS_LOCATION.NEXT ? 1 : -1;
283
283
  do {
284
284
  idx += inc;
285
285
  _el = elements[idx];
@@ -13,7 +13,7 @@ import {
13
13
  watchEffect
14
14
  } from "vue";
15
15
  import { IN_BROWSER, ON_REGEX } from "../../consts/Commons/commons.const.js";
16
- import { FOCUS_LOCATION } from "../../enums/index.js";
16
+ import { FOCUS_LOCATION } from "../../enums/Commons/commons.enum.js";
17
17
  import { getLifeCycleTarget } from "./getCurrentInstance.util.js";
18
18
  export function convertToUnit(str, unit = "px") {
19
19
  if (str == null || str === "") {
@@ -10,7 +10,7 @@ exports.pixelCeil = pixelCeil;
10
10
  exports.pixelRound = pixelRound;
11
11
  exports.staticLocationStrategy = staticLocationStrategy;
12
12
  var _vue = require("vue");
13
- var _enums = require("../../enums/index.cjs");
13
+ var _drag = require("../../enums/Commons/drag.enum.cjs");
14
14
  var _box = require("../../classes/Commons/box.class.cjs");
15
15
  var _anchor = require("./anchor.util.cjs");
16
16
  var _animation = require("./animation.util.cjs");
@@ -210,8 +210,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
210
210
  const hasOverflowX = overflows.x.before || overflows.x.after;
211
211
  const hasOverflowY = overflows.y.before || overflows.y.after;
212
212
  let reset = false;
213
- [_enums.AXIS.X, _enums.AXIS.Y].forEach(key => {
214
- if (key === _enums.AXIS.X && hasOverflowX && !flipped.x || key === _enums.AXIS.Y && hasOverflowY && !flipped.y) {
213
+ [_drag.AXIS.X, _drag.AXIS.Y].forEach(key => {
214
+ if (key === _drag.AXIS.X && hasOverflowX && !flipped.x || key === _drag.AXIS.Y && hasOverflowY && !flipped.y) {
215
215
  const newPlacement = {
216
216
  anchor: {
217
217
  ...placement.anchor
@@ -220,7 +220,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
220
220
  ...placement.origin
221
221
  }
222
222
  };
223
- const flip = key === _enums.AXIS.X ? axis2 === _enums.AXIS.Y ? _anchor.flipAlign : _anchor.flipSide : axis2 === _enums.AXIS.Y ? _anchor.flipSide : _anchor.flipAlign;
223
+ const flip = key === _drag.AXIS.X ? axis2 === _drag.AXIS.Y ? _anchor.flipAlign : _anchor.flipSide : axis2 === _drag.AXIS.Y ? _anchor.flipSide : _anchor.flipAlign;
224
224
  newPlacement.anchor = flip(newPlacement.anchor);
225
225
  newPlacement.origin = flip(newPlacement.origin);
226
226
  const {
@@ -268,7 +268,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
268
268
  top: (0, _commons.convertToUnit)(pixelRound(y)),
269
269
  left: (0, _commons.convertToUnit)(pixelRound(x)),
270
270
  right: void 0,
271
- minWidth: (0, _commons.convertToUnit)(axis === _enums.AXIS.Y ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
271
+ minWidth: (0, _commons.convertToUnit)(axis === _drag.AXIS.Y ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
272
272
  maxWidth: (0, _commons.convertToUnit)(pixelCeil((0, _commons.clamp)(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
273
273
  maxHeight: (0, _commons.convertToUnit)(pixelCeil((0, _commons.clamp)(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
274
274
  });
@@ -1,5 +1,5 @@
1
1
  import { computed, nextTick, onScopeDispose, watch } from "vue";
2
- import { AXIS } from "../../enums/index.js";
2
+ import { AXIS } from "../../enums/Commons/drag.enum.js";
3
3
  import { Box } from "../../classes/Commons/box.class.js";
4
4
  import { flipAlign, flipCorner, flipSide, getAxis, parseAnchor } from "./anchor.util.js";
5
5
  import { nullifyTransforms } from "./animation.util.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origam",
3
- "version": "2.40.0",
3
+ "version": "2.40.1",
4
4
  "type": "module",
5
5
  "description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
6
6
  "keywords": [