@printstack/print-studio 0.1.1 → 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.
- package/README.md +129 -162
- package/assets/{render.worker-Ch4qWx3S.js → render.worker-Dl59Xk1a.js} +9 -9
- package/{cloneDeep-PCw2ErRl.js → cloneDeep-waBDTGc3.js} +9 -4
- package/components/button-group/ButtonGroup.d.ts +1 -1
- package/components/print-s-logo/print-s-logo.vue.d.ts +1 -1
- package/components/s-form/types.d.ts +1 -1
- package/core/coordinate-space.d.ts +16 -0
- package/core/document-model.d.ts +1 -1
- package/core/element-registry.d.ts +3 -8
- package/core/index.d.ts +1 -0
- package/core/page-extensions.d.ts +1 -1
- package/core/types.d.ts +8 -0
- package/core.js +10 -10
- package/designer/commands/menu-adapter.d.ts +3 -3
- package/designer/commands/menu-types.d.ts +8 -1
- package/designer/commands/types.d.ts +2 -0
- package/designer/components/fields/use-table-draft.d.ts +0 -4
- package/designer/components/panels/layer-row-types.d.ts +37 -0
- package/designer/components/panels/layer-row.vue.d.ts +17 -0
- package/designer/components/stage/marquee-overlay.vue.d.ts +8 -0
- package/designer/components/stage/node-style.d.ts +3 -0
- package/designer/components/stage/selection-member.vue.d.ts +14 -0
- package/designer/composables/use-theme.d.ts +3 -0
- package/designer/facade/editing.d.ts +2 -2
- package/designer/facade/entities.d.ts +1160 -26
- package/designer/facade/use-print-studio.d.ts +1 -1
- package/designer/frame/view.d.ts +2 -0
- package/designer/interactions/marquee.d.ts +1 -1
- package/designer/interactions/move.d.ts +3 -1
- package/designer/mount-print-designer.d.ts +1 -1
- package/designer/plugins/plugin-manager.d.ts +3 -3
- package/designer/plugins/types.d.ts +1 -1
- package/designer/stores/document-store.d.ts +72 -0
- package/designer/stores/editor-store.d.ts +772 -16
- package/designer/stores/page-store.d.ts +25 -1
- package/designer/stores/selection-store.d.ts +1 -1
- package/designer/stores/template-store.d.ts +52 -4
- package/designer/stores/types.d.ts +1 -0
- package/designer/stores/ui-store.d.ts +232 -3
- package/designer/stores/view-store.d.ts +10 -1
- package/designer.d.ts +1 -1
- package/designer.js +3 -3
- package/elements/index.d.ts +2 -4
- package/elements/table/table-style.d.ts +3 -10
- package/{registries-dZq8MewR.js → elements-YX-XUHtf.js} +2510 -3069
- package/host-oKlYakgn.js +123 -0
- package/index.d.ts +3 -1
- package/index.js +9 -8
- package/locales/runtime.d.ts +7 -2
- package/locales/translations/zh-CN/designer.json.d.ts +9 -4
- package/{mount-print-designer-BLgVZOnm.js → mount-print-designer-CAqO0T0k.js} +4 -4
- package/{mount-print-preview-D7M-1AqH.js → mount-print-preview-DgDHL3E8.js} +4 -3
- package/package.json +19 -2
- package/parser/index.d.ts +1 -1
- package/parser/registry.d.ts +8 -0
- package/parser/render-runtime.d.ts +1 -1
- package/{presets-D3WhkbZK.js → presets-DmCp_Doe.js} +2 -2
- package/printer.d.ts +17 -0
- package/printer.js +3 -0
- package/registries-CyjYSHA7.js +1841 -0
- package/runtime/print-renderer.d.ts +3 -2
- package/runtime/registries.d.ts +1 -0
- package/runtime.js +32 -28
- package/{saas-B1H161e1.js → saas-D-q51uTz.js} +1 -1
- package/saas.js +1 -1
- package/{studio-BFQYHZsg.js → studio-DHusmJyL.js} +1264 -1187
- package/studio-types.d.ts +1 -1
- package/studio.d.ts +1 -1
- package/style.css +1 -1
- package/vue.d.ts +1 -1
- package/vue.js +3672 -3579
- package/document-model-GhFP9OGp.js +0 -1302
- package/host-CuGR8rD6.js +0 -123
|
@@ -7,7 +7,7 @@ import { RegistryOptions } from './registries';
|
|
|
7
7
|
export interface PrintRendererOptions extends RegistryOptions, RuntimeConfigOptions {
|
|
8
8
|
errors?: ErrorRuntime;
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function createPrinter(options?: PrintRendererOptions): {
|
|
11
11
|
preview: (template: PrintDocument, data: Record<string, unknown>, outputOptions?: BrowserOutputOptions) => Promise<{
|
|
12
12
|
warnings: string[];
|
|
13
13
|
close(): void;
|
|
@@ -23,4 +23,5 @@ export declare function createPrintRenderer(options?: PrintRendererOptions): {
|
|
|
23
23
|
dispose: () => void;
|
|
24
24
|
errors: ErrorRuntime;
|
|
25
25
|
};
|
|
26
|
-
export type
|
|
26
|
+
export type Printer = ReturnType<typeof createPrinter>;
|
|
27
|
+
export type PrintRenderer = Printer;
|
package/runtime/registries.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementDefinition, ElementRegistry } from '../core/element-registry';
|
|
2
2
|
import { DocumentParser, ParserRegistry } from '../parser/types';
|
|
3
3
|
export interface RegistryOptions {
|
|
4
|
+
builtinElements?: ElementDefinition[];
|
|
4
5
|
elements?: ElementDefinition[];
|
|
5
6
|
parsers?: DocumentParser<unknown, unknown>[];
|
|
6
7
|
}
|
package/runtime.js
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
import { t as e } from "./cloneDeep-
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./cloneDeep-waBDTGc3.js";
|
|
2
|
+
import { _ as t, h as n, i as r, n as i, s as a, t as o } from "./registries-CyjYSHA7.js";
|
|
3
|
+
import { t as s } from "./elements-YX-XUHtf.js";
|
|
3
4
|
// src/runtime/print-renderer.ts
|
|
4
|
-
function
|
|
5
|
-
let
|
|
6
|
-
...
|
|
7
|
-
|
|
5
|
+
function c(c = {}) {
|
|
6
|
+
let l = a(c), u = c.errors ?? t(), d = o({
|
|
7
|
+
...c,
|
|
8
|
+
builtinElements: c.elements ? [] : s
|
|
9
|
+
}), f = r({
|
|
10
|
+
...d,
|
|
11
|
+
config: () => l.rendering,
|
|
8
12
|
snapshot: e
|
|
9
|
-
}),
|
|
10
|
-
if (
|
|
13
|
+
}), p = i(), m = !1, h = n(f, p, () => {
|
|
14
|
+
if (m) throw Error("Print renderer has been disposed");
|
|
11
15
|
});
|
|
12
|
-
async function
|
|
13
|
-
if (
|
|
16
|
+
async function g(e, t) {
|
|
17
|
+
if (m) throw Error("Print renderer has been disposed");
|
|
14
18
|
try {
|
|
15
19
|
return await t();
|
|
16
20
|
} catch (t) {
|
|
17
|
-
throw await
|
|
21
|
+
throw await u.capture(t, { source: e }), t;
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
|
-
function g(t, n, r, i) {
|
|
21
|
-
return h("runtime.html", () => m.toHTML(e(t), e(n), r, i));
|
|
22
|
-
}
|
|
23
24
|
function _(t, n, r, i) {
|
|
24
|
-
return
|
|
25
|
+
return g("runtime.html", () => h.toHTML(e(t), e(n), r, i));
|
|
25
26
|
}
|
|
26
|
-
function v(t, n, r) {
|
|
27
|
-
return
|
|
27
|
+
function v(t, n, r, i) {
|
|
28
|
+
return g("runtime.pdf", () => h.toPDF(e(t), e(n), r, i));
|
|
28
29
|
}
|
|
29
30
|
function y(t, n, r) {
|
|
30
|
-
return
|
|
31
|
+
return g("runtime.preview", () => h.preview(e(t), e(n), r));
|
|
32
|
+
}
|
|
33
|
+
function b(t, n, r) {
|
|
34
|
+
return g("runtime.print", () => h.print(e(t), e(n), r));
|
|
31
35
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
36
|
+
function x() {
|
|
37
|
+
m || (m = !0, f.dispose(), p.dispose());
|
|
34
38
|
}
|
|
35
39
|
return {
|
|
36
|
-
dispose:
|
|
37
|
-
errors:
|
|
38
|
-
...
|
|
39
|
-
preview:
|
|
40
|
-
print:
|
|
41
|
-
toHTML:
|
|
42
|
-
toPDF:
|
|
40
|
+
dispose: x,
|
|
41
|
+
errors: u,
|
|
42
|
+
...d,
|
|
43
|
+
preview: y,
|
|
44
|
+
print: b,
|
|
45
|
+
toHTML: _,
|
|
46
|
+
toPDF: v
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
|
-
export {
|
|
49
|
+
export { c as createPrinter };
|
package/saas.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as SaasHttpError, t as createSaasClient, n as createSaasPlugin, r as createSaasTemplateProvider } from "./saas-
|
|
1
|
+
export { i as SaasHttpError, t as createSaasClient, n as createSaasPlugin, r as createSaasTemplateProvider } from "./saas-D-q51uTz.js";
|