@hankchen/canvas-editor-vue 0.0.0-stage → 0.1.1

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 (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -2
  3. package/dist/canvas/AlignFloatBar.d.ts +6 -0
  4. package/dist/canvas/CanvasSurface.d.ts +131 -0
  5. package/dist/canvas/ContentTypePill.d.ts +14 -0
  6. package/dist/canvas/ContextMenu.d.ts +14 -0
  7. package/dist/canvas/FindBar.d.ts +13 -0
  8. package/dist/canvas/GuidesOverlay.d.ts +18 -0
  9. package/dist/canvas/Ruler.d.ts +24 -0
  10. package/dist/canvas/TextEditingOverlay.d.ts +70 -0
  11. package/dist/canvas/createBand.d.ts +6 -0
  12. package/dist/canvas/findHighlight.d.ts +12 -0
  13. package/dist/canvas/gizmo.d.ts +24 -0
  14. package/dist/canvas/guideSnap.d.ts +3 -0
  15. package/dist/canvas/index.d.ts +20 -0
  16. package/dist/canvas/resizeHandles.d.ts +3 -0
  17. package/dist/canvas/scheduler.d.ts +2 -0
  18. package/dist/canvas/useDpr.d.ts +10 -0
  19. package/dist/canvas/useFindSession.d.ts +13 -0
  20. package/dist/canvas/useTextEditing.d.ts +53 -0
  21. package/dist/canvas-CS4SmrIO.js +1649 -0
  22. package/dist/canvas.js +2 -0
  23. package/dist/completionAnchor-4lhR2kJz.js +273 -0
  24. package/dist/createLucideIcon-CMq8ZKo2.js +96 -0
  25. package/dist/dist-DuXLYZZ9.js +341 -0
  26. package/dist/index.d.ts +19 -0
  27. package/dist/index.js +16 -0
  28. package/dist/layer-panel/LayerPanel.d.ts +32 -0
  29. package/dist/layer-panel/addMenu.d.ts +18 -0
  30. package/dist/layer-panel/index.d.ts +7 -0
  31. package/dist/layer-panel/useLayerPanel.d.ts +12 -0
  32. package/dist/layer-panel-ArP66_vZ.js +652 -0
  33. package/dist/layer-panel.js +2 -0
  34. package/dist/layerPath-BRZK9ka1.js +2160 -0
  35. package/dist/panel-theme.css +254 -0
  36. package/dist/property-panel/PropertyField.d.ts +65 -0
  37. package/dist/property-panel/PropertyPanel.d.ts +6 -0
  38. package/dist/property-panel/controlStyles.d.ts +17 -0
  39. package/dist/property-panel/controls.d.ts +3 -0
  40. package/dist/property-panel/fieldSchema.d.ts +116 -0
  41. package/dist/property-panel/fields/AlignField.d.ts +11 -0
  42. package/dist/property-panel/fields/AnchorDisclosureField.d.ts +16 -0
  43. package/dist/property-panel/fields/BooleanField.d.ts +13 -0
  44. package/dist/property-panel/fields/BorderField.d.ts +14 -0
  45. package/dist/property-panel/fields/BorderWidthInput.d.ts +14 -0
  46. package/dist/property-panel/fields/ColorField.d.ts +13 -0
  47. package/dist/property-panel/fields/FontField.d.ts +15 -0
  48. package/dist/property-panel/fields/ImageSrcField.d.ts +20 -0
  49. package/dist/property-panel/fields/NumberField.d.ts +13 -0
  50. package/dist/property-panel/fields/PaddingField.d.ts +14 -0
  51. package/dist/property-panel/fields/PairField.d.ts +19 -0
  52. package/dist/property-panel/fields/SelectField.d.ts +11 -0
  53. package/dist/property-panel/fields/ShorthandModeButton.d.ts +13 -0
  54. package/dist/property-panel/fields/TextField.d.ts +13 -0
  55. package/dist/property-panel/fields/TextareaField.d.ts +13 -0
  56. package/dist/property-panel/fields/ValueTypeSegmented.d.ts +10 -0
  57. package/dist/property-panel/fields/index.d.ts +16 -0
  58. package/dist/property-panel/fontPicker.d.ts +13 -0
  59. package/dist/property-panel/imageUpload.d.ts +11 -0
  60. package/dist/property-panel/index.d.ts +13 -0
  61. package/dist/property-panel/shorthand.d.ts +28 -0
  62. package/dist/property-panel/usePropertyPanel.d.ts +51 -0
  63. package/dist/property-panel/useShorthandMode.d.ts +18 -0
  64. package/dist/property-panel-jt_rsTVW.js +1719 -0
  65. package/dist/property-panel.js +2 -0
  66. package/dist/shared/DropdownMenu.d.ts +47 -0
  67. package/dist/shared/ExpressionCompletionPopup.d.ts +14 -0
  68. package/dist/shared/HelpDialog.d.ts +12 -0
  69. package/dist/shared/PanelIcon.d.ts +14 -0
  70. package/dist/shared/completion.d.ts +49 -0
  71. package/dist/shared/completionAnchor.d.ts +28 -0
  72. package/dist/shared/editableTarget.d.ts +5 -0
  73. package/dist/shared/expressionContext.d.ts +22 -0
  74. package/dist/shared/index.d.ts +37 -0
  75. package/dist/shared/rowsPathCompletionSource.d.ts +3 -0
  76. package/dist/shared/shortcutsHelp.d.ts +30 -0
  77. package/dist/shared/uploadFile.d.ts +2 -0
  78. package/dist/shared/useDataSourceSchema.d.ts +3 -0
  79. package/dist/shared/useDropdownMenu.d.ts +51 -0
  80. package/dist/shared/useExpressionCompletion.d.ts +45 -0
  81. package/dist/shared/useHistory.d.ts +7 -0
  82. package/dist/shared/usePathCompletion.d.ts +18 -0
  83. package/dist/shared/useSelection.d.ts +3 -0
  84. package/dist/shared/useShortcuts.d.ts +2 -0
  85. package/dist/shared/useShortcutsHelp.d.ts +9 -0
  86. package/dist/shared/useTransientFeedback.d.ts +10 -0
  87. package/dist/shared/useViewport.d.ts +3 -0
  88. package/dist/shared-D9zYUQaw.js +123 -0
  89. package/dist/shared.js +9 -0
  90. package/dist/status-bar/StatusBar.d.ts +17 -0
  91. package/dist/status-bar/index.d.ts +9 -0
  92. package/dist/status-bar/layerGeometryLabel.d.ts +13 -0
  93. package/dist/status-bar/layerPathLabel.d.ts +2 -0
  94. package/dist/status-bar/useDoc.d.ts +3 -0
  95. package/dist/status-bar-BhhrVoBZ.js +194 -0
  96. package/dist/status-bar.js +2 -0
  97. package/dist/style.css +2 -0
  98. package/dist/uploadFile-CutE_xI-.js +330 -0
  99. package/dist/useDataSourceSchema-C924m8fc.js +237 -0
  100. package/dist/usePathCompletion-DkHoGla4.js +228 -0
  101. package/dist/useShortcutsHelp-DTC3yRil.js +19 -0
  102. package/dist/useTransientFeedback-gS9Xa9GY.js +477 -0
  103. package/dist/useViewport-BLe2ise1.js +18 -0
  104. package/package.json +77 -3
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @hankchen/canvas-editor-vue Vue 3 薄绑定公共出口。
3
+ *
4
+ * src 按领域分域组织:canvas(画布表面及其内挂 overlay/gizmo/调度)、
5
+ * property-panel(schema 驱动属性面板,内含 fields/ 字段控件)、
6
+ * layer-panel(图层面板)、status-bar(状态栏)、shared(跨域切片桥)。
7
+ * 域之间禁止横向 import,跨域消费一律收口 shared——由 dependency-cruiser
8
+ * 域隔离规则(editor-vue-*-isolation)锁定。
9
+ * 宿主可从包根取全量符号,也可按域子路径细粒度引用
10
+ * (@hankchen/canvas-editor-vue/canvas 等,见 package.json exports)。
11
+ * 红线:只依赖 editor 内核,不得绕过内核直接 import canvas 或
12
+ * browser-renderer。
13
+ */
14
+ export declare const PACKAGE_NAME: "@hankchen/canvas-editor-vue";
15
+ export * from './canvas/index.js';
16
+ export * from './property-panel/index.js';
17
+ export * from './layer-panel/index.js';
18
+ export * from './status-bar/index.js';
19
+ export * from './shared/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
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-CS4SmrIO.js";
2
+ import { a as _, i as v, n as y, r as b, t as x } from "./layer-panel-ArP66_vZ.js";
3
+ import { a as S, c as C, d as w, f as T, i as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F } from "./property-panel-jt_rsTVW.js";
4
+ import { i as I, n as L, r as R, t as z } from "./completionAnchor-4lhR2kJz.js";
5
+ import { n as B, o as V, r as H, s as U, t as W } from "./useTransientFeedback-gS9Xa9GY.js";
6
+ import { i as G, n as K, r as q, t as J } from "./uploadFile-CutE_xI-.js";
7
+ import { n as Y, t as X } from "./usePathCompletion-DkHoGla4.js";
8
+ import { n as Z, t as Q } from "./useViewport-BLe2ise1.js";
9
+ import { n as $, r as ee, t as te } from "./useDataSourceSchema-C924m8fc.js";
10
+ import { n as ne, r as re, t as ie } from "./status-bar-BhhrVoBZ.js";
11
+ import { t as ae } from "./useShortcutsHelp-DTC3yRil.js";
12
+ import { n as oe, r as se, t as ce } from "./shared-D9zYUQaw.js";
13
+ //#region src/index.ts
14
+ var le = "@hankchen/canvas-editor-vue";
15
+ //#endregion
16
+ export { v as ADD_LAYER_MENU, _ as ADD_MENU, H as ARM_LAYER_CREATE_HINT, e as AlignFloatBar, D as CANVAS_FIELD_SECTIONS, n as CanvasSurface, f as ContentTypePill, a as ContextMenu, $ as DropdownMenu, R as ExpressionCompletionPopup, F as FIELD_SECTIONS_BY_TYPE, N as FONT_PICKER_KEY, l as FindBar, m as GuidesOverlay, se as HelpDialog, S as IMAGE_UPLOAD_KEY, x as LayerPanel, le as PACKAGE_NAME, I as PanelIcon, k as PropertyField, P as PropertyPanel, d as Ruler, ie as StatusBar, c as TextEditingOverlay, L as applyCompletion, E as controlRegistry, u as createGizmoOverlayPainter, h as createRafScheduler, V as detectShortcutPlatform, t as drawCreateRubberBand, s as drawFindMatches, p as drawSelectionGizmo, q as expressionCompletionSource, G as expressionFieldContext, w as fieldSectionsForPath, T as fieldSectionsForType, ne as formatLayerGeometry, re as formatLayerPath, C as injectFontPicker, A as injectImageUpload, B as isEditableEventTarget, y as isUpperHalf, j as layerRoleAt, z as measureCursorAnchor, O as readField, Y as rowsPathCompletionSource, U as shortcutActionLabel, J as uploadFileFromDom, te as useDataSourceSchema, r as useDpr, ee as useDropdownMenu, K as useExpressionCompletion, o as useFindSession, oe as useHistory, b as useLayerPanel, X as usePathCompletion, M as usePropertyPanel, Z as useSelection, ce as useShortcuts, ae as useShortcutsHelp, g as useTextEditing, W as useTransientFeedback, Q as useViewport, i as watchDprChanges };
@@ -0,0 +1,32 @@
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, {}, 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>;
32
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { LayerType } from '@hankchen/canvas-editor';
2
+ /** 新增菜单项(spec §2.1):四类图层武装画拉(drag-create 工单 03);模板表带 rowsPath 必填表单 */
3
+ export type AddMenuKind = {
4
+ kind: 'layer';
5
+ type: LayerType;
6
+ label: string;
7
+ title: string;
8
+ } | {
9
+ kind: 'template-table';
10
+ label: string;
11
+ title: string;
12
+ };
13
+ export declare const ADD_MENU: readonly AddMenuKind[];
14
+ /** 层型项视图(工具栏「+插入▾」消费,editor-top-toolbar 工单 03):ADD_MENU 的
15
+ * 四类图层项,模板表项不进工具栏 */
16
+ export declare const ADD_LAYER_MENU: readonly Extract<AddMenuKind, {
17
+ kind: 'layer';
18
+ }>[];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 图层面板域出口:图层面板组件、订阅切片桥(useLayerPanel)与新增菜单数据面
3
+ * (ADD_MENU/ADD_LAYER_MENU——工具栏「+插入▾」同源消费,editor-top-toolbar 工单 03)。
4
+ */
5
+ export { default as LayerPanel } from './LayerPanel';
6
+ export { isUpperHalf, useLayerPanel, type LayerPanelBinding } from './useLayerPanel';
7
+ export { ADD_LAYER_MENU, ADD_MENU, type AddMenuKind } from './addMenu';
@@ -0,0 +1,12 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { LayerOutlineNode, EditorSession, LayerPath } from '@hankchen/canvas-editor';
3
+ export interface LayerPanelBinding {
4
+ readonly outline: ComputedRef<readonly LayerOutlineNode[]>;
5
+ readonly selection: ComputedRef<LayerPath | null>;
6
+ readonly hovered: ComputedRef<LayerPath | null>;
7
+ /** 重命名会话(工单 09):正在行内改名的根层路径;null = 非编辑态 */
8
+ readonly renaming: ComputedRef<LayerPath | null>;
9
+ }
10
+ export declare function useLayerPanel(editor: EditorSession): LayerPanelBinding;
11
+ /** dragover 落点判定:指针纵移落在目标行上半吗(行高退化时视为下半——jsdom/隐藏行兜底) */
12
+ export declare function isUpperHalf(offsetY: number, rowHeight: number): boolean;