@sealpixel/plugin-frame 1.0.0-rc.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/README.md +3 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +101 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Color, OperationBase, SourcePx } from '@sealpixel/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export type FrameStyle = 'solid' | 'inset' | 'polaroid';
|
|
4
|
+
export interface FrameDoc {
|
|
5
|
+
frame: {
|
|
6
|
+
style: FrameStyle;
|
|
7
|
+
color: Color;
|
|
8
|
+
thickness: SourcePx;
|
|
9
|
+
radius: SourcePx;
|
|
10
|
+
} | null;
|
|
11
|
+
}
|
|
12
|
+
export interface FrameSetOp extends OperationBase<'frame.set'> {
|
|
13
|
+
style?: FrameStyle | undefined;
|
|
14
|
+
color?: Color | undefined;
|
|
15
|
+
thickness?: SourcePx | undefined;
|
|
16
|
+
radius?: SourcePx | undefined;
|
|
17
|
+
}
|
|
18
|
+
export type FrameClearOp = OperationBase<'frame.clear'>;
|
|
19
|
+
declare module '@sealpixel/core' {
|
|
20
|
+
interface OperationRegistry {
|
|
21
|
+
'frame.set': FrameSetOp;
|
|
22
|
+
'frame.clear': FrameClearOp;
|
|
23
|
+
}
|
|
24
|
+
interface DocumentRegistry {
|
|
25
|
+
frame: FrameDoc;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export declare const DEFAULT_FRAME: {
|
|
29
|
+
style: FrameStyle;
|
|
30
|
+
color: Color;
|
|
31
|
+
thickness: number;
|
|
32
|
+
radius: number;
|
|
33
|
+
};
|
|
34
|
+
export declare const frameSet: import("@sealpixel/core").OperationDef<FrameDoc, FrameSetOp>;
|
|
35
|
+
export declare const frameClear: import("@sealpixel/core").OperationDef<FrameDoc, FrameClearOp>;
|
|
36
|
+
export declare const FrameOptionsSchema: z.ZodObject<{
|
|
37
|
+
styles: z.ZodArray<z.ZodEnum<{
|
|
38
|
+
solid: "solid";
|
|
39
|
+
inset: "inset";
|
|
40
|
+
polaroid: "polaroid";
|
|
41
|
+
}>>;
|
|
42
|
+
palette: z.ZodArray<z.ZodString>;
|
|
43
|
+
thicknessRange: z.ZodObject<{
|
|
44
|
+
min: z.ZodNumber;
|
|
45
|
+
max: z.ZodNumber;
|
|
46
|
+
step: z.ZodNumber;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
radiusRange: z.ZodObject<{
|
|
49
|
+
min: z.ZodNumber;
|
|
50
|
+
max: z.ZodNumber;
|
|
51
|
+
step: z.ZodNumber;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
defaults: z.ZodObject<{
|
|
54
|
+
style: z.ZodEnum<{
|
|
55
|
+
solid: "solid";
|
|
56
|
+
inset: "inset";
|
|
57
|
+
polaroid: "polaroid";
|
|
58
|
+
}>;
|
|
59
|
+
color: z.ZodString;
|
|
60
|
+
thickness: z.ZodNumber;
|
|
61
|
+
radius: z.ZodNumber;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
enforce: z.ZodBoolean;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
/**
|
|
66
|
+
* `styles`: frame styles offered. `palette`: hex swatches for the colour
|
|
67
|
+
* (empty shows the free picker only). `radiusRange`: slider bounds in source px;
|
|
68
|
+
* `thicknessRange`: accepted thicknesses (no slider, `defaults.thickness` applies).
|
|
69
|
+
* `defaults`: values a new frame starts with.
|
|
70
|
+
*/
|
|
71
|
+
export type FrameOptions = z.infer<typeof FrameOptionsSchema>;
|
|
72
|
+
export declare const FRAME_DEFAULT_OPTIONS: FrameOptions;
|
|
73
|
+
export declare const framePlugin: import("@sealpixel/plugin-sdk").ConfigurablePlugin<"frame", FrameDoc, {
|
|
74
|
+
styles: ("solid" | "inset" | "polaroid")[];
|
|
75
|
+
palette: string[];
|
|
76
|
+
thicknessRange: {
|
|
77
|
+
min: number;
|
|
78
|
+
max: number;
|
|
79
|
+
step: number;
|
|
80
|
+
};
|
|
81
|
+
radiusRange: {
|
|
82
|
+
min: number;
|
|
83
|
+
max: number;
|
|
84
|
+
step: number;
|
|
85
|
+
};
|
|
86
|
+
defaults: {
|
|
87
|
+
style: "solid" | "inset" | "polaroid";
|
|
88
|
+
color: string;
|
|
89
|
+
thickness: number;
|
|
90
|
+
radius: number;
|
|
91
|
+
};
|
|
92
|
+
enforce: boolean;
|
|
93
|
+
}>;
|
|
94
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAExD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE;QAAE,KAAK,EAAE,UAAU,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CAC1F;AAED,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,WAAW,CAAC;IAC5D,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC/B;AACD,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;AAExD,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,iBAAiB;QACzB,WAAW,EAAE,UAAU,CAAC;QACxB,aAAa,EAAE,YAAY,CAAC;KAC7B;IACD,UAAU,gBAAgB;QACxB,KAAK,EAAE,QAAQ,CAAC;KACjB;CACF;AAMD,eAAO,MAAM,aAAa;WACN,UAAU;WACL,KAAK;;;CAG7B,CAAC;AAEF,eAAO,MAAM,QAAQ,8DAuBnB,CAAC;AACH,eAAO,MAAM,UAAU,gEAIrB,CAAC;AAQH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAU8D,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,qBAAqB,EAAE,YAOnC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;EAkCtB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineOperation, definePlugin } from '@sealpixel/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const channel = z.number().min(0).max(1);
|
|
4
|
+
const px = z.number().finite().min(0).max(4096);
|
|
5
|
+
const base = { id: z.string().min(1), at: z.number().optional() };
|
|
6
|
+
export const DEFAULT_FRAME = {
|
|
7
|
+
style: 'solid',
|
|
8
|
+
color: [1, 1, 1, 1],
|
|
9
|
+
thickness: 24,
|
|
10
|
+
radius: 0,
|
|
11
|
+
};
|
|
12
|
+
export const frameSet = defineOperation({
|
|
13
|
+
type: 'frame.set',
|
|
14
|
+
schema: z
|
|
15
|
+
.object({
|
|
16
|
+
type: z.literal('frame.set'),
|
|
17
|
+
...base,
|
|
18
|
+
style: z.enum(['solid', 'inset', 'polaroid']).optional(),
|
|
19
|
+
color: z.tuple([channel, channel, channel, channel]).optional(),
|
|
20
|
+
thickness: px.optional(),
|
|
21
|
+
radius: px.optional(),
|
|
22
|
+
})
|
|
23
|
+
.strict(),
|
|
24
|
+
reduce: (slice, op) => {
|
|
25
|
+
const prev = slice.frame ?? DEFAULT_FRAME;
|
|
26
|
+
return {
|
|
27
|
+
frame: {
|
|
28
|
+
style: op.style ?? prev.style,
|
|
29
|
+
color: op.color ?? prev.color,
|
|
30
|
+
thickness: op.thickness ?? prev.thickness,
|
|
31
|
+
radius: op.radius ?? prev.radius,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
export const frameClear = defineOperation({
|
|
37
|
+
type: 'frame.clear',
|
|
38
|
+
schema: z.object({ type: z.literal('frame.clear'), ...base }).strict(),
|
|
39
|
+
reduce: () => ({ frame: null }),
|
|
40
|
+
});
|
|
41
|
+
const hex = z.string().regex(/^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/, 'hex colour');
|
|
42
|
+
const range = z
|
|
43
|
+
.object({ min: px, max: px, step: z.number().positive() })
|
|
44
|
+
.strict()
|
|
45
|
+
.refine((r) => r.min < r.max, 'min must be below max');
|
|
46
|
+
const StyleSchema = z.enum(['solid', 'inset', 'polaroid']);
|
|
47
|
+
export const FrameOptionsSchema = z
|
|
48
|
+
.object({
|
|
49
|
+
styles: z.array(StyleSchema).min(1),
|
|
50
|
+
palette: z.array(hex),
|
|
51
|
+
thicknessRange: range,
|
|
52
|
+
radiusRange: range,
|
|
53
|
+
defaults: z.object({ style: StyleSchema, color: hex, thickness: px, radius: px }).strict(),
|
|
54
|
+
enforce: z.boolean(),
|
|
55
|
+
})
|
|
56
|
+
.strict()
|
|
57
|
+
.refine((o) => o.styles.includes(o.defaults.style), 'defaults.style must be one of styles');
|
|
58
|
+
export const FRAME_DEFAULT_OPTIONS = {
|
|
59
|
+
styles: ['solid', 'inset', 'polaroid'],
|
|
60
|
+
palette: [],
|
|
61
|
+
thicknessRange: { min: 0, max: 512, step: 1 },
|
|
62
|
+
radiusRange: { min: 0, max: 512, step: 1 },
|
|
63
|
+
defaults: { style: 'solid', color: '#ffffff', thickness: 24, radius: 0 },
|
|
64
|
+
enforce: false,
|
|
65
|
+
};
|
|
66
|
+
export const framePlugin = definePlugin({
|
|
67
|
+
id: 'frame',
|
|
68
|
+
version: 1,
|
|
69
|
+
operations: [frameSet, frameClear],
|
|
70
|
+
initialDocument: { frame: null },
|
|
71
|
+
stage: { name: 'frame', order: 600 },
|
|
72
|
+
toPlan: (doc) => (doc.frame === null || doc.frame.thickness === 0 ? null : { ...doc.frame }),
|
|
73
|
+
kernel: { kind: 'core' },
|
|
74
|
+
options: {
|
|
75
|
+
schema: FrameOptionsSchema,
|
|
76
|
+
defaults: FRAME_DEFAULT_OPTIONS,
|
|
77
|
+
describe: {
|
|
78
|
+
styles: 'Frame styles offered (solid, inset, polaroid).',
|
|
79
|
+
palette: 'Hex swatches for the frame colour; empty shows the free picker only.',
|
|
80
|
+
thicknessRange: 'Thicknesses accepted with enforce, in source px; the UI has no slider, defaults.thickness applies.',
|
|
81
|
+
radiusRange: 'Bounds and step of the corner radius slider, in source px.',
|
|
82
|
+
defaults: 'Values a new frame starts with.',
|
|
83
|
+
enforce: 'Reject styles, thickness or radius outside the options.',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
validate: (op, { options }) => {
|
|
87
|
+
if (op.type !== 'frame.set' || !options.enforce)
|
|
88
|
+
return null;
|
|
89
|
+
const o = op;
|
|
90
|
+
if (o.style !== undefined && !options.styles.includes(o.style))
|
|
91
|
+
return `style "${o.style}" is not offered`;
|
|
92
|
+
const t = options.thicknessRange;
|
|
93
|
+
if (o.thickness !== undefined && (o.thickness < t.min - 1e-9 || o.thickness > t.max + 1e-9))
|
|
94
|
+
return `thickness must stay within ${t.min}..${t.max}`;
|
|
95
|
+
const r = options.radiusRange;
|
|
96
|
+
if (o.radius !== undefined && (o.radius < r.min - 1e-9 || o.radius > r.max + 1e-9))
|
|
97
|
+
return `radius must stay within ${r.min}..${r.max}`;
|
|
98
|
+
return null;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AK,kBAAkB,CAAC;QAC7C,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;QACjC,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC;YACzF,OAAO,8BAA8B,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;QACzD,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC;YAChF,OAAO,2BAA2B,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sealpixel/plugin-frame",
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
4
|
+
"description": "Solid, inset and polaroid frames drawn inside the image bounds.",
|
|
5
|
+
"license": "BUSL-1.1",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/9feet/sealpixel.git",
|
|
9
|
+
"directory": "packages/plugins/frame"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://docs.sealpixel.dev",
|
|
12
|
+
"bugs": "https://github.com/9feet/sealpixel/issues",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [
|
|
20
|
+
"sealpixel-plugin"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc -p tsconfig.build.json",
|
|
31
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
32
|
+
"test": "vitest run"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@sealpixel/plugin-sdk": "workspace:*"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@sealpixel/core": "workspace:*",
|
|
39
|
+
"zod": "^4.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@sealpixel/config": "workspace:*",
|
|
43
|
+
"@sealpixel/core": "workspace:*",
|
|
44
|
+
"@types/node": "^24.0.0",
|
|
45
|
+
"typescript": "^5.9.0",
|
|
46
|
+
"vitest": "^4.0.0",
|
|
47
|
+
"zod": "^4.0.0"
|
|
48
|
+
}
|
|
49
|
+
}
|