@pixerate/editor 0.249.0 → 0.251.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.
Files changed (158) hide show
  1. package/dist/agent/index.cjs +40 -41
  2. package/dist/agent/index.js +9 -10
  3. package/dist/animation/index.cjs +6 -7
  4. package/dist/animation/index.js +5 -6
  5. package/dist/animation-editor/index.cjs +124 -123
  6. package/dist/animation-editor/index.js +15 -14
  7. package/dist/brushes/index.cjs +1406 -0
  8. package/dist/brushes/index.d.cts +12 -0
  9. package/dist/brushes/index.d.ts +12 -0
  10. package/dist/brushes/index.js +1406 -0
  11. package/dist/brushes/migrate.d.cts +17 -0
  12. package/dist/brushes/migrate.d.ts +17 -0
  13. package/dist/brushes/normalize.d.cts +15 -0
  14. package/dist/brushes/normalize.d.ts +15 -0
  15. package/dist/brushes/presets.d.cts +12 -0
  16. package/dist/brushes/presets.d.ts +12 -0
  17. package/dist/brushes/resolve.d.cts +56 -0
  18. package/dist/brushes/resolve.d.ts +56 -0
  19. package/dist/brushes/schema.d.cts +29 -0
  20. package/dist/brushes/schema.d.ts +29 -0
  21. package/dist/brushes/types.d.cts +323 -0
  22. package/dist/brushes/types.d.ts +323 -0
  23. package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
  24. package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
  25. package/dist/canvas/index.cjs +120 -65
  26. package/dist/canvas/index.d.cts +1 -0
  27. package/dist/canvas/index.d.ts +1 -0
  28. package/dist/canvas/index.js +88 -33
  29. package/dist/canvas/stickers.d.cts +35 -0
  30. package/dist/canvas/stickers.d.ts +35 -0
  31. package/dist/chart/index.cjs +159 -160
  32. package/dist/chart/index.js +9 -10
  33. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  34. package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
  35. package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
  36. package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
  37. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  38. package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
  39. package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
  40. package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
  41. package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
  42. package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
  43. package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
  44. package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
  45. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  46. package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
  47. package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
  48. package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
  49. package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
  50. package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
  51. package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
  52. package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
  53. package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
  54. package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
  55. package/dist/chunk-HS6QDWDF.cjs +1029 -0
  56. package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
  57. package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
  58. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  59. package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
  60. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  61. package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
  62. package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
  63. package/dist/chunk-JSDND7DF.cjs +173 -0
  64. package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
  65. package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
  66. package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
  67. package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
  68. package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
  69. package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
  70. package/dist/chunk-MTKY6K3Q.js +1029 -0
  71. package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
  72. package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
  73. package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
  74. package/dist/chunk-PXDIAYB6.cjs +594 -0
  75. package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
  76. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  77. package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
  78. package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
  79. package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
  80. package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
  81. package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
  82. package/dist/chunk-SZTI6EER.js +13 -0
  83. package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
  84. package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
  85. package/dist/chunk-TXFWZ5ZJ.js +594 -0
  86. package/dist/chunk-U67EN7GG.cjs +13 -0
  87. package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
  88. package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
  89. package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
  90. package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
  91. package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
  92. package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
  93. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  94. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  95. package/dist/color/index.cjs +4 -6
  96. package/dist/color/index.js +7 -9
  97. package/dist/effects/helpers.d.cts +6 -0
  98. package/dist/effects/helpers.d.ts +6 -0
  99. package/dist/effects/index.cjs +62 -60
  100. package/dist/effects/index.js +5 -3
  101. package/dist/effects/tools.d.cts +6 -0
  102. package/dist/effects/tools.d.ts +6 -0
  103. package/dist/export/index.cjs +7 -8
  104. package/dist/export/index.js +6 -7
  105. package/dist/extensions/index.cjs +10 -11
  106. package/dist/extensions/index.js +9 -10
  107. package/dist/gradient/index.cjs +33 -34
  108. package/dist/gradient/index.js +4 -5
  109. package/dist/image-editor/effects.d.cts +1 -1
  110. package/dist/image-editor/effects.d.ts +1 -1
  111. package/dist/image-editor/index.cjs +887 -863
  112. package/dist/image-editor/index.d.cts +1 -0
  113. package/dist/image-editor/index.d.ts +1 -0
  114. package/dist/image-editor/index.js +69 -45
  115. package/dist/image-editor/stickers.d.cts +9 -0
  116. package/dist/image-editor/stickers.d.ts +9 -0
  117. package/dist/index.cjs +16 -17
  118. package/dist/index.js +10 -11
  119. package/dist/paint/index.cjs +6 -4
  120. package/dist/paint/index.js +21 -19
  121. package/dist/paint-editor/brushes.d.cts +1 -2
  122. package/dist/paint-editor/brushes.d.ts +1 -2
  123. package/dist/paint-editor/index.cjs +2199 -699
  124. package/dist/paint-editor/index.js +1577 -77
  125. package/dist/paint-editor/mark-settings.d.cts +104 -0
  126. package/dist/paint-editor/mark-settings.d.ts +104 -0
  127. package/dist/paint-editor/procedural.d.cts +2 -75
  128. package/dist/paint-editor/procedural.d.ts +2 -75
  129. package/dist/paint-editor/stickers.d.cts +1 -22
  130. package/dist/paint-editor/stickers.d.ts +1 -22
  131. package/dist/raster/index.cjs +2 -2
  132. package/dist/raster/index.js +9 -9
  133. package/dist/stickers/index.cjs +22 -16
  134. package/dist/stickers/index.d.cts +1 -1
  135. package/dist/stickers/index.d.ts +1 -1
  136. package/dist/stickers/index.js +14 -8
  137. package/dist/stickers/tools.d.cts +57 -1
  138. package/dist/stickers/tools.d.ts +57 -1
  139. package/dist/tokens/index.cjs +3 -4
  140. package/dist/tokens/index.js +2 -3
  141. package/dist/typography/index.cjs +7 -8
  142. package/dist/typography/index.js +2 -3
  143. package/dist/vector/index.cjs +1011 -977
  144. package/dist/vector/index.d.cts +1 -0
  145. package/dist/vector/index.d.ts +1 -0
  146. package/dist/vector/index.js +47 -13
  147. package/dist/vector/stickers.d.cts +11 -0
  148. package/dist/vector/stickers.d.ts +11 -0
  149. package/dist/video-editor/index.cjs +349 -350
  150. package/dist/video-editor/index.js +9 -10
  151. package/package.json +11 -1
  152. package/skills/pixerate-image-editor/SKILL.md +1 -1
  153. package/skills/pixerate-stickers/SKILL.md +13 -1
  154. package/dist/chunk-7AHBW2CQ.cjs +0 -200
  155. package/dist/chunk-F67XMVDI.js +0 -200
  156. package/dist/chunk-H4AOUUBE.cjs +0 -2635
  157. package/dist/chunk-J7T5QZ45.js +0 -2635
  158. package/dist/chunk-ZEYMKDYS.cjs +0 -269
