@printstack/print-studio 0.1.2 → 0.1.3

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.
@@ -57,8 +57,8 @@ declare const ButtonGroup: import('vue').DefineComponent<import('vue').ExtractPr
57
57
  }>, {
58
58
  loading: boolean | undefined;
59
59
  gap: number | undefined;
60
+ wrap: boolean | undefined;
60
61
  size: "small" | "medium" | "large" | undefined;
61
62
  disabled: boolean | undefined;
62
- wrap: boolean | undefined;
63
63
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
64
64
  export { ButtonGroup as default };
package/core/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export { defineElement, ElementRegistry, elementRegistry, } from './element-regi
3
3
  export type { ElementDefinition, ElementOverflowContext, ElementOverflowResult, } from './element-registry';
4
4
  export { DesignerException } from './errors';
5
5
  export * from './types';
6
+ export { createBuiltinElementRegistry } from '../elements';
package/core.js CHANGED
@@ -1,48 +1,48 @@
1
- import { G as e, U as t, W as n, c as r, f as i, n as a, p as o, u as s } from "./document-model-Cc5RoO4j.js";
2
- import { A as c, B as l } from "./cloneDeep-waBDTGc3.js";
1
+ import { Jt as e, Yt as t, _t as n, ht as r, n as i, pt as a, qt as o, st as s, vt as c } from "./elements-YX-XUHtf.js";
2
+ import { A as l, B as u } from "./cloneDeep-waBDTGc3.js";
3
3
  // src/core/types.ts
4
- var u = [
4
+ var d = [
5
5
  {
6
6
  height: 297,
7
7
  get label() {
8
- return l("core.types.a4Portrait");
8
+ return u("core.types.a4Portrait");
9
9
  },
10
10
  width: 210
11
11
  },
12
12
  {
13
13
  height: 210,
14
14
  get label() {
15
- return l("core.types.a4Landscape");
15
+ return u("core.types.a4Landscape");
16
16
  },
17
17
  width: 297
18
18
  },
19
19
  {
20
20
  height: 210,
21
21
  get label() {
22
- return l("core.types.a5Portrait");
22
+ return u("core.types.a5Portrait");
23
23
  },
24
24
  width: 148
25
25
  },
26
26
  {
27
27
  height: 279.4,
28
28
  get label() {
29
- return l("core.types.letter");
29
+ return u("core.types.letter");
30
30
  },
31
31
  width: 215.9
32
32
  },
33
33
  {
34
34
  height: 200,
35
35
  get label() {
36
- return l("core.types.receipt80mm");
36
+ return u("core.types.receipt80mm");
37
37
  },
38
38
  width: 80
39
39
  },
40
40
  {
41
41
  height: 160,
42
42
  get label() {
43
- return l("core.types.receipt58mm");
43
+ return u("core.types.receipt58mm");
44
44
  },
45
45
  width: 58
46
46
  }
47
47
  ];
48
- export { a as DOCUMENT_VERSION, c as DesignerException, t as ElementRegistry, u as PAGE_PRESETS, r as createElement, s as createPage, i as createTemplate, n as defineElement, o as deserializeDocument, e as elementRegistry };
48
+ export { s as DOCUMENT_VERSION, l as DesignerException, o as ElementRegistry, d as PAGE_PRESETS, i as createBuiltinElementRegistry, a as createElement, r as createPage, n as createTemplate, e as defineElement, c as deserializeDocument, t as elementRegistry };
@@ -3257,7 +3257,7 @@ export declare function createFacadeAccess(ctx: EditorContext): {
3257
3257
  setRenamingId: (id: null | string) => void;
3258
3258
  single: import('vue').ComputedRef<import('../..').ElementNode | null>;
3259
3259
  unlockedNodes: import('vue').ComputedRef<import('../..').ElementNode[]>;
3260
- }, "reset" | "set" | "clear" | "all" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
3260
+ }, "reset" | "set" | "all" | "clear" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
3261
3261
  template: import('pinia').Store<"editor-template", Pick<{
3262
3262
  activatePage: (pageId: string) => void;
3263
3263
  applyToPages: (pageIds: string[], templateId: string) => void;
@@ -5495,7 +5495,7 @@ export declare function createFacadeAccess(ctx: EditorContext): {
5495
5495
  sequence: number;
5496
5496
  };
5497
5497
  }, "bringToFront" | "close" | "configure" | "open" | "nextZIndex">>;
5498
- }, "followBlock" | "dataSource" | "elementGroup" | "tutorial" | "layout" | "page" | "view" | "element" | "repeatGroup" | "canvas" | "template" | "guide" | "selection" | "rendering" | "zIndex" | "ui" | "clipboard" | "config" | "document" | "history" | "navigation" | "panel" | "plugin" | "scope">, Pick<{
5498
+ }, "followBlock" | "dataSource" | "elementGroup" | "tutorial" | "layout" | "page" | "view" | "element" | "repeatGroup" | "canvas" | "template" | "guide" | "scope" | "selection" | "rendering" | "zIndex" | "ui" | "clipboard" | "config" | "document" | "history" | "navigation" | "panel" | "plugin">, Pick<{
5499
5499
  canvas: import('pinia').Store<"editor-canvas", Pick<{
5500
5500
  getPage: import('vue').ComputedRef<(id: string) => import('../..').PageNode | undefined>;
5501
5501
  resolve: import('vue').ComputedRef<(page: import('../..').PageNode, nodes: import('../..').ElementNode[], options?: {
@@ -8745,7 +8745,7 @@ export declare function createFacadeAccess(ctx: EditorContext): {
8745
8745
  setRenamingId: (id: null | string) => void;
8746
8746
  single: import('vue').ComputedRef<import('../..').ElementNode | null>;
8747
8747
  unlockedNodes: import('vue').ComputedRef<import('../..').ElementNode[]>;
8748
- }, "reset" | "set" | "clear" | "all" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
8748
+ }, "reset" | "set" | "all" | "clear" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
8749
8749
  template: import('pinia').Store<"editor-template", Pick<{
8750
8750
  activatePage: (pageId: string) => void;
8751
8751
  applyToPages: (pageIds: string[], templateId: string) => void;
@@ -14233,7 +14233,7 @@ export declare function createFacadeAccess(ctx: EditorContext): {
14233
14233
  setRenamingId: (id: null | string) => void;
14234
14234
  single: import('vue').ComputedRef<import('../..').ElementNode | null>;
14235
14235
  unlockedNodes: import('vue').ComputedRef<import('../..').ElementNode[]>;
14236
- }, "reset" | "set" | "clear" | "all" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
14236
+ }, "reset" | "set" | "all" | "clear" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
14237
14237
  template: import('pinia').Store<"editor-template", Pick<{
14238
14238
  activatePage: (pageId: string) => void;
14239
14239
  applyToPages: (pageIds: string[], templateId: string) => void;
@@ -3,4 +3,4 @@ import { EditorContext } from '../context/editor-context';
3
3
  export interface UsePrintStudioOptions extends PrintStudioOptions {
4
4
  context?: EditorContext;
5
5
  }
6
- export declare function usePrintStudio(options?: UsePrintStudioOptions): DesignStudio;
6
+ export declare function useDesigner(options?: UsePrintStudioOptions): DesignStudio;
@@ -3249,7 +3249,7 @@ export declare function defineEditorStore(options?: DocumentStoreOptions): impor
3249
3249
  setRenamingId: (id: null | string) => void;
3250
3250
  single: import('vue').ComputedRef<import('../..').ElementNode | null>;
3251
3251
  unlockedNodes: import('vue').ComputedRef<import('../..').ElementNode[]>;
3252
- }, "reset" | "set" | "clear" | "all" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
3252
+ }, "reset" | "set" | "all" | "clear" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
3253
3253
  template: import('pinia').Store<"editor-template", Pick<{
3254
3254
  activatePage: (pageId: string) => void;
3255
3255
  applyToPages: (pageIds: string[], templateId: string) => void;
@@ -8738,7 +8738,7 @@ export declare const useEditorStore: import('pinia').SetupStoreDefinition<"edito
8738
8738
  setRenamingId: (id: null | string) => void;
8739
8739
  single: import('vue').ComputedRef<import('../..').ElementNode | null>;
8740
8740
  unlockedNodes: import('vue').ComputedRef<import('../..').ElementNode[]>;
8741
- }, "reset" | "set" | "clear" | "all" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
8741
+ }, "reset" | "set" | "all" | "clear" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
8742
8742
  template: import('pinia').Store<"editor-template", Pick<{
8743
8743
  activatePage: (pageId: string) => void;
8744
8744
  applyToPages: (pageIds: string[], templateId: string) => void;
@@ -98,4 +98,4 @@ export declare function createSelectionStore(deps: {
98
98
  setRenamingId: (id: null | string) => void;
99
99
  single: import('vue').ComputedRef<ElementNode | null>;
100
100
  unlockedNodes: import('vue').ComputedRef<ElementNode[]>;
101
- }, "reset" | "set" | "clear" | "all" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
101
+ }, "reset" | "set" | "all" | "clear" | "selectGuide" | "setEditingId" | "setHoverId" | "setKeyId" | "setRenamingId">>;
package/designer.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./mount-print-designer-DnHTrBE9.js";
1
+ import { t as e } from "./mount-print-designer-CAqO0T0k.js";
2
2
  import { A as t, B as n } from "./cloneDeep-waBDTGc3.js";
3
3
  // src/designer/template-library/remote-provider.ts
4
4
  function r(e) {
@@ -1,8 +1,6 @@
1
- /**
2
- * 元素注册入口:把内置元素定义注册到全局注册表。
3
- * 新增元素 = 新建定义文件 + 在此登记,设计器与解析器自动获得该元素的全部能力。
4
- */
1
+ import { ElementRegistry } from '../core/element-registry';
5
2
  export declare const builtinElements: import('../core/element-registry').ElementDefinition[];
6
3
  export declare function registerBuiltinElements(): void;
4
+ export declare function createBuiltinElementRegistry(): ElementRegistry;
7
5
  export type { TableMergeRule } from './table/table-style';
8
6
  export { elementRegistry } from '../core/element-registry';