@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.
- package/dist/agent/index.cjs +40 -41
- package/dist/agent/index.js +9 -10
- package/dist/animation/index.cjs +6 -7
- package/dist/animation/index.js +5 -6
- package/dist/animation-editor/index.cjs +124 -123
- package/dist/animation-editor/index.js +15 -14
- package/dist/brushes/index.cjs +1406 -0
- package/dist/brushes/index.d.cts +12 -0
- package/dist/brushes/index.d.ts +12 -0
- package/dist/brushes/index.js +1406 -0
- package/dist/brushes/migrate.d.cts +17 -0
- package/dist/brushes/migrate.d.ts +17 -0
- package/dist/brushes/normalize.d.cts +15 -0
- package/dist/brushes/normalize.d.ts +15 -0
- package/dist/brushes/presets.d.cts +12 -0
- package/dist/brushes/presets.d.ts +12 -0
- package/dist/brushes/resolve.d.cts +56 -0
- package/dist/brushes/resolve.d.ts +56 -0
- package/dist/brushes/schema.d.cts +29 -0
- package/dist/brushes/schema.d.ts +29 -0
- package/dist/brushes/types.d.cts +323 -0
- package/dist/brushes/types.d.ts +323 -0
- package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
- package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
- package/dist/canvas/index.cjs +120 -65
- package/dist/canvas/index.d.cts +1 -0
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.js +88 -33
- package/dist/canvas/stickers.d.cts +35 -0
- package/dist/canvas/stickers.d.ts +35 -0
- package/dist/chart/index.cjs +159 -160
- package/dist/chart/index.js +9 -10
- package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
- package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
- package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
- package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
- package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
- package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
- package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
- package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
- package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
- package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
- package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
- package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
- package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
- package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
- package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
- package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
- package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
- package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
- package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
- package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
- package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
- package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
- package/dist/chunk-HS6QDWDF.cjs +1029 -0
- package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
- package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
- package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
- package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
- package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
- package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
- package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
- package/dist/chunk-JSDND7DF.cjs +173 -0
- package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
- package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
- package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
- package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
- package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
- package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
- package/dist/chunk-MTKY6K3Q.js +1029 -0
- package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
- package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
- package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
- package/dist/chunk-PXDIAYB6.cjs +594 -0
- package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
- package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
- package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
- package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
- package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
- package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
- package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
- package/dist/chunk-SZTI6EER.js +13 -0
- package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
- package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
- package/dist/chunk-TXFWZ5ZJ.js +594 -0
- package/dist/chunk-U67EN7GG.cjs +13 -0
- package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
- package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
- package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
- package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
- package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
- package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
- package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
- package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
- package/dist/color/index.cjs +4 -6
- package/dist/color/index.js +7 -9
- package/dist/effects/helpers.d.cts +6 -0
- package/dist/effects/helpers.d.ts +6 -0
- package/dist/effects/index.cjs +62 -60
- package/dist/effects/index.js +5 -3
- package/dist/effects/tools.d.cts +6 -0
- package/dist/effects/tools.d.ts +6 -0
- package/dist/export/index.cjs +7 -8
- package/dist/export/index.js +6 -7
- package/dist/extensions/index.cjs +10 -11
- package/dist/extensions/index.js +9 -10
- package/dist/gradient/index.cjs +33 -34
- package/dist/gradient/index.js +4 -5
- package/dist/image-editor/effects.d.cts +1 -1
- package/dist/image-editor/effects.d.ts +1 -1
- package/dist/image-editor/index.cjs +887 -863
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +69 -45
- package/dist/image-editor/stickers.d.cts +9 -0
- package/dist/image-editor/stickers.d.ts +9 -0
- package/dist/index.cjs +16 -17
- package/dist/index.js +10 -11
- package/dist/paint/index.cjs +6 -4
- package/dist/paint/index.js +21 -19
- package/dist/paint-editor/brushes.d.cts +1 -2
- package/dist/paint-editor/brushes.d.ts +1 -2
- package/dist/paint-editor/index.cjs +2199 -699
- package/dist/paint-editor/index.js +1577 -77
- package/dist/paint-editor/mark-settings.d.cts +104 -0
- package/dist/paint-editor/mark-settings.d.ts +104 -0
- package/dist/paint-editor/procedural.d.cts +2 -75
- package/dist/paint-editor/procedural.d.ts +2 -75
- package/dist/paint-editor/stickers.d.cts +1 -22
- package/dist/paint-editor/stickers.d.ts +1 -22
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.js +9 -9
- package/dist/stickers/index.cjs +22 -16
- package/dist/stickers/index.d.cts +1 -1
- package/dist/stickers/index.d.ts +1 -1
- package/dist/stickers/index.js +14 -8
- package/dist/stickers/tools.d.cts +57 -1
- package/dist/stickers/tools.d.ts +57 -1
- package/dist/tokens/index.cjs +3 -4
- package/dist/tokens/index.js +2 -3
- package/dist/typography/index.cjs +7 -8
- package/dist/typography/index.js +2 -3
- package/dist/vector/index.cjs +1011 -977
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +47 -13
- package/dist/vector/stickers.d.cts +11 -0
- package/dist/vector/stickers.d.ts +11 -0
- package/dist/video-editor/index.cjs +349 -350
- package/dist/video-editor/index.js +9 -10
- package/package.json +11 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -1
- package/skills/pixerate-stickers/SKILL.md +13 -1
- package/dist/chunk-7AHBW2CQ.cjs +0 -200
- package/dist/chunk-F67XMVDI.js +0 -200
- package/dist/chunk-H4AOUUBE.cjs +0 -2635
- package/dist/chunk-J7T5QZ45.js +0 -2635
- package/dist/chunk-ZEYMKDYS.cjs +0 -269
package/dist/stickers/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/stickers/index.js
CHANGED
|
@@ -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
|
-
|
|
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-
|
|
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;
|
package/dist/stickers/tools.d.ts
CHANGED
|
@@ -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;
|
package/dist/tokens/index.cjs
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
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-
|
|
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 =
|
|
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;
|
package/dist/tokens/index.js
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
tokenSlug,
|
|
56
56
|
tokensStyleDomain,
|
|
57
57
|
updateTokenVariable
|
|
58
|
-
} from "../chunk-
|
|
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-
|
|
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
|
|
21
|
+
var _chunkTFF2GTGNcjs = require('../chunk-TFF2GTGN.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
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 =
|
|
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 =
|
|
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(
|
|
567
|
-
const level =
|
|
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 :
|
|
575
|
+
const suggestion = passesAA ? void 0 : _chunkTFF2GTGNcjs.suggestAccessibleForeground.call(void 0, fg, bg, { large });
|
|
577
576
|
return {
|
|
578
577
|
ratio,
|
|
579
578
|
large,
|
package/dist/typography/index.js
CHANGED
|
@@ -18,13 +18,12 @@ import {
|
|
|
18
18
|
} from "../chunk-N4ZXW3WB.js";
|
|
19
19
|
import {
|
|
20
20
|
suggestAccessibleForeground
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-YBAPT7NL.js";
|
|
22
22
|
import {
|
|
23
23
|
contrastLevel,
|
|
24
24
|
contrastRatio,
|
|
25
25
|
parseColor
|
|
26
|
-
} from "../chunk-
|
|
27
|
-
import "../chunk-F67XMVDI.js";
|
|
26
|
+
} from "../chunk-MHLU6GRJ.js";
|
|
28
27
|
import "../chunk-6ONMQ6WF.js";
|
|
29
28
|
|
|
30
29
|
// src/typography/types.ts
|