@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.d.cts
CHANGED
|
@@ -509,6 +509,7 @@ declare const en: {
|
|
|
509
509
|
"error.staleReplacement": string;
|
|
510
510
|
"error.staleCompose": string;
|
|
511
511
|
"error.stalePreview": string;
|
|
512
|
+
"error.outputValidation": string;
|
|
512
513
|
"error.unmatchedReplace": string;
|
|
513
514
|
"error.unresolvableAddress": string;
|
|
514
515
|
"error.runRangeConflict": string;
|
package/dist/index.d.ts
CHANGED
|
@@ -509,6 +509,7 @@ declare const en: {
|
|
|
509
509
|
"error.staleReplacement": string;
|
|
510
510
|
"error.staleCompose": string;
|
|
511
511
|
"error.stalePreview": string;
|
|
512
|
+
"error.outputValidation": string;
|
|
512
513
|
"error.unmatchedReplace": string;
|
|
513
514
|
"error.unresolvableAddress": string;
|
|
514
515
|
"error.runRangeConflict": string;
|
package/dist/index.js
CHANGED
|
@@ -2963,11 +2963,13 @@ function isLayoutOverflow(error) {
|
|
|
2963
2963
|
function wrapped(error, text, detail) {
|
|
2964
2964
|
if (isHwpEngineError2(error)) {
|
|
2965
2965
|
const insertion = insertionOf(error);
|
|
2966
|
+
const refusal = engineRefusalKind(error);
|
|
2966
2967
|
return Object.assign(
|
|
2967
2968
|
new HwpEngineError2(error.code, text, {
|
|
2968
2969
|
...error.status === void 0 ? {} : { status: error.status },
|
|
2969
2970
|
cause: error,
|
|
2970
2971
|
...insertion === void 0 ? {} : { insertion },
|
|
2972
|
+
...refusal === void 0 ? {} : { refusal },
|
|
2971
2973
|
// The marker survives too: a host's `onError` branches on the same
|
|
2972
2974
|
// structured fields the transport set, so a wrapper that drops one
|
|
2973
2975
|
// hands it a failure it cannot classify (#91).
|
|
@@ -2990,6 +2992,9 @@ function isRefusedInsertion(error) {
|
|
|
2990
2992
|
function insertionFailure(error, blocks, t) {
|
|
2991
2993
|
const message = error instanceof Error ? error.message : String(error);
|
|
2992
2994
|
if (!isRefusedInsertion(error)) return error;
|
|
2995
|
+
if (engineRefusalKind(error) === "output_validation") {
|
|
2996
|
+
return wrapped(error, t("error.outputValidation"), message);
|
|
2997
|
+
}
|
|
2993
2998
|
const insertion = insertionOf(error);
|
|
2994
2999
|
if (insertion?.kind === "unknown_style") {
|
|
2995
3000
|
return wrapped(error, t("components.unknownStyle", { style: insertion.style }), message);
|
|
@@ -4014,6 +4019,7 @@ var en = {
|
|
|
4014
4019
|
"error.staleReplacement": "The document changed during template work; reopen it and try again.",
|
|
4015
4020
|
"error.staleCompose": "The open document changed while the new document was being composed; compose again.",
|
|
4016
4021
|
"error.stalePreview": "The document changed while this preview was being made; preview again on the open document.",
|
|
4022
|
+
"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.",
|
|
4017
4023
|
"error.unmatchedReplace": "The engine found no text to replace in that paragraph, so nothing was applied. Select the text again and retry.",
|
|
4018
4024
|
"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.",
|
|
4019
4025
|
"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.",
|
|
@@ -4472,6 +4478,7 @@ var ko = {
|
|
|
4472
4478
|
"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.",
|
|
4473
4479
|
"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.",
|
|
4474
4480
|
"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.",
|
|
4481
|
+
"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.",
|
|
4475
4482
|
"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.",
|
|
4476
4483
|
"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.",
|
|
4477
4484
|
"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.",
|
|
@@ -4652,7 +4659,8 @@ var REFUSAL_MESSAGE = {
|
|
|
4652
4659
|
unmatched_replace: "error.unmatchedReplace",
|
|
4653
4660
|
run_range_conflict: "error.runRangeConflict",
|
|
4654
4661
|
range_tag: "error.rangeTagRefused",
|
|
4655
|
-
unresolvable_address: "error.unresolvableAddress"
|
|
4662
|
+
unresolvable_address: "error.unresolvableAddress",
|
|
4663
|
+
output_validation: "error.outputValidation"
|
|
4656
4664
|
};
|
|
4657
4665
|
var HwpEditor = forwardRef(
|
|
4658
4666
|
function HwpEditor2(props, ref) {
|