@hankchen/canvas-editor-vue 0.3.0 → 0.5.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/canvas/CanvasSurface.d.ts +28 -1
- package/dist/canvas/{ContentTypePill.d.ts → EditOverlayToolbar.d.ts} +19 -0
- package/dist/canvas/TextEditingOverlay.d.ts +31 -3
- package/dist/canvas/index.d.ts +1 -1
- package/dist/canvas/useTextEditing.d.ts +30 -8
- package/dist/{canvas-ZMyaouKe.js → canvas-CX1RdlFC.js} +816 -437
- package/dist/canvas.js +2 -2
- package/dist/index.js +15 -14
- package/dist/layer-panel/LayerPanel.d.ts +1 -27
- package/dist/layer-panel/TemplateTableForm.d.ts +38 -0
- package/dist/layer-panel/addMenu.d.ts +20 -8
- package/dist/layer-panel/index.d.ts +6 -3
- package/dist/{layer-panel-CEyB57XM.js → layer-panel-kOceTf8H.js} +329 -243
- package/dist/layer-panel.js +2 -2
- package/dist/panel-theme.css +24 -0
- package/dist/{completionAnchor-Da8VhzMQ.js → popupPosition-Ck5Gsvjy.js} +163 -107
- package/dist/property-panel/PropertyField.d.ts +6 -0
- package/dist/property-panel/fieldSchema.d.ts +7 -1
- package/dist/property-panel/fields/ImageSrcField.d.ts +5 -1
- package/dist/property-panel/fields/ResourceValueField.d.ts +19 -0
- package/dist/property-panel/fields/TextareaField.d.ts +1 -0
- package/dist/property-panel/fields/ValueTypeSegmented.d.ts +3 -1
- package/dist/property-panel/index.d.ts +5 -3
- package/dist/property-panel/usePropertyPanel.d.ts +16 -4
- package/dist/{property-panel-DmSf_GPu.js → property-panel-B32ZBQdf.js} +472 -376
- package/dist/property-panel.js +3 -2
- package/dist/resourceTemplate-cdcQtp9a.js +246 -0
- package/dist/shared/ExpressionPathPicker.d.ts +25 -0
- package/dist/shared/completion.d.ts +14 -10
- package/dist/shared/expressionContext.d.ts +2 -2
- package/dist/shared/index.d.ts +14 -1
- package/dist/shared/mergeKey.d.ts +2 -0
- package/dist/shared/pathPickerModel.d.ts +11 -0
- package/dist/shared/popupPosition.d.ts +41 -0
- package/dist/shared/resourceTemplate.d.ts +7 -0
- package/dist/shared/useExpressionCompletion.d.ts +0 -7
- package/dist/shared/useExpressionDiagnostics.d.ts +15 -0
- package/dist/shared.js +10 -9
- package/dist/style.css +1 -1
- package/dist/uploadFile-D1RY-ji0.js +516 -0
- package/dist/usePathCompletion-Do17CQ6l.js +220 -0
- package/package.json +2 -2
- package/dist/uploadFile-DXAEX9kG.js +0 -455
- package/dist/usePathCompletion-C52F4phW.js +0 -229
- /package/dist/{property-panel → shared}/fontPicker.d.ts +0 -0
package/dist/canvas.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-
|
|
2
|
-
export { e as AlignFloatBar, n as CanvasSurface,
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-CX1RdlFC.js";
|
|
2
|
+
export { e as AlignFloatBar, n as CanvasSurface, a as ContextMenu, f as EditOverlayToolbar, l as FindBar, m as GuidesOverlay, d as Ruler, c as TextEditingOverlay, u as createGizmoOverlayPainter, h as createRafScheduler, t as drawCreateRubberBand, s as drawFindMatches, p as drawSelectionGizmo, r as useDpr, o as useFindSession, g as useTextEditing, i as watchDprChanges };
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-
|
|
2
|
-
import { a as _,
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-CX1RdlFC.js";
|
|
2
|
+
import { a as _, c as v, i as y, l as b, n as x, o as S, r as C, s as w, t as T } from "./layer-panel-kOceTf8H.js";
|
|
3
|
+
import { a as E, c as D, d as O, f as k, i as A, l as j, n as M, o as N, r as P, s as F, t as I, u as L } from "./property-panel-B32ZBQdf.js";
|
|
4
|
+
import { a as R, i as z, n as B, o as V, r as H, s as U, t as W } from "./popupPosition-Ck5Gsvjy.js";
|
|
5
|
+
import { c as G, i as K, n as q, s as J, t as Y } from "./useTransientFeedback-CTjmMmFF.js";
|
|
6
|
+
import { a as X, c as Z, i as Q, l as $, n as ee, o as te, r as ne, s as re, t as ie } from "./uploadFile-D1RY-ji0.js";
|
|
7
|
+
import { i as ae, n as oe, r as se, t as ce } from "./resourceTemplate-cdcQtp9a.js";
|
|
8
|
+
import { n as le, t as ue } from "./usePathCompletion-Do17CQ6l.js";
|
|
9
|
+
import { n as de, t as fe } from "./useViewport-D9Ipevzs.js";
|
|
10
|
+
import { n as pe, r as me, t as he } from "./useDataSourceSchema-CGbldbUj.js";
|
|
11
|
+
import { n as ge, r as _e, t as ve } from "./status-bar-_PvEXyq8.js";
|
|
12
|
+
import { t as ye } from "./useShortcutsHelp-CsyarO2P.js";
|
|
13
|
+
import { n as be, r as xe, t as Se } from "./shared-wuupBoZg.js";
|
|
13
14
|
//#region src/index.ts
|
|
14
|
-
var
|
|
15
|
+
var Ce = "@hankchen/canvas-editor-vue";
|
|
15
16
|
//#endregion
|
|
16
|
-
export {
|
|
17
|
+
export { _ as ADD_LAYER_MENU, S as ADD_MENU, w as ADD_RATIO_PRESET_MENU, v as ADD_TEXT_PRESET_MENU, K as ARM_LAYER_CREATE_HINT, e as AlignFloatBar, F as CANVAS_FIELD_SECTIONS, n as CanvasSurface, a as ContextMenu, pe as DropdownMenu, f as EditOverlayToolbar, V as ExpressionCompletionPopup, se as ExpressionPathPicker, D as FIELD_SECTIONS_BY_TYPE, ne as FONT_PICKER_KEY, l as FindBar, m as GuidesOverlay, xe as HelpDialog, E as IMAGE_UPLOAD_KEY, T as LayerPanel, Ce as PACKAGE_NAME, b as PANEL_ADD_MENU, W as POPUP_GAP, B as POPUP_MARGIN, U as PanelIcon, M as PropertyField, I as PropertyPanel, d as Ruler, ve as StatusBar, y as TemplateTableForm, c as TextEditingOverlay, R as applyCompletion, ce as attachResourceTemplate, A as controlRegistry, u as createGizmoOverlayPainter, h as createRafScheduler, J as detectShortcutPlatform, t as drawCreateRubberBand, s as drawFindMatches, p as drawSelectionGizmo, Z as expressionCompletionSource, X as expressionDiagnosticHint, $ as expressionFieldContext, j as fieldSectionsForPath, L as fieldSectionsForType, ge as formatLayerGeometry, _e as formatLayerPath, Q as injectFontPicker, N as injectImageUpload, q as isEditableEventTarget, x as isUpperHalf, O as layerRoleAt, z as measureCursorAnchor, ae as pathPickerEntries, H as placePopupInViewport, k as readField, le as rowsPathCompletionSource, ee as selectionFieldMergeKey, G as shortcutActionLabel, oe as stripResourceTemplate, ie as uploadFileFromDom, he as useDataSourceSchema, r as useDpr, me as useDropdownMenu, re as useExpressionCompletion, te as useExpressionDiagnostics, o as useFindSession, be as useHistory, C as useLayerPanel, ue as usePathCompletion, P as usePropertyPanel, de as useSelection, Se as useShortcuts, ye as useShortcutsHelp, g as useTextEditing, Y as useTransientFeedback, fe as useViewport, i as watchDprChanges };
|
|
@@ -2,31 +2,5 @@ import { EditorSession } from '@hankchen/canvas-editor';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
editor: EditorSession;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
6
|
-
rowsPathInputEl: HTMLInputElement;
|
|
7
|
-
pathPopupRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
8
|
-
state: import('..').ExpressionCompletionState;
|
|
9
|
-
}> & Readonly<{
|
|
10
|
-
onSelect?: ((index: number) => any) | undefined;
|
|
11
|
-
}>, {
|
|
12
|
-
rootEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
13
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
-
select: (index: number) => any;
|
|
15
|
-
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
16
|
-
rootRef: HTMLDivElement;
|
|
17
|
-
}, any, import('vue').ComponentProvideOptions, {
|
|
18
|
-
P: {};
|
|
19
|
-
B: {};
|
|
20
|
-
D: {};
|
|
21
|
-
C: {};
|
|
22
|
-
M: {};
|
|
23
|
-
Defaults: {};
|
|
24
|
-
}, Readonly<{
|
|
25
|
-
state: import('..').ExpressionCompletionState;
|
|
26
|
-
}> & Readonly<{
|
|
27
|
-
onSelect?: ((index: number) => any) | undefined;
|
|
28
|
-
}>, {
|
|
29
|
-
rootEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
30
|
-
}, {}, {}, {}, {}> | null;
|
|
31
|
-
}, HTMLElement>;
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
32
6
|
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EditorSession } from '@hankchen/canvas-editor';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
editor: EditorSession;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
+
cancel: () => any;
|
|
7
|
+
confirm: (rowsPath: string) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onCancel?: (() => any) | undefined;
|
|
10
|
+
onConfirm?: ((rowsPath: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
12
|
+
rowsPathInputEl: HTMLInputElement;
|
|
13
|
+
pathPopupRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
14
|
+
state: import('..').ExpressionCompletionState;
|
|
15
|
+
}> & Readonly<{
|
|
16
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
rootEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
select: (index: number) => any;
|
|
21
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
22
|
+
rootRef: HTMLDivElement;
|
|
23
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
24
|
+
P: {};
|
|
25
|
+
B: {};
|
|
26
|
+
D: {};
|
|
27
|
+
C: {};
|
|
28
|
+
M: {};
|
|
29
|
+
Defaults: {};
|
|
30
|
+
}, Readonly<{
|
|
31
|
+
state: import('..').ExpressionCompletionState;
|
|
32
|
+
}> & Readonly<{
|
|
33
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
rootEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
36
|
+
}, {}, {}, {}, {}> | null;
|
|
37
|
+
}, HTMLDivElement>;
|
|
38
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayerType, TextPresetId } from '@hankchen/canvas-editor';
|
|
1
|
+
import { LayerType, RatioPresetId, TextPresetId } from '@hankchen/canvas-editor';
|
|
2
2
|
/** 新增菜单项(spec §2.1):四类图层武装画拉(drag-create 工单 03);模板表带 rowsPath 必填表单 */
|
|
3
3
|
export type AddMenuKind = {
|
|
4
4
|
kind: 'layer';
|
|
@@ -17,15 +17,27 @@ export type AddTextPresetKind = {
|
|
|
17
17
|
label: string;
|
|
18
18
|
title: string;
|
|
19
19
|
};
|
|
20
|
+
/** 比例预设项(image-ratio-preset 工单 02,spec 决策 2):面板专用入口——应用即写建层比例槽 + 武装画拉 */
|
|
21
|
+
export type AddRatioPresetKind = {
|
|
22
|
+
kind: 'ratio-preset';
|
|
23
|
+
preset: RatioPresetId;
|
|
24
|
+
label: string;
|
|
25
|
+
title: string;
|
|
26
|
+
};
|
|
20
27
|
export declare const ADD_MENU: readonly AddMenuKind[];
|
|
21
28
|
/** 文本预设三项(text-defaults 工单 02,spec 决策 4):从内核 TEXT_PRESETS 派生
|
|
22
29
|
* (字号单一事实源,内核改档位文案自动跟随),v1 只定字号——字体缺口由新层样式槽补 */
|
|
23
30
|
export declare const ADD_TEXT_PRESET_MENU: readonly AddTextPresetKind[];
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
|
|
31
|
+
/** 比例预设六档(image-ratio-preset 工单 02,spec 决策 2):从内核 RATIO_PRESETS
|
|
32
|
+
* 派生(比例与顺序单一事实源)。title 带比例说明与画拉提示;Shift 手势瞬时反转
|
|
33
|
+
* 槽态随档位给反向提示——具名档按 Shift 临时自由、自由档按 Shift 临时钳 1:1 */
|
|
34
|
+
export declare const ADD_RATIO_PRESET_MENU: readonly AddRatioPresetKind[];
|
|
35
|
+
/** 面板「+」完整序(text-defaults 工单 02 + image-ratio-preset 工单 02,spec 决策 2/5):
|
|
36
|
+
* 文本预设三项插在「文本层」之后、比例六档平铺在「图片层」之后;工具栏派生视图
|
|
37
|
+
* ADD_LAYER_MENU 不含预设(预设只属面板) */
|
|
38
|
+
export declare const PANEL_ADD_MENU: readonly (AddMenuKind | AddTextPresetKind | AddRatioPresetKind)[];
|
|
27
39
|
/** 层型项视图(工具栏「+插入▾」消费,editor-top-toolbar 工单 03):ADD_MENU 的
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
* 四类图层项。template-table-drag-create 工单 03 起模板表项同序收入(spec 决策
|
|
41
|
+
* 5,四图层项后收尾)——视图 = ADD_MENU 全量恒等派生,工具栏与面板同序同文案;
|
|
42
|
+
* 分发差异(模板表项弹层表单、四图层项直接武装)归消费面(LayerPanel / 宿主) */
|
|
43
|
+
export declare const ADD_LAYER_MENU: readonly AddMenuKind[];
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* 图层面板域出口:图层面板组件、共享模板行路径表单(TemplateTableForm——面板菜单
|
|
3
|
+
* 与工具栏弹层共用,template-table-drag-create 工单 02)、订阅切片桥(useLayerPanel)
|
|
4
|
+
* 与新增菜单数据面(ADD_MENU/ADD_LAYER_MENU——工具栏「+插入▾」同源消费,
|
|
5
|
+
* editor-top-toolbar 工单 03;两族预设清单面板专用,image-ratio-preset 工单 02 起含比例档位)。
|
|
4
6
|
*/
|
|
5
7
|
export { default as LayerPanel } from './LayerPanel';
|
|
8
|
+
export { default as TemplateTableForm } from './TemplateTableForm';
|
|
6
9
|
export { isUpperHalf, useLayerPanel, type LayerPanelBinding } from './useLayerPanel';
|
|
7
|
-
export { ADD_LAYER_MENU, ADD_MENU, ADD_TEXT_PRESET_MENU, PANEL_ADD_MENU, type AddMenuKind, type AddTextPresetKind, } from './addMenu';
|
|
10
|
+
export { ADD_LAYER_MENU, ADD_MENU, ADD_RATIO_PRESET_MENU, ADD_TEXT_PRESET_MENU, PANEL_ADD_MENU, type AddMenuKind, type AddRatioPresetKind, type AddTextPresetKind, } from './addMenu';
|