@worm-vue3-print/common 0.0.0-stage → 1.4.0-beta.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/LICENSE +21 -0
- package/README.md +278 -2
- package/dist/browser-bundle.d.ts +14 -0
- package/dist/common.css +526 -0
- package/dist/common.js +1017 -0
- package/dist/core/default-template.d.ts +9 -0
- package/dist/core/format.d.ts +122 -0
- package/dist/core/h.d.ts +22 -0
- package/dist/core/icons.d.ts +10 -0
- package/dist/core/store.d.ts +163 -0
- package/dist/index.cjs +760 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +7697 -0
- package/dist/print-designer.d.ts +187 -0
- package/dist/shell/binding.d.ts +21 -0
- package/dist/shell/canvas.d.ts +59 -0
- package/dist/shell/code.d.ts +11 -0
- package/dist/shell/color-picker.d.ts +44 -0
- package/dist/shell/controls.d.ts +138 -0
- package/dist/shell/crop-anchor.d.ts +29 -0
- package/dist/shell/elements.d.ts +27 -0
- package/dist/shell/expression-editor.d.ts +33 -0
- package/dist/shell/flow-list.d.ts +11 -0
- package/dist/shell/font-select.d.ts +24 -0
- package/dist/shell/format-bar.d.ts +15 -0
- package/dist/shell/help-content/changelog.d.ts +12 -0
- package/dist/shell/help-content/faq.d.ts +12 -0
- package/dist/shell/help-content/features.d.ts +12 -0
- package/dist/shell/help-content/getting-started.d.ts +12 -0
- package/dist/shell/help-content/index.d.ts +13 -0
- package/dist/shell/help-content/shortcuts.d.ts +12 -0
- package/dist/shell/help-modal.d.ts +19 -0
- package/dist/shell/page-extras.d.ts +11 -0
- package/dist/shell/panels.d.ts +17 -0
- package/dist/shell/prop-group.d.ts +11 -0
- package/dist/shell/property-panel.d.ts +15 -0
- package/dist/shell/property-search.d.ts +32 -0
- package/dist/shell/ruler.d.ts +29 -0
- package/dist/shell/table-props.d.ts +17 -0
- package/dist/shell/table.d.ts +22 -0
- package/dist/shell/toolbar-overflow.d.ts +28 -0
- package/dist/shell/toolbar.d.ts +8 -0
- package/dist/shell/watermark.d.ts +11 -0
- package/package.json +61 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,279 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @worm-vue3-print/common
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> ⚠️ **实验性质 · 以预览版发布到 npm**:dist-tag 为 `next`,安装必须写 `@worm-vue3-print/common@next`;
|
|
4
|
+
> 版本号形如 `1.4.0-beta.N`(与主线同号 + 预发布后缀)。npm 上还没有 `latest`,转正时才发 stable。
|
|
5
|
+
> 本包尚未定版,接口与产物形态仍可能调整,**不建议应用到生产环境**;
|
|
6
|
+
> Vue 3 项目请使用成熟方案 `@worm-vue3-print/canvas`,本包目前仅供评估与非生产环境的集成验证。
|
|
7
|
+
|
|
8
|
+
打印模板可视化设计器的 **通用宿主适配形态**:任意框架、或完全没有框架的宿主都能直接接入,
|
|
9
|
+
实现为零框架原生 Custom Element + Shadow DOM,**不依赖 Vue / React 等任何框架运行时**,
|
|
10
|
+
用于把 `@worm-vue3-print/canvas`(Vue 3 版设计器)的能力带给 Vue 2、React、jQuery 及任意非 Vue3 宿主。
|
|
11
|
+
|
|
12
|
+
- 功能与布局与 Vue 3 版对齐,逐项状态见 [PARITY.md](./PARITY.md)
|
|
13
|
+
- 样式与图标从 canvas 构建产物**派生**(`scripts/gen-styles.mjs` 剥离 `[data-v-*]`、
|
|
14
|
+
`scripts/gen-icons.mjs` 抽取 lucide 图标),因此 canvas 改版后重新构建即自动跟随
|
|
15
|
+
- 运行时体积:`dist/index.js` 368.28 kB(gzip 106.68 kB),零框架依赖
|
|
16
|
+
- 浏览器直挂形态:`dist/common.js`(UMD,core 与码制库已内联)+ `dist/common.css`,见下节
|
|
17
|
+
|
|
18
|
+
## 安装
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm i @worm-vue3-print/common@next @worm-vue3-print/core
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`@next` 是预览版的 dist-tag,安装必须带上它。注意 `latest` 目前被 npm 在首次发布时自动打在了同一个预览版上(红灯判据:`npm run publish:common:check`),所以省略 `@next` 不会报错,而是**静默装到实验包**;维护者摘除 `latest` 后省略才会显式失败。
|
|
25
|
+
`core` 装正式版即可(本包依赖 `^1.4.0`),出纸链路也要直接用它。
|
|
26
|
+
|
|
27
|
+
四种宿主形态各自的依赖与插件(本包零框架运行时,宿主框架按需装):
|
|
28
|
+
|
|
29
|
+
| 宿主 | 安装 | 框架插件 |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Vue 3 | `npm i @worm-vue3-print/common@next @worm-vue3-print/core vue` | `@vitejs/plugin-vue`,须配 `isCustomElement` |
|
|
32
|
+
| Vue 2.7 | `npm i @worm-vue3-print/common@next @worm-vue3-print/core vue@2.7` | `@vitejs/plugin-vue2` |
|
|
33
|
+
| React 18 | `npm i @worm-vue3-print/common@next @worm-vue3-print/core react react-dom` | `@vitejs/plugin-react`,无需自定义元素配置 |
|
|
34
|
+
| jQuery / 无打包器 | 取本包 `dist/common.js` + `dist/common.css` 直挂 | 无,见下节 |
|
|
35
|
+
|
|
36
|
+
## 浏览器直挂(jQuery / 无打包器宿主)
|
|
37
|
+
|
|
38
|
+
`vite.bundle.config.ts` 额外产出两个文件,子路径 `@worm-vue3-print/common/browser` 指向它们:
|
|
39
|
+
|
|
40
|
+
- `dist/common.js`(499.07 kB / gzip 154.83 kB):UMD,把 `@worm-vue3-print/core` 与条形码、二维码库
|
|
41
|
+
全部内联,并挂出全局 `window.WormPrintCommon`。除了本包 `index` 的那套 API
|
|
42
|
+
(`registerAll` / `createDefaultTemplate` / `DesignerStore` / `PrintDesignerElement`),
|
|
43
|
+
还一并挂出出纸要用的 `renderHtmlPages` / `browserCodeRenderer` / `PrintClient` / `WormPrintError`,
|
|
44
|
+
以及宿主自绘模板缩略图所需的纸张几何工具 `getPaperDimensions` / `isContinuousPaperSize` / `getByPath`
|
|
45
|
+
—— 直挂宿主拿不到裸包名 `@worm-vue3-print/core`,没有这些入口就无法在同一个 `<script>` 里
|
|
46
|
+
完成「浏览器渲染 → 打印 / 静默打印」
|
|
47
|
+
- `dist/common.css`:即 `src/styles/designer.css`(由 `gen-styles.mjs` 从 canvas 派生,含 `:host` 块级基线)。
|
|
48
|
+
Shadow DOM 形态用不到它——样式由组件内联注入;只有把设计器渲染进 **light DOM** 时才需要引它,
|
|
49
|
+
公开子路径为 `@worm-vue3-print/common/style.css`(打包器 `import '@worm-vue3-print/common/style.css'`,
|
|
50
|
+
无打包器则复制成文件后 `<link>`),不要深路径引 `dist/`
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<link rel="stylesheet" href="/vendor/worm-print-common.css" />
|
|
54
|
+
<script src="/vendor/worm-print-common.js"></script>
|
|
55
|
+
<script>
|
|
56
|
+
WormPrintCommon.registerAll()
|
|
57
|
+
const el = document.querySelector('print-designer')
|
|
58
|
+
el.fields = fields // 数组/对象只能赋 property
|
|
59
|
+
el.template = templateJson
|
|
60
|
+
el.uploadImage = file => uploadToServer(file)
|
|
61
|
+
el.addEventListener('save', e => persist(e.detail))
|
|
62
|
+
const out = await WormPrintCommon.renderHtmlPages(
|
|
63
|
+
JSON.parse(el.getTemplateJson()), data, location.origin, WormPrintCommon.browserCodeRenderer)
|
|
64
|
+
</script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
两个硬约束:自定义元素默认 `display:inline`,宿主必须给它块级宽高,否则设计器整体塌陷;
|
|
68
|
+
`fields` 没有 getter,读回要看 `el.store.fields`。
|
|
69
|
+
|
|
70
|
+
完整可运行的直挂宿主示例见 `demo-common/apps/jquery`(含 `sync-assets.mjs` 如何从包 dist 取这两个文件、
|
|
71
|
+
以及 `/render-api` 透传的 40 行静态服务器);Vue 3 / Vue 2 / React 三种 NPM 接入形态见下文
|
|
72
|
+
「在 Vue 3 / Vue 2 / React 中使用」,可运行工程在 `demo-common/apps/vue3`、`demo-common/apps/vue2`、`demo-common/apps/react`。
|
|
73
|
+
|
|
74
|
+
## 使用
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
import { registerAll } from '@worm-vue3-print/common'
|
|
78
|
+
registerAll() // 注册 <print-designer>,按需调用,不自动污染全局
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<print-designer id="d" style="height:100%"></print-designer>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
const d = document.getElementById('d')
|
|
87
|
+
d.fields = [{ fieldKey: 'orderNo', fieldLabel: '单号' }] // 也接受 JSON 字符串
|
|
88
|
+
d.template = templateJson
|
|
89
|
+
d.addEventListener('save', e => save(e.detail)) // e.detail 为模板 JSON
|
|
90
|
+
d.addEventListener('preview', e => preview(e.detail))
|
|
91
|
+
d.getTemplateJson()
|
|
92
|
+
d.validateTemplate() // 拼版/多页配置校验,宿主旁路导出前调用
|
|
93
|
+
d.loadTemplate(json)
|
|
94
|
+
d.save()
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
出纸链路不需要设计器,直接走 `@worm-vue3-print/core`(浏览器渲染 / print-render 服务端 /
|
|
98
|
+
桌面静默打印),与 canvas(Vue 3)宿主完全一致。
|
|
99
|
+
|
|
100
|
+
## 在 Vue 3 / Vue 2 / React 中使用
|
|
101
|
+
|
|
102
|
+
三种宿主消费的是**同一个 `<print-designer>` 自定义元素**,差异只有两处:编译期要不要放行未知标签、
|
|
103
|
+
对象入参在哪一帧赋 property。下面代码取自 `demo-common/apps/{vue3,vue2,react}` 三个可运行工程,
|
|
104
|
+
已剥掉示例库与弹层等 demo 噪音。
|
|
105
|
+
|
|
106
|
+
### Vue 3
|
|
107
|
+
|
|
108
|
+
> Vue 3 项目的生产首选仍是 `@worm-vue3-print/canvas`(功能面更全);本节面向已定用 common 形态、
|
|
109
|
+
> 或要与 Vue 2 / React 共用同一套注入代码的场景。
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
// vite.config.js —— SFC 编译期就要声明 print-* 是自定义元素,否则被当未注册组件
|
|
113
|
+
import vue from '@vitejs/plugin-vue'
|
|
114
|
+
|
|
115
|
+
export default defineConfig({
|
|
116
|
+
plugins: [vue({
|
|
117
|
+
template: { compilerOptions: { isCustomElement: tag => tag.startsWith('print-') } },
|
|
118
|
+
})],
|
|
119
|
+
})
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```js
|
|
123
|
+
// main.js
|
|
124
|
+
import { createApp } from 'vue'
|
|
125
|
+
import { registerAll } from '@worm-vue3-print/common'
|
|
126
|
+
|
|
127
|
+
registerAll() // 全应用调一次,不自动污染全局
|
|
128
|
+
createApp(App).mount('#app')
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```vue
|
|
132
|
+
<template>
|
|
133
|
+
<print-designer ref="designerRef" is-edit="true" show-help="true"
|
|
134
|
+
@save="onSave" @preview="onPreview" @dblclick-cell="onDblclickCell" />
|
|
135
|
+
</template>
|
|
136
|
+
|
|
137
|
+
<script setup>
|
|
138
|
+
import { onMounted, ref } from 'vue'
|
|
139
|
+
|
|
140
|
+
const designerRef = ref(null)
|
|
141
|
+
|
|
142
|
+
/** 对象/函数入参只能赋 property(模板绑定会走 setAttribute 被字符串化) */
|
|
143
|
+
function syncDesigner() {
|
|
144
|
+
const el = designerRef.value
|
|
145
|
+
el.fields = fields.value
|
|
146
|
+
el.template = template.value
|
|
147
|
+
el.fonts = fontsOf(template.value) // 可选:字体声明;demo 的 fontsOf() 取各页 /fonts 并按 family 去重
|
|
148
|
+
}
|
|
149
|
+
const onSave = e => persist(JSON.parse(e.detail))
|
|
150
|
+
|
|
151
|
+
onMounted(() => {
|
|
152
|
+
const el = designerRef.value
|
|
153
|
+
el.uploadImage = uploadToServer
|
|
154
|
+
el.uploadDesignBackground = uploadToServer
|
|
155
|
+
syncDesigner()
|
|
156
|
+
})
|
|
157
|
+
</script>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
- **runtime-only 构建下 `app.config.compilerOptions.isCustomElement` 不生效**,配置必须落在 `@vitejs/plugin-vue` 里;
|
|
161
|
+
只有自带运行时编译器的宿主才用 `app.config` 那条。
|
|
162
|
+
|
|
163
|
+
### Vue 2.7
|
|
164
|
+
|
|
165
|
+
```js
|
|
166
|
+
// main.js
|
|
167
|
+
import Vue from 'vue'
|
|
168
|
+
import { registerAll } from '@worm-vue3-print/common'
|
|
169
|
+
|
|
170
|
+
registerAll()
|
|
171
|
+
// 必须声明,否则报 Unknown custom element、画面是个空壳
|
|
172
|
+
Vue.config.ignoredElements = ['print-designer']
|
|
173
|
+
|
|
174
|
+
new Vue({ render: h => h(App) }).$mount('#app')
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```vue
|
|
178
|
+
<template>
|
|
179
|
+
<print-designer ref="designer" is-edit="true" show-help="true"
|
|
180
|
+
@save="onSave" @preview="onPreview" @dblclick-cell="onDblclickCell" />
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<script>
|
|
184
|
+
export default {
|
|
185
|
+
data: () => ({ fields: [], templateData: null }),
|
|
186
|
+
mounted() {
|
|
187
|
+
const el = this.$refs.designer
|
|
188
|
+
el.uploadImage = this.uploadImage // 函数只能赋 property
|
|
189
|
+
el.uploadDesignBackground = this.uploadImage
|
|
190
|
+
this.syncDesigner()
|
|
191
|
+
},
|
|
192
|
+
methods: {
|
|
193
|
+
syncDesigner() {
|
|
194
|
+
const el = this.$refs.designer
|
|
195
|
+
if (!el) return
|
|
196
|
+
el.fields = this.fields // 数组只能赋 property
|
|
197
|
+
el.template = this.templateData // 对象同上
|
|
198
|
+
},
|
|
199
|
+
onSave(e) { persist(JSON.parse(e.detail)) }, // e.detail 为模板 JSON 字符串
|
|
200
|
+
},
|
|
201
|
+
}
|
|
202
|
+
</script>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
- **`structuredClone` 会抛 `DataCloneError`**:Vue 2 把 `data` 里的对象深度响应式化成 Proxy,
|
|
206
|
+
模板/数据深拷贝统一用 `JSON.parse(JSON.stringify(...))`。
|
|
207
|
+
- 宿主页面是**单根节点**(Vue 2 不支持多根 fragment,预览层与弹层都得写在根节点内);
|
|
208
|
+
`v-if` 控制的预览 iframe 要 `$nextTick()` + `requestAnimationFrame()` 两层才拿得到节点。
|
|
209
|
+
- Vue 2 侧专属坑的完整清单见 `demo-common/apps/vue2/README.md`(共 7 条)。
|
|
210
|
+
|
|
211
|
+
### React 18
|
|
212
|
+
|
|
213
|
+
React 没有 `isCustomElement` 这类编译配置:未知标签 `print-designer` 直接按原生元素渲染,
|
|
214
|
+
所以只剩运行期两条约定。
|
|
215
|
+
|
|
216
|
+
```jsx
|
|
217
|
+
// main.jsx
|
|
218
|
+
import { registerAll } from '@worm-vue3-print/common'
|
|
219
|
+
|
|
220
|
+
registerAll() // 一次即可;设计器样式在组件 Shadow DOM 内,宿主不必引 css
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
```jsx
|
|
224
|
+
// App.jsx
|
|
225
|
+
import { useEffect, useRef, useState } from 'react'
|
|
226
|
+
|
|
227
|
+
export default function App() {
|
|
228
|
+
const designerRef = useRef(null)
|
|
229
|
+
const [fields, setFields] = useState([])
|
|
230
|
+
const [templateData, setTemplateData] = useState(null)
|
|
231
|
+
|
|
232
|
+
function syncDesigner(nextFields, nextTemplate) {
|
|
233
|
+
const el = designerRef.current
|
|
234
|
+
if (!el) return
|
|
235
|
+
el.fields = nextFields // JSX 里 template={obj} 会被字符串化成 [object Object]
|
|
236
|
+
el.template = nextTemplate
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
useEffect(() => {
|
|
240
|
+
const el = designerRef.current
|
|
241
|
+
el.uploadImage = uploadToServer // 函数同样只能赋 property
|
|
242
|
+
el.uploadDesignBackground = uploadToServer
|
|
243
|
+
syncDesigner(fields, templateData) // 挂载后统一注入;换模板/换字段后再调一次
|
|
244
|
+
|
|
245
|
+
const onSave = e => persist(JSON.parse(e.detail))
|
|
246
|
+
el.addEventListener('save', onSave) // JSX 的 onSave 不会绑定 CustomEvent
|
|
247
|
+
return () => el.removeEventListener('save', onSave) // StrictMode dev 双跑,漏解绑会重复注册
|
|
248
|
+
}, [])
|
|
249
|
+
|
|
250
|
+
return <print-designer ref={designerRef} is-edit="true" show-help="true" />
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
- 事件只注册一次:处理器要读最新 state 时用 `useRef` 桥接(demo 里的 `printDataRef`),
|
|
255
|
+
把 state 放进 effect 依赖会导致频繁重绑。
|
|
256
|
+
|
|
257
|
+
### 三宿主共通的三条
|
|
258
|
+
|
|
259
|
+
1. **对象与函数只能赋 property**;字符串开关(`is-edit="true"`、`show-help="true"`)写在模板 / JSX 属性上即可。
|
|
260
|
+
`fields` 只有 setter(读回看 `el.store.fields`),`template` 的 getter 返回当前画布 JSON。
|
|
261
|
+
改字段/换模板后要**显式再调一次注入函数**(三个 demo 都在切示例、导入模板、清空、自定义字段四处调用),
|
|
262
|
+
不去 `watch` element 本身。
|
|
263
|
+
2. **元素默认 `display:inline`,宿主必须给块级宽高**,否则设计器整体塌陷:
|
|
264
|
+
`.容器 print-designer { display: block; width: 100%; height: 100% }`。
|
|
265
|
+
3. **事件是 CustomEvent**,载荷在 `event.detail`:`save` / `preview` 是模板 JSON 字符串;
|
|
266
|
+
`dblclick-element` 就是元素 id 字符串本身、`dblclick-cell` 是 `{ elementId, r, c, cellId }` 对象,
|
|
267
|
+
后两者**不要** `JSON.parse`。旁路取模板用 `getTemplateJson()`,它绕过拼版校验,
|
|
268
|
+
保存/导出前要先调 `validateTemplate()`。
|
|
269
|
+
|
|
270
|
+
## 与 canvas 版的边界
|
|
271
|
+
|
|
272
|
+
| | canvas(Vue 3) | common(本包) |
|
|
273
|
+
|---|---|---|
|
|
274
|
+
| 运行时 | Vue 3.5 | 无框架 |
|
|
275
|
+
| 宿主注入 | `provide/inject`、props | element property / attribute + CustomEvent |
|
|
276
|
+
| 样式 | `@worm-vue3-print/canvas/style.css` | 内置 Shadow DOM(`?inline`),无需引样式文件;light DOM 形态引 `@worm-vue3-print/common/style.css` |
|
|
277
|
+
| 适用 | Vue 3 项目 | React / Vue 2 / jQuery / 原生 |
|
|
278
|
+
|
|
279
|
+
Vue 3 项目应继续用 `@worm-vue3-print/canvas`,功能面更全;本包面向非 Vue3 宿主。
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-vue3-print/common v1.4.0-beta.0
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { getPaperDimensions, isContinuousPaperSize, getByPath } from '@worm-vue3-print/core';
|
|
8
|
+
import { applyPreviewViewZoom, defaultZoomKey, paperWidthPx, resolvePrinterDpi, resolveToolbarOverflow, resolveZoomKey, viewZoomHint, zoomPresets, zoomValueOf } from '@worm-vue3-print/core/designer';
|
|
9
|
+
import { renderHtmlPages, browserCodeRenderer } from '@worm-vue3-print/core/browser';
|
|
10
|
+
import { PrintClient, WormPrintError } from '@worm-vue3-print/core/client';
|
|
11
|
+
export * from './index';
|
|
12
|
+
export { renderHtmlPages, browserCodeRenderer, PrintClient, WormPrintError };
|
|
13
|
+
export { getPaperDimensions, isContinuousPaperSize, getByPath };
|
|
14
|
+
export { applyPreviewViewZoom, defaultZoomKey, paperWidthPx, resolvePrinterDpi, resolveToolbarOverflow, resolveZoomKey, viewZoomHint, zoomPresets, zoomValueOf, };
|