@magicpages/kalotyp-ui 0.1.2 → 0.2.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/icons.d.ts +1 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/index.js +11350 -928
- package/dist/index.js.map +1 -1
- package/dist/kalotyp-ui.css +1 -1
- package/dist/plugins/annotate/coord-inputs.d.ts +10 -2
- package/dist/plugins/annotate/coord-inputs.d.ts.map +1 -1
- package/dist/plugins/annotate/emoji-data.d.ts +27 -0
- package/dist/plugins/annotate/emoji-data.d.ts.map +1 -0
- package/dist/plugins/annotate/emoji-images.d.ts +47 -0
- package/dist/plugins/annotate/emoji-images.d.ts.map +1 -0
- package/dist/plugins/annotate/emoji-picker.d.ts +29 -0
- package/dist/plugins/annotate/emoji-picker.d.ts.map +1 -0
- package/dist/plugins/annotate/fonts-loader.d.ts +22 -0
- package/dist/plugins/annotate/fonts-loader.d.ts.map +1 -0
- package/dist/plugins/annotate/mount.d.ts.map +1 -1
- package/dist/plugins/annotate/panel.d.ts +20 -1
- package/dist/plugins/annotate/panel.d.ts.map +1 -1
- package/dist/plugins/annotate/plugin.d.ts.map +1 -1
- package/dist/plugins/annotate/render.d.ts +3 -3
- package/dist/plugins/annotate/render.d.ts.map +1 -1
- package/dist/plugins/annotate/selection.d.ts +29 -1
- package/dist/plugins/annotate/selection.d.ts.map +1 -1
- package/dist/plugins/annotate/text-editor.d.ts +6 -2
- package/dist/plugins/annotate/text-editor.d.ts.map +1 -1
- package/dist/plugins/annotate/tools.d.ts +11 -0
- package/dist/plugins/annotate/tools.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* annotation's image-space anchor. Using a `<div>` instead of a
|
|
6
6
|
* `<textarea>` lets us match the canvas-side font and size precisely
|
|
7
7
|
* (textareas restrict the visible padding/size combination on some
|
|
8
|
-
* browsers). The element
|
|
9
|
-
*
|
|
8
|
+
* browsers). The element auto-sizes to its content and grows with the
|
|
9
|
+
* text the user types (line breaks via Shift+Enter).
|
|
10
10
|
*
|
|
11
11
|
* Lifecycle:
|
|
12
12
|
* - `open(shape, viewport)`: position the editor over the shape,
|
|
@@ -27,6 +27,10 @@ export interface TextEditorOptions {
|
|
|
27
27
|
}
|
|
28
28
|
export interface TextEditorHandle {
|
|
29
29
|
open(shape: TextShape, viewport: Viewport, source: SourceImage): void;
|
|
30
|
+
/** Re-apply font/colour/alignment/position to the open editor without
|
|
31
|
+
* resetting its text or moving the caret (used when panel controls
|
|
32
|
+
* restyle the text mid-edit). */
|
|
33
|
+
restyle(shape: TextShape, viewport: Viewport): void;
|
|
30
34
|
close(): void;
|
|
31
35
|
destroy(): void;
|
|
32
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.d.ts","sourceRoot":"","sources":["../../../src/plugins/annotate/text-editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"text-editor.d.ts","sourceRoot":"","sources":["../../../src/plugins/annotate/text-editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,SAAS,EACd,KAAK,QAAQ,EACd,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,IAAI,CAAC;IACjB,QAAQ,IAAI,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IACtE;;sCAEkC;IAClC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACpD,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAkI5E"}
|
|
@@ -35,6 +35,17 @@ export declare function startArrowGesture(ctx: ToolGestureContext, origin: Point
|
|
|
35
35
|
export declare function startFreehandGesture(ctx: ToolGestureContext, origin: PointerEvent, options: {
|
|
36
36
|
kind: 'freehand' | 'highlight';
|
|
37
37
|
}): DragHandlers;
|
|
38
|
+
/**
|
|
39
|
+
* Emoji sticker placement. Unlike the drag-to-create tools, an emoji is placed
|
|
40
|
+
* on press (centred on the pointer at the armed size) and a drag before release
|
|
41
|
+
* just repositions it — so a plain tap is a valid placement, and a press-drag
|
|
42
|
+
* lets you fine-tune the drop point in one gesture. The committed sticker is
|
|
43
|
+
* selected so its resize handles are immediately available.
|
|
44
|
+
*/
|
|
45
|
+
export declare function startEmojiGesture(ctx: ToolGestureContext, origin: PointerEvent, spec: {
|
|
46
|
+
emoji: string;
|
|
47
|
+
size: number;
|
|
48
|
+
}): DragHandlers;
|
|
38
49
|
/**
|
|
39
50
|
* Body-drag (move) gesture used by the select tool when the user
|
|
40
51
|
* presses on an already-selected shape and drags. Translates the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/plugins/annotate/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/plugins/annotate/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,aAAa,EAYlB,KAAK,KAAK,EAEV,KAAK,KAAK,EACV,KAAK,KAAK,EAEX,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK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AE,EAAE,MAAM,KAAK,KAAK,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAC9B,YAAY,CAgBd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicpages/kalotyp-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Default UI for Kalotyp — an open-source image editor for Ghost CMS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jannis Fedoruk-Betschki <jannis@magicpages.co>",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"lucide": "^1.17.0",
|
|
42
|
-
"@magicpages/kalotyp-core": "0.
|
|
42
|
+
"@magicpages/kalotyp-core": "0.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"jsdom": "29.1.1",
|