@sw7d/paper-renderer 0.1.2 → 0.1.4

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.
@@ -634,8 +634,8 @@ function Se(e, t, n, r, i, a, o, s) {
634
634
  let e = o + r.fontSize * .1, n = r.fontSize * 1.1;
635
635
  l += ` <rect x="${t.toFixed(2)}" y="${e.toFixed(2)}" width="${r.width.toFixed(2)}" height="${n.toFixed(2)}" fill="${r.backgroundColor}" fill-opacity="0.3"></rect>\n`;
636
636
  }
637
- let u = r.italic ? -r.fontSize * .02 : 0;
638
- if (l += ` <text class="text" xml:space="preserve" font-size="${r.fontSize}" font-weight="${a}" font-family="${r.fontFamily || "&quot;Times New Roman&quot;, SimSun"}" font-style="${i}" fill="${r.color}" fill-opacity="1" x="${c}" y="${(o + u).toFixed(2)}" dominant-baseline="hanging">${V(r.value)}</text>\n`, r.dotAbove) {
637
+ let u = r.italic ? -r.fontSize * .02 : 0, d = r.fontFamily ? V(r.fontFamily) : "&quot;Times New Roman&quot;, SimSun";
638
+ if (l += ` <text class="text" xml:space="preserve" font-size="${r.fontSize}" font-weight="${a}" font-family="${d}" font-style="${i}" fill="${r.color}" fill-opacity="1" x="${c}" y="${(o + u).toFixed(2)}" dominant-baseline="hanging">${V(r.value)}</text>\n`, r.dotAbove) {
639
639
  let e = Math.max(1.5, r.fontSize * .1), n = o + r.fontSize * .9 + e;
640
640
  for (let i = 0; i < s.length; i++) {
641
641
  let a = r.xPositions.length === s.length ? r.xPositions[i] + t + z(s[i], r.fontSize, r.fontFamily, r.bold, r.italic) / 2 : t + i * r.fontSize * .6 + r.fontSize * .3;
@@ -2330,7 +2330,7 @@ function gt(e) {
2330
2330
  //#region src/utils/questionHtmlParser.ts
2331
2331
  var _t = 0, vt = 0, yt = 0, bt = .5;
2332
2332
  function xt(e, t = {}) {
2333
- let { questionNo: n = "", score: r = "", contentWidth: i = 600, fontSize: a = 14, lineSpacing: o = 1.5, skipAnswerArea: s = !1 } = t, c = new DOMParser().parseFromString(e, "text/html"), l = [], u = Math.round(a * o * 1.67), d = n.length > 2 ? 26.25 : 17.5, f = new Set([
2333
+ let { questionNo: n = "", score: r = "", contentWidth: i = 600, fontSize: a = 14, lineSpacing: o = 1.5, skipAnswerArea: s = !1, protectContent: c = !1 } = t, l = new DOMParser().parseFromString(e, "text/html"), u = [], d = Math.round(a * o * 1.67), f = n.length > 2 ? 26.25 : 17.5, p = new Set([
2334
2334
  "p",
2335
2335
  "h1",
2336
2336
  "h2",
@@ -2343,13 +2343,13 @@ function xt(e, t = {}) {
2343
2343
  "ul",
2344
2344
  "div"
2345
2345
  ]);
2346
- for (let e = 0; e < c.body.childNodes.length; e++) {
2347
- let t = c.body.childNodes[e];
2346
+ for (let e = 0; e < l.body.childNodes.length; e++) {
2347
+ let t = l.body.childNodes[e];
2348
2348
  if (t.nodeType !== Node.ELEMENT_NODE) continue;
2349
2349
  let n = t, r = n.tagName.toLowerCase();
2350
2350
  if (r === "table") {
2351
- let e = jt(n, i, u), t = e.reduce((e, t) => e + t.lineHeight, 0) + 4;
2352
- l.push({
2351
+ let e = jt(n, i, d), t = e.reduce((e, t) => e + t.lineHeight, 0) + 4;
2352
+ u.push({
2353
2353
  lines: e,
2354
2354
  y: 0,
2355
2355
  height: t
@@ -2359,8 +2359,8 @@ function xt(e, t = {}) {
2359
2359
  if (r === "figure") {
2360
2360
  let e = n.querySelector("table");
2361
2361
  if (e) {
2362
- let t = jt(e, i, u), n = t.reduce((e, t) => e + t.lineHeight, 0) + 4;
2363
- l.push({
2362
+ let t = jt(e, i, d), n = t.reduce((e, t) => e + t.lineHeight, 0) + 4;
2363
+ u.push({
2364
2364
  lines: t,
2365
2365
  y: 0,
2366
2366
  height: n
@@ -2368,42 +2368,42 @@ function xt(e, t = {}) {
2368
2368
  }
2369
2369
  continue;
2370
2370
  }
2371
- if (!f.has(r)) continue;
2372
- let o = n, s = o.getAttribute("style") || "", p = J(o, a, s, i, d);
2373
- if (p.length === 0) continue;
2374
- let m = it(p, i, u), h = m.reduce((e, t) => e + t.lineHeight, 0) + 4, g = wt(s), _ = g === "center" ? "center" : g === "right" ? "right" : void 0;
2375
- l.push({
2371
+ if (!p.has(r)) continue;
2372
+ let o = n, s = o.getAttribute("style") || "", c = J(o, a, s, i, f);
2373
+ if (c.length === 0) continue;
2374
+ let m = it(c, i, d), h = m.reduce((e, t) => e + t.lineHeight, 0) + 4, g = wt(s), _ = g === "center" ? "center" : g === "right" ? "right" : void 0;
2375
+ u.push({
2376
2376
  lines: m,
2377
2377
  y: 0,
2378
2378
  height: h,
2379
2379
  justification: _
2380
2380
  });
2381
2381
  }
2382
- if (!s) for (let e = 0; e < 2; e++) l.push({
2382
+ if (!s) for (let e = 0; e < 2; e++) u.push({
2383
2383
  lines: [{
2384
2384
  elements: [{
2385
2385
  type: "enter",
2386
2386
  width: 20,
2387
2387
  height: 20
2388
2388
  }],
2389
- baseline: u * .5,
2390
- lineHeight: u,
2389
+ baseline: d * .5,
2390
+ lineHeight: d,
2391
2391
  y: 0
2392
2392
  }],
2393
2393
  y: 0,
2394
- height: u + 4
2394
+ height: d + 4
2395
2395
  });
2396
- let p = l.reduce((e, t) => e + (t.height || 26), 0), m = `topic-html-${++vt}`;
2396
+ let m = u.reduce((e, t) => e + (t.height || 26), 0), h = `topic-html-${++vt}`;
2397
2397
  return [{
2398
2398
  id: `q-html-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
2399
2399
  type: "question",
2400
- paragraphs: l,
2401
- height: p,
2402
- protectContent: !0,
2400
+ paragraphs: u,
2401
+ height: m,
2402
+ protectContent: c,
2403
2403
  metadata: {
2404
2404
  questionNo: n,
2405
2405
  score: r,
2406
- topicId: m,
2406
+ topicId: h,
2407
2407
  originalContentWidth: i,
2408
2408
  label: n ? `第${n}题` : "导入题目"
2409
2409
  }
@@ -2637,7 +2637,7 @@ function Tt(e) {
2637
2637
  }
2638
2638
  function Et(e) {
2639
2639
  let t = e.match(/font-family:\s*([^;]+)/);
2640
- return t ? t[1].trim() : null;
2640
+ return t ? t[1].trim().replace(/["']/g, "") : null;
2641
2641
  }
2642
2642
  function Dt(e) {
2643
2643
  let t = e.match(/color:\s*rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);
@@ -2705,35 +2705,36 @@ function jt(e, t, n) {
2705
2705
  //#endregion
2706
2706
  //#region src/utils/questionJsonParser.ts
2707
2707
  function Mt(e, t = {}) {
2708
- let { questionNo: n = "", score: r = "", contentWidth: i = 600, fontSize: a = 14, lineSpacing: o = 1.5 } = t, s = e.extra_json?.quest_type || "answer_question", c = s === "single_chose" || s === "multi_chose", l = Math.round(a * o * 1.67), u = xt(e.question, {
2708
+ let { questionNo: n = "", score: r = "", contentWidth: i = 600, fontSize: a = 14, lineSpacing: o = 1.5, protectContent: s = !1 } = t, c = e.extra_json?.quest_type || "answer_question", l = c === "single_chose" || c === "multi_chose", u = Math.round(a * o * 1.67), d = xt(e.question, {
2709
2709
  questionNo: n,
2710
2710
  score: r,
2711
2711
  contentWidth: i,
2712
2712
  fontSize: a,
2713
2713
  lineSpacing: o,
2714
- skipAnswerArea: !0
2714
+ skipAnswerArea: !0,
2715
+ protectContent: s
2715
2716
  });
2716
- if (u.length === 0) return [];
2717
- let d = u[0], f = {
2718
- id: d.id,
2717
+ if (d.length === 0) return [];
2718
+ let f = d[0], p = {
2719
+ id: f.id,
2719
2720
  type: "question",
2720
- paragraphs: [...d.paragraphs],
2721
+ paragraphs: [...f.paragraphs],
2721
2722
  height: 0,
2722
- protectContent: !0,
2723
- questionType: s,
2723
+ protectContent: s,
2724
+ questionType: c,
2724
2725
  metadata: {
2725
- ...d.metadata,
2726
+ ...f.metadata,
2726
2727
  qid: e.qid,
2727
- questType: s,
2728
+ questType: c,
2728
2729
  answer: e.extra_json?.answer || e.answer || "",
2729
2730
  rawOptions: e.extra_json?.options,
2730
2731
  tenantId: e.tenant_id,
2731
2732
  tags: e.tags
2732
2733
  }
2733
2734
  };
2734
- if (c && e.extra_json?.options && e.extra_json.options.length > 0) f.options = Nt(e.extra_json.options, i, a, o), f.paragraphs.push(Pt(l));
2735
- else for (let e = 0; e < 2; e++) f.paragraphs.push(Pt(l));
2736
- return f.height = f.paragraphs.reduce((e, t) => e + (t.height || 26), 0), [f];
2735
+ if (l && e.extra_json?.options && e.extra_json.options.length > 0) p.options = Nt(e.extra_json.options, i, a, o), p.paragraphs.push(Pt(u));
2736
+ else for (let e = 0; e < 2; e++) p.paragraphs.push(Pt(u));
2737
+ return p.height = p.paragraphs.reduce((e, t) => e + (t.height || 26), 0), [p];
2737
2738
  }
2738
2739
  function Nt(e, t, n, r) {
2739
2740
  let i = Math.max(100, t - 20);
@@ -4616,57 +4617,57 @@ function kn(e, t, n, r, i) {
4616
4617
  xPositions: o
4617
4618
  };
4618
4619
  }
4619
- function An(e, t, n, r, i, a) {
4620
- let o = [];
4620
+ function An(e, t, n, r, i, a, o = !1) {
4621
+ let s = [];
4621
4622
  for (let e = 0; e < n.length; e++) {
4622
4623
  let t = On(n[e], r);
4623
- o.push(xn(t, r, i, a && a > 0 ? a : void 0));
4624
+ s.push(xn(t, r, i, a && a > 0 ? a : void 0));
4624
4625
  }
4625
- for (let e = 0; e < 2; e++) o.push($(r, i));
4626
- let s = o.reduce((e, t) => e + (t.height || 26), 0), c = `topic-${e.replace(".", "")}-${++Cn}`;
4626
+ for (let e = 0; e < 2; e++) s.push($(r, i));
4627
+ let c = s.reduce((e, t) => e + (t.height || 26), 0), l = `topic-${e.replace(".", "")}-${++Cn}`;
4627
4628
  return {
4628
4629
  id: `q-${e.replace(".", "")}-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
4629
4630
  type: "question",
4630
- paragraphs: o,
4631
- height: s,
4632
- protectContent: !0,
4631
+ paragraphs: s,
4632
+ height: c,
4633
+ protectContent: o,
4633
4634
  metadata: {
4634
4635
  questionNo: e,
4635
4636
  score: t,
4636
- topicId: c,
4637
+ topicId: l,
4637
4638
  originalContentWidth: a || 0,
4638
4639
  label: `第${e.replace(".", "")}题`
4639
4640
  }
4640
4641
  };
4641
4642
  }
4642
- function jn(e, t, n, r, i, a) {
4643
- let o = [], s = `group-${e.replace(".", "")}`, c = [], l = 0, u = (n, l) => {
4644
- if (c.length === 0) return;
4645
- let u = c.map((e) => xn(On(e, r), r, i, a && a > 0 ? a : void 0));
4646
- if (!n) for (let e = 0; e < 2; e++) u.push($(r, i));
4647
- let d = u.reduce((e, t) => e + (t.height || 26), 0), f = `${s}-${n ? "header" : `sub${l}`}`;
4648
- o.push({
4649
- id: `${f}-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
4643
+ function jn(e, t, n, r, i, a, o = !1) {
4644
+ let s = [], c = `group-${e.replace(".", "")}`, l = [], u = 0, d = (n, u) => {
4645
+ if (l.length === 0) return;
4646
+ let d = l.map((e) => xn(On(e, r), r, i, a && a > 0 ? a : void 0));
4647
+ if (!n) for (let e = 0; e < 2; e++) d.push($(r, i));
4648
+ let f = d.reduce((e, t) => e + (t.height || 26), 0), p = `${c}-${n ? "header" : `sub${u}`}`;
4649
+ s.push({
4650
+ id: `${p}-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
4650
4651
  type: n ? "question" : "sub-question",
4651
- paragraphs: u,
4652
- height: d,
4653
- protectContent: !0,
4652
+ paragraphs: d,
4653
+ height: f,
4654
+ protectContent: o,
4654
4655
  metadata: {
4655
4656
  questionNo: n ? e : "",
4656
4657
  score: n ? "" : t,
4657
- topicId: f,
4658
- blockGroup: s,
4658
+ topicId: p,
4659
+ blockGroup: c,
4659
4660
  originalContentWidth: a || 0,
4660
- subLabel: n ? "" : `(${l})`,
4661
- label: n ? `第${e.replace(".", "")}题` : `子题(${l})`
4661
+ subLabel: n ? "" : `(${u})`,
4662
+ label: n ? `第${e.replace(".", "")}题` : `子题(${u})`
4662
4663
  }
4663
- }), c = [];
4664
+ }), l = [];
4664
4665
  };
4665
4666
  for (let e of n) {
4666
4667
  let t = e.match(/^\((\d+)\)\s*/);
4667
- t ? (u(o.length === 0, l), l = parseInt(t[1]), c.push(e.substring(t[0].length))) : c.push(e);
4668
+ t ? (d(s.length === 0, u), u = parseInt(t[1]), l.push(e.substring(t[0].length))) : l.push(e);
4668
4669
  }
4669
- return u(o.length === 0, l), o;
4670
+ return d(s.length === 0, u), s;
4670
4671
  }
4671
4672
  function Mn(e) {
4672
4673
  let t = [];
@@ -4951,45 +4952,47 @@ function Pn(e) {
4951
4952
  function N(e, t) {
4952
4953
  A(e, { metadata: { title: t } }), M(), i.value = !0, h();
4953
4954
  }
4954
- function P(e) {
4955
- let r = e.content.split("\n").filter((e) => e.trim());
4956
- r.length === 0 && r.push("");
4957
- let o = e.score ? `(${e.score}分)` : "", s = r.some((e) => /^\(\d+\)\s*/.test(e)), c = Z(n.value), l = Q(n.value), u = a.value.columnWidth, d;
4958
- if (s) d = jn(e.no, o, r, c, l, u - 26.25);
4955
+ function P(e, r = !1) {
4956
+ let o = e.content.split("\n").filter((e) => e.trim());
4957
+ o.length === 0 && o.push("");
4958
+ let s = e.score ? `(${e.score}分)` : "", c = o.some((e) => /^\(\d+\)\s*/.test(e)), l = Z(n.value), u = Q(n.value), d = a.value.columnWidth, p;
4959
+ if (c) p = jn(e.no, s, o, l, u, d - 26.25, r);
4959
4960
  else {
4960
4961
  let t = e.no.length > 2 ? 26.25 : 17.5;
4961
- d = [An(e.no, o, r, c, l, u - t)];
4962
+ p = [An(e.no, s, o, l, u, d - t, r)];
4962
4963
  }
4963
- for (let e of d) t.value = [...t.value, e];
4964
- d.length > 0 && (f.value = d[d.length - 1].id), M(), i.value = !0, g();
4964
+ for (let e of p) t.value = [...t.value, e];
4965
+ p.length > 0 && (f.value = p[p.length - 1].id), M(), i.value = !0, g();
4965
4966
  }
4966
- function F(e, r, o) {
4967
- let s = Z(n.value), c = Q(n.value), l = a.value.columnWidth, u = (r?.length || 0) > 2 ? 26.25 : 17.5, d = xt(e, {
4967
+ function F(e, r, o, s = !1) {
4968
+ let c = Z(n.value), l = Q(n.value), u = a.value.columnWidth, d = (r?.length || 0) > 2 ? 26.25 : 17.5, p = xt(e, {
4968
4969
  questionNo: r || "",
4969
4970
  score: o || "",
4970
- contentWidth: l - u,
4971
- fontSize: s,
4972
- lineSpacing: c
4971
+ contentWidth: u - d,
4972
+ fontSize: c,
4973
+ lineSpacing: l,
4974
+ protectContent: s
4973
4975
  });
4974
- for (let e of d) t.value = [...t.value, e];
4975
- d.length > 0 && (f.value = d[d.length - 1].id), M(), i.value = !0, g();
4976
+ for (let e of p) t.value = [...t.value, e];
4977
+ p.length > 0 && (f.value = p[p.length - 1].id), M(), i.value = !0, g();
4976
4978
  }
4977
- function te(e, r, o) {
4978
- let s = Z(n.value), c = Q(n.value), l = a.value.columnWidth, u = (r?.length || 0) > 2 ? 26.25 : 17.5, d;
4979
+ function te(e, r, o, s = !1) {
4980
+ let c = Z(n.value), l = Q(n.value), u = a.value.columnWidth, d = (r?.length || 0) > 2 ? 26.25 : 17.5, p;
4979
4981
  try {
4980
- d = JSON.parse(e);
4982
+ p = JSON.parse(e);
4981
4983
  } catch {
4982
4984
  throw Error("JSON 格式错误,请检查");
4983
4985
  }
4984
- let p = Mt(d, {
4986
+ let m = Mt(p, {
4985
4987
  questionNo: r || "",
4986
4988
  score: o || "",
4987
- contentWidth: l - u,
4988
- fontSize: s,
4989
- lineSpacing: c
4989
+ contentWidth: u - d,
4990
+ fontSize: c,
4991
+ lineSpacing: l,
4992
+ protectContent: s
4990
4993
  });
4991
- for (let e of p) t.value = [...t.value, e];
4992
- p.length > 0 && (f.value = p[p.length - 1].id), M(), i.value = !0, g();
4994
+ for (let e of m) t.value = [...t.value, e];
4995
+ m.length > 0 && (f.value = m[m.length - 1].id), M(), i.value = !0, g();
4993
4996
  }
4994
4997
  function ne(e, t, n) {
4995
4998
  let r = p(e);
@@ -6370,18 +6373,18 @@ var Un = { class: "pe-root" }, Wn = { class: "pe-main" }, Gn = { class: "pe-edit
6370
6373
  isDirty: () => C.isDirty.value
6371
6374
  },
6372
6375
  questions: {
6373
- addFromHtml: (e, t, n) => {
6374
- C.addQuestionFromHtml(e, t, n), S("change");
6376
+ addFromHtml: (e, t, n, r) => {
6377
+ C.addQuestionFromHtml(e, t, n, r), S("change");
6375
6378
  },
6376
- addFromJson: (e, t, n) => {
6377
- C.addQuestionFromJson(e, t, n), S("change");
6379
+ addFromJson: (e, t, n, r) => {
6380
+ C.addQuestionFromJson(e, t, n, r), S("change");
6378
6381
  },
6379
- addFromText: (e, t, n) => {
6382
+ addFromText: (e, t, n, r) => {
6380
6383
  C.addNewQuestion({
6381
6384
  no: t || "",
6382
6385
  score: n || "",
6383
6386
  content: e
6384
- }), S("change");
6387
+ }, r), S("change");
6385
6388
  },
6386
6389
  remove: (e) => {
6387
6390
  C.removeBlock(e), S("change");
@@ -6611,7 +6614,7 @@ var Un = { class: "pe-root" }, Wn = { class: "pe-main" }, Gn = { class: "pe-edit
6611
6614
  let n = e.__vccOpts || e;
6612
6615
  for (let [e, r] of t) n[e] = r;
6613
6616
  return n;
6614
- }, Qn = /*#__PURE__*/ Zn(Xn, [["__scopeId", "data-v-e44f7765"]]), $n = { class: "pe-preview__pages" }, er = ["innerHTML"], tr = {
6617
+ }, Qn = /*#__PURE__*/ Zn(Xn, [["__scopeId", "data-v-39c4e337"]]), $n = { class: "pe-preview__pages" }, er = ["innerHTML"], tr = {
6615
6618
  key: 0,
6616
6619
  class: "pe-preview__helpers"
6617
6620
  }, nr = {
@@ -16,9 +16,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
16
16
  isDirty: () => boolean;
17
17
  };
18
18
  questions: {
19
- addFromHtml: (html: string, no?: string, score?: string) => void;
20
- addFromJson: (json: string, no?: string, score?: string) => void;
21
- addFromText: (text: string, no?: string, score?: string) => void;
19
+ addFromHtml: (html: string, no?: string, score?: string, protectContent?: boolean) => void;
20
+ addFromJson: (json: string, no?: string, score?: string, protectContent?: boolean) => void;
21
+ addFromText: (text: string, no?: string, score?: string, protectContent?: boolean) => void;
22
22
  remove: (id: string) => void;
23
23
  addTitleBlock: (title: string, beforeId?: string) => void;
24
24
  reorder: (orderedIds: string[]) => void;
@@ -29,7 +29,7 @@ export declare function parseInlineSegments(text: string): Array<{
29
29
  value: string;
30
30
  }>;
31
31
  export declare function parseQuestionLine(text: string, fontSize: number): InlineElement[];
32
- export declare function createQuestionBlock(no: string, score: string, textLines: string[], fontSize: number, lineSpacing: number, contentWidth?: number): ContentBlock;
33
- export declare function createSubQuestionBlocks(no: string, score: string, textLines: string[], fontSize: number, lineSpacing: number, contentWidth?: number): ContentBlock[];
32
+ export declare function createQuestionBlock(no: string, score: string, textLines: string[], fontSize: number, lineSpacing: number, contentWidth?: number, protectContent?: boolean): ContentBlock;
33
+ export declare function createSubQuestionBlocks(no: string, score: string, textLines: string[], fontSize: number, lineSpacing: number, contentWidth?: number, protectContent?: boolean): ContentBlock[];
34
34
  export declare function getBlockPlainText(block: ContentBlock): string;
35
35
  export declare function getBlockLabel(block: ContentBlock): string;
@@ -55,9 +55,9 @@ export declare function usePaperBlockOps(deps: UsePaperBlockOpsDeps): {
55
55
  no: string;
56
56
  score: string;
57
57
  content: string;
58
- }) => void;
59
- addQuestionFromHtml: (html: string, no?: string, score?: string) => void;
60
- addQuestionFromJson: (jsonStr: string, no?: string, score?: string) => void;
58
+ }, protectContent?: boolean) => void;
59
+ addQuestionFromHtml: (html: string, no?: string, score?: string, protectContent?: boolean) => void;
60
+ addQuestionFromJson: (jsonStr: string, no?: string, score?: string, protectContent?: boolean) => void;
61
61
  updateInlineImageSize: (id: string, newWidth: number, newHeight?: number) => void;
62
62
  getImageParagraphInfo: (id: string) => {
63
63
  isStandalone: boolean;
@@ -157,9 +157,9 @@ export declare function usePaperCore(options?: UsePaperCoreOptions): {
157
157
  no: string;
158
158
  score: string;
159
159
  content: string;
160
- }) => void;
161
- addQuestionFromHtml: (html: string, no?: string, score?: string) => void;
162
- addQuestionFromJson: (jsonStr: string, no?: string, score?: string) => void;
160
+ }, protectContent?: boolean) => void;
161
+ addQuestionFromHtml: (html: string, no?: string, score?: string, protectContent?: boolean) => void;
162
+ addQuestionFromJson: (jsonStr: string, no?: string, score?: string, protectContent?: boolean) => void;
163
163
  getBlockPlainText: typeof import("./paperHelpers").getBlockPlainText;
164
164
  parseTextToParagraphs: (text: string, fontSize?: number, lineSpacing?: number, contentWidth?: number) => import("..").Paragraph[];
165
165
  getBlockLabel: typeof import("./paperHelpers").getBlockLabel;
@@ -33,6 +33,8 @@ export interface ParseQuestionHtmlOptions {
33
33
  lineSpacing?: number;
34
34
  /** 跳过自动追加作答空段落(由调用方自行控制) */
35
35
  skipAnswerArea?: boolean;
36
+ /** 是否启用内容保护,默认 true */
37
+ protectContent?: boolean;
36
38
  }
37
39
  /**
38
40
  * 将题库原始 HTML 转换为 ContentBlock[],可直接插入画板
@@ -48,6 +48,8 @@ export interface ParseQuestionJsonOptions {
48
48
  fontSize?: number;
49
49
  /** 默认行距倍数,默认 1.5 */
50
50
  lineSpacing?: number;
51
+ /** 是否启用内容保护,默认 true */
52
+ protectContent?: boolean;
51
53
  }
52
54
  /**
53
55
  * 将题库完整 JSON 转换为 ContentBlock[]
package/dist/style.css CHANGED
@@ -1,2 +1,2 @@
1
- .paper-page text.text{dominant-baseline:hanging;white-space:pre}.paper-page .block:hover{cursor:default}.paper-page .formula svg{vertical-align:middle;overflow:visible}.paper-page text[fill=\#aaa]{-webkit-user-select:none;user-select:none;font-size:13px}.paper-page [data-block-id]{cursor:pointer}.paper-page rect[stroke-dasharray="4,4"]{pointer-events:none}svg.paper-page{display:block}text.topic-no,text.question-score{dominant-baseline:hanging}.title_wrapper{box-sizing:border-box;color:#231f20;text-align:left;background:#fff;border:none;align-items:center;max-width:100%;height:38px;padding:5px 0;font-family:Times New Roman,黑体;font-size:14pt;display:flex;position:relative}.title_wrapper .title-content{align-items:center;width:100%;display:inline-flex;overflow:hidden}.title_wrapper .title-content .title-text{color:#231f20;white-space:nowrap;font-size:15px;font-weight:600;line-height:32px}.title_wrapper .title-content .title-score{color:#231f20;border:none;padding:0 2px 0 8px;font-size:10pt;font-weight:400;line-height:1.2}.header-block{font-family:Microsoft YaHei,PingFang SC,sans-serif}.header-school-info{color:#595959;justify-content:center;align-items:center;gap:12px;width:100%;padding:6px 0 0;display:flex}.header-school-info--simple{padding-top:3px}.headerDesc{font-size:14px;line-height:1.5}.headerDesc strong{color:#000;font-size:16px}.header-school-info .score{white-space:nowrap;font-size:12px;line-height:1.5;display:inline-block}.header-paper-name{text-align:center;width:100%;padding:2px 0}.header-paper-name .input-box{flex-direction:column;justify-content:center;align-items:center;display:flex}.header-paper-name .input-box__label{display:none}.header-paper-name .input-box__input{color:#000;text-align:center;background:0 0;border:none;outline:none;padding:2px 8px;font-size:22px;font-weight:700;line-height:1.5;display:block}.header-student-info{align-items:flex-start;gap:16px;width:100%;padding:4px 0 0;display:flex}.header-student-info .qr-code-img{flex-shrink:0;width:65px;height:65px}.header-student-info .qr-code-img img{width:100%;height:auto;display:block}.student-fields{flex-direction:column;flex:1;gap:10px;min-width:0;display:flex}.student-fields-row{flex-wrap:wrap;gap:16px;display:flex}.student-field{flex:1;align-items:center;min-width:120px;display:flex}.student-field .label{color:#000;white-space:nowrap;margin-right:4px;font-size:14px}.student-field .underline{border-bottom:1px solid #000;flex:1;min-width:60px;height:22px}.student-code{color:#000;align-items:center;font-size:13px;display:flex}.student-code-table{border-collapse:collapse;vertical-align:middle;margin-left:4px;display:inline-table}.student-code-cell{text-align:center;border:1px solid #000;width:25px;height:30px;font-size:14px}.tail-time-wrapper{color:#595959;width:100%;font-family:Microsoft YaHei,PingFang SC,sans-serif;font-size:12px}.answer-wrapper,.revise-wrapper{align-items:center;gap:6px;display:flex}.tail-col{align-items:center;gap:3px;display:flex}.center-col{flex-direction:column;align-items:center;gap:2px;display:flex}.tail-col-item{gap:1px}.tail-label.text{color:#8c8c8c;white-space:nowrap;font-size:11px}.tail-col .text{color:#595959;white-space:nowrap;font-size:12px}.tail-col .text-second{color:#bfbfbf;font-size:10px}.rect{box-sizing:border-box;border:1px solid #d9d9d9;border-radius:2px;width:18px;height:18px}.rect-fill{background:#f0f0f0}.rect-stroke{background:0 0}.revise-area{align-items:center;gap:4px;display:flex}.revise-area-label{color:#8c8c8c;white-space:nowrap;font-size:11px}.revise-area-rect{box-sizing:border-box;border:1px solid #d9d9d9;border-radius:2px;width:18px;height:18px}.el-icon.triangle{color:#8c8c8c;justify-content:center;align-items:center;font-size:14px;display:inline-flex}.pe-editor-surface::-webkit-scrollbar{width:6px;height:6px}.pe-editor-surface::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:3px}.pe-editor-surface::-webkit-scrollbar-thumb:hover{background:#bfbfbf}.paper-page g.question:hover>rect.question-hitarea{fill:#409eff0a}.paper-page g.question:hover>path.question-border{stroke:#409eff}.paper-page g.underline:hover>rect.underline-hitarea{fill:#409eff0f}.paper-page g.underline:hover>rect[fill="rgb(245,245,245)"]{fill:#f0f8f7}.editable-dashed{cursor:pointer;outline-offset:1px;border-radius:2px;outline:1px dashed #bfbfbf;padding:0 2px}.editable-dashed:hover,.editable-dashed:focus{outline-offset:1px;border-radius:2px;outline:1px dashed #409eff}.pe-root[data-v-e44f7765]{background:#f0f2f5;flex-direction:column;width:100%;height:100%;font-family:Microsoft YaHei,PingFang SC,sans-serif;display:flex;overflow:hidden}.pe-main[data-v-e44f7765]{background:#e8ebf0;flex:1;justify-content:center;display:flex;position:relative;overflow:hidden}.pe-editor[data-v-e44f7765]{justify-content:center;width:100%;height:100%;display:flex;overflow:hidden}.pe-editor-surface[data-v-e44f7765]{box-sizing:border-box;-webkit-user-select:none;user-select:none;scrollbar-width:none;-ms-overflow-style:none;font-synthesis:unset;text-rendering:auto;-webkit-font-smoothing:auto;background-color:#eee;width:100%;height:100%;padding:10px 0;position:relative;overflow:auto;transform:scaleY(.99999)}.pe-editor-defs[data-v-e44f7765]{width:1px;height:1px;position:absolute;overflow:hidden}.pe-editor-pages[data-v-e44f7765]{flex-direction:column;align-items:center;gap:24px;min-height:100%;padding:24px 0;display:flex}.pe-editor-page[data-v-e44f7765]{background:#fff;border:2px solid #0000;flex-shrink:0;line-height:0;transition:border-color .2s,box-shadow .2s;box-shadow:0 1px 6px #00000014}.pe-editor-page.active[data-v-e44f7765]{border-color:#409eff;box-shadow:0 2px 12px #409eff33}.pe-editor-viewport[data-v-e44f7765]{transform-origin:0 0;-webkit-user-select:text;user-select:text}.pe-editor-viewport[data-v-e44f7765] svg.paper-page{display:block}.pe-editor-controllers[data-v-e44f7765]{pointer-events:none;z-index:102;width:100%;height:100%;position:absolute;top:0;left:0;overflow:visible}.pe-ctrl-block[data-v-e44f7765]{pointer-events:auto}.pe-ctrl-height[data-v-e44f7765]{cursor:ns-resize;color:#fff;opacity:.85;z-index:103;pointer-events:auto;background:#409eff;border-radius:4px;justify-content:center;align-items:center;width:44px;height:20px;transition:opacity .15s;display:flex;position:absolute;bottom:-11px;left:50%;transform:translate(-50%)}.pe-ctrl-height[data-v-e44f7765]:hover{opacity:1;background:#048f80}.pe-ctrl-height[data-v-e44f7765]:active{background:#037066}.pe-ctrlUnderline[data-v-e44f7765]{pointer-events:auto;box-sizing:border-box;border:1.5px solid #409eff;border-radius:2px}.pe-ctrl-ul-left[data-v-e44f7765],.pe-ctrl-ul-right[data-v-e44f7765]{cursor:ew-resize;color:#fff;opacity:.85;z-index:103;background:#409eff;border-radius:4px;justify-content:center;align-items:center;width:20px;height:28px;transition:opacity .15s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.pe-ctrl-ul-left[data-v-e44f7765]{left:-12px}.pe-ctrl-ul-right[data-v-e44f7765]{right:-12px}.pe-ctrl-ul-left[data-v-e44f7765]:hover,.pe-ctrl-ul-right[data-v-e44f7765]:hover{opacity:1;background:#048f80}.pe-ctrl-ul-left[data-v-e44f7765]:active,.pe-ctrl-ul-right[data-v-e44f7765]:active{background:#037066}.pe-ctrlAnchor[data-v-e44f7765]{pointer-events:auto;box-sizing:border-box;cursor:move;border:1.5px solid #409eff;border-radius:1px}.pe-resize-se[data-v-e44f7765],.pe-resize-sw[data-v-e44f7765],.pe-resize-ne[data-v-e44f7765],.pe-resize-nw[data-v-e44f7765]{box-sizing:border-box;z-index:104;background:#409eff;border:1px solid #fff;border-radius:2px;width:10px;height:10px;position:absolute}.pe-resize-se[data-v-e44f7765]{cursor:nwse-resize;bottom:-5px;right:-5px}.pe-resize-sw[data-v-e44f7765]{cursor:nesw-resize;bottom:-5px;left:-5px}.pe-resize-ne[data-v-e44f7765]{cursor:nesw-resize;top:-5px;right:-5px}.pe-resize-nw[data-v-e44f7765]{cursor:nwse-resize;top:-5px;left:-5px}.pe-resize-se[data-v-e44f7765]:hover,.pe-resize-sw[data-v-e44f7765]:hover,.pe-resize-ne[data-v-e44f7765]:hover,.pe-resize-nw[data-v-e44f7765]:hover{background:#048f80}.pe-img-align-bar[data-v-e44f7765]{z-index:105;background:#409eff;border-radius:4px;gap:0;display:flex;position:absolute;overflow:hidden}.pe-align-btn[data-v-e44f7765]{color:#fff;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;width:28px;height:24px;font-size:12px;transition:background .15s;display:flex}.pe-align-btn[data-v-e44f7765]:hover{background:#fff3}.pe-align-btn.active[data-v-e44f7765]{background:#00000040}.pe-editor-input-wrapper[data-v-e44f7765]{z-index:-1;opacity:0;width:0;position:absolute}.pe-editor-virtual-input[data-v-e44f7765]{width:5px;height:30px}.pe-editor-cursor[data-v-e44f7765]{z-index:99999999;background:#000;width:1px;height:0;animation:1s ease-in-out infinite pe-blink-e44f7765;position:absolute;top:0;left:0}@keyframes pe-blink-e44f7765{0%{opacity:.8}50%{opacity:0}}.pe-preview[data-v-c429b5aa]{width:100%;font-family:Times New Roman,宋体,Cambria Math,serif;overflow:hidden}.pe-preview__pages[data-v-c429b5aa]{flex-direction:column;align-items:center;gap:16px;padding:16px 0;display:flex}.pe-preview__page[data-v-c429b5aa]{background:#fff;position:relative;overflow:hidden;box-shadow:0 2px 12px #00000026}.pe-preview__page-col[data-v-c429b5aa]{position:absolute;top:0;left:0}.pe-preview__page-col[data-v-c429b5aa] svg{width:100%;height:100%;display:block}.pe-preview__helpers[data-v-c429b5aa]{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}.pe-preview__helper-box[data-v-c429b5aa]{box-sizing:border-box}.pe-preview__page-num[data-v-c429b5aa]{color:#bfbfbf;pointer-events:none;font-size:11px;position:absolute;bottom:4px;right:8px}.pe-preview--print .pe-preview__page[data-v-c429b5aa]{box-shadow:none;page-break-before:always;page-break-after:always;page-break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact;margin:0}.pe-preview--print .pe-preview__pages[data-v-c429b5aa]{gap:0;padding:0}.pe-preview--print .pe-preview__helpers[data-v-c429b5aa],.pe-preview--print .pe-preview__page-num[data-v-c429b5aa]{display:none!important}@media print{@page{margin:0}body[data-v-c429b5aa]{margin:0;padding:0}}
1
+ .paper-page text.text{dominant-baseline:hanging;white-space:pre;font-family:Times New Roman,SimSun!important}.paper-page .block:hover{cursor:default}.paper-page .formula svg{vertical-align:middle;overflow:visible}.paper-page text[fill=\#aaa]{-webkit-user-select:none;user-select:none;font-size:13px}.paper-page [data-block-id]{cursor:pointer}.paper-page rect[stroke-dasharray="4,4"]{pointer-events:none}svg.paper-page{display:block}text.topic-no,text.question-score{dominant-baseline:hanging}.title_wrapper{box-sizing:border-box;color:#231f20;text-align:left;background:#fff;border:none;align-items:center;max-width:100%;height:38px;padding:5px 0;font-family:Times New Roman,黑体;font-size:14pt;display:flex;position:relative}.title_wrapper .title-content{align-items:center;width:100%;display:inline-flex;overflow:hidden}.title_wrapper .title-content .title-text{color:#231f20;white-space:nowrap;font-size:15px;font-weight:600;line-height:32px}.title_wrapper .title-content .title-score{color:#231f20;border:none;padding:0 2px 0 8px;font-size:10pt;font-weight:400;line-height:1.2}.header-block{font-family:Microsoft YaHei,PingFang SC,sans-serif}.header-school-info{color:#595959;justify-content:center;align-items:center;gap:12px;width:100%;padding:6px 0 0;display:flex}.header-school-info--simple{padding-top:3px}.headerDesc{font-size:14px;line-height:1.5}.headerDesc strong{color:#000;font-size:16px}.header-school-info .score{white-space:nowrap;font-size:12px;line-height:1.5;display:inline-block}.header-paper-name{text-align:center;width:100%;padding:2px 0}.header-paper-name .input-box{flex-direction:column;justify-content:center;align-items:center;display:flex}.header-paper-name .input-box__label{display:none}.header-paper-name .input-box__input{color:#000;text-align:center;background:0 0;border:none;outline:none;padding:2px 8px;font-size:22px;font-weight:700;line-height:1.5;display:block}.header-student-info{align-items:flex-start;gap:16px;width:100%;padding:4px 0 0;display:flex}.header-student-info .qr-code-img{flex-shrink:0;width:65px;height:65px}.header-student-info .qr-code-img img{width:100%;height:auto;display:block}.student-fields{flex-direction:column;flex:1;gap:10px;min-width:0;display:flex}.student-fields-row{flex-wrap:wrap;gap:16px;display:flex}.student-field{flex:1;align-items:center;min-width:120px;display:flex}.student-field .label{color:#000;white-space:nowrap;margin-right:4px;font-size:14px}.student-field .underline{border-bottom:1px solid #000;flex:1;min-width:60px;height:22px}.student-code{color:#000;align-items:center;font-size:13px;display:flex}.student-code-table{border-collapse:collapse;vertical-align:middle;margin-left:4px;display:inline-table}.student-code-cell{text-align:center;border:1px solid #000;width:25px;height:30px;font-size:14px}.tail-time-wrapper{color:#595959;width:100%;font-family:Microsoft YaHei,PingFang SC,sans-serif;font-size:12px}.answer-wrapper,.revise-wrapper{align-items:center;gap:6px;display:flex}.tail-col{align-items:center;gap:3px;display:flex}.center-col{flex-direction:column;align-items:center;gap:2px;display:flex}.tail-col-item{gap:1px}.tail-label.text{color:#8c8c8c;white-space:nowrap;font-size:11px}.tail-col .text{color:#595959;white-space:nowrap;font-size:12px}.tail-col .text-second{color:#bfbfbf;font-size:10px}.rect{box-sizing:border-box;border:1px solid #d9d9d9;border-radius:2px;width:18px;height:18px}.rect-fill{background:#f0f0f0}.rect-stroke{background:0 0}.revise-area{align-items:center;gap:4px;display:flex}.revise-area-label{color:#8c8c8c;white-space:nowrap;font-size:11px}.revise-area-rect{box-sizing:border-box;border:1px solid #d9d9d9;border-radius:2px;width:18px;height:18px}.el-icon.triangle{color:#8c8c8c;justify-content:center;align-items:center;font-size:14px;display:inline-flex}.pe-editor-surface::-webkit-scrollbar{width:6px;height:6px}.pe-editor-surface::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:3px}.pe-editor-surface::-webkit-scrollbar-thumb:hover{background:#bfbfbf}.paper-page g.question:hover>rect.question-hitarea{fill:#409eff0a}.paper-page g.question:hover>path.question-border{stroke:#409eff}.paper-page g.underline:hover>rect.underline-hitarea{fill:#409eff0f}.paper-page g.underline:hover>rect[fill="rgb(245,245,245)"]{fill:#f0f8f7}.editable-dashed{cursor:pointer;outline-offset:1px;border-radius:2px;outline:1px dashed #bfbfbf;padding:0 2px}.editable-dashed:hover,.editable-dashed:focus{outline-offset:1px;border-radius:2px;outline:1px dashed #409eff}.pe-root[data-v-39c4e337]{background:#f0f2f5;flex-direction:column;width:100%;height:100%;font-family:Microsoft YaHei,PingFang SC,sans-serif;display:flex;overflow:hidden}.pe-main[data-v-39c4e337]{background:#e8ebf0;flex:1;justify-content:center;display:flex;position:relative;overflow:hidden}.pe-editor[data-v-39c4e337]{justify-content:center;width:100%;height:100%;display:flex;overflow:hidden}.pe-editor-surface[data-v-39c4e337]{box-sizing:border-box;-webkit-user-select:none;user-select:none;scrollbar-width:none;-ms-overflow-style:none;font-synthesis:unset;text-rendering:auto;-webkit-font-smoothing:auto;background-color:#eee;width:100%;height:100%;padding:10px 0;position:relative;overflow:auto;transform:scaleY(.99999)}.pe-editor-defs[data-v-39c4e337]{width:1px;height:1px;position:absolute;overflow:hidden}.pe-editor-pages[data-v-39c4e337]{flex-direction:column;align-items:center;gap:24px;min-height:100%;padding:24px 0;display:flex}.pe-editor-page[data-v-39c4e337]{background:#fff;border:2px solid #0000;flex-shrink:0;line-height:0;transition:border-color .2s,box-shadow .2s;box-shadow:0 1px 6px #00000014}.pe-editor-page.active[data-v-39c4e337]{border-color:#409eff;box-shadow:0 2px 12px #409eff33}.pe-editor-viewport[data-v-39c4e337]{transform-origin:0 0;-webkit-user-select:text;user-select:text}.pe-editor-viewport[data-v-39c4e337] svg.paper-page{display:block}.pe-editor-controllers[data-v-39c4e337]{pointer-events:none;z-index:102;width:100%;height:100%;position:absolute;top:0;left:0;overflow:visible}.pe-ctrl-block[data-v-39c4e337]{pointer-events:auto}.pe-ctrl-height[data-v-39c4e337]{cursor:ns-resize;color:#fff;opacity:.85;z-index:103;pointer-events:auto;background:#409eff;border-radius:4px;justify-content:center;align-items:center;width:44px;height:20px;transition:opacity .15s;display:flex;position:absolute;bottom:-11px;left:50%;transform:translate(-50%)}.pe-ctrl-height[data-v-39c4e337]:hover{opacity:1;background:#048f80}.pe-ctrl-height[data-v-39c4e337]:active{background:#037066}.pe-ctrlUnderline[data-v-39c4e337]{pointer-events:auto;box-sizing:border-box;border:1.5px solid #409eff;border-radius:2px}.pe-ctrl-ul-left[data-v-39c4e337],.pe-ctrl-ul-right[data-v-39c4e337]{cursor:ew-resize;color:#fff;opacity:.85;z-index:103;background:#409eff;border-radius:4px;justify-content:center;align-items:center;width:20px;height:28px;transition:opacity .15s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.pe-ctrl-ul-left[data-v-39c4e337]{left:-12px}.pe-ctrl-ul-right[data-v-39c4e337]{right:-12px}.pe-ctrl-ul-left[data-v-39c4e337]:hover,.pe-ctrl-ul-right[data-v-39c4e337]:hover{opacity:1;background:#048f80}.pe-ctrl-ul-left[data-v-39c4e337]:active,.pe-ctrl-ul-right[data-v-39c4e337]:active{background:#037066}.pe-ctrlAnchor[data-v-39c4e337]{pointer-events:auto;box-sizing:border-box;cursor:move;border:1.5px solid #409eff;border-radius:1px}.pe-resize-se[data-v-39c4e337],.pe-resize-sw[data-v-39c4e337],.pe-resize-ne[data-v-39c4e337],.pe-resize-nw[data-v-39c4e337]{box-sizing:border-box;z-index:104;background:#409eff;border:1px solid #fff;border-radius:2px;width:10px;height:10px;position:absolute}.pe-resize-se[data-v-39c4e337]{cursor:nwse-resize;bottom:-5px;right:-5px}.pe-resize-sw[data-v-39c4e337]{cursor:nesw-resize;bottom:-5px;left:-5px}.pe-resize-ne[data-v-39c4e337]{cursor:nesw-resize;top:-5px;right:-5px}.pe-resize-nw[data-v-39c4e337]{cursor:nwse-resize;top:-5px;left:-5px}.pe-resize-se[data-v-39c4e337]:hover,.pe-resize-sw[data-v-39c4e337]:hover,.pe-resize-ne[data-v-39c4e337]:hover,.pe-resize-nw[data-v-39c4e337]:hover{background:#048f80}.pe-img-align-bar[data-v-39c4e337]{z-index:105;background:#409eff;border-radius:4px;gap:0;display:flex;position:absolute;overflow:hidden}.pe-align-btn[data-v-39c4e337]{color:#fff;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;width:28px;height:24px;font-size:12px;transition:background .15s;display:flex}.pe-align-btn[data-v-39c4e337]:hover{background:#fff3}.pe-align-btn.active[data-v-39c4e337]{background:#00000040}.pe-editor-input-wrapper[data-v-39c4e337]{z-index:-1;opacity:0;width:0;position:absolute}.pe-editor-virtual-input[data-v-39c4e337]{width:5px;height:30px}.pe-editor-cursor[data-v-39c4e337]{z-index:99999999;background:#000;width:1px;height:0;animation:1s ease-in-out infinite pe-blink-39c4e337;position:absolute;top:0;left:0}@keyframes pe-blink-39c4e337{0%{opacity:.8}50%{opacity:0}}.pe-preview[data-v-c429b5aa]{width:100%;font-family:Times New Roman,宋体,Cambria Math,serif;overflow:hidden}.pe-preview__pages[data-v-c429b5aa]{flex-direction:column;align-items:center;gap:16px;padding:16px 0;display:flex}.pe-preview__page[data-v-c429b5aa]{background:#fff;position:relative;overflow:hidden;box-shadow:0 2px 12px #00000026}.pe-preview__page-col[data-v-c429b5aa]{position:absolute;top:0;left:0}.pe-preview__page-col[data-v-c429b5aa] svg{width:100%;height:100%;display:block}.pe-preview__helpers[data-v-c429b5aa]{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}.pe-preview__helper-box[data-v-c429b5aa]{box-sizing:border-box}.pe-preview__page-num[data-v-c429b5aa]{color:#bfbfbf;pointer-events:none;font-size:11px;position:absolute;bottom:4px;right:8px}.pe-preview--print .pe-preview__page[data-v-c429b5aa]{box-shadow:none;page-break-before:always;page-break-after:always;page-break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact;margin:0}.pe-preview--print .pe-preview__pages[data-v-c429b5aa]{gap:0;padding:0}.pe-preview--print .pe-preview__helpers[data-v-c429b5aa],.pe-preview--print .pe-preview__page-num[data-v-c429b5aa]{display:none!important}@media print{@page{margin:0}body[data-v-c429b5aa]{margin:0;padding:0}}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sw7d/paper-renderer",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "题卡设计器核心组件 - 纯编辑表面",
5
5
  "type": "module",
6
6
  "main": "./dist/paper-renderer.js",