@cosmicdrift/kumiko-document-designer 0.382.0 → 0.383.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.
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TemplateResolverHandlers, TemplateResolverQueries, } from "@cosmicdrift/kumiko-bundled-features/template-resolver/web";
3
- import { dispatcherErrorText, useMutation, usePrimitives, useQuery, useTranslation, } from "@cosmicdrift/kumiko-renderer";
3
+ import { dispatcherErrorText, useMutation, usePrimitives, useQuery, useTranslation, useUnsavedInputSource, } from "@cosmicdrift/kumiko-renderer";
4
4
  import { useState } from "react";
5
5
  import { EditorHeader, EditorLocaleSwitch, EditorModeSwitch, originOf, } from "./editor-header.js";
6
6
  import { EditorBody, EditorFooter, EditorFrame } from "./editor-shell.js";
@@ -95,6 +95,7 @@ export function MailEditorBody(props) {
95
95
  persistence.clearError();
96
96
  };
97
97
  const dirty = isDraftDirty(draft, baseline);
98
+ useUnsavedInputSource(() => dirty);
98
99
  const busy = persistence.busy;
99
100
  const canSave = !locked && !busy && validation?.canSave === true && (dirty || creating);
100
101
  const canPublish = !locked &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-document-designer",
3
- "version": "0.382.0",
3
+ "version": "0.383.0",
4
4
  "description": "Document designer for Kumiko: template overview, layout editor (mail layout, PDF letterhead) and the PDF template editor.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -20,11 +20,11 @@
20
20
  "./web/styles.css": "./src/web/styles.css"
21
21
  },
22
22
  "dependencies": {
23
- "@cosmicdrift/kumiko-bundled-features": "0.382.0",
24
- "@cosmicdrift/kumiko-framework": "0.382.0",
25
- "@cosmicdrift/kumiko-renderer": "0.382.0",
26
- "@cosmicdrift/kumiko-renderer-puppeteer-client": "0.382.0",
27
- "@cosmicdrift/kumiko-types": "0.382.0",
23
+ "@cosmicdrift/kumiko-bundled-features": "0.383.0",
24
+ "@cosmicdrift/kumiko-framework": "0.383.0",
25
+ "@cosmicdrift/kumiko-renderer": "0.383.0",
26
+ "@cosmicdrift/kumiko-renderer-puppeteer-client": "0.383.0",
27
+ "@cosmicdrift/kumiko-types": "0.383.0",
28
28
  "react": "^19.2.6"
29
29
  },
30
30
  "devDependencies": {