@hwp-editor/react 1.4.1 → 1.4.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/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2999,11 +2999,13 @@ function isLayoutOverflow(error) {
|
|
|
2999
2999
|
function wrapped(error, text, detail) {
|
|
3000
3000
|
if ((0, import_core16.isHwpEngineError)(error)) {
|
|
3001
3001
|
const insertion = insertionOf(error);
|
|
3002
|
+
const refusal = engineRefusalKind(error);
|
|
3002
3003
|
return Object.assign(
|
|
3003
3004
|
new import_core16.HwpEngineError(error.code, text, {
|
|
3004
3005
|
...error.status === void 0 ? {} : { status: error.status },
|
|
3005
3006
|
cause: error,
|
|
3006
3007
|
...insertion === void 0 ? {} : { insertion },
|
|
3008
|
+
...refusal === void 0 ? {} : { refusal },
|
|
3007
3009
|
// The marker survives too: a host's `onError` branches on the same
|
|
3008
3010
|
// structured fields the transport set, so a wrapper that drops one
|
|
3009
3011
|
// hands it a failure it cannot classify (#91).
|
|
@@ -3026,6 +3028,9 @@ function isRefusedInsertion(error) {
|
|
|
3026
3028
|
function insertionFailure(error, blocks, t) {
|
|
3027
3029
|
const message = error instanceof Error ? error.message : String(error);
|
|
3028
3030
|
if (!isRefusedInsertion(error)) return error;
|
|
3031
|
+
if (engineRefusalKind(error) === "output_validation") {
|
|
3032
|
+
return wrapped(error, t("error.outputValidation"), message);
|
|
3033
|
+
}
|
|
3029
3034
|
const insertion = insertionOf(error);
|
|
3030
3035
|
if (insertion?.kind === "unknown_style") {
|
|
3031
3036
|
return wrapped(error, t("components.unknownStyle", { style: insertion.style }), message);
|
|
@@ -4050,6 +4055,7 @@ var en = {
|
|
|
4050
4055
|
"error.staleReplacement": "The document changed during template work; reopen it and try again.",
|
|
4051
4056
|
"error.staleCompose": "The open document changed while the new document was being composed; compose again.",
|
|
4052
4057
|
"error.stalePreview": "The document changed while this preview was being made; preview again on the open document.",
|
|
4058
|
+
"error.outputValidation": "The engine's output preservation check refused to write the edited file. One known cause is HWPX font metadata (typeInfo) that HWP5 cannot represent. In that case, save as .hwpx to preserve the metadata. If you accept its loss, explicitly run ahwp convert in.hwpx -o in.hwp without --strict, reopen in.hwp, and retry. For other causes, rerun the same edit with the engine's --verify option and inspect the verification report.",
|
|
4053
4059
|
"error.unmatchedReplace": "The engine found no text to replace in that paragraph, so nothing was applied. Select the text again and retry.",
|
|
4054
4060
|
"error.unresolvableAddress": "The engine could not address the edit's paragraph or run. Runs inside some nested paragraphs cannot be addressed. Format text in a top-level paragraph or a table cell, or edit this target in a word processor.",
|
|
4055
4061
|
"error.runRangeConflict": "A run format change was refused because an earlier pending change in that paragraph (text, a link, a field, a bookmark, an image or a cell) may change its text, so the run might no longer name the same characters. Nothing was applied. Remove the format change from the pending list, apply the rest, then format the run again; or queue the format change before the others.",
|
|
@@ -4508,6 +4514,7 @@ var ko = {
|
|
|
4508
4514
|
"error.staleReplacement": "\uD15C\uD50C\uB9BF \uC791\uC5C5 \uC911 \uBB38\uC11C\uAC00 \uBC14\uB00C\uC5C8\uC2B5\uB2C8\uB2E4. \uBB38\uC11C\uB97C \uB2E4\uC2DC \uC5F0 \uB4A4 \uC7AC\uC2DC\uB3C4\uD558\uC138\uC694.",
|
|
4509
4515
|
"error.staleCompose": "\uC0C8 \uBB38\uC11C\uB97C \uC791\uC131\uD558\uB294 \uB3D9\uC548 \uC5F4\uB9B0 \uBB38\uC11C\uAC00 \uBC14\uB00C\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC791\uC131\uD558\uC138\uC694.",
|
|
4510
4516
|
"error.stalePreview": "\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uB9CC\uB4DC\uB294 \uB3D9\uC548 \uBB38\uC11C\uAC00 \uBC14\uB00C\uC5C8\uC2B5\uB2C8\uB2E4. \uC5F4\uB9B0 \uBB38\uC11C\uC5D0\uC11C \uB2E4\uC2DC \uBBF8\uB9AC\uBCF4\uAE30\uD558\uC138\uC694.",
|
|
4517
|
+
"error.outputValidation": "\uC5D4\uC9C4\uC758 \uCD9C\uB825 \uBCF4\uC874 \uAC80\uC0AC\uC5D0\uC11C \uD3B8\uC9D1 \uACB0\uACFC \uD30C\uC77C \uC4F0\uAE30\uB97C \uAC70\uBD80\uD588\uC2B5\uB2C8\uB2E4. \uC54C\uB824\uC9C4 \uC6D0\uC778 \uC911 \uD558\uB098\uB294 HWP5\uB85C \uD45C\uD604\uD560 \uC218 \uC5C6\uB294 HWPX \uAE00\uAF34 \uBA54\uD0C0\uB370\uC774\uD130(typeInfo)\uC785\uB2C8\uB2E4. \uC774 \uACBD\uC6B0 \uBA54\uD0C0\uB370\uC774\uD130\uB97C \uBCF4\uC874\uD558\uB824\uBA74 .hwpx\uB85C \uC800\uC7A5\uD558\uC138\uC694. \uBA54\uD0C0\uB370\uC774\uD130 \uC190\uC2E4\uC744 \uC218\uC6A9\uD55C\uB2E4\uBA74 ahwp convert in.hwpx -o in.hwp\uB97C --strict \uC5C6\uC774 \uBA85\uC2DC\uC801\uC73C\uB85C \uC2E4\uD589\uD558\uACE0, in.hwp\uB97C \uB2E4\uC2DC \uC5F0 \uB4A4 \uC7AC\uC2DC\uB3C4\uD558\uC138\uC694. \uB2E4\uB978 \uC6D0\uC778\uC774\uBA74 \uAC19\uC740 \uD3B8\uC9D1\uC744 \uC5D4\uC9C4\uC758 --verify \uC635\uC158\uACFC \uD568\uAED8 \uB2E4\uC2DC \uC2E4\uD589\uD558\uACE0 \uAC80\uC99D \uBCF4\uACE0\uC11C\uB97C \uD655\uC778\uD558\uC138\uC694.",
|
|
4511
4518
|
"error.unmatchedReplace": "\uD574\uB2F9 \uBB38\uB2E8\uC5D0\uC11C \uBC14\uAFC0 \uD14D\uC2A4\uD2B8\uB97C \uC5D4\uC9C4\uC774 \uCC3E\uC9C0 \uBABB\uD574 \uC544\uBB34\uAC83\uB3C4 \uC801\uC6A9\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD14D\uC2A4\uD2B8\uB97C \uB2E4\uC2DC \uC120\uD0DD\uD55C \uB4A4 \uC7AC\uC2DC\uB3C4\uD558\uC138\uC694.",
|
|
4512
4519
|
"error.unresolvableAddress": "\uC5D4\uC9C4\uC774 \uD3B8\uC9D1 \uB300\uC0C1 \uBB38\uB2E8\uC774\uB098 run\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC77C\uBD80 \uC911\uCCA9 \uBB38\uB2E8 \uC548\uC758 run\uC740 \uC5D4\uC9C4\uC774 \uC8FC\uC18C\uB85C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCD5C\uC0C1\uC704 \uBB38\uB2E8\uC774\uB098 \uD45C \uC140\uC758 \uD14D\uC2A4\uD2B8\uC5D0 \uC11C\uC2DD\uC744 \uC9C0\uC815\uD558\uAC70\uB098, \uC774 \uB300\uC0C1\uC740 \uC6CC\uB4DC\uD504\uB85C\uC138\uC11C\uC5D0\uC11C \uD3B8\uC9D1\uD558\uC138\uC694.",
|
|
4513
4520
|
"error.runRangeConflict": "\uAC19\uC740 \uBB38\uB2E8\uC5D0 \uB300\uAE30 \uC911\uC778 \uC55E\uC120 \uBCC0\uACBD(\uD14D\uC2A4\uD2B8, \uB9C1\uD06C, \uD544\uB4DC, \uCC45\uAC08\uD53C, \uC774\uBBF8\uC9C0, \uC140)\uC774 \uBB38\uB2E8 \uD14D\uC2A4\uD2B8\uB97C \uBC14\uAFC0 \uC218 \uC788\uC5B4 run\uC774 \uB354 \uC774\uC0C1 \uAC19\uC740 \uAE00\uC790\uB97C \uAC00\uB9AC\uD0A4\uC9C0 \uC54A\uC744 \uC218 \uC788\uC73C\uBBC0\uB85C run \uC11C\uC2DD \uBCC0\uACBD\uC774 \uAC70\uBD80\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC544\uBB34\uAC83\uB3C4 \uC801\uC6A9\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB300\uAE30 \uBAA9\uB85D\uC5D0\uC11C \uC11C\uC2DD \uBCC0\uACBD\uC744 \uC81C\uAC70\uD558\uACE0 \uB098\uBA38\uC9C0\uB97C \uC801\uC6A9\uD55C \uB4A4 run \uC11C\uC2DD\uC744 \uB2E4\uC2DC \uC9C0\uC815\uD558\uAC70\uB098, \uC11C\uC2DD \uBCC0\uACBD\uC744 \uB2E4\uB978 \uBCC0\uACBD\uBCF4\uB2E4 \uBA3C\uC800 \uB300\uAE30\uC5F4\uC5D0 \uB123\uC73C\uC138\uC694.",
|
|
@@ -4688,7 +4695,8 @@ var REFUSAL_MESSAGE = {
|
|
|
4688
4695
|
unmatched_replace: "error.unmatchedReplace",
|
|
4689
4696
|
run_range_conflict: "error.runRangeConflict",
|
|
4690
4697
|
range_tag: "error.rangeTagRefused",
|
|
4691
|
-
unresolvable_address: "error.unresolvableAddress"
|
|
4698
|
+
unresolvable_address: "error.unresolvableAddress",
|
|
4699
|
+
output_validation: "error.outputValidation"
|
|
4692
4700
|
};
|
|
4693
4701
|
var HwpEditor = (0, import_react13.forwardRef)(
|
|
4694
4702
|
function HwpEditor2(props, ref) {
|