@shadow-garden/bapbong-model 0.11.1 → 0.11.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 CHANGED
@@ -87,6 +87,7 @@ function pastedParagraphAttrs(el, heading) {
87
87
  heading,
88
88
  align: m ? m[1].toLowerCase() : null,
89
89
  borders: dataJson(el, "data-borders"),
90
+ markFont: dataJson(el, "data-mark-font"),
90
91
  carry: dataJson(el, "data-carry")
91
92
  };
92
93
  }
@@ -220,6 +221,13 @@ var schema = new import_prosemirror_model.Schema({
220
221
  // null). Painted behind the paragraph's lines, in the same box the
221
222
  // borders use.
222
223
  shading: { default: null },
224
+ // The paragraph MARK's own font ({ family?, sizePt?, bold?, italic? }
225
+ // or null) — w:pPr/w:rPr resolved through the same cascade a run gets.
226
+ // Set only on paragraphs imported EMPTY, where the mark is the only
227
+ // thing on the line and therefore sets its height. `carry.markRPr`
228
+ // keeps the same rPr verbatim for export; this is the measured
229
+ // reading of it, and nothing writes it back.
230
+ markFont: { default: null },
223
231
  // Carry-through fidelity (docx round-trip): OOXML paragraph
224
232
  // properties the model does NOT represent, preserved verbatim so a
225
233
  // customer's save never drops them. { pPr?: string, markRPr?: string }
@@ -247,6 +255,8 @@ var schema = new import_prosemirror_model.Schema({
247
255
  dom["data-borders"] = JSON.stringify(node.attrs["borders"]);
248
256
  if (node.attrs["shading"])
249
257
  dom["data-shading"] = String(node.attrs["shading"]);
258
+ if (node.attrs["markFont"])
259
+ dom["data-mark-font"] = JSON.stringify(node.attrs["markFont"]);
250
260
  if (node.attrs["carry"])
251
261
  dom["data-carry"] = JSON.stringify(node.attrs["carry"]);
252
262
  return [tag, dom, 0];
package/dist/index.js CHANGED
@@ -55,6 +55,7 @@ function pastedParagraphAttrs(el, heading) {
55
55
  heading,
56
56
  align: m ? m[1].toLowerCase() : null,
57
57
  borders: dataJson(el, "data-borders"),
58
+ markFont: dataJson(el, "data-mark-font"),
58
59
  carry: dataJson(el, "data-carry")
59
60
  };
60
61
  }
@@ -188,6 +189,13 @@ var schema = new Schema({
188
189
  // null). Painted behind the paragraph's lines, in the same box the
189
190
  // borders use.
190
191
  shading: { default: null },
192
+ // The paragraph MARK's own font ({ family?, sizePt?, bold?, italic? }
193
+ // or null) — w:pPr/w:rPr resolved through the same cascade a run gets.
194
+ // Set only on paragraphs imported EMPTY, where the mark is the only
195
+ // thing on the line and therefore sets its height. `carry.markRPr`
196
+ // keeps the same rPr verbatim for export; this is the measured
197
+ // reading of it, and nothing writes it back.
198
+ markFont: { default: null },
191
199
  // Carry-through fidelity (docx round-trip): OOXML paragraph
192
200
  // properties the model does NOT represent, preserved verbatim so a
193
201
  // customer's save never drops them. { pPr?: string, markRPr?: string }
@@ -215,6 +223,8 @@ var schema = new Schema({
215
223
  dom["data-borders"] = JSON.stringify(node.attrs["borders"]);
216
224
  if (node.attrs["shading"])
217
225
  dom["data-shading"] = String(node.attrs["shading"]);
226
+ if (node.attrs["markFont"])
227
+ dom["data-mark-font"] = JSON.stringify(node.attrs["markFont"]);
218
228
  if (node.attrs["carry"])
219
229
  dom["data-carry"] = JSON.stringify(node.attrs["carry"]);
220
230
  return [tag, dom, 0];
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/lib/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAwF3C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,yWA8nBjB,CAAC;AAEH,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAG,OAAO,MAAM,CAAC;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,yDA0CxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD,qDAAqD;AACrD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAE5D;+EAC+E;AAC/E,MAAM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AAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD,qDAAqD;AACrD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAE5D;+EAC+E;AAC/E,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,2EAA2E;AAC3E,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC;;;6EAGyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;CACvC;AA0BD;;;4EAG4E;AAC5E,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shadow-garden/bapbong-model",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "bapbong — ProseMirror document model / schema",
5
5
  "license": "MIT",
6
6
  "repository": {