@@ -12,5 +12,5 @@ export { editorStickers, stampOutline, stampPixels } from './editor.js';
12
12
  export { createFakeStickerProvider, type FakeStickerProviderOptions } from './fake.js';
13
13
  export { combineStickerProviders } from './combine.js';
14
14
  export { checkStickerProvider, type StickerConformanceIssue, type StickerConformanceOptions } from './conformance.js';
15
- export { createStickerTools, createStickerToolProvider, describeStickerRef, stickerForAgent, type StickerToolsOptions } from './tools.js';
15
+ export { createInsertStickerTool, insertSticker, createStickerTools, createStickerToolProvider, describeStickerRef, stickerForAgent, type StickerInsertHost, type StickerPlacement, type StickerToolsOptions } from './tools.js';
16
16
  export { StickerBrowser, type StickerBrowserItem, type StickerBrowserState } from './browser.js';
@@ -1,30 +1,34 @@
1
1
  import {
2
2
  StickerBrowser,
3
+ createInsertStickerTool,
4
+ createStickerToolProvider,
5
+ createStickerTools,
6
+ describeStickerRef,
3
7
  editorStickers,
8
+ insertSticker,
4
9
  stampOutline,
5
- stampPixels
6
- } from "../chunk-EJLRBS5Q.js";
10
+ stampPixels,
11
+ stickerForAgent
12
+ } from "../chunk-WZOGDKCQ.js";
7
13
  import {
8
14
  DEFAULT_STICKER_PAGE,
9
15
  EDITOR_STICKERS_ID,
10
16
  MAX_STICKER_PAGE,
11
17
  STAMP_KINDS,
12
- StickerError,
13
18
  StickersSlot,
14
19
  checkStickerSearchOptions,
15
20
  closestStickerRefs,
16
- createStickerToolProvider,
17
- createStickerTools,
18
- describeStickerRef,
19
21
  editorStampOf,
20
22
  normalizeStickerRef,
21
23
  parseStickerRef,
22
24
  stampCoverage,
23
- stickerForAgent,
24
25
  stickerIdFor,
25
26
  stickerPage,
26
27
  stickerRefOf
27
- } from "../chunk-5RH3VXAK.js";
28
+ } from "../chunk-APX63ILU.js";
29
+ import {
30
+ StickerError
31
+ } from "../chunk-SZTI6EER.js";
28
32
  import "../chunk-4D6KP5BV.js";
