@patterkit/ops 0.7.5 → 0.7.6

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -5
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -2572,6 +2572,7 @@ async function voiceScriptToXlsx(data) {
2572
2572
  }
2573
2573
 
2574
2574
  // src/script-doc.ts
2575
+ import { humanizeNodeRefs } from "@patterkit/core";
2575
2576
  var TOKENS = {
2576
2577
  ink: "26221c",
2577
2578
  // near-black warm ink (headings)
@@ -2616,10 +2617,6 @@ function colourIndex(name) {
2616
2617
  function characterColour(name) {
2617
2618
  return CHAR_PALETTE[colourIndex(name)];
2618
2619
  }
2619
- var VISIT_FN_RE = /\b(patter_visits|patter_seen|visits|seen)\s*\(\s*(['"])(.*?)\2\s*\)/g;
2620
- function humanizeCondition(cond, label) {
2621
- return cond.replace(VISIT_FN_RE, (_m, fn, _q, id) => `${fn}(${label(id)})`);
2622
- }
2623
2620
  var MARKUP_RE = /<(b|i|bi)>([\s\S]*?)<\/\1>/g;
2624
2621
  var INTERP_RE = /\{@[^}]*\}/g;
2625
2622
  function textRuns(text) {
@@ -2694,7 +2691,7 @@ function runScriptDoc(loaded) {
2694
2691
  blockName.set(block.id, block.name);
2695
2692
  }
2696
2693
  }
2697
- const humanize = (cond) => humanizeCondition(cond, (id) => blockName.get(id) ?? sceneOf.get(id) ?? id);
2694
+ const humanize = (cond) => humanizeNodeRefs(cond, (id) => blockName.get(id) ?? sceneOf.get(id) ?? id);
2698
2695
  const els = [];
2699
2696
  const textOf = (id) => source[id] ?? "";
2700
2697
  const jumpText = (j) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patterkit/ops",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "The shared operations layer: every project operation (load, validate, export, format, play, ...) as a pure function, consumed by the patter CLI and Patterpad alike.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,10 +27,10 @@
27
27
  "build": "tsup src/index.ts --format esm --dts --clean"
28
28
  },
29
29
  "dependencies": {
30
- "@patterkit/compiler": "0.2.7",
31
- "@patterkit/core": "0.2.3",
30
+ "@patterkit/compiler": "0.2.8",
31
+ "@patterkit/core": "0.2.4",
32
32
  "@patterkit/model": "0.5.0",
33
- "@patterkit/runtime": "0.12.1",
33
+ "@patterkit/runtime": "0.13.0",
34
34
  "@wildwinter/toolkit": "^0.1.0",
35
35
  "docx": "^9.7.1",
36
36
  "exceljs": "^4.4.0",