@w100n/documents 0.16.1 → 0.16.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.
- package/dist/{SheetView-FVLKQR7J.js → SheetView-S5AFXKPA.js} +4 -4
- package/dist/{TextEditor-BF6HCNHL.js → TextEditor-7WQJFUUU.js} +18 -14
- package/dist/TextEditor-7WQJFUUU.js.map +1 -0
- package/dist/{chunk-NPVH2YDI.js → chunk-JC4DLTMI.js} +2 -2
- package/dist/{chunk-GN3ZOD36.js → chunk-KGAQT5M3.js} +2 -2
- package/dist/{chunk-GN3ZOD36.js.map → chunk-KGAQT5M3.js.map} +1 -1
- package/dist/collab.cjs +1 -1
- package/dist/collab.cjs.map +1 -1
- package/dist/collab.js +1 -1
- package/dist/{grid-Q4XBPQFY.js → grid-AZLMNS7K.js} +15 -6
- package/dist/grid-AZLMNS7K.js.map +1 -0
- package/dist/index.cjs +37 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +26 -6
- package/dist/index.css.map +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/dist/TextEditor-BF6HCNHL.js.map +0 -1
- package/dist/grid-Q4XBPQFY.js.map +0 -1
- /package/dist/{SheetView-FVLKQR7J.js.map → SheetView-S5AFXKPA.js.map} +0 -0
- /package/dist/{chunk-NPVH2YDI.js.map → chunk-JC4DLTMI.js.map} +0 -0
package/dist/collab.js
CHANGED
|
@@ -11,7 +11,7 @@ import "@univerjs/preset-sheets-find-replace/lib/index.css";
|
|
|
11
11
|
import "@univerjs/preset-sheets-data-validation/lib/index.css";
|
|
12
12
|
import "@univerjs/preset-sheets-note/lib/index.css";
|
|
13
13
|
import { createUniver, LocaleType, mergeLocales, purpleTheme } from "@univerjs/presets";
|
|
14
|
-
import { CalculationMode, IMarkSelectionService, UniverSheetsCorePreset } from "@univerjs/preset-sheets-core";
|
|
14
|
+
import { CalculationMode, IMarkSelectionService, SelectionControl, UniverSheetsCorePreset } from "@univerjs/preset-sheets-core";
|
|
15
15
|
import { UniverSheetsDataValidationPreset } from "@univerjs/preset-sheets-data-validation";
|
|
16
16
|
import { UniverSheetsFilterPreset } from "@univerjs/preset-sheets-filter";
|
|
17
17
|
import { UniverSheetsFindReplacePreset } from "@univerjs/preset-sheets-find-replace";
|
|
@@ -29,6 +29,15 @@ import noteEn from "@univerjs/preset-sheets-note/locales/en-US";
|
|
|
29
29
|
import notePl from "@univerjs/preset-sheets-note/locales/pl-PL";
|
|
30
30
|
import sortEn from "@univerjs/preset-sheets-sort/locales/en-US";
|
|
31
31
|
import sortPl from "@univerjs/preset-sheets-sort/locales/pl-PL";
|
|
32
|
+
|
|
33
|
+
// src/sheets/calm.ts
|
|
34
|
+
var calm = (selection) => selection.style?.widgets && Object.values(selection.style.widgets).some(Boolean) ? { ...selection, style: { ...selection.style, widgets: {}, strokeWidth: 2 } } : selection;
|
|
35
|
+
|
|
36
|
+
// src/sheets/grid.ts
|
|
37
|
+
var draw = SelectionControl.prototype.updateRangeBySelectionWithCoord;
|
|
38
|
+
SelectionControl.prototype.updateRangeBySelectionWithCoord = function(selection, ...rest) {
|
|
39
|
+
draw.call(this, calm(selection), ...rest);
|
|
40
|
+
};
|
|
32
41
|
function grid(container, language, edit) {
|
|
33
42
|
return createUniver({
|
|
34
43
|
locale: language === "pl" ? LocaleType.PL_PL : LocaleType.EN_US,
|
|
@@ -36,7 +45,7 @@ function grid(container, language, edit) {
|
|
|
36
45
|
[LocaleType.EN_US]: mergeLocales(coreEn, checkEn, filterEn, findEn, noteEn, sortEn),
|
|
37
46
|
[LocaleType.PL_PL]: mergeLocales(corePl, checkPl, filterPl, findPl, notePl, sortPl)
|
|
38
47
|
},
|
|
39
|
-
theme: purpleTheme,
|
|
48
|
+
theme: { ...purpleTheme, "loop-color": { 1: "blue.500", 2: "red.500", 3: "green.600", 4: "orange.500", 5: "purple.500", 6: "jiqing.600", 7: "pink.500", 8: "yellow.700", 9: "indigo.600", 10: "red.700", 11: "green.800", 12: "blue.800" } },
|
|
40
49
|
darkMode: false,
|
|
41
50
|
presets: [
|
|
42
51
|
UniverSheetsCorePreset({
|
|
@@ -60,7 +69,7 @@ function marks({ univer, univerAPI: api }) {
|
|
|
60
69
|
const service = univer.__getInjector().get(IMarkSelectionService);
|
|
61
70
|
let list = [];
|
|
62
71
|
let ids = [];
|
|
63
|
-
const
|
|
72
|
+
const draw2 = () => {
|
|
64
73
|
ids.forEach((id) => service.removeShape(id));
|
|
65
74
|
const sid = api.getActiveWorkbook()?.getActiveSheet().getSheetId();
|
|
66
75
|
ids = list.filter((m) => m.sheet === sid).flatMap((m) => {
|
|
@@ -69,11 +78,11 @@ function marks({ univer, univerAPI: api }) {
|
|
|
69
78
|
return id ? [id] : [];
|
|
70
79
|
});
|
|
71
80
|
};
|
|
72
|
-
const turn = api.addEvent(api.Event.ActiveSheetChanged,
|
|
81
|
+
const turn = api.addEvent(api.Event.ActiveSheetChanged, draw2);
|
|
73
82
|
return {
|
|
74
83
|
show: (next) => {
|
|
75
84
|
list = next;
|
|
76
|
-
|
|
85
|
+
draw2();
|
|
77
86
|
},
|
|
78
87
|
dispose: () => {
|
|
79
88
|
turn.dispose();
|
|
@@ -85,4 +94,4 @@ export {
|
|
|
85
94
|
grid,
|
|
86
95
|
marks
|
|
87
96
|
};
|
|
88
|
-
//# sourceMappingURL=grid-
|
|
97
|
+
//# sourceMappingURL=grid-AZLMNS7K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sheets/grid.ts","../src/sheets/calm.ts"],"sourcesContent":["import '@univerjs/preset-sheets-core/lib/index.css';\nimport '@univerjs/preset-sheets-sort/lib/index.css';\nimport '@univerjs/preset-sheets-filter/lib/index.css';\nimport '@univerjs/preset-sheets-find-replace/lib/index.css';\nimport '@univerjs/preset-sheets-data-validation/lib/index.css';\nimport '@univerjs/preset-sheets-note/lib/index.css';\nimport { createUniver, LocaleType, mergeLocales, purpleTheme } from '@univerjs/presets';\nimport { CalculationMode, IMarkSelectionService, SelectionControl, UniverSheetsCorePreset } from '@univerjs/preset-sheets-core';\nimport { UniverSheetsDataValidationPreset } from '@univerjs/preset-sheets-data-validation';\nimport { UniverSheetsFilterPreset } from '@univerjs/preset-sheets-filter';\nimport { UniverSheetsFindReplacePreset } from '@univerjs/preset-sheets-find-replace';\nimport { UniverSheetsNotePreset } from '@univerjs/preset-sheets-note';\nimport { UniverSheetsSortPreset } from '@univerjs/preset-sheets-sort';\nimport coreEn from '@univerjs/preset-sheets-core/locales/en-US';\nimport corePl from '@univerjs/preset-sheets-core/locales/pl-PL';\nimport checkEn from '@univerjs/preset-sheets-data-validation/locales/en-US';\nimport checkPl from '@univerjs/preset-sheets-data-validation/locales/pl-PL';\nimport filterEn from '@univerjs/preset-sheets-filter/locales/en-US';\nimport filterPl from '@univerjs/preset-sheets-filter/locales/pl-PL';\nimport findEn from '@univerjs/preset-sheets-find-replace/locales/en-US';\nimport findPl from '@univerjs/preset-sheets-find-replace/locales/pl-PL';\nimport noteEn from '@univerjs/preset-sheets-note/locales/en-US';\nimport notePl from '@univerjs/preset-sheets-note/locales/pl-PL';\nimport sortEn from '@univerjs/preset-sheets-sort/locales/en-US';\nimport sortPl from '@univerjs/preset-sheets-sort/locales/pl-PL';\nimport type { Language } from '../types';\nimport { calm } from './calm';\nimport { box } from './refs';\n\nexport type Mark = { sheet: string; range: string; color: string };\n\nconst draw = SelectionControl.prototype.updateRangeBySelectionWithCoord;\n// Univer draws eight resize handles on every formula reference and offers no option to turn them off.\nSelectionControl.prototype.updateRangeBySelectionWithCoord = function (selection, ...rest) { draw.call(this, calm(selection), ...rest); };\n\nexport function grid(container: HTMLElement, language: Language, edit: boolean) {\n return createUniver({\n locale: language === 'pl' ? LocaleType.PL_PL : LocaleType.EN_US,\n locales: {\n [LocaleType.EN_US]: mergeLocales(coreEn, checkEn, filterEn, findEn, noteEn, sortEn),\n [LocaleType.PL_PL]: mergeLocales(corePl, checkPl, filterPl, findPl, notePl, sortPl),\n },\n theme: { ...purpleTheme, 'loop-color': { 1: 'blue.500', 2: 'red.500', 3: 'green.600', 4: 'orange.500', 5: 'purple.500', 6: 'jiqing.600', 7: 'pink.500', 8: 'yellow.700', 9: 'indigo.600', 10: 'red.700', 11: 'green.800', 12: 'blue.800' } },\n darkMode: false,\n presets: [\n UniverSheetsCorePreset({\n container, toolbar: false, formulaBar: true, contextMenu: true, disableAutoFocus: true,\n footer: { sheetBar: true, statisticBar: true, menus: edit, zoomSlider: true, addSheetButtonConfig: { show: edit } },\n formula: { initialFormulaComputing: CalculationMode.WHEN_EMPTY },\n }),\n UniverSheetsSortPreset(),\n UniverSheetsFilterPreset(),\n UniverSheetsFindReplacePreset(),\n UniverSheetsDataValidationPreset(),\n UniverSheetsNotePreset(),\n ],\n });\n}\n\nexport function marks({ univer, univerAPI: api }: ReturnType<typeof grid>) {\n const service = univer.__getInjector().get(IMarkSelectionService);\n let list: Mark[] = [];\n let ids: string[] = [];\n const draw = () => {\n ids.forEach(id => service.removeShape(id));\n const sid = api.getActiveWorkbook()?.getActiveSheet().getSheetId();\n ids = list.filter(m => m.sheet === sid).flatMap(m => {\n const b = box(m.range);\n const id = b && service.addShape({ range: b, primary: null, style: { stroke: m.color, fill: `${m.color}1f`, strokeWidth: 2, widgets: {} } }, [], 1000);\n return id ? [id] : [];\n });\n };\n const turn = api.addEvent(api.Event.ActiveSheetChanged, draw);\n return {\n show: (next: Mark[]) => { list = next; draw(); },\n dispose: () => { turn.dispose(); ids.forEach(id => service.removeShape(id)); },\n };\n}\n","export const calm = <T extends { style?: { widgets?: object; strokeWidth?: number } | null | void }>(selection: T): T =>\n selection.style?.widgets && Object.values(selection.style.widgets).some(Boolean) ? { ...selection, style: { ...selection.style, widgets: {}, strokeWidth: 2 } } : selection;\n"],"mappings":";;;;;;AAAA,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,SAAS,cAAc,YAAY,cAAc,mBAAmB;AACpE,SAAS,i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E,WAAK,QAAQ;AAAG,UAAI,QAAQ,QAAM,QAAQ,YAAY,EAAE,CAAC;AAAA,IAAG;AAAA,EAC/E;AACF;","names":["draw"]}
|
package/dist/index.cjs
CHANGED
|
@@ -4735,7 +4735,7 @@ var init_extensions = __esm({
|
|
|
4735
4735
|
var version;
|
|
4736
4736
|
var init_package = __esm({
|
|
4737
4737
|
"package.json"() {
|
|
4738
|
-
version = "0.16.
|
|
4738
|
+
version = "0.16.2";
|
|
4739
4739
|
}
|
|
4740
4740
|
});
|
|
4741
4741
|
|
|
@@ -8827,20 +8827,24 @@ img { max-width: 100%; } img[data-wrap='left'] { float: left; margin: 0 12pt 6pt
|
|
|
8827
8827
|
}
|
|
8828
8828
|
}
|
|
8829
8829
|
),
|
|
8830
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
8831
|
-
|
|
8832
|
-
|
|
8830
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-find-end", children: [
|
|
8831
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("small", { "aria-live": "polite", children: query ? found?.hits.length ? `${(found.at ?? 0) + 1} / ${found.hits.length}` : t.noHits : "" }),
|
|
8832
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": t.previous, title: t.previous, disabled: !found?.hits.length, onClick: () => seek({ at: found.at - 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronUp, { "aria-hidden": true }) }),
|
|
8833
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": t.next, title: t.next, disabled: !found?.hits.length, onClick: () => seek({ at: found.at + 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.ChevronDown, { "aria-hidden": true }) })
|
|
8834
|
+
] })
|
|
8833
8835
|
] }),
|
|
8834
8836
|
can.edit && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-docs-row", children: [
|
|
8835
8837
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { value: swap, placeholder: t.replaceWith, "aria-label": t.replaceWith, onChange: (e) => setSwap(e.target.value) }),
|
|
8836
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8838
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "w100n-text-find-end", children: [
|
|
8839
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-pdf-link", disabled: !found?.hits.length, onClick: () => {
|
|
8840
|
+
replace(editor, swap, false);
|
|
8841
|
+
seek({});
|
|
8842
|
+
}, children: t.replaceOne }),
|
|
8843
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "w100n-docs-action", disabled: !found?.hits.length, onClick: () => {
|
|
8844
|
+
replace(editor, swap, true);
|
|
8845
|
+
seek({});
|
|
8846
|
+
}, children: t.replaceAll })
|
|
8847
|
+
] })
|
|
8844
8848
|
] }),
|
|
8845
8849
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "w100n-setup-check", children: [
|
|
8846
8850
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "checkbox", checked: matchCase, onChange: (e) => {
|
|
@@ -10075,6 +10079,15 @@ var init_sheets = __esm({
|
|
|
10075
10079
|
}
|
|
10076
10080
|
});
|
|
10077
10081
|
|
|
10082
|
+
// src/sheets/calm.ts
|
|
10083
|
+
var calm;
|
|
10084
|
+
var init_calm = __esm({
|
|
10085
|
+
"src/sheets/calm.ts"() {
|
|
10086
|
+
"use strict";
|
|
10087
|
+
calm = (selection) => selection.style?.widgets && Object.values(selection.style.widgets).some(Boolean) ? { ...selection, style: { ...selection.style, widgets: {}, strokeWidth: 2 } } : selection;
|
|
10088
|
+
}
|
|
10089
|
+
});
|
|
10090
|
+
|
|
10078
10091
|
// src/sheets/grid.ts
|
|
10079
10092
|
var grid_exports = {};
|
|
10080
10093
|
__export(grid_exports, {
|
|
@@ -10088,7 +10101,7 @@ function grid2(container, language, edit) {
|
|
|
10088
10101
|
[import_presets.LocaleType.EN_US]: (0, import_presets.mergeLocales)(import_en_US.default, import_en_US2.default, import_en_US3.default, import_en_US4.default, import_en_US5.default, import_en_US6.default),
|
|
10089
10102
|
[import_presets.LocaleType.PL_PL]: (0, import_presets.mergeLocales)(import_pl_PL.default, import_pl_PL2.default, import_pl_PL3.default, import_pl_PL4.default, import_pl_PL5.default, import_pl_PL6.default)
|
|
10090
10103
|
},
|
|
10091
|
-
theme: import_presets.purpleTheme,
|
|
10104
|
+
theme: { ...import_presets.purpleTheme, "loop-color": { 1: "blue.500", 2: "red.500", 3: "green.600", 4: "orange.500", 5: "purple.500", 6: "jiqing.600", 7: "pink.500", 8: "yellow.700", 9: "indigo.600", 10: "red.700", 11: "green.800", 12: "blue.800" } },
|
|
10092
10105
|
darkMode: false,
|
|
10093
10106
|
presets: [
|
|
10094
10107
|
(0, import_preset_sheets_core.UniverSheetsCorePreset)({
|
|
@@ -10112,7 +10125,7 @@ function marks({ univer, univerAPI: api }) {
|
|
|
10112
10125
|
const service = univer.__getInjector().get(import_preset_sheets_core.IMarkSelectionService);
|
|
10113
10126
|
let list = [];
|
|
10114
10127
|
let ids = [];
|
|
10115
|
-
const
|
|
10128
|
+
const draw2 = () => {
|
|
10116
10129
|
ids.forEach((id) => service.removeShape(id));
|
|
10117
10130
|
const sid = api.getActiveWorkbook()?.getActiveSheet().getSheetId();
|
|
10118
10131
|
ids = list.filter((m) => m.sheet === sid).flatMap((m) => {
|
|
@@ -10121,11 +10134,11 @@ function marks({ univer, univerAPI: api }) {
|
|
|
10121
10134
|
return id ? [id] : [];
|
|
10122
10135
|
});
|
|
10123
10136
|
};
|
|
10124
|
-
const turn2 = api.addEvent(api.Event.ActiveSheetChanged,
|
|
10137
|
+
const turn2 = api.addEvent(api.Event.ActiveSheetChanged, draw2);
|
|
10125
10138
|
return {
|
|
10126
10139
|
show: (next) => {
|
|
10127
10140
|
list = next;
|
|
10128
|
-
|
|
10141
|
+
draw2();
|
|
10129
10142
|
},
|
|
10130
10143
|
dispose: () => {
|
|
10131
10144
|
turn2.dispose();
|
|
@@ -10133,7 +10146,7 @@ function marks({ univer, univerAPI: api }) {
|
|
|
10133
10146
|
}
|
|
10134
10147
|
};
|
|
10135
10148
|
}
|
|
10136
|
-
var import_lib, import_lib2, import_lib3, import_lib4, import_lib5, import_lib6, import_presets, import_preset_sheets_core, import_preset_sheets_data_validation, import_preset_sheets_filter, import_preset_sheets_find_replace, import_preset_sheets_note, import_preset_sheets_sort, import_en_US, import_pl_PL, import_en_US2, import_pl_PL2, import_en_US3, import_pl_PL3, import_en_US4, import_pl_PL4, import_en_US5, import_pl_PL5, import_en_US6, import_pl_PL6;
|
|
10149
|
+
var import_lib, import_lib2, import_lib3, import_lib4, import_lib5, import_lib6, import_presets, import_preset_sheets_core, import_preset_sheets_data_validation, import_preset_sheets_filter, import_preset_sheets_find_replace, import_preset_sheets_note, import_preset_sheets_sort, import_en_US, import_pl_PL, import_en_US2, import_pl_PL2, import_en_US3, import_pl_PL3, import_en_US4, import_pl_PL4, import_en_US5, import_pl_PL5, import_en_US6, import_pl_PL6, draw;
|
|
10137
10150
|
var init_grid = __esm({
|
|
10138
10151
|
"src/sheets/grid.ts"() {
|
|
10139
10152
|
"use strict";
|
|
@@ -10162,7 +10175,12 @@ var init_grid = __esm({
|
|
|
10162
10175
|
import_pl_PL5 = __toESM(require("@univerjs/preset-sheets-note/locales/pl-PL"), 1);
|
|
10163
10176
|
import_en_US6 = __toESM(require("@univerjs/preset-sheets-sort/locales/en-US"), 1);
|
|
10164
10177
|
import_pl_PL6 = __toESM(require("@univerjs/preset-sheets-sort/locales/pl-PL"), 1);
|
|
10178
|
+
init_calm();
|
|
10165
10179
|
init_refs();
|
|
10180
|
+
draw = import_preset_sheets_core.SelectionControl.prototype.updateRangeBySelectionWithCoord;
|
|
10181
|
+
import_preset_sheets_core.SelectionControl.prototype.updateRangeBySelectionWithCoord = function(selection, ...rest) {
|
|
10182
|
+
draw.call(this, calm(selection), ...rest);
|
|
10183
|
+
};
|
|
10166
10184
|
}
|
|
10167
10185
|
});
|
|
10168
10186
|
|
|
@@ -12813,7 +12831,7 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
|
|
|
12813
12831
|
setSigning(null);
|
|
12814
12832
|
setTool("place");
|
|
12815
12833
|
};
|
|
12816
|
-
const
|
|
12834
|
+
const draw2 = (e) => {
|
|
12817
12835
|
const r = e.currentTarget.getBoundingClientRect();
|
|
12818
12836
|
const p = { x: e.clientX - r.left, y: e.clientY - r.top };
|
|
12819
12837
|
const ctx = e.currentTarget.getContext("2d");
|
|
@@ -13077,7 +13095,7 @@ function PdfView({ bytes, t, language, worker, rights, host, documentId, onSaved
|
|
|
13077
13095
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "w100n-pdf-script", style: { fontSize: Math.min(52, Math.floor(680 / Math.max(1, (signing.name || t.yourName).length))) }, children: signing.name || t.yourName })
|
|
13078
13096
|
] }),
|
|
13079
13097
|
signing.tab === "drawn" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
13080
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("canvas", { ref: pad, className: "w100n-pdf-pad", "aria-label": t.drawHere, onPointerDown:
|
|
13098
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("canvas", { ref: pad, className: "w100n-pdf-pad", "aria-label": t.drawHere, onPointerDown: draw2, onPointerMove: draw2 }),
|
|
13081
13099
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "w100n-docs-row", children: [
|
|
13082
13100
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("small", { className: "w100n-docs-muted", children: t.drawHere }),
|
|
13083
13101
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "w100n-pdf-link", onClick: () => {
|