vobi_document 1.1.5 → 1.1.6
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/{chunk-3F5SJWGQ.cjs → chunk-CSQHYPHU.cjs} +14 -14
- package/dist/{chunk-3F5SJWGQ.cjs.map → chunk-CSQHYPHU.cjs.map} +1 -1
- package/dist/{chunk-LQAZBMG4.cjs → chunk-LQIV7LT7.cjs} +8 -8
- package/dist/{chunk-LQAZBMG4.cjs.map → chunk-LQIV7LT7.cjs.map} +1 -1
- package/dist/{chunk-4BAC7SQD.js → chunk-NLM2NZWH.js} +3 -3
- package/dist/{chunk-4BAC7SQD.js.map → chunk-NLM2NZWH.js.map} +1 -1
- package/dist/{chunk-QQHKBSAG.js → chunk-PNCVE5YE.js} +3 -3
- package/dist/{chunk-QQHKBSAG.js.map → chunk-PNCVE5YE.js.map} +1 -1
- package/dist/{chunk-GDLKTYDB.cjs → chunk-RGA2OGHE.cjs} +3 -3
- package/dist/{chunk-GDLKTYDB.cjs.map → chunk-RGA2OGHE.cjs.map} +1 -1
- package/dist/{chunk-RKYQRL6M.cjs → chunk-RGG5BGMG.cjs} +17 -17
- package/dist/chunk-RGG5BGMG.cjs.map +1 -0
- package/dist/{chunk-MFBZNNYC.js → chunk-Y7ADQ2HV.js} +4 -4
- package/dist/chunk-Y7ADQ2HV.js.map +1 -0
- package/dist/{chunk-K6ZKB5EA.js → chunk-Z3ZCB3ZT.js} +3 -3
- package/dist/{chunk-K6ZKB5EA.js.map → chunk-Z3ZCB3ZT.js.map} +1 -1
- package/dist/editor.cjs +14 -14
- package/dist/editor.js +2 -2
- package/dist/index.cjs +58 -58
- package/dist/index.js +5 -5
- package/dist/print.cjs +19 -19
- package/dist/print.cjs.map +1 -1
- package/dist/print.js +5 -5
- package/dist/print.js.map +1 -1
- package/dist/render.cjs +18 -18
- package/dist/render.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-MFBZNNYC.js.map +0 -1
- package/dist/chunk-RKYQRL6M.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkL5FXGEKX_cjs = require('./chunk-L5FXGEKX.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkRGA2OGHE_cjs = require('./chunk-RGA2OGHE.cjs');
|
|
5
5
|
var chunkQJ5W5EED_cjs = require('./chunk-QJ5W5EED.cjs');
|
|
6
6
|
var chunkSP5LCPDG_cjs = require('./chunk-SP5LCPDG.cjs');
|
|
7
7
|
var e = require('react');
|
|
@@ -249,12 +249,12 @@ function resolveTheme(theme = {}) {
|
|
|
249
249
|
return {
|
|
250
250
|
...theme,
|
|
251
251
|
documentFont: theme.documentFont ?? DEFAULT_DOCUMENT_FONT_ID,
|
|
252
|
-
colors: { ...
|
|
252
|
+
colors: { ...chunkRGA2OGHE_cjs.DEFAULT_DOCUMENT_COLORS, ...theme.colors },
|
|
253
253
|
page: {
|
|
254
254
|
format: "A4",
|
|
255
255
|
orientation: "portrait",
|
|
256
256
|
...theme.page,
|
|
257
|
-
margins: { ...
|
|
257
|
+
margins: { ...chunkRGA2OGHE_cjs.DEFAULT_PAGE_MARGINS, ...theme.page?.margins }
|
|
258
258
|
},
|
|
259
259
|
header: { ...DEFAULT_HEADER_CONFIG, ...theme.header },
|
|
260
260
|
footer: { ...DEFAULT_FOOTER_CONFIG, ...theme.footer }
|
|
@@ -1004,7 +1004,7 @@ var COLOR_FIELDS = [
|
|
|
1004
1004
|
{ key: "background", label: "Fundo" }
|
|
1005
1005
|
];
|
|
1006
1006
|
function VisualTab({ theme, onPatch, onLogoUpload }) {
|
|
1007
|
-
const colors = { ...
|
|
1007
|
+
const colors = { ...chunkRGA2OGHE_cjs.DEFAULT_DOCUMENT_COLORS, ...theme.colors };
|
|
1008
1008
|
const setColor = (key, value) => onPatch({ colors: { ...theme.colors, [key]: value } });
|
|
1009
1009
|
const handleLogo = async (file) => {
|
|
1010
1010
|
if (!file || !onLogoUpload) return;
|
|
@@ -1031,7 +1031,7 @@ function VisualTab({ theme, onPatch, onLogoUpload }) {
|
|
|
1031
1031
|
"aria-label": "Fonte",
|
|
1032
1032
|
value: theme.documentFont ?? DEFAULT_DOCUMENT_FONT_ID,
|
|
1033
1033
|
onChange: (e2) => onPatch({ documentFont: e2.target.value }),
|
|
1034
|
-
children:
|
|
1034
|
+
children: chunkRGA2OGHE_cjs.DOCUMENT_FONTS.map((font) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: font.id, children: font.label }, font.id))
|
|
1035
1035
|
}
|
|
1036
1036
|
)
|
|
1037
1037
|
] }),
|
|
@@ -1171,12 +1171,12 @@ function DocumentEditor({
|
|
|
1171
1171
|
const [settingsOpen, setSettingsOpen] = e.useState(false);
|
|
1172
1172
|
const shellRef = e.useRef(null);
|
|
1173
1173
|
usePreserveCanvasScroll(shellRef);
|
|
1174
|
-
|
|
1174
|
+
chunkRGA2OGHE_cjs.useDocumentFont(theme.documentFont);
|
|
1175
1175
|
const disabledByKey = e.useMemo(
|
|
1176
1176
|
() => Object.fromEntries(disabledBlocks.map((block) => [block.key, block.reason ?? ""])),
|
|
1177
1177
|
[disabledBlocks.map((block) => `${block.key}:${block.reason ?? ""}`).join("|")]
|
|
1178
1178
|
);
|
|
1179
|
-
const baseConfig = e.useMemo(() =>
|
|
1179
|
+
const baseConfig = e.useMemo(() => chunkRGA2OGHE_cjs.buildConfig(registry), [registry]);
|
|
1180
1180
|
const config = e.useMemo(() => {
|
|
1181
1181
|
const disabledKeys = Object.keys(disabledByKey);
|
|
1182
1182
|
if (!disabledKeys.length) return baseConfig;
|
|
@@ -1225,12 +1225,12 @@ function DocumentEditor({
|
|
|
1225
1225
|
drawerItem: ({ name }) => {
|
|
1226
1226
|
const disabledByKeyLive = disabledByKeyRef.current;
|
|
1227
1227
|
const blockByKeyLive = blockByKeyRef.current;
|
|
1228
|
-
const card = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1229
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1228
|
+
const card = /* @__PURE__ */ jsxRuntime.jsxs(chunkRGA2OGHE_cjs.DrawerCard, { $disabled: name in disabledByKeyLive, children: [
|
|
1229
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRGA2OGHE_cjs.DrawerItemIcon, { children: blockByKeyLive[name]?.icon ?? /* @__PURE__ */ jsxRuntime.jsx(chunkL5FXGEKX_cjs.BlockIcon, {}) }),
|
|
1230
1230
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: blockByKeyLive[name]?.label ?? name })
|
|
1231
1231
|
] });
|
|
1232
1232
|
if (!(name in disabledByKeyLive)) return card;
|
|
1233
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1233
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkRGA2OGHE_cjs.DrawerHint, { "data-hint": disabledByKeyLive[name] || void 0, children: card });
|
|
1234
1234
|
}
|
|
1235
1235
|
};
|
|
1236
1236
|
const withBridge = apiRefRef.current ? {
|
|
@@ -1276,8 +1276,8 @@ function DocumentEditor({
|
|
|
1276
1276
|
}
|
|
1277
1277
|
return { ...withActions, header: Header };
|
|
1278
1278
|
}, [Boolean(renderHeader), Boolean(apiRef), Boolean(renderBlockActions)]);
|
|
1279
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1280
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1279
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkRGA2OGHE_cjs.DocumentThemeProvider, { theme, children: /* @__PURE__ */ jsxRuntime.jsx(chunkSP5LCPDG_cjs.CatalogProvider, { catalog, translator, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkSP5LCPDG_cjs.ResolvedProvider, { resolved, ensureResolved, unresolvedDisplay, children: [
|
|
1280
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRGA2OGHE_cjs.EditorShell, { ref: shellRef, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1281
1281
|
core.Puck,
|
|
1282
1282
|
{
|
|
1283
1283
|
config,
|
|
@@ -1385,5 +1385,5 @@ exports.rgbToHex = rgbToHex;
|
|
|
1385
1385
|
exports.themeSchema = themeSchema;
|
|
1386
1386
|
exports.useDocumentAutosave = useDocumentAutosave;
|
|
1387
1387
|
exports.usePuckState = usePuckState;
|
|
1388
|
-
//# sourceMappingURL=chunk-
|
|
1389
|
-
//# sourceMappingURL=chunk-
|
|
1388
|
+
//# sourceMappingURL=chunk-CSQHYPHU.cjs.map
|
|
1389
|
+
//# sourceMappingURL=chunk-CSQHYPHU.cjs.map
|