@ym-print/designer-vue 0.0.0-stage → 0.1.0-rc.2

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 (84) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +165 -2
  3. package/THIRD_PARTY_NOTICES.md +31 -0
  4. package/dependency-licenses.json +285 -0
  5. package/dist/AdvancedProperties.d.ts +15 -0
  6. package/dist/AlignIcon.d.ts +6 -0
  7. package/dist/AutoFitProperties.d.ts +13 -0
  8. package/dist/CompositeCellProperties.d.ts +17 -0
  9. package/dist/Designer.d.ts +76 -0
  10. package/dist/DesignerBoundary.d.ts +19 -0
  11. package/dist/DesignerHelp.d.ts +10 -0
  12. package/dist/DesignerNotification.d.ts +7 -0
  13. package/dist/DesignerTooltip.d.ts +18 -0
  14. package/dist/DocumentProperties.d.ts +16 -0
  15. package/dist/FieldTree.d.ts +30 -0
  16. package/dist/FieldTreeBranch.d.ts +34 -0
  17. package/dist/FontSelect.d.ts +13 -0
  18. package/dist/ImpositionProperties.d.ts +11 -0
  19. package/dist/LayerIcon.d.ts +6 -0
  20. package/dist/LayerPanel.d.ts +19 -0
  21. package/dist/NodeProperties.d.ts +23 -0
  22. package/dist/PluginProperties.d.ts +18 -0
  23. package/dist/ReportProperties.d.ts +19 -0
  24. package/dist/SelectionToolbar.d.ts +44 -0
  25. package/dist/StampProperties.d.ts +12 -0
  26. package/dist/TableColumnsDialog.d.ts +28 -0
  27. package/dist/TableProperties.d.ts +27 -0
  28. package/dist/band-geometry.d.ts +22 -0
  29. package/dist/band-lines.d.ts +9 -0
  30. package/dist/batch-CAXW738z.js +2100 -0
  31. package/dist/batch.d.ts +36 -0
  32. package/dist/business-path.d.ts +4 -0
  33. package/dist/business-types.d.ts +64 -0
  34. package/dist/business.d.ts +5 -0
  35. package/dist/design-canvas.d.ts +4 -0
  36. package/dist/document.d.ts +44 -0
  37. package/dist/field-tree.d.ts +17 -0
  38. package/dist/font-catalog.d.ts +15 -0
  39. package/dist/geometry.d.ts +31 -0
  40. package/dist/history.d.ts +22 -0
  41. package/dist/hooks.d.ts +94 -0
  42. package/dist/index.d.ts +21 -0
  43. package/dist/index.js +7907 -0
  44. package/dist/package.d.ts +25 -0
  45. package/dist/page-properties.d.ts +10 -0
  46. package/dist/persistence.d.ts +72 -0
  47. package/dist/plugin-contract.d.ts +20 -0
  48. package/dist/plugins.d.ts +55 -0
  49. package/dist/preflight.d.ts +9 -0
  50. package/dist/printing-entry.d.ts +12 -0
  51. package/dist/printing.d.ts +50 -0
  52. package/dist/printing.js +3 -0
  53. package/dist/scaffold.d.ts +6 -0
  54. package/dist/sdk.d.ts +15 -0
  55. package/dist/sections.d.ts +5 -0
  56. package/dist/style.css +2 -0
  57. package/dist/text-sizing.d.ts +6 -0
  58. package/dist/theme.d.ts +23 -0
  59. package/dist/types.d.ts +82 -0
  60. package/dist/zip.d.ts +17 -0
  61. package/package.json +57 -4
  62. package/third-party-licenses/@babel__helper-string-parser@7.29.11/LICENSE +22 -0
  63. package/third-party-licenses/@babel__helper-validator-identifier@7.29.7/LICENSE +22 -0
  64. package/third-party-licenses/@babel__parser@7.29.11/LICENSE +19 -0
  65. package/third-party-licenses/@babel__types@7.29.11/LICENSE +22 -0
  66. package/third-party-licenses/@jridgewell__sourcemap-codec@1.6.0/LICENSE +19 -0
  67. package/third-party-licenses/@vue__compiler-core@3.5.44/LICENSE +21 -0
  68. package/third-party-licenses/@vue__compiler-dom@3.5.44/LICENSE +21 -0
  69. package/third-party-licenses/@vue__compiler-sfc@3.5.44/LICENSE +21 -0
  70. package/third-party-licenses/@vue__compiler-ssr@3.5.44/LICENSE +21 -0
  71. package/third-party-licenses/@vue__reactivity@3.5.44/LICENSE +21 -0
  72. package/third-party-licenses/@vue__runtime-core@3.5.44/LICENSE +21 -0
  73. package/third-party-licenses/@vue__runtime-dom@3.5.44/LICENSE +21 -0
  74. package/third-party-licenses/@vue__server-renderer@3.5.44/LICENSE +21 -0
  75. package/third-party-licenses/@vue__shared@3.5.44/LICENSE +21 -0
  76. package/third-party-licenses/csstype@3.2.3/LICENSE +19 -0
  77. package/third-party-licenses/entities@7.0.1/LICENSE +11 -0
  78. package/third-party-licenses/estree-walker@2.0.2/LICENSE +7 -0
  79. package/third-party-licenses/magic-string@0.30.21/LICENSE +7 -0
  80. package/third-party-licenses/nanoid@3.3.20/LICENSE +20 -0
  81. package/third-party-licenses/picocolors@1.1.1/LICENSE +15 -0
  82. package/third-party-licenses/postcss@8.5.32/LICENSE +20 -0
  83. package/third-party-licenses/source-map-js@1.2.2/LICENSE +28 -0
  84. package/third-party-licenses/vue@3.5.44/LICENSE +21 -0