29
33
  import {
30
34
  pngDataUrl
@@ -314,11 +318,13 @@ export {
314
318
  closestStickerRefs,
315
319
  combineStickerProviders,
316
320
  createFakeStickerProvider,
321
+ createInsertStickerTool,
317
322
  createStickerToolProvider,
318
323
  createStickerTools,
319
324
  describeStickerRef,
320
325
  editorStampOf,
321
326
  editorStickers,
327
+ insertSticker,
322
328
  normalizeStickerRef,
323
329
  parseStickerRef,
324
330
  stampCoverage,
@@ -4,7 +4,40 @@
4
4
  * stickers. Refusals name the valid choices.
5
5
  */
6
6
  import type { AgentTool, AgentToolProvider } from '../tools/registry.cjs';
7
- import type { StickerDescription, StickerProvider, StickerRef, StickerSummary } from './types.cjs';
7
+ import type { MaybePromise, StickerAsset, StickerDescription, StickerFormat, StickerProvider, StickerRef, StickerSummary } from './types.cjs';
8
+ /** Where and how big an inserted sticker goes, with its art. */
9
+ export interface StickerPlacement {
10
+ ref: StickerRef;
11
+ description: StickerDescription;
12
+ asset: StickerAsset;
13
+ /** Centre, in the editor's document units. */
14
+ x: number;
15
+ y: number;
16
+ /** Size of its box (the natural aspect kept). */
17
+ width: number;
18
+ height: number;
19
+ /** #rrggbb it was tinted to, when tintable and asked for. */
20
+ colour?: string;
21
+ }
22
+ /**
23
+ * An editor that can take an inserted sticker (`insert_sticker`): the vector editor (editable
24
+ * paths), the image editor (a pixel layer), the canvas (a shape node) or any other.
25
+ */
26
+ export interface StickerInsertHost {
27
+ /** What the editor calls the thing it makes ("group", "layer", "node"), for descriptions. */
28
+ noun: string;
29
+ /** The format it wants first (it gets the other when the sticker has only that). */
30
+ format: StickerFormat;
31
+ /** The default centre when the call gives none (the middle of the view or document). */
32
+ defaultCentre(): {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ /** Adds the sticker as one undo step; returns what it made (its id at least) for later tools. */
37
+ insert(placement: StickerPlacement): MaybePromise<{
38
+ id: string;
39
+ } & Record<string, unknown>>;
40
+ }
8
41
  /** A summary as the tools return it: `ref` instead of the provider's id. */
9
42
  export declare function stickerForAgent(provider: StickerProvider, s: StickerSummary): Record<string, unknown>;
10
43
  /**
@@ -15,9 +48,32 @@ export declare function describeStickerRef(provider: StickerProvider, ref: Stick
15
48
  export interface StickerToolsOptions {
16
49
  /** The provider to use, read on every call (an editor's `StickersSlot`). */
17
50
  provider: () => StickerProvider;
51
+ /** With it, `insert_sticker` puts a sticker into this editor. */
52
+ insert?: StickerInsertHost;
18
53
  }
19
54
  /** `find_stickers` and `describe_sticker` over the provider `options.provider()` returns. */
20
55
  export declare function createStickerTools(options: StickerToolsOptions): AgentTool[];
56
+ /**
57
+ * Puts one sticker into an editor through its host (the panels and `insert_sticker` both use it):
58
+ * checks the ref, loads the art in the host's format, tinted when asked and tintable, and places
59
+ * it centred at (`x`, `y`) (default the host's centre), `width` wide (default its natural width).
60
+ * Returns what the host made, the ref, the size and the licence.
61
+ */
62
+ export declare function insertSticker(provider: StickerProvider, host: StickerInsertHost, options: {
63
+ ref: StickerRef;
64
+ x?: number;
65
+ y?: number;
66
+ width?: number;
67
+ color?: string;
68
+ }): Promise<{
69
+ id: string;
70
+ ref: StickerRef;
71
+ width: number;
72
+ height: number;
73
+ licence: StickerDescription['licence'];
74
+ } & Record<string, unknown>>;
75
+ /** `insert_sticker`: one sticker by ref into an editor, at a place and size, as one undo step. */
76
+ export declare function createInsertStickerTool(provider: () => StickerProvider, host: StickerInsertHost): AgentTool;
21
77
  /** The sticker library tools as a provider (id `stickers` by default). */
22
78
  export declare function createStickerToolProvider(options: StickerToolsOptions & {
23
79
  id?: string;
@@ -4,7 +4,40 @@
4
4
  * stickers. Refusals name the valid choices.
5
5
  */
6
6
  import type { AgentTool, AgentToolProvider } from '../tools/registry.js';
7
- import type { StickerDescription, StickerProvider, StickerRef, StickerSummary } from './types.js';
7
+ import type { MaybePromise, StickerAsset, StickerDescription, StickerFormat, StickerProvider, StickerRef, StickerSummary } from './types.js';
8
+ /** Where and how big an inserted sticker goes, with its art. */
9
+ export interface StickerPlacement {
10
+ ref: StickerRef;
11
+ description: StickerDescription;
12
+ asset: StickerAsset;
13
+ /** Centre, in the editor's document units. */
14
+ x: number;
15
+ y: number;
16
+ /** Size of its box (the natural aspect kept). */
17
+ width: number;
18
+ height: number;
19
+ /** #rrggbb it was tinted to, when tintable and asked for. */
20
+ colour?: string;
21
+ }
22
+ /**
23
+ * An editor that can take an inserted sticker (`insert_sticker`): the vector editor (editable
24
+ * paths), the image editor (a pixel layer), the canvas (a shape node) or any other.
25
+ */
26
+ export interface StickerInsertHost {
27
+ /** What the editor calls the thing it makes ("group", "layer", "node"), for descriptions. */
28
+ noun: string;
29
+ /** The format it wants first (it gets the other when the sticker has only that). */
30
+ format: StickerFormat;
31
+ /** The default centre when the call gives none (the middle of the view or document). */
32
+ defaultCentre(): {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ /** Adds the sticker as one undo step; returns what it made (its id at least) for later tools. */
37
+ insert(placement: StickerPlacement): MaybePromise<{
38
+ id: string;
39
+ } & Record<string, unknown>>;
40
+ }
8
41
  /** A summary as the tools return it: `ref` instead of the provider's id. */
9
42
  export declare function stickerForAgent(provider: StickerProvider, s: StickerSummary): Record<string, unknown>;
10
43
  /**
@@ -15,9 +48,32 @@ export declare function describeStickerRef(provider: StickerProvider, ref: Stick
15
48
  export interface StickerToolsOptions {
16
49
  /** The provider to use, read on every call (an editor's `StickersSlot`). */
17
50
  provider: () => StickerProvider;
51
+ /** With it, `insert_sticker` puts a sticker into this editor. */
52
+ insert?: StickerInsertHost;
18
53
  }
19
54
  /** `find_stickers` and `describe_sticker` over the provider `options.provider()` returns. */
20
55
  export declare function createStickerTools(options: StickerToolsOptions): AgentTool[];
56
+ /**
57
+ * Puts one sticker into an editor through its host (the panels and `insert_sticker` both use it):
58
+ * checks the ref, loads the art in the host's format, tinted when asked and tintable, and places
59
+ * it centred at (`x`, `y`) (default the host's centre), `width` wide (default its natural width).
60
+ * Returns what the host made, the ref, the size and the licence.
61
+ */
62
+ export declare function insertSticker(provider: StickerProvider, host: StickerInsertHost, options: {
63
+ ref: StickerRef;
64
+ x?: number;
65
+ y?: number;
66
+ width?: number;
67
+ color?: string;
68
+ }): Promise<{
69
+ id: string;
70
+ ref: StickerRef;
71
+ width: number;
72
+ height: number;
73
+ licence: StickerDescription['licence'];
74
+ } & Record<string, unknown>>;
75
+ /** `insert_sticker`: one sticker by ref into an editor, at a place and size, as one undo step. */
76
+ export declare function createInsertStickerTool(provider: () => StickerProvider, host: StickerInsertHost): AgentTool;
21
77
  /** The sticker library tools as a provider (id `stickers` by default). */
22
78
  export declare function createStickerToolProvider(options: StickerToolsOptions & {
23
79
  id?: string;
@@ -55,7 +55,7 @@
55
55
 
56
56
 
57
57
 
58
- var _chunkGA4EU4P3cjs = require('../chunk-GA4EU4P3.cjs');
58
+ var _chunkUXETV2NCcjs = require('../chunk-UXETV2NC.cjs');
59
59
  require('../chunk-SJ2CPTQC.cjs');
60
60
  require('../chunk-2BSBFBOA.cjs');
61
61
 
@@ -63,8 +63,7 @@ require('../chunk-2BSBFBOA.cjs');
63
63
 
64
64
 
65
65
  var _chunkA6QWKBJPcjs = require('../chunk-A6QWKBJP.cjs');
66
- require('../chunk-RD7RX52G.cjs');
67
- require('../chunk-7AHBW2CQ.cjs');
66
+ require('../chunk-5UEFBM2M.cjs');
68
67
  require('../chunk-IPJ3TEYR.cjs');
69
68
 
70
69
 
@@ -126,4 +125,4 @@ require('../chunk-IPJ3TEYR.cjs');
126
125
 
127
126
 
128
127
 
129
- exports.EMPTY_TOKEN_STATE = _chunkGA4EU4P3cjs.EMPTY_TOKEN_STATE; exports.TOKEN_SCOPES_BY_TYPE = _chunkGA4EU4P3cjs.TOKEN_SCOPES_BY_TYPE; exports.TOKEN_TYPES = _chunkGA4EU4P3cjs.TOKEN_TYPES; exports.TokenError = _chunkGA4EU4P3cjs.TokenError; exports.TokenStore = _chunkGA4EU4P3cjs.TokenStore; exports.W3C_TOKENS_EXTENSION = _chunkGA4EU4P3cjs.W3C_TOKENS_EXTENSION; exports.addTokenMode = _chunkGA4EU4P3cjs.addTokenMode; exports.checkTokenAlias = _chunkGA4EU4P3cjs.checkTokenAlias; exports.coerceTokenLiteral = _chunkGA4EU4P3cjs.coerceTokenLiteral; exports.createTokenCollection = _chunkGA4EU4P3cjs.createTokenCollection; exports.createTokenStore = _chunkGA4EU4P3cjs.createTokenStore; exports.createTokenStyleSource = _chunkGA4EU4P3cjs.createTokenStyleSource; exports.createTokenVariable = _chunkGA4EU4P3cjs.createTokenVariable; exports.createTokensEditorDocument = _chunkGA4EU4P3cjs.createTokensEditorDocument; exports.createTokensStyleToolProvider = _chunkGA4EU4P3cjs.createTokensStyleToolProvider; exports.cssString = _chunkGA4EU4P3cjs.cssString; exports.defaultTokenId = _chunkGA4EU4P3cjs.defaultTokenId; exports.defaultTokenValue = _chunkGA4EU4P3cjs.defaultTokenValue; exports.deleteTokenCollection = _chunkGA4EU4P3cjs.deleteTokenCollection; exports.deleteTokenVariables = _chunkGA4EU4P3cjs.deleteTokenVariables; exports.exportTokensCss = _chunkGA4EU4P3cjs.exportTokensCss; exports.exportW3CTokens = _chunkGA4EU4P3cjs.exportW3CTokens; exports.exportW3CTokensJson = _chunkGA4EU4P3cjs.exportW3CTokensJson; exports.findTokenCollection = _chunkGA4EU4P3cjs.findTokenCollection; exports.findTokenMode = _chunkGA4EU4P3cjs.findTokenMode; exports.findTokenVariable = _chunkGA4EU4P3cjs.findTokenVariable; exports.formatTokenCssValue = _chunkGA4EU4P3cjs.formatTokenCssValue; exports.formatTokenValue = _chunkGA4EU4P3cjs.formatTokenValue; exports.getCollectionVariables = _chunkGA4EU4P3cjs.getCollectionVariables; exports.getCurrentMode = _chunkGA4EU4P3cjs.getCurrentMode; exports.getDefaultMode = _chunkGA4EU4P3cjs.getDefaultMode; exports.getTokenCollection = _chunkGA4EU4P3cjs.getTokenCollection; exports.getTokenCssName = _chunkGA4EU4P3cjs.getTokenCssName; exports.getTokenCssVariables = _chunkGA4EU4P3cjs.getTokenCssVariables; exports.getTokenVariable = _chunkGA4EU4P3cjs.getTokenVariable; exports.hexToRgba = _chunkA6QWKBJPcjs.hexToRgba; exports.importW3CTokens = _chunkGA4EU4P3cjs.importW3CTokens; exports.isTokenAlias = _chunkGA4EU4P3cjs.isTokenAlias; exports.isTokenInScope = _chunkGA4EU4P3cjs.isTokenInScope; exports.isTokenScopeKnown = _chunkGA4EU4P3cjs.isTokenScopeKnown; exports.literalTokenType = _chunkGA4EU4P3cjs.literalTokenType; exports.moveTokenMode = _chunkGA4EU4P3cjs.moveTokenMode; exports.normalizeTokenColor = _chunkA6QWKBJPcjs.normalizeTokenColor; exports.normalizeTokenName = _chunkGA4EU4P3cjs.normalizeTokenName; exports.normalizeTokenScopes = _chunkGA4EU4P3cjs.normalizeTokenScopes; exports.parseTokenState = _chunkGA4EU4P3cjs.parseTokenState; exports.prepareTokenValue = _chunkGA4EU4P3cjs.prepareTokenValue; exports.removeTokenMode = _chunkGA4EU4P3cjs.removeTokenMode; exports.renameTokenCollection = _chunkGA4EU4P3cjs.renameTokenCollection; exports.renameTokenMode = _chunkGA4EU4P3cjs.renameTokenMode; exports.renameTokenVariable = _chunkGA4EU4P3cjs.renameTokenVariable; exports.resolveToken = _chunkGA4EU4P3cjs.resolveToken; exports.resolveTokenInMode = _chunkGA4EU4P3cjs.resolveTokenInMode; exports.resolveTokenValue = _chunkGA4EU4P3cjs.resolveTokenValue; exports.rgbaToHex = _chunkA6QWKBJPcjs.rgbaToHex; exports.setTokenValue = _chunkGA4EU4P3cjs.setTokenValue; exports.tokenSlug = _chunkGA4EU4P3cjs.tokenSlug; exports.tokensStyleDomain = _chunkGA4EU4P3cjs.tokensStyleDomain; exports.updateTokenVariable = _chunkGA4EU4P3cjs.updateTokenVariable;
128
+ exports.EMPTY_TOKEN_STATE = _chunkUXETV2NCcjs.EMPTY_TOKEN_STATE; exports.TOKEN_SCOPES_BY_TYPE = _chunkUXETV2NCcjs.TOKEN_SCOPES_BY_TYPE; exports.TOKEN_TYPES = _chunkUXETV2NCcjs.TOKEN_TYPES; exports.TokenError = _chunkUXETV2NCcjs.TokenError; exports.TokenStore = _chunkUXETV2NCcjs.TokenStore; exports.W3C_TOKENS_EXTENSION = _chunkUXETV2NCcjs.W3C_TOKENS_EXTENSION; exports.addTokenMode = _chunkUXETV2NCcjs.addTokenMode; exports.checkTokenAlias = _chunkUXETV2NCcjs.checkTokenAlias; exports.coerceTokenLiteral = _chunkUXETV2NCcjs.coerceTokenLiteral; exports.createTokenCollection = _chunkUXETV2NCcjs.createTokenCollection; exports.createTokenStore = _chunkUXETV2NCcjs.createTokenStore; exports.createTokenStyleSource = _chunkUXETV2NCcjs.createTokenStyleSource; exports.createTokenVariable = _chunkUXETV2NCcjs.createTokenVariable; exports.createTokensEditorDocument = _chunkUXETV2NCcjs.createTokensEditorDocument; exports.createTokensStyleToolProvider = _chunkUXETV2NCcjs.createTokensStyleToolProvider; exports.cssString = _chunkUXETV2NCcjs.cssString; exports.defaultTokenId = _chunkUXETV2NCcjs.defaultTokenId; exports.defaultTokenValue = _chunkUXETV2NCcjs.defaultTokenValue; exports.deleteTokenCollection = _chunkUXETV2NCcjs.deleteTokenCollection; exports.deleteTokenVariables = _chunkUXETV2NCcjs.deleteTokenVariables; exports.exportTokensCss = _chunkUXETV2NCcjs.exportTokensCss; exports.exportW3CTokens = _chunkUXETV2NCcjs.exportW3CTokens; exports.exportW3CTokensJson = _chunkUXETV2NCcjs.exportW3CTokensJson; exports.findTokenCollection = _chunkUXETV2NCcjs.findTokenCollection; exports.findTokenMode = _chunkUXETV2NCcjs.findTokenMode; exports.findTokenVariable = _chunkUXETV2NCcjs.findTokenVariable; exports.formatTokenCssValue = _chunkUXETV2NCcjs.formatTokenCssValue; exports.formatTokenValue = _chunkUXETV2NCcjs.formatTokenValue; exports.getCollectionVariables = _chunkUXETV2NCcjs.getCollectionVariables; exports.getCurrentMode = _chunkUXETV2NCcjs.getCurrentMode; exports.getDefaultMode = _chunkUXETV2NCcjs.getDefaultMode; exports.getTokenCollection = _chunkUXETV2NCcjs.getTokenCollection; exports.getTokenCssName = _chunkUXETV2NCcjs.getTokenCssName; exports.getTokenCssVariables = _chunkUXETV2NCcjs.getTokenCssVariables; exports.getTokenVariable = _chunkUXETV2NCcjs.getTokenVariable; exports.hexToRgba = _chunkA6QWKBJPcjs.hexToRgba; exports.importW3CTokens = _chunkUXETV2NCcjs.importW3CTokens; exports.isTokenAlias = _chunkUXETV2NCcjs.isTokenAlias; exports.isTokenInScope = _chunkUXETV2NCcjs.isTokenInScope; exports.isTokenScopeKnown = _chunkUXETV2NCcjs.isTokenScopeKnown; exports.literalTokenType = _chunkUXETV2NCcjs.literalTokenType; exports.moveTokenMode = _chunkUXETV2NCcjs.moveTokenMode; exports.normalizeTokenColor = _chunkA6QWKBJPcjs.normalizeTokenColor; exports.normalizeTokenName = _chunkUXETV2NCcjs.normalizeTokenName; exports.normalizeTokenScopes = _chunkUXETV2NCcjs.normalizeTokenScopes; exports.parseTokenState = _chunkUXETV2NCcjs.parseTokenState; exports.prepareTokenValue = _chunkUXETV2NCcjs.prepareTokenValue; exports.removeTokenMode = _chunkUXETV2NCcjs.removeTokenMode; exports.renameTokenCollection = _chunkUXETV2NCcjs.renameTokenCollection; exports.renameTokenMode = _chunkUXETV2NCcjs.renameTokenMode; exports.renameTokenVariable = _chunkUXETV2NCcjs.renameTokenVariable; exports.resolveToken = _chunkUXETV2NCcjs.resolveToken; exports.resolveTokenInMode = _chunkUXETV2NCcjs.resolveTokenInMode; exports.resolveTokenValue = _chunkUXETV2NCcjs.resolveTokenValue; exports.rgbaToHex = _chunkA6QWKBJPcjs.rgbaToHex; exports.setTokenValue = _chunkUXETV2NCcjs.setTokenValue; exports.tokenSlug = _chunkUXETV2NCcjs.tokenSlug; exports.tokensStyleDomain = _chunkUXETV2NCcjs.tokensStyleDomain; exports.updateTokenVariable = _chunkUXETV2NCcjs.updateTokenVariable;
@@ -55,7 +55,7 @@ import {
55
55
  tokenSlug,
56
56
  tokensStyleDomain,
57
57
  updateTokenVariable
58
- } from "../chunk-YGQVCQTG.js";
58
+ } from "../chunk-ILP77UD6.js";
59
59
  import "../chunk-XBQX76CT.js";
60
60
  import "../chunk-HF5QZS7Z.js";
61
61
  import {
@@ -63,8 +63,7 @@ import {
63
63
  normalizeTokenColor,
64
64
  rgbaToHex
65
65
  } from "../chunk-2WPNAGHI.js";
66
- import "../chunk-JEGJP4OW.js";
67
- import "../chunk-F67XMVDI.js";
66
+ import "../chunk-MHLU6GRJ.js";
68
67
  import "../chunk-6ONMQ6WF.js";
69
68
  export {
70
69
  EMPTY_TOKEN_STATE,
@@ -18,13 +18,12 @@
18
18
  var _chunk4XSBOGMKcjs = require('../chunk-4XSBOGMK.cjs');
19
19
 
20
20
 
21
- var _chunkPPFJHTW5cjs = require('../chunk-PPFJHTW5.cjs');
21
+ var _chunkTFF2GTGNcjs = require('../chunk-TFF2GTGN.cjs');
22
22
 
23
23
 
24
24
 
25
25
 
26
- var _chunkRD7RX52Gcjs = require('../chunk-RD7RX52G.cjs');
27
- require('../chunk-7AHBW2CQ.cjs');
26
+ var _chunk5UEFBM2Mcjs = require('../chunk-5UEFBM2M.cjs');
28
27
  require('../chunk-IPJ3TEYR.cjs');
29
28
 
30
29
  // src/typography/types.ts
@@ -558,13 +557,13 @@ function isLargeText(font) {
558
557
  function checkTypographyAccessibility(options) {
559
558
  const { font } = options;
560
559
  if (!Number.isFinite(font.size) || font.size <= 0) throw new Error(`Font size ${font.size} must be a positive number of px.`);
561
- const fg = _chunkRD7RX52Gcjs.parseColor.call(void 0, options.foreground);
560
+ const fg = _chunk5UEFBM2Mcjs.parseColor.call(void 0, options.foreground);
562
561
  if (!fg) throw new Error(`"${options.foreground}" is not a colour I can read; use hex (#2a4b8d), rgb(), hsl(), oklch() or a CSS colour name.`);
563
- const bg = _chunkRD7RX52Gcjs.parseColor.call(void 0, options.background);
562
+ const bg = _chunk5UEFBM2Mcjs.parseColor.call(void 0, options.background);
564
563
  if (!bg) throw new Error(`"${options.background}" is not a colour I can read; use hex (#ffffff), rgb(), hsl(), oklch() or a CSS colour name.`);
565
564
  const large = isLargeText(font);
566
- const ratio = Math.round(_chunkRD7RX52Gcjs.contrastRatio.call(void 0, fg, bg) * 100) / 100;
567
- const level = _chunkRD7RX52Gcjs.contrastLevel.call(void 0, ratio, { large });
565
+ const ratio = Math.round(_chunk5UEFBM2Mcjs.contrastRatio.call(void 0, fg, bg) * 100) / 100;
566
+ const level = _chunk5UEFBM2Mcjs.contrastLevel.call(void 0, ratio, { large });
568
567
  const passesAA = level !== "fail";
569
568
  const bold = _chunk4XSBOGMKcjs.normalizeFontWeight.call(void 0, font.weight) >= 700;
570
569
  const issues = [];
@@ -573,7 +572,7 @@ function checkTypographyAccessibility(options) {
573
572
  if (font.size < 12) issues.push(`${font.size}px text is hard to read at any contrast; use 12px or more (16px for body text).`);
574
573
  const weight = _chunk4XSBOGMKcjs.normalizeFontWeight.call(void 0, font.weight);
575
574
  if (weight <= 300 && font.size < 24) issues.push(`Weight ${weight} at ${font.size}px has thin strokes that lower effective contrast; use 400 or heavier below 24px.`);
576
- const suggestion = passesAA ? void 0 : _chunkPPFJHTW5cjs.suggestAccessibleForeground.call(void 0, fg, bg, { large });
575
+ const suggestion = passesAA ? void 0 : _chunkTFF2GTGNcjs.suggestAccessibleForeground.call(void 0, fg, bg, { large });
577
576
  return {
578
577
  ratio,
579
578
  large,
@@ -18,13 +18,12 @@ import {
18
18
  } from "../chunk-N4ZXW3WB.js";
19
19
  import {
20
20
  suggestAccessibleForeground
21
- } from "../chunk-6ADHGQ73.js";
21
+ } from "../chunk-YBAPT7NL.js";
22
22
  import {
23
23
  contrastLevel,
24
24
  contrastRatio,
25
25
  parseColor
26
- } from "../chunk-JEGJP4OW.js";
27
- import "../chunk-F67XMVDI.js";
26
+ } from "../chunk-MHLU6GRJ.js";
28
27
  import "../chunk-6ONMQ6WF.js";
29
28
 
30
29
  // src/typography/types.ts