vobi_document 1.1.5 → 1.1.7

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkL5FXGEKX_cjs = require('./chunk-L5FXGEKX.cjs');
4
- var chunkGDLKTYDB_cjs = require('./chunk-GDLKTYDB.cjs');
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: { ...chunkGDLKTYDB_cjs.DEFAULT_DOCUMENT_COLORS, ...theme.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: { ...chunkGDLKTYDB_cjs.DEFAULT_PAGE_MARGINS, ...theme.page?.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 = { ...chunkGDLKTYDB_cjs.DEFAULT_DOCUMENT_COLORS, ...theme.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: chunkGDLKTYDB_cjs.DOCUMENT_FONTS.map((font) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: font.id, children: font.label }, font.id))
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
- chunkGDLKTYDB_cjs.useDocumentFont(theme.documentFont);
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(() => chunkGDLKTYDB_cjs.buildConfig(registry), [registry]);
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(chunkGDLKTYDB_cjs.DrawerCard, { $disabled: name in disabledByKeyLive, children: [
1229
- /* @__PURE__ */ jsxRuntime.jsx(chunkGDLKTYDB_cjs.DrawerItemIcon, { children: blockByKeyLive[name]?.icon ?? /* @__PURE__ */ jsxRuntime.jsx(chunkL5FXGEKX_cjs.BlockIcon, {}) }),
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(chunkGDLKTYDB_cjs.DrawerHint, { "data-hint": disabledByKeyLive[name] || void 0, children: card });
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(chunkGDLKTYDB_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(chunkGDLKTYDB_cjs.EditorShell, { ref: shellRef, children: /* @__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-3F5SJWGQ.cjs.map
1389
- //# sourceMappingURL=chunk-3F5SJWGQ.cjs.map
1388
+ //# sourceMappingURL=chunk-CSQHYPHU.cjs.map
1389
+ //# sourceMappingURL=chunk-CSQHYPHU.cjs.map