package/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ UNLICENSED
2
+
3
+ Copyright (c) 2026 YmPrintUnit contributors. All rights reserved.
4
+
5
+ No open-source license is granted for the original YmPrintUnit code.
6
+
7
+ Third-party components retain their own licenses. See THIRD_PARTY_NOTICES.md
8
+ and dependency-licenses.json; this notice does not change those licenses.
package/README.md CHANGED
@@ -1,3 +1,166 @@
1
- # Temporary Holding Version
1
+ # @ym-print/designer-vue
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Vue 3 打印设计器与独立 Web 打印 SDK。支持字段和表格预设、拖拽编辑、系统字体、复杂报表、分页预览、浏览器打印、PDF/图片导出及模板资源包。
4
+
5
+ ## npm 安装
6
+
7
+ 首次 npm 发布完成后安装预发布版:
8
+
9
+ ```sh
10
+ pnpm add vue@^3.5.0 @ym-print/designer-vue@next
11
+ ```
12
+
13
+ 正式版发布后将 `@next` 改为 `@latest`。原始代码保持 `UNLICENSED`,详见随包附带的 `LICENSE`;第三方许可见 `THIRD_PARTY_NOTICES.md`。
14
+
15
+ ## 使用环境
16
+
17
+ - Vue 组件使用 Vue `^3.5.0`,包采用 ESM 并提供 TypeScript 类型。
18
+ - 设计器和打印在桌面 Chrome / Edge 145 及以上运行,部署使用 HTTPS 或 localhost。
19
+ - 独立 `/printing` 入口可用于不依赖 Vue 的浏览器项目。
20
+
21
+ ## 本地安装
22
+
23
+ 在 YmPrintUnit 仓库根目录执行:
24
+
25
+ ```sh
26
+ pnpm install --frozen-lockfile
27
+ pnpm candidate:pack
28
+ ```
29
+
30
+ 将 `output/npm-candidate/` 中四个 `.tgz` 文件放入宿主项目。独立宿主项目创建以下 `pnpm-workspace.yaml`;已有工作区保留原有 `packages`,只合并 `overrides`。包文件名中的版本应与实际生成文件一致:
31
+
32
+ ```yaml
33
+ packages: []
34
+ overrides:
35
+ '@ym-print/core': file:./ym-print-core-0.1.0-rc.2.tgz
36
+ '@ym-print/renderer-dom': file:./ym-print-renderer-dom-0.1.0-rc.2.tgz
37
+ '@ym-print/renderer-pdf': file:./ym-print-renderer-pdf-0.1.0-rc.2.tgz
38
+ '@ym-print/designer-vue': file:./ym-print-designer-vue-0.1.0-rc.2.tgz
39
+ ```
40
+
41
+ 安装这些文件及 Vue:
42
+
43
+ ```sh
44
+ pnpm add vue@^3.5.0 ./ym-print-core-0.1.0-rc.2.tgz ./ym-print-renderer-dom-0.1.0-rc.2.tgz ./ym-print-renderer-pdf-0.1.0-rc.2.tgz ./ym-print-designer-vue-0.1.0-rc.2.tgz
45
+ ```
46
+
47
+ ## Vue 组件
48
+
49
+ 完整参数、默认值、字段与表格配置、主题、保存回调、事件、插槽和实例方法见 [YmPrintDesigner 组件文档](../../docs/designer-vue-api.md)。
50
+
51
+ ```vue
52
+ <script setup lang="ts">
53
+ import {shallowRef} from 'vue';
54
+ import {YmPrintDesigner, newDesign} from '@ym-print/designer-vue';
55
+ import type {BusinessField, BusinessTablePreset, DesignDocument, DesignerApi} from '@ym-print/designer-vue';
56
+
57
+ const design = newDesign('A4');
58
+ const api = shallowRef<DesignerApi>();
59
+ const fields: BusinessField[] = [
60
+ {label:'编号', path:'code', group:'单据资料'},
61
+ {label:'供应商编码', path:'sup/supplierno', group:'供应商'},
62
+ ];
63
+ const tables: BusinessTablePreset[] = [{
64
+ id:'lines', label:'明细', path:'lines', columns:[
65
+ {id:'description', label:'说明', path:'description', widthUm:100000},
66
+ {id:'quantity', label:'数量', path:'quantity', widthUm:40000, decimals:0},
67
+ ],
68
+ }];
69
+ const previewData = {code:'DOC-001', sup:{supplierno:'SUP-001'}, lines:[{description:'示例内容', quantity:2}]};
70
+ const saved = shallowRef<DesignDocument>();
71
+ function save(document: DesignDocument) {
72
+ saved.value = document;
73
+ }
74
+ </script>
75
+
76
+ <template>
77
+ <div style="height:900px">
78
+ <YmPrintDesigner
79
+ :initial-document="design"
80
+ :fields="fields"
81
+ :tables="tables"
82
+ :preview-data="previewData"
83
+ :save="save"
84
+ @ready="value => api = value"
85
+ />
86
+ </div>
87
+ </template>
88
+ ```
89
+
90
+ `fields`、`tables` 及列的 `path` 不带开头的 `/`:一级字段写 `code`,多级字段写 `sup/supplierno`,表格写 `lines`,列路径相对于每行数据。组件自动处理内部引用;以 `/` 开头的配置会报错。
91
+
92
+ 设计器内只提供设计与预览模式,保存、测试打印和导出 PDF 位于画布下方的浮动操作条。不包含品牌页头、JSON/测试数据面板或底部状态栏;宿主通过 `load/loadPackage/exportPackage/check` 等 API 实现模板打开、资源包和检查结果界面。
93
+
94
+ 字段、表格定义和测试数据由业务组件创建并通过 Props 传入。SDK 导出通用的 `BusinessField`、`BusinessTablePreset`、`BusinessTableColumn` 等 TS 类型,以及设计和打印 API。业务系统在 `save(document, context)` 中完成持久化,异步保存可使用 `context.signal` 取消请求。
95
+
96
+ 字体通过下拉框选择。支持的浏览器可点击“读取”并授权获取本机字体列表;不支持或未授权时使用通用字体和检测到的常用字体。模板只保存字体名称。
97
+
98
+ ## 模板与数据
99
+
100
+ | 输入 | 用途 |
101
+ | --- | --- |
102
+ | `initialDocument` | 首次挂载的设计模板 |
103
+ | `fields` / `tables` | 可选字段、固定表格列及绑定定义 |
104
+ | `dataSources` | 多数据源的字段与表格定义 |
105
+ | `previewData` / `previewSources` | 设计预览使用的数据 |
106
+ | `previewImages` | 预览使用的动态图片 |
107
+ | `save` | 接收纯设计内容的保存回调 |
108
+ | `autoSave` | 自动保存开关或延迟配置 |
109
+
110
+ 保存内容包含纸张、布局、静态文字、字段引用、列配置、字体名称和静态图片。业务系统负责模板的读取与存储,并在实际打印时传入本次数据。
111
+
112
+ ## 编辑器使用
113
+
114
+ - 点击或拖动字段、表格和辅助元素到画布,再通过属性面板调整位置与样式。
115
+ - 选中表格,在“基础 → 列设置”弹窗中编辑列名、类型、显隐、宽度、对齐、字体和顺序;“更多设置”编辑单元格高级属性。
116
+ - 页码作为固定辅助元素,可放在页眉、正文和页脚任意位置,每页显示并独立设置格式和字体。
117
+ - 拖动页眉线、页脚线划分每页重复内容;报表头线、报表尾线划分每节开始/结束各打印一次的内容。长表格在正文区域自动分页。
118
+ - 设计模式编辑当前分节的一页画布,预览模式查看完整分页。
119
+
120
+ ## 样式与生命周期
121
+
122
+ 默认 `styleIsolation="shadow"`,组件自带内部样式。使用普通 DOM 时导入 CSS 并设置 `style-isolation="none"`:
123
+
124
+ ```ts
125
+ import '@ym-print/designer-vue/style.css';
126
+ ```
127
+
128
+ 通过 `ready` 事件取得 `DesignerApi`。切换模板调用 `load()`,路由离开前等待 `requestLeave('leave')`,卸载使用 Vue 的生命周期。主题通过 `theme` 设置为 `light`、`dark` 或自定义 tokens。
129
+
130
+ ## 独立打印与导出
131
+
132
+ ```ts
133
+ import {prepareTemplatePrint, exportTemplatePdf} from '@ym-print/designer-vue/printing';
134
+ import type {DesignDocument} from '@ym-print/designer-vue/printing';
135
+
136
+ export async function printOrder(
137
+ design: DesignDocument,
138
+ data: Record<string, unknown>,
139
+ signal?: AbortSignal,
140
+ ) {
141
+ const session = await prepareTemplatePrint(design, data, {signal});
142
+ try {
143
+ await session.print();
144
+ return session;
145
+ } catch (error) {
146
+ session.dispose();
147
+ throw error;
148
+ }
149
+ }
150
+
151
+ export async function createPdf(design: DesignDocument, data: Record<string, unknown>) {
152
+ return exportTemplatePdf(design, data, {dpi:144});
153
+ }
154
+ ```
155
+
156
+ 打印会话在 `afterprint` 时自动清理,业务流程提前结束时调用 `dispose()`。`exportTemplatePng()`、`exportTemplateJpeg()` 和 `exportTemplateImageArchive()` 分别输出单页图片和超大图片分条包;`prepareTemplateBatch()` 与批量打印/PDF 接口用于多份单据。
157
+
158
+ ## PDF 页面导入
159
+
160
+ 启用 PDF 页面导入时,在 Vite 配置中添加 `@ym-print/renderer-dom/vite` 的 `ymPrintPdfAssets()`,将 PDF.js 辅助资源部署到 `/ym-print-assets/`。
161
+
162
+ 子目录部署时,设置组件 `pdf-asset-base-url`,或在 `importPdf()` 中传入 `assetBaseUrl`。该地址为完整目录 URL,并保留结尾 `/`。
163
+
164
+ ## 插件
165
+
166
+ 将 `DesignerPlugin[]` 传入 `plugins`。实际打印包含插件元素的模板时,在独立输出选项中传入设计器 `getRegistry()` 返回的注册表;需要打印钩子时同时传入 `getHooks()`。
@@ -0,0 +1,31 @@
1
+ # Third-party notices
2
+
3
+ @ym-print/designer-vue 0.1.0-rc.2 — original code: UNLICENSED.
4
+
5
+ Bundled code and external packages keep their original licenses. Optional peers are loaded through their documented opt-in entry.
6
+
7
+ | Package | License | Delivery | Notices |
8
+ | --- | --- | --- | --- |
9
+ | @babel/helper-string-parser@7.29.11 | MIT | external | [LICENSE](third-party-licenses/@babel__helper-string-parser@7.29.11/LICENSE) |
10
+ | @babel/helper-validator-identifier@7.29.7 | MIT | external | [LICENSE](third-party-licenses/@babel__helper-validator-identifier@7.29.7/LICENSE) |
11
+ | @babel/parser@7.29.11 | MIT | external | [LICENSE](third-party-licenses/@babel__parser@7.29.11/LICENSE) |
12
+ | @babel/types@7.29.11 | MIT | external | [LICENSE](third-party-licenses/@babel__types@7.29.11/LICENSE) |
13
+ | @jridgewell/sourcemap-codec@1.6.0 | MIT | external | [LICENSE](third-party-licenses/@jridgewell__sourcemap-codec@1.6.0/LICENSE) |
14
+ | @vue/compiler-core@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__compiler-core@3.5.44/LICENSE) |
15
+ | @vue/compiler-dom@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__compiler-dom@3.5.44/LICENSE) |
16
+ | @vue/compiler-sfc@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__compiler-sfc@3.5.44/LICENSE) |
17
+ | @vue/compiler-ssr@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__compiler-ssr@3.5.44/LICENSE) |
18
+ | @vue/reactivity@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__reactivity@3.5.44/LICENSE) |
19
+ | @vue/runtime-core@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__runtime-core@3.5.44/LICENSE) |
20
+ | @vue/runtime-dom@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__runtime-dom@3.5.44/LICENSE) |
21
+ | @vue/server-renderer@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__server-renderer@3.5.44/LICENSE) |
22
+ | @vue/shared@3.5.44 | MIT | external | [LICENSE](third-party-licenses/@vue__shared@3.5.44/LICENSE) |
23
+ | csstype@3.2.3 | MIT | external | [LICENSE](third-party-licenses/csstype@3.2.3/LICENSE) |
24
+ | entities@7.0.1 | BSD-2-Clause | external | [LICENSE](third-party-licenses/entities@7.0.1/LICENSE) |
25
+ | estree-walker@2.0.2 | MIT | external | [LICENSE](third-party-licenses/estree-walker@2.0.2/LICENSE) |
26
+ | magic-string@0.30.21 | MIT | external | [LICENSE](third-party-licenses/magic-string@0.30.21/LICENSE) |
27
+ | nanoid@3.3.20 | MIT | external | [LICENSE](third-party-licenses/nanoid@3.3.20/LICENSE) |
28
+ | picocolors@1.1.1 | ISC | external | [LICENSE](third-party-licenses/picocolors@1.1.1/LICENSE) |
29
+ | postcss@8.5.32 | MIT | external | [LICENSE](third-party-licenses/postcss@8.5.32/LICENSE) |
30
+ | source-map-js@1.2.2 | BSD-3-Clause | external | [LICENSE](third-party-licenses/source-map-js@1.2.2/LICENSE) |
31
+ | vue@3.5.44 | MIT | optional-peer | [LICENSE](third-party-licenses/vue@3.5.44/LICENSE) |
@@ -0,0 +1,285 @@
1
+ {
2
+ "package": "@ym-print/designer-vue",
3
+ "version": "0.1.0-rc.2",
4
+ "license": "UNLICENSED",
5
+ "licenseScope": "original YmPrintUnit code only",
6
+ "dependencies": [
7
+ {
8
+ "name": "@babel/helper-string-parser",
9
+ "version": "7.29.11",
10
+ "license": "MIT",
11
+ "kind": "external",
12
+ "notices": [
13
+ {
14
+ "path": "third-party-licenses/@babel__helper-string-parser@7.29.11/LICENSE",
15
+ "sha256": "117da2af0d4ce0fe1c8e19b5cff9dcd806adf973d328d27b11d4448c4ff24f76"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "name": "@babel/helper-validator-identifier",
21
+ "version": "7.29.7",
22
+ "license": "MIT",
23
+ "kind": "external",
24
+ "notices": [
25
+ {
26
+ "path": "third-party-licenses/@babel__helper-validator-identifier@7.29.7/LICENSE",
27
+ "sha256": "117da2af0d4ce0fe1c8e19b5cff9dcd806adf973d328d27b11d4448c4ff24f76"
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "name": "@babel/parser",
33
+ "version": "7.29.11",
34
+ "license": "MIT",
35
+ "kind": "external",
36
+ "notices": [
37
+ {
38
+ "path": "third-party-licenses/@babel__parser@7.29.11/LICENSE",
39
+ "sha256": "2e97627cb278aa7556fb9e8817368302301a595b6c7582512b8d74c57b773652"
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "name": "@babel/types",
45
+ "version": "7.29.11",
46
+ "license": "MIT",
47
+ "kind": "external",
48
+ "notices": [
49
+ {
50
+ "path": "third-party-licenses/@babel__types@7.29.11/LICENSE",
51
+ "sha256": "117da2af0d4ce0fe1c8e19b5cff9dcd806adf973d328d27b11d4448c4ff24f76"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "name": "@jridgewell/sourcemap-codec",
57
+ "version": "1.6.0",
58
+ "license": "MIT",
59
+ "kind": "external",
60
+ "notices": [
61
+ {
62
+ "path": "third-party-licenses/@jridgewell__sourcemap-codec@1.6.0/LICENSE",
63
+ "sha256": "769d154fbde32a915af110b1123650bc79f4cbe675acc66e005265bf069c6c6c"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "name": "@vue/compiler-core",
69
+ "version": "3.5.44",
70
+ "license": "MIT",
71
+ "kind": "external",
72
+ "notices": [
73
+ {
74
+ "path": "third-party-licenses/@vue__compiler-core@3.5.44/LICENSE",
75
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "name": "@vue/compiler-dom",
81
+ "version": "3.5.44",
82
+ "license": "MIT",
83
+ "kind": "external",
84
+ "notices": [
85
+ {
86
+ "path": "third-party-licenses/@vue__compiler-dom@3.5.44/LICENSE",
87
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "name": "@vue/compiler-sfc",
93
+ "version": "3.5.44",
94
+ "license": "MIT",
95
+ "kind": "external",
96
+ "notices": [
97
+ {
98
+ "path": "third-party-licenses/@vue__compiler-sfc@3.5.44/LICENSE",
99
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "name": "@vue/compiler-ssr",
105
+ "version": "3.5.44",
106
+ "license": "MIT",
107
+ "kind": "external",
108
+ "notices": [
109
+ {
110
+ "path": "third-party-licenses/@vue__compiler-ssr@3.5.44/LICENSE",
111
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "name": "@vue/reactivity",
117
+ "version": "3.5.44",
118
+ "license": "MIT",
119
+ "kind": "external",
120
+ "notices": [
121
+ {
122
+ "path": "third-party-licenses/@vue__reactivity@3.5.44/LICENSE",
123
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "@vue/runtime-core",
129
+ "version": "3.5.44",
130
+ "license": "MIT",
131
+ "kind": "external",
132
+ "notices": [
133
+ {
134
+ "path": "third-party-licenses/@vue__runtime-core@3.5.44/LICENSE",
135
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "name": "@vue/runtime-dom",
141
+ "version": "3.5.44",
142
+ "license": "MIT",
143
+ "kind": "external",
144
+ "notices": [
145
+ {
146
+ "path": "third-party-licenses/@vue__runtime-dom@3.5.44/LICENSE",
147
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
148
+ }
149
+ ]
150
+ },
151
+ {
152
+ "name": "@vue/server-renderer",
153
+ "version": "3.5.44",
154
+ "license": "MIT",
155
+ "kind": "external",
156
+ "notices": [
157
+ {
158
+ "path": "third-party-licenses/@vue__server-renderer@3.5.44/LICENSE",
159
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "name": "@vue/shared",
165
+ "version": "3.5.44",
166
+ "license": "MIT",
167
+ "kind": "external",
168
+ "notices": [
169
+ {
170
+ "path": "third-party-licenses/@vue__shared@3.5.44/LICENSE",
171
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "name": "csstype",
177
+ "version": "3.2.3",
178
+ "license": "MIT",
179
+ "kind": "external",
180
+ "notices": [
181
+ {
182
+ "path": "third-party-licenses/csstype@3.2.3/LICENSE",
183
+ "sha256": "11d55bd4541c75ee7879547ac49089c489163dae49551389713c3d026cab383e"
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "name": "entities",
189
+ "version": "7.0.1",
190
+ "license": "BSD-2-Clause",
191
+ "kind": "external",
192
+ "notices": [
193
+ {
194
+ "path": "third-party-licenses/entities@7.0.1/LICENSE",
195
+ "sha256": "cb992345949ccd6e8394b2cd6c465f7b897c864f845937dbf64e8997f389e164"
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ "name": "estree-walker",
201
+ "version": "2.0.2",
202
+ "license": "MIT",
203
+ "kind": "external",
204
+ "notices": [
205
+ {
206
+ "path": "third-party-licenses/estree-walker@2.0.2/LICENSE",
207
+ "sha256": "8a6dcbabe7179f9c8489c08a7d874d0f1e093ae7449e03756ccf87cb9d0e296e"
208
+ }
209
+ ]
210
+ },
211
+ {
212
+ "name": "magic-string",
213
+ "version": "0.30.21",
214
+ "license": "MIT",
215
+ "kind": "external",
216
+ "notices": [
217
+ {
218
+ "path": "third-party-licenses/magic-string@0.30.21/LICENSE",
219
+ "sha256": "1cbe51b907662f6cb1492b16c359384a595180bf0e4d101603ed525e75c4e484"
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ "name": "nanoid",
225
+ "version": "3.3.20",
226
+ "license": "MIT",
227
+ "kind": "external",
228
+ "notices": [
229
+ {
230
+ "path": "third-party-licenses/nanoid@3.3.20/LICENSE",
231
+ "sha256": "da4db1480d9beea3483a2eda5c53b22238d0827d57da162b48f122e04d2d9987"
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "name": "picocolors",
237
+ "version": "1.1.1",
238
+ "license": "ISC",
239
+ "kind": "external",
240
+ "notices": [
241
+ {
242
+ "path": "third-party-licenses/picocolors@1.1.1/LICENSE",
243
+ "sha256": "6582629e2979466878f6014313dcc2f3756c9616148682227ce3063dde310750"
244
+ }
245
+ ]
246
+ },
247
+ {
248
+ "name": "postcss",
249
+ "version": "8.5.32",
250
+ "license": "MIT",
251
+ "kind": "external",
252
+ "notices": [
253
+ {
254
+ "path": "third-party-licenses/postcss@8.5.32/LICENSE",
255
+ "sha256": "5be1f3465bba68a626777f984878814aaf35e7ef8e9fd314d469bcf887050fb8"
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "name": "source-map-js",
261
+ "version": "1.2.2",
262
+ "license": "BSD-3-Clause",
263
+ "kind": "external",
264
+ "notices": [
265
+ {
266
+ "path": "third-party-licenses/source-map-js@1.2.2/LICENSE",
267
+ "sha256": "6cb0631f71c7749763fd3dd1d5bee52dd1070ec17f2edc1710079ad070bd2fbd"
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ "name": "vue",
273
+ "version": "3.5.44",
274
+ "license": "MIT",
275
+ "kind": "optional-peer",
276
+ "notices": [
277
+ {
278
+ "path": "third-party-licenses/vue@3.5.44/LICENSE",
279
+ "sha256": "1bb85cc9b13b81ef41c81c51866172fc345e0503c86726a6755b796590b70175"
280
+ }
281
+ ]
282
+ }
283
+ ],
284
+ "resourceLicenses": []
285
+ }
@@ -0,0 +1,15 @@
1
+ import type { DesignerApi } from './types.js';
2
+ type __VLS_Props = {
3
+ pluginId: string;
4
+ nodeId: string;
5
+ payload: Record<string, any>;
6
+ disabled: boolean;
7
+ api: DesignerApi;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ change: (value: Record<string, unknown>) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onChange?: ((value: Record<string, unknown>) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ kind: 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom' | 'distribute-x' | 'distribute-y';
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { TextAutoFit } from '@ym-print/core';
2
+ type __VLS_Props = {
3
+ modelValue?: TextAutoFit;
4
+ maxSizeMpt: number;
5
+ label: string;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:modelValue": (value: TextAutoFit | undefined) => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ "onUpdate:modelValue"?: ((value: TextAutoFit | undefined) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { CompositeCell, TextStyle, ImageResource } from '@ym-print/core';
2
+ import type { BusinessCellField } from './types.js';
3
+ type __VLS_Props = {
4
+ cell: CompositeCell;
5
+ label: string;
6
+ fields: BusinessCellField[];
7
+ images: ImageResource[];
8
+ baseStyle: TextStyle;
9
+ fontFamily: string;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ change: (cell: CompositeCell) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onChange?: ((cell: CompositeCell) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,76 @@
1
+ import { PrintError } from '@ym-print/core';
2
+ import type { DesignerProps } from './types.js';
3
+ import type { PrintNode, ImageResource } from '@ym-print/core';
4
+ import type { DesignDocument } from './document.js';
5
+ import type { BusinessField, DesignerApi, DesignerStatus } from './types.js';
6
+ import type { BusinessTablePreset } from './types.js';
7
+ import type { DesignSaveState } from './persistence.js';
8
+ import './style.css';
9
+ type DropPoint = {
10
+ pageId: string;
11
+ x: number;
12
+ y: number;
13
+ altKey?: boolean;
14
+ };
15
+ declare function insertField(field: BusinessField, drop?: DropPoint): void;
16
+ declare function bindField(path: string): void;
17
+ declare function insertImage(file: File | ImageResource): Promise<void>;
18
+ declare var __VLS_15: {
19
+ document: DesignDocument;
20
+ api: DesignerApi;
21
+ }, __VLS_18: {
22
+ fields: BusinessField[];
23
+ bind: typeof bindField;
24
+ insert: typeof insertField;
25
+ }, __VLS_30: {
26
+ tables: BusinessTablePreset[];
27
+ insert: (table: BusinessTablePreset) => void;
28
+ }, __VLS_58: {
29
+ insert: typeof insertImage;
30
+ }, __VLS_83: {
31
+ selection: PrintNode[];
32
+ api: DesignerApi;
33
+ }, __VLS_170: {
34
+ document: DesignDocument;
35
+ selection: string[];
36
+ };
37
+ type __VLS_Slots = {} & {
38
+ toolbar?: (props: typeof __VLS_15) => any;
39
+ } & {
40
+ fields?: (props: typeof __VLS_18) => any;
41
+ } & {
42
+ tables?: (props: typeof __VLS_30) => any;
43
+ } & {
44
+ images?: (props: typeof __VLS_58) => any;
45
+ } & {
46
+ 'selection-toolbar'?: (props: typeof __VLS_83) => any;
47
+ } & {
48
+ properties?: (props: typeof __VLS_170) => any;
49
+ };
50
+ declare const __VLS_base: import("vue").DefineComponent<DesignerProps, DesignerApi, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
51
+ error: (error: PrintError) => any;
52
+ save: (document: DesignDocument, context: import("./persistence.js").DesignSaveContext) => any;
53
+ ready: (api: DesignerApi) => any;
54
+ change: (document: DesignDocument) => any;
55
+ "status-change": (status: DesignerStatus) => any;
56
+ "save-state-change": (state: DesignSaveState) => any;
57
+ }, string, import("vue").PublicProps, Readonly<DesignerProps> & Readonly<{
58
+ onError?: ((error: PrintError) => any) | undefined;
59
+ onSave?: ((document: DesignDocument, context: import("./persistence.js").DesignSaveContext) => any) | undefined;
60
+ onReady?: ((api: DesignerApi) => any) | undefined;
61
+ onChange?: ((document: DesignDocument) => any) | undefined;
62
+ "onStatus-change"?: ((status: DesignerStatus) => any) | undefined;
63
+ "onSave-state-change"?: ((state: DesignSaveState) => any) | undefined;
64
+ }>, {
65
+ styleIsolation: "none" | "shadow";
66
+ autoSave: boolean | import("./persistence.js").AutoSaveOptions;
67
+ guardChanges: boolean;
68
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
69
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
70
+ declare const _default: typeof __VLS_export;
71
+ export default _default;
72
+ type __VLS_WithSlots<T, S> = T & {
73
+ new (): {
74
+ $slots: S;
75
+ };
76
+ };
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ isolation: 'shadow' | 'none';
3
+ styles?: readonly string[];
4
+ };
5
+ declare var __VLS_7: {}, __VLS_15: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_15) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ host?: HTMLElement;
3
+ };
4
+ declare function open(kind?: 'guide' | 'shortcuts'): Promise<void>;
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
6
+ open: typeof open;
7
+ isOpen: () => boolean;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ message: string;
3
+ sequence?: number;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;