@milaboratories/pl-model-common 1.47.2 → 1.48.0

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 (95) hide show
  1. package/dist/bmodel/block_kind_ref.cjs +45 -0
  2. package/dist/bmodel/block_kind_ref.cjs.map +1 -0
  3. package/dist/bmodel/block_kind_ref.d.ts +57 -0
  4. package/dist/bmodel/block_kind_ref.d.ts.map +1 -0
  5. package/dist/bmodel/block_kind_ref.js +43 -0
  6. package/dist/bmodel/block_kind_ref.js.map +1 -0
  7. package/dist/bmodel/container.d.ts +8 -0
  8. package/dist/bmodel/container.d.ts.map +1 -1
  9. package/dist/bmodel/index.cjs +4 -0
  10. package/dist/bmodel/index.d.ts +2 -1
  11. package/dist/bmodel/index.js +2 -1
  12. package/dist/columns/dedup.cjs +1 -1
  13. package/dist/columns/dedup.cjs.map +1 -1
  14. package/dist/columns/dedup.d.ts +1 -1
  15. package/dist/columns/dedup.js +1 -1
  16. package/dist/columns/dedup.js.map +1 -1
  17. package/dist/columns/providers.cjs +1 -1
  18. package/dist/columns/providers.cjs.map +1 -1
  19. package/dist/columns/providers.d.ts +1 -1
  20. package/dist/columns/providers.js +1 -1
  21. package/dist/columns/providers.js.map +1 -1
  22. package/dist/drivers/index.cjs +4 -0
  23. package/dist/drivers/index.d.ts +2 -2
  24. package/dist/drivers/index.js +2 -2
  25. package/dist/drivers/pframe/data_types.cjs.map +1 -1
  26. package/dist/drivers/pframe/data_types.d.ts +24 -0
  27. package/dist/drivers/pframe/data_types.d.ts.map +1 -1
  28. package/dist/drivers/pframe/data_types.js.map +1 -1
  29. package/dist/drivers/pframe/index.cjs +4 -0
  30. package/dist/drivers/pframe/index.d.ts +2 -2
  31. package/dist/drivers/pframe/index.js +2 -2
  32. package/dist/drivers/pframe/spec/ids.cjs +151 -0
  33. package/dist/drivers/pframe/spec/ids.cjs.map +1 -1
  34. package/dist/drivers/pframe/spec/ids.d.ts +53 -1
  35. package/dist/drivers/pframe/spec/ids.d.ts.map +1 -1
  36. package/dist/drivers/pframe/spec/ids.js +150 -3
  37. package/dist/drivers/pframe/spec/ids.js.map +1 -1
  38. package/dist/drivers/pframe/spec/index.cjs +4 -0
  39. package/dist/drivers/pframe/spec/index.d.ts +2 -2
  40. package/dist/drivers/pframe/spec/index.js +2 -2
  41. package/dist/index.cjs +29 -0
  42. package/dist/index.d.ts +7 -2
  43. package/dist/index.js +8 -2
  44. package/dist/plid.cjs +1 -1
  45. package/dist/plid.cjs.map +1 -1
  46. package/dist/plid.d.ts +3 -2
  47. package/dist/plid.d.ts.map +1 -1
  48. package/dist/plid.js +1 -1
  49. package/dist/plid.js.map +1 -1
  50. package/dist/template/index.cjs +20 -0
  51. package/dist/template/index.d.ts +5 -0
  52. package/dist/template/index.js +5 -0
  53. package/dist/template/kind_selector.cjs +92 -0
  54. package/dist/template/kind_selector.cjs.map +1 -0
  55. package/dist/template/kind_selector.d.ts +80 -0
  56. package/dist/template/kind_selector.d.ts.map +1 -0
  57. package/dist/template/kind_selector.js +87 -0
  58. package/dist/template/kind_selector.js.map +1 -0
  59. package/dist/template/project_template_v1.cjs +231 -0
  60. package/dist/template/project_template_v1.cjs.map +1 -0
  61. package/dist/template/project_template_v1.d.ts +215 -0
  62. package/dist/template/project_template_v1.d.ts.map +1 -0
  63. package/dist/template/project_template_v1.js +225 -0
  64. package/dist/template/project_template_v1.js.map +1 -0
  65. package/dist/template/template_ref_form.cjs +73 -0
  66. package/dist/template/template_ref_form.cjs.map +1 -0
  67. package/dist/template/template_ref_form.d.ts +74 -0
  68. package/dist/template/template_ref_form.d.ts.map +1 -0
  69. package/dist/template/template_ref_form.js +72 -0
  70. package/dist/template/template_ref_form.js.map +1 -0
  71. package/dist/template/template_relocate.cjs +46 -0
  72. package/dist/template/template_relocate.cjs.map +1 -0
  73. package/dist/template/template_relocate.d.ts +32 -0
  74. package/dist/template/template_relocate.d.ts.map +1 -0
  75. package/dist/template/template_relocate.js +46 -0
  76. package/dist/template/template_relocate.js.map +1 -0
  77. package/package.json +5 -5
  78. package/src/bmodel/block_kind_ref.ts +59 -0
  79. package/src/bmodel/container.ts +9 -0
  80. package/src/bmodel/index.ts +1 -0
  81. package/src/columns/dedup.ts +1 -1
  82. package/src/columns/providers.ts +1 -1
  83. package/src/drivers/pframe/data_types.ts +24 -0
  84. package/src/drivers/pframe/spec/ids.test.ts +90 -0
  85. package/src/drivers/pframe/spec/ids.ts +191 -1
  86. package/src/index.ts +1 -0
  87. package/src/plid.ts +5 -5
  88. package/src/template/index.ts +4 -0
  89. package/src/template/kind_selector.ts +126 -0
  90. package/src/template/project_template_v1.test.ts +315 -0
  91. package/src/template/project_template_v1.ts +444 -0
  92. package/src/template/template_ref_form.test.ts +86 -0
  93. package/src/template/template_ref_form.ts +108 -0
  94. package/src/template/template_relocate.test.ts +182 -0
  95. package/src/template/template_relocate.ts +61 -0
@@ -0,0 +1,45 @@
1
+ //#region src/bmodel/block_kind_ref.ts
2
+ /**
3
+ * Compose a {@link BlockKindReference} from a kind's `name`/`version`.
4
+ *
5
+ * The single place that decides how the reference is assembled. If global
6
+ * uniqueness later requires the name segment to be org-qualified, this is the
7
+ * one line that changes.
8
+ */
9
+ const formatKindRef = (k) => `${k.name}@${k.version}`;
10
+ /**
11
+ * Split a `{name}@{version}` string on its version separator.
12
+ *
13
+ * The one place that decides where the name ends. Uses the LAST `@` so an
14
+ * org-qualified npm name that itself starts with `@` (e.g.
15
+ * `@platforma-open/pkg.kind`) keeps its whole name. A leading/absent separator
16
+ * (`lastIndexOf("@") <= 0`) means the string carries no version segment —
17
+ * malformed — so this throws rather than returning a silently version-less
18
+ * result.
19
+ *
20
+ * Shared with the template layer, whose `{name}@{selector}` references use the
21
+ * same split and differ only in how the right half is interpreted (see
22
+ * `parseKindSelectorReference`). `what` names the thing being parsed so the
23
+ * error message stays specific to the caller's reference type.
24
+ */
25
+ const splitVersionedName = (ref, what = "block kind reference", expected = "{name}@{version}") => {
26
+ const at = ref.lastIndexOf("@");
27
+ if (at <= 0) throw new Error(`Malformed ${what} (expected '${expected}'): ${ref}`);
28
+ return {
29
+ name: ref.slice(0, at),
30
+ version: ref.slice(at + 1)
31
+ };
32
+ };
33
+ /**
34
+ * Split a {@link BlockKindReference} back into `{ name, version }`.
35
+ *
36
+ * Throws on a reference with no version segment — see
37
+ * {@link splitVersionedName}, which owns the split rule.
38
+ */
39
+ const parseKindRef = (ref) => splitVersionedName(ref);
40
+ //#endregion
41
+ exports.formatKindRef = formatKindRef;
42
+ exports.parseKindRef = parseKindRef;
43
+ exports.splitVersionedName = splitVersionedName;
44
+
45
+ //# sourceMappingURL=block_kind_ref.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block_kind_ref.cjs","names":[],"sources":["../../src/bmodel/block_kind_ref.ts"],"sourcesContent":["import type { Branded } from \"@milaboratories/helpers\";\n\n/**\n * On-wire reference to a block kind, canonically the string `{name}@{version}`.\n *\n * A branded string: readers overwhelmingly need identity equality (\"does block\n * X implement kind Y?\"), for which an opaque canonical string is ideal. Any\n * reader that needs the parts calls {@link parseKindRef}; any writer composes\n * the reference through {@link formatKindRef}. Keeping composition in a single\n * function localizes the one open decision — whether the name segment has to be\n * org-qualified for global uniqueness — to one place.\n */\nexport type BlockKindReference = Branded<string, \"BlockKindReference\">;\n\n/**\n * Compose a {@link BlockKindReference} from a kind's `name`/`version`.\n *\n * The single place that decides how the reference is assembled. If global\n * uniqueness later requires the name segment to be org-qualified, this is the\n * one line that changes.\n */\nexport const formatKindRef = (k: { name: string; version: string }): BlockKindReference =>\n `${k.name}@${k.version}` as BlockKindReference;\n\n/**\n * Split a `{name}@{version}` string on its version separator.\n *\n * The one place that decides where the name ends. Uses the LAST `@` so an\n * org-qualified npm name that itself starts with `@` (e.g.\n * `@platforma-open/pkg.kind`) keeps its whole name. A leading/absent separator\n * (`lastIndexOf(\"@\") <= 0`) means the string carries no version segment —\n * malformed — so this throws rather than returning a silently version-less\n * result.\n *\n * Shared with the template layer, whose `{name}@{selector}` references use the\n * same split and differ only in how the right half is interpreted (see\n * `parseKindSelectorReference`). `what` names the thing being parsed so the\n * error message stays specific to the caller's reference type.\n */\nexport const splitVersionedName = (\n ref: string,\n what = \"block kind reference\",\n expected = \"{name}@{version}\",\n): { name: string; version: string } => {\n const at = ref.lastIndexOf(\"@\");\n if (at <= 0) {\n throw new Error(`Malformed ${what} (expected '${expected}'): ${ref}`);\n }\n return { name: ref.slice(0, at), version: ref.slice(at + 1) };\n};\n\n/**\n * Split a {@link BlockKindReference} back into `{ name, version }`.\n *\n * Throws on a reference with no version segment — see\n * {@link splitVersionedName}, which owns the split rule.\n */\nexport const parseKindRef = (ref: BlockKindReference): { name: string; version: string } =>\n splitVersionedName(ref);\n"],"mappings":";;;;;;;;AAqBA,MAAa,iBAAiB,MAC5B,GAAG,EAAE,KAAK,GAAG,EAAE;;;;;;;;;;;;;;;;AAiBjB,MAAa,sBACX,KACA,OAAO,wBACP,WAAW,uBAC2B;CACtC,MAAM,KAAK,IAAI,YAAY,GAAG;CAC9B,IAAI,MAAM,GACR,MAAM,IAAI,MAAM,aAAa,KAAK,cAAc,SAAS,MAAM,KAAK;CAEtE,OAAO;EAAE,MAAM,IAAI,MAAM,GAAG,EAAE;EAAG,SAAS,IAAI,MAAM,KAAK,CAAC;CAAE;AAC9D;;;;;;;AAQA,MAAa,gBAAgB,QAC3B,mBAAmB,GAAG"}
@@ -0,0 +1,57 @@
1
+ import { Branded } from "@milaboratories/helpers";
2
+
3
+ //#region src/bmodel/block_kind_ref.d.ts
4
+ /**
5
+ * On-wire reference to a block kind, canonically the string `{name}@{version}`.
6
+ *
7
+ * A branded string: readers overwhelmingly need identity equality ("does block
8
+ * X implement kind Y?"), for which an opaque canonical string is ideal. Any
9
+ * reader that needs the parts calls {@link parseKindRef}; any writer composes
10
+ * the reference through {@link formatKindRef}. Keeping composition in a single
11
+ * function localizes the one open decision — whether the name segment has to be
12
+ * org-qualified for global uniqueness — to one place.
13
+ */
14
+ type BlockKindReference = Branded<string, "BlockKindReference">;
15
+ /**
16
+ * Compose a {@link BlockKindReference} from a kind's `name`/`version`.
17
+ *
18
+ * The single place that decides how the reference is assembled. If global
19
+ * uniqueness later requires the name segment to be org-qualified, this is the
20
+ * one line that changes.
21
+ */
22
+ declare const formatKindRef: (k: {
23
+ name: string;
24
+ version: string;
25
+ }) => BlockKindReference;
26
+ /**
27
+ * Split a `{name}@{version}` string on its version separator.
28
+ *
29
+ * The one place that decides where the name ends. Uses the LAST `@` so an
30
+ * org-qualified npm name that itself starts with `@` (e.g.
31
+ * `@platforma-open/pkg.kind`) keeps its whole name. A leading/absent separator
32
+ * (`lastIndexOf("@") <= 0`) means the string carries no version segment —
33
+ * malformed — so this throws rather than returning a silently version-less
34
+ * result.
35
+ *
36
+ * Shared with the template layer, whose `{name}@{selector}` references use the
37
+ * same split and differ only in how the right half is interpreted (see
38
+ * `parseKindSelectorReference`). `what` names the thing being parsed so the
39
+ * error message stays specific to the caller's reference type.
40
+ */
41
+ declare const splitVersionedName: (ref: string, what?: string, expected?: string) => {
42
+ name: string;
43
+ version: string;
44
+ };
45
+ /**
46
+ * Split a {@link BlockKindReference} back into `{ name, version }`.
47
+ *
48
+ * Throws on a reference with no version segment — see
49
+ * {@link splitVersionedName}, which owns the split rule.
50
+ */
51
+ declare const parseKindRef: (ref: BlockKindReference) => {
52
+ name: string;
53
+ version: string;
54
+ };
55
+ //#endregion
56
+ export { BlockKindReference, formatKindRef, parseKindRef, splitVersionedName };
57
+ //# sourceMappingURL=block_kind_ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block_kind_ref.d.ts","names":[],"sources":["../../src/bmodel/block_kind_ref.ts"],"mappings":";;;;;AAYA;;;;AAAwC;AASxC;;;KATY,kBAAA,GAAqB,OAAO;;;;;;AAUQ;AAiBhD;cAlBa,aAAA,GAAiB,CAAA;EAAK,IAAA;EAAc,OAAA;AAAA,MAAoB,kBACrB;;;;;;AAqBtB;AAc1B;;;;;;;;;cAlBa,kBAAA,GACX,GAAA,UACA,IAAA,WACA,QAAA;EACG,IAAA;EAAc,OAAA;AAAA;;;;;;;cAcN,YAAA,GAAgB,GAAA,EAAK,kBAAkB;EAAK,IAAA;EAAc,OAAA;AAAA"}
@@ -0,0 +1,43 @@
1
+ //#region src/bmodel/block_kind_ref.ts
2
+ /**
3
+ * Compose a {@link BlockKindReference} from a kind's `name`/`version`.
4
+ *
5
+ * The single place that decides how the reference is assembled. If global
6
+ * uniqueness later requires the name segment to be org-qualified, this is the
7
+ * one line that changes.
8
+ */
9
+ const formatKindRef = (k) => `${k.name}@${k.version}`;
10
+ /**
11
+ * Split a `{name}@{version}` string on its version separator.
12
+ *
13
+ * The one place that decides where the name ends. Uses the LAST `@` so an
14
+ * org-qualified npm name that itself starts with `@` (e.g.
15
+ * `@platforma-open/pkg.kind`) keeps its whole name. A leading/absent separator
16
+ * (`lastIndexOf("@") <= 0`) means the string carries no version segment —
17
+ * malformed — so this throws rather than returning a silently version-less
18
+ * result.
19
+ *
20
+ * Shared with the template layer, whose `{name}@{selector}` references use the
21
+ * same split and differ only in how the right half is interpreted (see
22
+ * `parseKindSelectorReference`). `what` names the thing being parsed so the
23
+ * error message stays specific to the caller's reference type.
24
+ */
25
+ const splitVersionedName = (ref, what = "block kind reference", expected = "{name}@{version}") => {
26
+ const at = ref.lastIndexOf("@");
27
+ if (at <= 0) throw new Error(`Malformed ${what} (expected '${expected}'): ${ref}`);
28
+ return {
29
+ name: ref.slice(0, at),
30
+ version: ref.slice(at + 1)
31
+ };
32
+ };
33
+ /**
34
+ * Split a {@link BlockKindReference} back into `{ name, version }`.
35
+ *
36
+ * Throws on a reference with no version segment — see
37
+ * {@link splitVersionedName}, which owns the split rule.
38
+ */
39
+ const parseKindRef = (ref) => splitVersionedName(ref);
40
+ //#endregion
41
+ export { formatKindRef, parseKindRef, splitVersionedName };
42
+
43
+ //# sourceMappingURL=block_kind_ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block_kind_ref.js","names":[],"sources":["../../src/bmodel/block_kind_ref.ts"],"sourcesContent":["import type { Branded } from \"@milaboratories/helpers\";\n\n/**\n * On-wire reference to a block kind, canonically the string `{name}@{version}`.\n *\n * A branded string: readers overwhelmingly need identity equality (\"does block\n * X implement kind Y?\"), for which an opaque canonical string is ideal. Any\n * reader that needs the parts calls {@link parseKindRef}; any writer composes\n * the reference through {@link formatKindRef}. Keeping composition in a single\n * function localizes the one open decision — whether the name segment has to be\n * org-qualified for global uniqueness — to one place.\n */\nexport type BlockKindReference = Branded<string, \"BlockKindReference\">;\n\n/**\n * Compose a {@link BlockKindReference} from a kind's `name`/`version`.\n *\n * The single place that decides how the reference is assembled. If global\n * uniqueness later requires the name segment to be org-qualified, this is the\n * one line that changes.\n */\nexport const formatKindRef = (k: { name: string; version: string }): BlockKindReference =>\n `${k.name}@${k.version}` as BlockKindReference;\n\n/**\n * Split a `{name}@{version}` string on its version separator.\n *\n * The one place that decides where the name ends. Uses the LAST `@` so an\n * org-qualified npm name that itself starts with `@` (e.g.\n * `@platforma-open/pkg.kind`) keeps its whole name. A leading/absent separator\n * (`lastIndexOf(\"@\") <= 0`) means the string carries no version segment —\n * malformed — so this throws rather than returning a silently version-less\n * result.\n *\n * Shared with the template layer, whose `{name}@{selector}` references use the\n * same split and differ only in how the right half is interpreted (see\n * `parseKindSelectorReference`). `what` names the thing being parsed so the\n * error message stays specific to the caller's reference type.\n */\nexport const splitVersionedName = (\n ref: string,\n what = \"block kind reference\",\n expected = \"{name}@{version}\",\n): { name: string; version: string } => {\n const at = ref.lastIndexOf(\"@\");\n if (at <= 0) {\n throw new Error(`Malformed ${what} (expected '${expected}'): ${ref}`);\n }\n return { name: ref.slice(0, at), version: ref.slice(at + 1) };\n};\n\n/**\n * Split a {@link BlockKindReference} back into `{ name, version }`.\n *\n * Throws on a reference with no version segment — see\n * {@link splitVersionedName}, which owns the split rule.\n */\nexport const parseKindRef = (ref: BlockKindReference): { name: string; version: string } =>\n splitVersionedName(ref);\n"],"mappings":";;;;;;;;AAqBA,MAAa,iBAAiB,MAC5B,GAAG,EAAE,KAAK,GAAG,EAAE;;;;;;;;;;;;;;;;AAiBjB,MAAa,sBACX,KACA,OAAO,wBACP,WAAW,uBAC2B;CACtC,MAAM,KAAK,IAAI,YAAY,GAAG;CAC9B,IAAI,MAAM,GACR,MAAM,IAAI,MAAM,aAAa,KAAK,cAAc,SAAS,MAAM,KAAK;CAEtE,OAAO;EAAE,MAAM,IAAI,MAAM,GAAG,EAAE;EAAG,SAAS,IAAI,MAAM,KAAK,CAAC;CAAE;AAC9D;;;;;;;AAQA,MAAa,gBAAgB,QAC3B,mBAAmB,GAAG"}
@@ -1,6 +1,7 @@
1
1
  import { Code } from "./code.js";
2
2
  import { BlockRenderingMode } from "./types.js";
3
3
  import { BlockConfigV3Generic, BlockConfigV4Generic } from "./block_config.js";
4
+ import { BlockKindReference } from "./block_kind_ref.js";
4
5
 
5
6
  //#region src/bmodel/container.d.ts
6
7
  /** Container simplifying maintenance of forward and backward compatibility */
@@ -8,6 +9,13 @@ type BlockConfigContainer = {
8
9
  readonly v4?: Omit<BlockConfigV4Generic, "code">; /** Actual config */
9
10
  readonly v3?: Omit<BlockConfigV3Generic, "code">; /** Config code bundle. Actually is required, but we keep it optional for backward compatibility */
10
11
  readonly code?: Code;
12
+ /**
13
+ * Reference to the block kind this config implements, in `{name}@{version}`
14
+ * form. Version-independent block identity — lives at the container level
15
+ * beside {@link code}, orthogonal to which render envelope (`v3`/`v4`)
16
+ * applies. Optional for backward compatibility with kind-less blocks.
17
+ */
18
+ readonly kind?: BlockKindReference;
11
19
  /**
12
20
  * For backward compatibility
13
21
  * @deprecated
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","names":[],"sources":["../../src/bmodel/container.ts"],"mappings":";;;;;;KAKY,oBAAA;EAAA,SACD,EAAA,GAAK,IAAA,CAAK,oBAAA,WADW;EAAA,SAGrB,EAAA,GAAK,IAAA,CAAK,oBAAA,WAFA;EAAA,SAKV,IAAA,GAAO,IAAA;EAHG;;;;EAAA,SAaV,UAAA;EAoCgB;;;;EAAA,SA9BhB,aAAA,GAAgB,kBAAA;EAnBhB;;;;EAAA,SAyBA,WAAA;EAZA;;;;EAAA,SAkBA,MAAA;EAMA;;;;EAAA,SAAA,WAAA;EAYgB;;;;EAAA,SANhB,QAAA;;;;;WAMA,OAAA,GAAU,MAAA;AAAA"}
1
+ {"version":3,"file":"container.d.ts","names":[],"sources":["../../src/bmodel/container.ts"],"mappings":";;;;;;;KAMY,oBAAA;EAAA,SACD,EAAA,GAAK,IAAA,CAAK,oBAAA,WADW;EAAA,SAGrB,EAAA,GAAK,IAAA,CAAK,oBAAA,WAFA;EAAA,SAKV,IAAA,GAAO,IAAA;EAHG;;;;;;EAAA,SAWV,IAAA,GAAO,kBAAA;EA8CS;;;;EAAA,SApChB,UAAA;EArBK;;;;EAAA,SA2BL,aAAA,GAAgB,kBAAA;EAhBT;;;;EAAA,SAsBP,WAAA;EAMA;;;;EAAA,SAAA,MAAA;EAkBgB;AAAA;;;EAAA,SAZhB,WAAA;;;;;WAMA,QAAA;;;;;WAMA,OAAA,GAAU,MAAA;AAAA"}
@@ -1,6 +1,10 @@
1
1
  const require_block_config = require("./block_config.cjs");
2
2
  const require_code = require("./code.cjs");
3
+ const require_block_kind_ref = require("./block_kind_ref.cjs");
3
4
  const require_normalization = require("./normalization.cjs");
4
5
  exports.Code = require_code.Code;
5
6
  exports.extractCodeWithInfo = require_block_config.extractCodeWithInfo;
6
7
  exports.extractConfigGeneric = require_normalization.extractConfigGeneric;
8
+ exports.formatKindRef = require_block_kind_ref.formatKindRef;
9
+ exports.parseKindRef = require_block_kind_ref.parseKindRef;
10
+ exports.splitVersionedName = require_block_kind_ref.splitVersionedName;
@@ -1,6 +1,7 @@
1
1
  import { BlockCodeWithInfo, Code } from "./code.js";
2
2
  import { BlockRenderingMode } from "./types.js";
3
3
  import { BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, extractCodeWithInfo } from "./block_config.js";
4
+ import { BlockKindReference, formatKindRef, parseKindRef, splitVersionedName } from "./block_kind_ref.js";
4
5
  import { BlockConfigContainer } from "./container.js";
5
6
  import { extractConfigGeneric } from "./normalization.js";
6
- export { BlockCodeWithInfo, BlockConfigContainer, BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, BlockRenderingMode, Code, extractCodeWithInfo, extractConfigGeneric };
7
+ export { BlockCodeWithInfo, BlockConfigContainer, BlockConfigGeneric, BlockConfigV3Generic, BlockConfigV4Generic, BlockKindReference, BlockRenderingMode, Code, extractCodeWithInfo, extractConfigGeneric, formatKindRef, parseKindRef, splitVersionedName };
@@ -1,4 +1,5 @@
1
1
  import { extractCodeWithInfo } from "./block_config.js";
2
2
  import { Code } from "./code.js";
3
+ import { formatKindRef, parseKindRef, splitVersionedName } from "./block_kind_ref.js";
3
4
  import { extractConfigGeneric } from "./normalization.js";
4
- export { Code, extractCodeWithInfo, extractConfigGeneric };
5
+ export { Code, extractCodeWithInfo, extractConfigGeneric, formatKindRef, parseKindRef, splitVersionedName };
@@ -18,7 +18,7 @@ const require_native_id = require("../drivers/pframe/spec/native_id.cjs");
18
18
  *
19
19
  * Shared by sandbox-side `extractColumns` (column_providers) and host-side
20
20
  * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical
21
- * dedup semantics, but operate on different concrete item types (ColumnLazy
21
+ * dedup semantics, but operate on different concrete item types (DataColumnRecipe
22
22
  * vs. raw ColumnUniversalId).
23
23
  */
24
24
  function dedupColumns(items, getId, getSpec) {
@@ -1 +1 @@
1
- {"version":3,"file":"dedup.cjs","names":["isPObjectId","deriveNativeId"],"sources":["../../src/columns/dedup.ts"],"sourcesContent":["import type { PColumnSpec } from \"../drivers/pframe/spec/spec\";\nimport type { NativePObjectId } from \"../drivers/pframe/spec/native_id\";\nimport { deriveNativeId } from \"../drivers/pframe/spec/native_id\";\nimport type { ColumnUniversalId } from \"../drivers/pframe/spec/ids\";\nimport { isPObjectId } from \"../pool\";\n\n/**\n * Two-track dedup over an item stream keyed by `ColumnUniversalId`:\n *\n * - **Raw `PObjectId`s** are deduped by `deriveNativeId(spec)`. The same\n * physical column reached via outputs vs. result_pool has different\n * id shapes but identical nativeId — first occurrence wins so the\n * provider order (outputs before pool) decides which id is canonical.\n * - **Non-`PObjectId` ids** (e.g. `SUniversalPColumnUniversalId`,\n * `ColumnDiscoveredId`) keep raw-id dedup — they legitimately share\n * nativeId with siblings.\n *\n * When `getSpec` returns `undefined` for a `PObjectId`, falls back to raw-id\n * dedup (so an unresolvable id still survives instead of dropping silently).\n *\n * Shared by sandbox-side `extractColumns` (column_providers) and host-side\n * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical\n * dedup semantics, but operate on different concrete item types (ColumnLazy\n * vs. raw ColumnUniversalId).\n */\nexport function dedupColumns<T>(\n items: ReadonlyArray<T>,\n getId: (item: T) => ColumnUniversalId,\n getSpec: (item: T) => PColumnSpec | undefined,\n): T[] {\n const seenNative = new Set<NativePObjectId>();\n const seenId = new Set<ColumnUniversalId>();\n const out: T[] = [];\n for (const item of items) {\n const id = getId(item);\n if (seenId.has(id)) continue;\n if (isPObjectId(id)) {\n const spec = getSpec(item);\n if (spec !== undefined) {\n const nativeId = deriveNativeId(spec);\n if (seenNative.has(nativeId)) continue;\n seenNative.add(nativeId);\n }\n }\n seenId.add(id);\n out.push(item);\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,aACd,OACA,OACA,SACK;CACL,MAAM,6BAAa,IAAI,IAAqB;CAC5C,MAAM,yBAAS,IAAI,IAAuB;CAC1C,MAAM,MAAW,CAAC;CAClB,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,KAAK,MAAM,IAAI;EACrB,IAAI,OAAO,IAAI,EAAE,GAAG;EACpB,IAAIA,aAAAA,YAAY,EAAE,GAAG;GACnB,MAAM,OAAO,QAAQ,IAAI;GACzB,IAAI,SAAS,KAAA,GAAW;IACtB,MAAM,WAAWC,kBAAAA,eAAe,IAAI;IACpC,IAAI,WAAW,IAAI,QAAQ,GAAG;IAC9B,WAAW,IAAI,QAAQ;GACzB;EACF;EACA,OAAO,IAAI,EAAE;EACb,IAAI,KAAK,IAAI;CACf;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"dedup.cjs","names":["isPObjectId","deriveNativeId"],"sources":["../../src/columns/dedup.ts"],"sourcesContent":["import type { PColumnSpec } from \"../drivers/pframe/spec/spec\";\nimport type { NativePObjectId } from \"../drivers/pframe/spec/native_id\";\nimport { deriveNativeId } from \"../drivers/pframe/spec/native_id\";\nimport type { ColumnUniversalId } from \"../drivers/pframe/spec/ids\";\nimport { isPObjectId } from \"../pool\";\n\n/**\n * Two-track dedup over an item stream keyed by `ColumnUniversalId`:\n *\n * - **Raw `PObjectId`s** are deduped by `deriveNativeId(spec)`. The same\n * physical column reached via outputs vs. result_pool has different\n * id shapes but identical nativeId — first occurrence wins so the\n * provider order (outputs before pool) decides which id is canonical.\n * - **Non-`PObjectId` ids** (e.g. `SUniversalPColumnUniversalId`,\n * `ColumnDiscoveredId`) keep raw-id dedup — they legitimately share\n * nativeId with siblings.\n *\n * When `getSpec` returns `undefined` for a `PObjectId`, falls back to raw-id\n * dedup (so an unresolvable id still survives instead of dropping silently).\n *\n * Shared by sandbox-side `extractColumns` (column_providers) and host-side\n * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical\n * dedup semantics, but operate on different concrete item types (DataColumnRecipe\n * vs. raw ColumnUniversalId).\n */\nexport function dedupColumns<T>(\n items: ReadonlyArray<T>,\n getId: (item: T) => ColumnUniversalId,\n getSpec: (item: T) => PColumnSpec | undefined,\n): T[] {\n const seenNative = new Set<NativePObjectId>();\n const seenId = new Set<ColumnUniversalId>();\n const out: T[] = [];\n for (const item of items) {\n const id = getId(item);\n if (seenId.has(id)) continue;\n if (isPObjectId(id)) {\n const spec = getSpec(item);\n if (spec !== undefined) {\n const nativeId = deriveNativeId(spec);\n if (seenNative.has(nativeId)) continue;\n seenNative.add(nativeId);\n }\n }\n seenId.add(id);\n out.push(item);\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,aACd,OACA,OACA,SACK;CACL,MAAM,6BAAa,IAAI,IAAqB;CAC5C,MAAM,yBAAS,IAAI,IAAuB;CAC1C,MAAM,MAAW,CAAC;CAClB,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,KAAK,MAAM,IAAI;EACrB,IAAI,OAAO,IAAI,EAAE,GAAG;EACpB,IAAIA,aAAAA,YAAY,EAAE,GAAG;GACnB,MAAM,OAAO,QAAQ,IAAI;GACzB,IAAI,SAAS,KAAA,GAAW;IACtB,MAAM,WAAWC,kBAAAA,eAAe,IAAI;IACpC,IAAI,WAAW,IAAI,QAAQ,GAAG;IAC9B,WAAW,IAAI,QAAQ;GACzB;EACF;EACA,OAAO,IAAI,EAAE;EACb,IAAI,KAAK,IAAI;CACf;CACA,OAAO;AACT"}
@@ -18,7 +18,7 @@ import { ColumnUniversalId } from "../drivers/pframe/spec/ids.js";
18
18
  *
19
19
  * Shared by sandbox-side `extractColumns` (column_providers) and host-side
20
20
  * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical
21
- * dedup semantics, but operate on different concrete item types (ColumnLazy
21
+ * dedup semantics, but operate on different concrete item types (DataColumnRecipe
22
22
  * vs. raw ColumnUniversalId).
23
23
  */
24
24
  declare function dedupColumns<T>(items: ReadonlyArray<T>, getId: (item: T) => ColumnUniversalId, getSpec: (item: T) => PColumnSpec | undefined): T[];
@@ -18,7 +18,7 @@ import { deriveNativeId } from "../drivers/pframe/spec/native_id.js";
18
18
  *
19
19
  * Shared by sandbox-side `extractColumns` (column_providers) and host-side
20
20
  * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical
21
- * dedup semantics, but operate on different concrete item types (ColumnLazy
21
+ * dedup semantics, but operate on different concrete item types (DataColumnRecipe
22
22
  * vs. raw ColumnUniversalId).
23
23
  */
24
24
  function dedupColumns(items, getId, getSpec) {
@@ -1 +1 @@
1
- {"version":3,"file":"dedup.js","names":[],"sources":["../../src/columns/dedup.ts"],"sourcesContent":["import type { PColumnSpec } from \"../drivers/pframe/spec/spec\";\nimport type { NativePObjectId } from \"../drivers/pframe/spec/native_id\";\nimport { deriveNativeId } from \"../drivers/pframe/spec/native_id\";\nimport type { ColumnUniversalId } from \"../drivers/pframe/spec/ids\";\nimport { isPObjectId } from \"../pool\";\n\n/**\n * Two-track dedup over an item stream keyed by `ColumnUniversalId`:\n *\n * - **Raw `PObjectId`s** are deduped by `deriveNativeId(spec)`. The same\n * physical column reached via outputs vs. result_pool has different\n * id shapes but identical nativeId — first occurrence wins so the\n * provider order (outputs before pool) decides which id is canonical.\n * - **Non-`PObjectId` ids** (e.g. `SUniversalPColumnUniversalId`,\n * `ColumnDiscoveredId`) keep raw-id dedup — they legitimately share\n * nativeId with siblings.\n *\n * When `getSpec` returns `undefined` for a `PObjectId`, falls back to raw-id\n * dedup (so an unresolvable id still survives instead of dropping silently).\n *\n * Shared by sandbox-side `extractColumns` (column_providers) and host-side\n * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical\n * dedup semantics, but operate on different concrete item types (ColumnLazy\n * vs. raw ColumnUniversalId).\n */\nexport function dedupColumns<T>(\n items: ReadonlyArray<T>,\n getId: (item: T) => ColumnUniversalId,\n getSpec: (item: T) => PColumnSpec | undefined,\n): T[] {\n const seenNative = new Set<NativePObjectId>();\n const seenId = new Set<ColumnUniversalId>();\n const out: T[] = [];\n for (const item of items) {\n const id = getId(item);\n if (seenId.has(id)) continue;\n if (isPObjectId(id)) {\n const spec = getSpec(item);\n if (spec !== undefined) {\n const nativeId = deriveNativeId(spec);\n if (seenNative.has(nativeId)) continue;\n seenNative.add(nativeId);\n }\n }\n seenId.add(id);\n out.push(item);\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,aACd,OACA,OACA,SACK;CACL,MAAM,6BAAa,IAAI,IAAqB;CAC5C,MAAM,yBAAS,IAAI,IAAuB;CAC1C,MAAM,MAAW,CAAC;CAClB,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,KAAK,MAAM,IAAI;EACrB,IAAI,OAAO,IAAI,EAAE,GAAG;EACpB,IAAI,YAAY,EAAE,GAAG;GACnB,MAAM,OAAO,QAAQ,IAAI;GACzB,IAAI,SAAS,KAAA,GAAW;IACtB,MAAM,WAAW,eAAe,IAAI;IACpC,IAAI,WAAW,IAAI,QAAQ,GAAG;IAC9B,WAAW,IAAI,QAAQ;GACzB;EACF;EACA,OAAO,IAAI,EAAE;EACb,IAAI,KAAK,IAAI;CACf;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"dedup.js","names":[],"sources":["../../src/columns/dedup.ts"],"sourcesContent":["import type { PColumnSpec } from \"../drivers/pframe/spec/spec\";\nimport type { NativePObjectId } from \"../drivers/pframe/spec/native_id\";\nimport { deriveNativeId } from \"../drivers/pframe/spec/native_id\";\nimport type { ColumnUniversalId } from \"../drivers/pframe/spec/ids\";\nimport { isPObjectId } from \"../pool\";\n\n/**\n * Two-track dedup over an item stream keyed by `ColumnUniversalId`:\n *\n * - **Raw `PObjectId`s** are deduped by `deriveNativeId(spec)`. The same\n * physical column reached via outputs vs. result_pool has different\n * id shapes but identical nativeId — first occurrence wins so the\n * provider order (outputs before pool) decides which id is canonical.\n * - **Non-`PObjectId` ids** (e.g. `SUniversalPColumnUniversalId`,\n * `ColumnDiscoveredId`) keep raw-id dedup — they legitimately share\n * nativeId with siblings.\n *\n * When `getSpec` returns `undefined` for a `PObjectId`, falls back to raw-id\n * dedup (so an unresolvable id still survives instead of dropping silently).\n *\n * Shared by sandbox-side `extractColumns` (column_providers) and host-side\n * `ColumnsCollectionDriverImpl.getColumns` — both layers need identical\n * dedup semantics, but operate on different concrete item types (DataColumnRecipe\n * vs. raw ColumnUniversalId).\n */\nexport function dedupColumns<T>(\n items: ReadonlyArray<T>,\n getId: (item: T) => ColumnUniversalId,\n getSpec: (item: T) => PColumnSpec | undefined,\n): T[] {\n const seenNative = new Set<NativePObjectId>();\n const seenId = new Set<ColumnUniversalId>();\n const out: T[] = [];\n for (const item of items) {\n const id = getId(item);\n if (seenId.has(id)) continue;\n if (isPObjectId(id)) {\n const spec = getSpec(item);\n if (spec !== undefined) {\n const nativeId = deriveNativeId(spec);\n if (seenNative.has(nativeId)) continue;\n seenNative.add(nativeId);\n }\n }\n seenId.add(id);\n out.push(item);\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,aACd,OACA,OACA,SACK;CACL,MAAM,6BAAa,IAAI,IAAqB;CAC5C,MAAM,yBAAS,IAAI,IAAuB;CAC1C,MAAM,MAAW,CAAC;CAClB,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,KAAK,MAAM,IAAI;EACrB,IAAI,OAAO,IAAI,EAAE,GAAG;EACpB,IAAI,YAAY,EAAE,GAAG;GACnB,MAAM,OAAO,QAAQ,IAAI;GACzB,IAAI,SAAS,KAAA,GAAW;IACtB,MAAM,WAAW,eAAe,IAAI;IACpC,IAAI,WAAW,IAAI,QAAQ,GAAG;IAC9B,WAAW,IAAI,QAAQ;GACzB;EACF;EACA,OAAO,IAAI,EAAE;EACb,IAAI,KAAK,IAAI;CACf;CACA,OAAO;AACT"}
@@ -6,7 +6,7 @@ const require_accessor_traversal = require("./accessor_traversal.cjs");
6
6
  * exposes `isFinal()` via the root's `getInputsLocked()`.
7
7
  *
8
8
  * Used directly on the host side; sandbox extends it with `getColumns()`
9
- * returning {@link ColumnLazy}s — see `AccessorColumnsProvider` in
9
+ * returning {@link DataColumnRecipe}s — see `AccessorColumnsProvider` in
10
10
  * `@platforma-sdk/model`.
11
11
  */
12
12
  var AccessorEntriesProvider = class {
@@ -1 +1 @@
1
- {"version":3,"file":"providers.cjs","names":["indexAccessorRoot","indexPoolBlock"],"sources":["../../src/columns/providers.ts"],"sourcesContent":["import type { PObjectId } from \"../pool\";\nimport { indexAccessorRoot, indexPoolBlock } from \"./accessor_traversal\";\nimport type { AccessorLike, ColumnEntriesProvider, LeafEntry, UpstreamBlockCtx } from \"./types\";\n\n/**\n * Generic entries provider over a single accessor root. Walks `<root>` once\n * from the supplied `rootPath`, builds an id → {@link LeafEntry} map and\n * exposes `isFinal()` via the root's `getInputsLocked()`.\n *\n * Used directly on the host side; sandbox extends it with `getColumns()`\n * returning {@link ColumnLazy}s — see `AccessorColumnsProvider` in\n * `@platforma-sdk/model`.\n */\nexport class AccessorEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected readonly entries: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(\n protected readonly root: A,\n rootPath: ReadonlyArray<string>,\n ) {\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const entry of indexAccessorRoot(root, rootPath)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n this.entries = map;\n }\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n return this.entries;\n }\n\n isFinal(): boolean {\n return this.root.getInputsLocked();\n }\n}\n\n/**\n * Generic entries provider over a list of upstream-block ctx pairs.\n *\n * Per-block merge: iterate `prod` then `staging`, dedupe by name with\n * first-wins semantics (prod takes precedence).\n *\n * `isFinal()` is the AND of `getInputsLocked()` over every present ctx\n * accessor and `!prodIncomplete && !stagingIncomplete` over every block.\n */\nexport class ResultPoolEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected cachedEntries?: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(protected readonly blocks: ReadonlyArray<UpstreamBlockCtx<A>>) {}\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n if (this.cachedEntries !== undefined) return this.cachedEntries;\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const block of this.blocks) {\n for (const entry of indexPoolBlock(block)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n }\n return (this.cachedEntries = map);\n }\n\n isFinal(): boolean {\n for (const block of this.blocks) {\n if (block.prodIncomplete || block.stagingIncomplete) return false;\n if (block.prodCtx && !block.prodCtx.getInputsLocked()) return false;\n if (block.stagingCtx && !block.stagingCtx.getInputsLocked()) return false;\n }\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,0BAAb,MAEsC;CAIf;CAHrB;CAEA,YACE,MACA,UACA;EAFmB,KAAA,OAAA;EAGnB,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAASA,2BAAAA,kBAAkB,MAAM,QAAQ,GAClD,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAEjD,KAAK,UAAU;CACjB;CAEA,oBAA0D;EACxD,OAAO,KAAK;CACd;CAEA,UAAmB;EACjB,OAAO,KAAK,KAAK,gBAAgB;CACnC;AACF;;;;;;;;;;AAWA,IAAa,4BAAb,MAEsC;CAGL;CAF/B;CAEA,YAAY,QAA+D;EAA5C,KAAA,SAAA;CAA6C;CAE5E,oBAA0D;EACxD,IAAI,KAAK,kBAAkB,KAAA,GAAW,OAAO,KAAK;EAClD,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAAS,KAAK,QACvB,KAAK,MAAM,SAASC,2BAAAA,eAAe,KAAK,GACtC,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAGnD,OAAQ,KAAK,gBAAgB;CAC/B;CAEA,UAAmB;EACjB,KAAK,MAAM,SAAS,KAAK,QAAQ;GAC/B,IAAI,MAAM,kBAAkB,MAAM,mBAAmB,OAAO;GAC5D,IAAI,MAAM,WAAW,CAAC,MAAM,QAAQ,gBAAgB,GAAG,OAAO;GAC9D,IAAI,MAAM,cAAc,CAAC,MAAM,WAAW,gBAAgB,GAAG,OAAO;EACtE;EACA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"providers.cjs","names":["indexAccessorRoot","indexPoolBlock"],"sources":["../../src/columns/providers.ts"],"sourcesContent":["import type { PObjectId } from \"../pool\";\nimport { indexAccessorRoot, indexPoolBlock } from \"./accessor_traversal\";\nimport type { AccessorLike, ColumnEntriesProvider, LeafEntry, UpstreamBlockCtx } from \"./types\";\n\n/**\n * Generic entries provider over a single accessor root. Walks `<root>` once\n * from the supplied `rootPath`, builds an id → {@link LeafEntry} map and\n * exposes `isFinal()` via the root's `getInputsLocked()`.\n *\n * Used directly on the host side; sandbox extends it with `getColumns()`\n * returning {@link DataColumnRecipe}s — see `AccessorColumnsProvider` in\n * `@platforma-sdk/model`.\n */\nexport class AccessorEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected readonly entries: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(\n protected readonly root: A,\n rootPath: ReadonlyArray<string>,\n ) {\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const entry of indexAccessorRoot(root, rootPath)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n this.entries = map;\n }\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n return this.entries;\n }\n\n isFinal(): boolean {\n return this.root.getInputsLocked();\n }\n}\n\n/**\n * Generic entries provider over a list of upstream-block ctx pairs.\n *\n * Per-block merge: iterate `prod` then `staging`, dedupe by name with\n * first-wins semantics (prod takes precedence).\n *\n * `isFinal()` is the AND of `getInputsLocked()` over every present ctx\n * accessor and `!prodIncomplete && !stagingIncomplete` over every block.\n */\nexport class ResultPoolEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected cachedEntries?: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(protected readonly blocks: ReadonlyArray<UpstreamBlockCtx<A>>) {}\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n if (this.cachedEntries !== undefined) return this.cachedEntries;\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const block of this.blocks) {\n for (const entry of indexPoolBlock(block)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n }\n return (this.cachedEntries = map);\n }\n\n isFinal(): boolean {\n for (const block of this.blocks) {\n if (block.prodIncomplete || block.stagingIncomplete) return false;\n if (block.prodCtx && !block.prodCtx.getInputsLocked()) return false;\n if (block.stagingCtx && !block.stagingCtx.getInputsLocked()) return false;\n }\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,0BAAb,MAEsC;CAIf;CAHrB;CAEA,YACE,MACA,UACA;EAFmB,KAAA,OAAA;EAGnB,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAASA,2BAAAA,kBAAkB,MAAM,QAAQ,GAClD,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAEjD,KAAK,UAAU;CACjB;CAEA,oBAA0D;EACxD,OAAO,KAAK;CACd;CAEA,UAAmB;EACjB,OAAO,KAAK,KAAK,gBAAgB;CACnC;AACF;;;;;;;;;;AAWA,IAAa,4BAAb,MAEsC;CAGL;CAF/B;CAEA,YAAY,QAA+D;EAA5C,KAAA,SAAA;CAA6C;CAE5E,oBAA0D;EACxD,IAAI,KAAK,kBAAkB,KAAA,GAAW,OAAO,KAAK;EAClD,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAAS,KAAK,QACvB,KAAK,MAAM,SAASC,2BAAAA,eAAe,KAAK,GACtC,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAGnD,OAAQ,KAAK,gBAAgB;CAC/B;CAEA,UAAmB;EACjB,KAAK,MAAM,SAAS,KAAK,QAAQ;GAC/B,IAAI,MAAM,kBAAkB,MAAM,mBAAmB,OAAO;GAC5D,IAAI,MAAM,WAAW,CAAC,MAAM,QAAQ,gBAAgB,GAAG,OAAO;GAC9D,IAAI,MAAM,cAAc,CAAC,MAAM,WAAW,gBAAgB,GAAG,OAAO;EACtE;EACA,OAAO;CACT;AACF"}
@@ -8,7 +8,7 @@ import { AccessorLike, ColumnEntriesProvider, LeafEntry, UpstreamBlockCtx } from
8
8
  * exposes `isFinal()` via the root's `getInputsLocked()`.
9
9
  *
10
10
  * Used directly on the host side; sandbox extends it with `getColumns()`
11
- * returning {@link ColumnLazy}s — see `AccessorColumnsProvider` in
11
+ * returning {@link DataColumnRecipe}s — see `AccessorColumnsProvider` in
12
12
  * `@platforma-sdk/model`.
13
13
  */
14
14
  declare class AccessorEntriesProvider<A extends AccessorLike<A>> implements ColumnEntriesProvider<A> {
@@ -6,7 +6,7 @@ import { indexAccessorRoot, indexPoolBlock } from "./accessor_traversal.js";
6
6
  * exposes `isFinal()` via the root's `getInputsLocked()`.
7
7
  *
8
8
  * Used directly on the host side; sandbox extends it with `getColumns()`
9
- * returning {@link ColumnLazy}s — see `AccessorColumnsProvider` in
9
+ * returning {@link DataColumnRecipe}s — see `AccessorColumnsProvider` in
10
10
  * `@platforma-sdk/model`.
11
11
  */
12
12
  var AccessorEntriesProvider = class {
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","names":[],"sources":["../../src/columns/providers.ts"],"sourcesContent":["import type { PObjectId } from \"../pool\";\nimport { indexAccessorRoot, indexPoolBlock } from \"./accessor_traversal\";\nimport type { AccessorLike, ColumnEntriesProvider, LeafEntry, UpstreamBlockCtx } from \"./types\";\n\n/**\n * Generic entries provider over a single accessor root. Walks `<root>` once\n * from the supplied `rootPath`, builds an id → {@link LeafEntry} map and\n * exposes `isFinal()` via the root's `getInputsLocked()`.\n *\n * Used directly on the host side; sandbox extends it with `getColumns()`\n * returning {@link ColumnLazy}s — see `AccessorColumnsProvider` in\n * `@platforma-sdk/model`.\n */\nexport class AccessorEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected readonly entries: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(\n protected readonly root: A,\n rootPath: ReadonlyArray<string>,\n ) {\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const entry of indexAccessorRoot(root, rootPath)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n this.entries = map;\n }\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n return this.entries;\n }\n\n isFinal(): boolean {\n return this.root.getInputsLocked();\n }\n}\n\n/**\n * Generic entries provider over a list of upstream-block ctx pairs.\n *\n * Per-block merge: iterate `prod` then `staging`, dedupe by name with\n * first-wins semantics (prod takes precedence).\n *\n * `isFinal()` is the AND of `getInputsLocked()` over every present ctx\n * accessor and `!prodIncomplete && !stagingIncomplete` over every block.\n */\nexport class ResultPoolEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected cachedEntries?: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(protected readonly blocks: ReadonlyArray<UpstreamBlockCtx<A>>) {}\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n if (this.cachedEntries !== undefined) return this.cachedEntries;\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const block of this.blocks) {\n for (const entry of indexPoolBlock(block)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n }\n return (this.cachedEntries = map);\n }\n\n isFinal(): boolean {\n for (const block of this.blocks) {\n if (block.prodIncomplete || block.stagingIncomplete) return false;\n if (block.prodCtx && !block.prodCtx.getInputsLocked()) return false;\n if (block.stagingCtx && !block.stagingCtx.getInputsLocked()) return false;\n }\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,0BAAb,MAEsC;CAIf;CAHrB;CAEA,YACE,MACA,UACA;EAFmB,KAAA,OAAA;EAGnB,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAAS,kBAAkB,MAAM,QAAQ,GAClD,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAEjD,KAAK,UAAU;CACjB;CAEA,oBAA0D;EACxD,OAAO,KAAK;CACd;CAEA,UAAmB;EACjB,OAAO,KAAK,KAAK,gBAAgB;CACnC;AACF;;;;;;;;;;AAWA,IAAa,4BAAb,MAEsC;CAGL;CAF/B;CAEA,YAAY,QAA+D;EAA5C,KAAA,SAAA;CAA6C;CAE5E,oBAA0D;EACxD,IAAI,KAAK,kBAAkB,KAAA,GAAW,OAAO,KAAK;EAClD,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAAS,KAAK,QACvB,KAAK,MAAM,SAAS,eAAe,KAAK,GACtC,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAGnD,OAAQ,KAAK,gBAAgB;CAC/B;CAEA,UAAmB;EACjB,KAAK,MAAM,SAAS,KAAK,QAAQ;GAC/B,IAAI,MAAM,kBAAkB,MAAM,mBAAmB,OAAO;GAC5D,IAAI,MAAM,WAAW,CAAC,MAAM,QAAQ,gBAAgB,GAAG,OAAO;GAC9D,IAAI,MAAM,cAAc,CAAC,MAAM,WAAW,gBAAgB,GAAG,OAAO;EACtE;EACA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"providers.js","names":[],"sources":["../../src/columns/providers.ts"],"sourcesContent":["import type { PObjectId } from \"../pool\";\nimport { indexAccessorRoot, indexPoolBlock } from \"./accessor_traversal\";\nimport type { AccessorLike, ColumnEntriesProvider, LeafEntry, UpstreamBlockCtx } from \"./types\";\n\n/**\n * Generic entries provider over a single accessor root. Walks `<root>` once\n * from the supplied `rootPath`, builds an id → {@link LeafEntry} map and\n * exposes `isFinal()` via the root's `getInputsLocked()`.\n *\n * Used directly on the host side; sandbox extends it with `getColumns()`\n * returning {@link DataColumnRecipe}s — see `AccessorColumnsProvider` in\n * `@platforma-sdk/model`.\n */\nexport class AccessorEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected readonly entries: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(\n protected readonly root: A,\n rootPath: ReadonlyArray<string>,\n ) {\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const entry of indexAccessorRoot(root, rootPath)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n this.entries = map;\n }\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n return this.entries;\n }\n\n isFinal(): boolean {\n return this.root.getInputsLocked();\n }\n}\n\n/**\n * Generic entries provider over a list of upstream-block ctx pairs.\n *\n * Per-block merge: iterate `prod` then `staging`, dedupe by name with\n * first-wins semantics (prod takes precedence).\n *\n * `isFinal()` is the AND of `getInputsLocked()` over every present ctx\n * accessor and `!prodIncomplete && !stagingIncomplete` over every block.\n */\nexport class ResultPoolEntriesProvider<\n A extends AccessorLike<A>,\n> implements ColumnEntriesProvider<A> {\n protected cachedEntries?: ReadonlyMap<PObjectId, LeafEntry<A>>;\n\n constructor(protected readonly blocks: ReadonlyArray<UpstreamBlockCtx<A>>) {}\n\n getPObjectEntries(): ReadonlyMap<PObjectId, LeafEntry<A>> {\n if (this.cachedEntries !== undefined) return this.cachedEntries;\n const map = new Map<PObjectId, LeafEntry<A>>();\n for (const block of this.blocks) {\n for (const entry of indexPoolBlock(block)) {\n if (!map.has(entry.id)) map.set(entry.id, entry);\n }\n }\n return (this.cachedEntries = map);\n }\n\n isFinal(): boolean {\n for (const block of this.blocks) {\n if (block.prodIncomplete || block.stagingIncomplete) return false;\n if (block.prodCtx && !block.prodCtx.getInputsLocked()) return false;\n if (block.stagingCtx && !block.stagingCtx.getInputsLocked()) return false;\n }\n return true;\n }\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,0BAAb,MAEsC;CAIf;CAHrB;CAEA,YACE,MACA,UACA;EAFmB,KAAA,OAAA;EAGnB,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAAS,kBAAkB,MAAM,QAAQ,GAClD,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAEjD,KAAK,UAAU;CACjB;CAEA,oBAA0D;EACxD,OAAO,KAAK;CACd;CAEA,UAAmB;EACjB,OAAO,KAAK,KAAK,gBAAgB;CACnC;AACF;;;;;;;;;;AAWA,IAAa,4BAAb,MAEsC;CAGL;CAF/B;CAEA,YAAY,QAA+D;EAA5C,KAAA,SAAA;CAA6C;CAE5E,oBAA0D;EACxD,IAAI,KAAK,kBAAkB,KAAA,GAAW,OAAO,KAAK;EAClD,MAAM,sBAAM,IAAI,IAA6B;EAC7C,KAAK,MAAM,SAAS,KAAK,QACvB,KAAK,MAAM,SAAS,eAAe,KAAK,GACtC,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,GAAG,IAAI,IAAI,MAAM,IAAI,KAAK;EAGnD,OAAQ,KAAK,gBAAgB;CAC/B;CAEA,UAAmB;EACjB,KAAK,MAAM,SAAS,KAAK,QAAQ;GAC/B,IAAI,MAAM,kBAAkB,MAAM,mBAAmB,OAAO;GAC5D,IAAI,MAAM,WAAW,CAAC,MAAM,QAAQ,gBAAgB,GAAG,OAAO;GAC9D,IAAI,MAAM,cAAc,CAAC,MAAM,WAAW,gBAAgB,GAAG,OAAO;EACtE;EACA,OAAO;CACT;AACF"}
@@ -73,6 +73,8 @@ exports.isColumnDiscoveredKey = require_discovered_column.isColumnDiscoveredKey;
73
73
  exports.isColumnFilteredId = require_filtered_column.isColumnFilteredId;
74
74
  exports.isColumnFilteredKey = require_filtered_column.isColumnFilteredKey;
75
75
  exports.isColumnOverriddenKey = require_overridden.isColumnOverriddenKey;
76
+ exports.isColumnUniversalId = require_ids.isColumnUniversalId;
77
+ exports.isColumnUniversalKey = require_ids.isColumnUniversalKey;
76
78
  exports.isDataInfo = require_data_info.isDataInfo;
77
79
  exports.isDataInfoEntries = require_data_info.isDataInfoEntries;
78
80
  exports.isEmptySpecDelta = require_overridden.isEmptySpecDelta;
@@ -107,6 +109,7 @@ exports.parseColumnDiscoveredId = require_discovered_column.parseColumnDiscovere
107
109
  exports.parseColumnId = require_ids.parseColumnId;
108
110
  exports.parseColumnIdSafely = require_ids.parseColumnIdSafely;
109
111
  exports.parseColumnOverriddenId = require_overridden.parseColumnOverriddenId;
112
+ exports.peelJsonLayers = require_ids.peelJsonLayers;
110
113
  exports.readAnnotation = require_spec.readAnnotation;
111
114
  exports.readAnnotationJson = require_spec.readAnnotationJson;
112
115
  exports.readAnnotationJsonOrThrow = require_spec.readAnnotationJsonOrThrow;
@@ -117,6 +120,7 @@ exports.readMetadata = require_spec.readMetadata;
117
120
  exports.readMetadataJson = require_spec.readMetadataJson;
118
121
  exports.readMetadataJsonOrThrow = require_spec.readMetadataJsonOrThrow;
119
122
  exports.reconstructSpecFromId = require_ids.reconstructSpecFromId;
123
+ exports.remapColumnIdBlockIds = require_ids.remapColumnIdBlockIds;
120
124
  exports.resolveAnchors = require_anchored.resolveAnchors;
121
125
  exports.resolveAnnotationParents = require_spec.resolveAnnotationParents;
122
126
  exports.sortJoinEntry = require_table_calculate.sortJoinEntry;
@@ -1,7 +1,7 @@
1
1
  import { ColumnDiscoveredId, ColumnDiscoveredKey, createColumnDiscoveredId, createColumnDiscoveredKey, distillColumnDiscoveredKey, isColumnDiscoveredId, isColumnDiscoveredKey, parseColumnDiscoveredId, stringifyColumnDiscoveredId } from "./pframe/spec/discovered_column.js";
2
2
  import { Annotation, AnnotationDataStatus, AnnotationJson, AxesId, AxesSpec, AxisId, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, ColumnValueType, Domain, DomainJson, Metadata, MetadataJson, PAxisName, PColumn, PColumnIdAndSpec, PColumnName, PColumnSpec, PColumnSpecId, PDataColumnSpec, PUniversalColumnSpec, Trace, TraceEntry, ValueType, canonicalizeAxisId, canonicalizeAxisWithParents, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getNormalizedAxesList, getPColumnSpecId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAxisId, isLabelColumn, isLinkerColumn, matchAxisId, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, resolveAnnotationParents } from "./pframe/spec/spec.js";
3
3
  import { ColumnOverriddenId, ColumnOverriddenKey, SpecOverrides, applySpecOverrides, createColumnOverriddenId, createColumnOverriddenKey, deriveSpecDelta, distillColumnOverriddenKey, isColumnOverriddenKey, isEmptySpecDelta, mergeSpecOverrides, parseColumnOverriddenId, stringifyColumnOverriddenId, unwrapOverrides } from "./pframe/spec/overridden.js";
4
- import { AxisPatches, ColumnUniversalId, ColumnUniversalKey, SUniversalPColumnId, UniversalPColumnId, extractPObjectId, parseColumnId, parseColumnIdSafely, reconstructSpecFromId, stringifyColumnId } from "./pframe/spec/ids.js";
4
+ import { AxisPatches, ColumnUniversalId, ColumnUniversalKey, PeeledJsonLayers, SUniversalPColumnId, UniversalPColumnId, extractPObjectId, isColumnUniversalId, isColumnUniversalKey, parseColumnId, parseColumnIdSafely, peelJsonLayers, reconstructSpecFromId, remapColumnIdBlockIds, stringifyColumnId } from "./pframe/spec/ids.js";
5
5
  import { AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, ColumnFilteredId, ColumnFilteredKey, FilteredPColumn, FilteredPColumnId, applyAxisFilters, createColumnFilteredId, createColumnFilteredKey, isColumnFilteredId, isColumnFilteredKey, isFilteredPColumn, stringifyColumnFilteredId } from "./pframe/spec/filtered_column.js";
6
6
  import { AnchoredIdDeriver, ResolveAnchorsOptions, resolveAnchors } from "./pframe/spec/anchored.js";
7
7
  import { NativePObjectId, deriveNativeId } from "./pframe/spec/native_id.js";
@@ -31,4 +31,4 @@ import { FileRange, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpl
31
31
  import { AnchorEntry, ColumnsDiscoverOptions, ColumnsFilterOptions, DiscoverColumnsOptions, MatchQualifications, MatchingMode, matchingModeToConstraints } from "./columns/discover_columns_options.js";
32
32
  import { ChunkedStreamReader, ChunkedStreamReaderOptions, ErrorHandlerStatus } from "./ChunkedStreamReader.js";
33
33
  import { CollectionHandle, ColumnsCollectionDriver, ColumnsCollectionDriverHost, ColumnsCollectionDriverModel, SerializedColumnsSource } from "./columns/columns_collection_driver.js";
34
- export { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchorEntry, AnchoredColumnMatchStrategy, AnchoredIdDeriver, AnchoredPColumnId, AnchoredPColumnSelector, Annotation, AnnotationDataStatus, AnnotationJson, AnyLogHandle, ArchiveFormat, ArtificialColumnJoinEntry, AxesId, AxesSpec, AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, AxisId, AxisPatches, AxisQualification, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, BlobDriver, BlobDriverMetrics, BlobHandleAndSize, BlobLike, BlobToURLDriver, BlockUIURL, BuildQueryInput, CalculateTableDataRequest, CalculateTableDataResponse, ChunkedStreamReader, ChunkedStreamReaderOptions, CollectionHandle, ColumnAxesWithQualifications, ColumnDiscoveredId, ColumnDiscoveredKey, ColumnFilter, ColumnFilteredId, ColumnFilteredKey, ColumnJoinEntry, ColumnOverriddenId, ColumnOverriddenKey, ColumnUniversalId, ColumnUniversalKey, ColumnValueType, ColumnsCollectionDriver, ColumnsCollectionDriverHost, ColumnsCollectionDriverModel, ColumnsDiscoverOptions, ColumnsFilterOptions, CompositeLinkerMap, ConstantAxisFilter, ContentHandler, DataExprAxisRef, DataExprColumnRef, DataInfo, DataInfoEntries, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DataQueryTransformColumns, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsOptions, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, Domain, DomainJson, ErrorHandlerStatus, EvaluateQueryResponse, ExportPTableOptions, FileLike, FileRange, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilteredPColumn, FilteredPColumnId, FindColumnsRequest, FindColumnsResponse, FolderURL, FrontendDriver, FullJoin, FullPTableColumnData, GetContentOptions, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ImportProgress, ImportStatus, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, InlineColumnJoinEntry, InnerJoin, JoinEntry, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, LegacyAxisSelector, LinkerMap, ListFilesResult, LiveLogHandle, LocalBlobHandle, LocalBlobHandleAndSize, LocalImportFileHandle, LogsDriver, LsDriver, LsEntry, MatchQualifications, MatcherMap, MatchingMode, Metadata, MetadataJson, MultiAxisSelector, MultiColumnSelector, NativePObjectId, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, OuterJoin, PAxisName, PColumn, PColumnDataEntry, PColumnIdAndSpec, PColumnKey, PColumnName, PColumnSelector, PColumnSpec, PColumnSpecId, PColumnValue, PColumnValues, PColumnValuesEntry, PDataColumnSpec, PFrame, PFrameDef, PFrameDriver, PFrameHandle, PFrameModelDriver, PFrameSpecDriver, PTable, PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, PTableDef, PTableDefV2, PTableDownloadCompression, PTableDownloadFormat, PTableHandle, PTableNA, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableShape, PTableSorting, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PUniversalColumnSpec, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, ProgressLogWithInfo, RangeBytes, ReadyLogHandle, RemoteBlobHandle, RemoteBlobHandleAndSize, ResolveAnchorsOptions, RootFilterSpec, SUniversalPColumnId, SerializedColumnsSource, SingleAxisSelector, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, SpecExprAxisRef, SpecExprColumnRef, SpecFrameHandle, SpecOverrides, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySpecOverride, SpecQuerySymmetricJoin, SpecQueryTransformColumns, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, StringMatcher, TableRange, Trace, TraceEntry, UniqueValuesRequest, UniqueValuesResponse, UniversalPColumnId, ValueType, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, XLSX_MAX_ROWS_PER_SHEET, applyAxisFilters, applySpecOverrides, canonicalizeAxisId, canonicalizeAxisWithParents, collectSpecQueryColumns, createColumnDiscoveredId, createColumnDiscoveredKey, createColumnFilteredId, createColumnFilteredKey, createColumnOverriddenId, createColumnOverriddenKey, dataInfoToEntries, deriveNativeId, deriveSpecDelta, distillColumnDiscoveredKey, distillColumnOverriddenKey, entriesToDataInfo, extractPObjectId, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isColumnDiscoveredId, isColumnDiscoveredKey, isColumnFilteredId, isColumnFilteredKey, isColumnOverriddenKey, isDataInfo, isDataInfoEntries, isEmptySpecDelta, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPTableNA, isPartitionedDataInfoEntries, isValueNA, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, matchingModeToConstraints, mergeSpecOverrides, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnDiscoveredId, parseColumnId, parseColumnIdSafely, parseColumnOverriddenId, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, reconstructSpecFromId, resolveAnchors, resolveAnnotationParents, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnDiscoveredId, stringifyColumnFilteredId, stringifyColumnId, stringifyColumnOverriddenId, traverseQuerySpec, unwrapOverrides, validateRangeBytes, visitDataInfo };
34
+ export { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchorEntry, AnchoredColumnMatchStrategy, AnchoredIdDeriver, AnchoredPColumnId, AnchoredPColumnSelector, Annotation, AnnotationDataStatus, AnnotationJson, AnyLogHandle, ArchiveFormat, ArtificialColumnJoinEntry, AxesId, AxesSpec, AxisFilter, AxisFilterByIdx, AxisFilterByName, AxisFilterValue, AxisId, AxisPatches, AxisQualification, AxisSpec, AxisSpecNormalized, AxisTree, AxisValueType, BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, BlobDriver, BlobDriverMetrics, BlobHandleAndSize, BlobLike, BlobToURLDriver, BlockUIURL, BuildQueryInput, CalculateTableDataRequest, CalculateTableDataResponse, ChunkedStreamReader, ChunkedStreamReaderOptions, CollectionHandle, ColumnAxesWithQualifications, ColumnDiscoveredId, ColumnDiscoveredKey, ColumnFilter, ColumnFilteredId, ColumnFilteredKey, ColumnJoinEntry, ColumnOverriddenId, ColumnOverriddenKey, ColumnUniversalId, ColumnUniversalKey, ColumnValueType, ColumnsCollectionDriver, ColumnsCollectionDriverHost, ColumnsCollectionDriverModel, ColumnsDiscoverOptions, ColumnsFilterOptions, CompositeLinkerMap, ConstantAxisFilter, ContentHandler, DataExprAxisRef, DataExprColumnRef, DataInfo, DataInfoEntries, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DataQueryTransformColumns, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsOptions, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, Domain, DomainJson, ErrorHandlerStatus, EvaluateQueryResponse, ExportPTableOptions, FileLike, FileRange, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilteredPColumn, FilteredPColumnId, FindColumnsRequest, FindColumnsResponse, FolderURL, FrontendDriver, FullJoin, FullPTableColumnData, GetContentOptions, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ImportProgress, ImportStatus, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, InlineColumnJoinEntry, InnerJoin, JoinEntry, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, LegacyAxisSelector, LinkerMap, ListFilesResult, LiveLogHandle, LocalBlobHandle, LocalBlobHandleAndSize, LocalImportFileHandle, LogsDriver, LsDriver, LsEntry, MatchQualifications, MatcherMap, MatchingMode, Metadata, MetadataJson, MultiAxisSelector, MultiColumnSelector, NativePObjectId, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, OuterJoin, PAxisName, PColumn, PColumnDataEntry, PColumnIdAndSpec, PColumnKey, PColumnName, PColumnSelector, PColumnSpec, PColumnSpecId, PColumnValue, PColumnValues, PColumnValuesEntry, PDataColumnSpec, PFrame, PFrameDef, PFrameDriver, PFrameHandle, PFrameModelDriver, PFrameSpecDriver, PTable, PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, PTableDef, PTableDefV2, PTableDownloadCompression, PTableDownloadFormat, PTableHandle, PTableNA, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableShape, PTableSorting, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PUniversalColumnSpec, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, PeeledJsonLayers, ProgressLogWithInfo, RangeBytes, ReadyLogHandle, RemoteBlobHandle, RemoteBlobHandleAndSize, ResolveAnchorsOptions, RootFilterSpec, SUniversalPColumnId, SerializedColumnsSource, SingleAxisSelector, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, SpecExprAxisRef, SpecExprColumnRef, SpecFrameHandle, SpecOverrides, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySpecOverride, SpecQuerySymmetricJoin, SpecQueryTransformColumns, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, StringMatcher, TableRange, Trace, TraceEntry, UniqueValuesRequest, UniqueValuesResponse, UniversalPColumnId, ValueType, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, XLSX_MAX_ROWS_PER_SHEET, applyAxisFilters, applySpecOverrides, canonicalizeAxisId, canonicalizeAxisWithParents, collectSpecQueryColumns, createColumnDiscoveredId, createColumnDiscoveredKey, createColumnFilteredId, createColumnFilteredKey, createColumnOverriddenId, createColumnOverriddenKey, dataInfoToEntries, deriveNativeId, deriveSpecDelta, distillColumnDiscoveredKey, distillColumnOverriddenKey, entriesToDataInfo, extractPObjectId, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isColumnDiscoveredId, isColumnDiscoveredKey, isColumnFilteredId, isColumnFilteredKey, isColumnOverriddenKey, isColumnUniversalId, isColumnUniversalKey, isDataInfo, isDataInfoEntries, isEmptySpecDelta, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPTableNA, isPartitionedDataInfoEntries, isValueNA, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, matchingModeToConstraints, mergeSpecOverrides, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnDiscoveredId, parseColumnId, parseColumnIdSafely, parseColumnOverriddenId, peelJsonLayers, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, reconstructSpecFromId, remapColumnIdBlockIds, resolveAnchors, resolveAnnotationParents, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnDiscoveredId, stringifyColumnFilteredId, stringifyColumnId, stringifyColumnOverriddenId, traverseQuerySpec, unwrapOverrides, validateRangeBytes, visitDataInfo };
@@ -11,7 +11,7 @@ import { getPTableColumnId } from "./pframe/table_common.js";
11
11
  import { applyAxisFilters, createColumnFilteredId, createColumnFilteredKey, isColumnFilteredId, isColumnFilteredKey, isFilteredPColumn, stringifyColumnFilteredId } from "./pframe/spec/filtered_column.js";
12
12
  import { createColumnDiscoveredId, createColumnDiscoveredKey, distillColumnDiscoveredKey, isColumnDiscoveredId, isColumnDiscoveredKey, parseColumnDiscoveredId, stringifyColumnDiscoveredId } from "./pframe/spec/discovered_column.js";
13
13
  import { applySpecOverrides, createColumnOverriddenId, createColumnOverriddenKey, deriveSpecDelta, distillColumnOverriddenKey, isColumnOverriddenKey, isEmptySpecDelta, mergeSpecOverrides, parseColumnOverriddenId, stringifyColumnOverriddenId, unwrapOverrides } from "./pframe/spec/overridden.js";
14
- import { extractPObjectId, parseColumnId, parseColumnIdSafely, reconstructSpecFromId, stringifyColumnId } from "./pframe/spec/ids.js";
14
+ import { extractPObjectId, isColumnUniversalId, isColumnUniversalKey, parseColumnId, parseColumnIdSafely, peelJsonLayers, reconstructSpecFromId, remapColumnIdBlockIds, stringifyColumnId } from "./pframe/spec/ids.js";
15
15
  import { AnchoredIdDeriver, resolveAnchors } from "./pframe/spec/anchored.js";
16
16
  import { isAnchoredPColumnId, legacyColumnSelectorsToPredicate, matchAxis, matchMultiColumnSelector, matchPColumn, multiColumnSelectorsToPredicate } from "./pframe/spec/selectors.js";
17
17
  import { deriveNativeId } from "./pframe/spec/native_id.js";
@@ -19,4 +19,4 @@ import { LinkerMap } from "./pframe/linker_columns.js";
19
19
  import "./pframe/index.js";
20
20
  import { matchingModeToConstraints } from "./columns/discover_columns_options.js";
21
21
  import { ChunkedStreamReader } from "./ChunkedStreamReader.js";
22
- export { AnchoredIdDeriver, Annotation, AnnotationJson, ChunkedStreamReader, Domain, DomainJson, LinkerMap, PAxisName, PColumnName, PTableNA, RangeBytes, ValueType, XLSX_MAX_ROWS_PER_SHEET, applyAxisFilters, applySpecOverrides, canonicalizeAxisId, canonicalizeAxisWithParents, collectSpecQueryColumns, createColumnDiscoveredId, createColumnDiscoveredKey, createColumnFilteredId, createColumnFilteredKey, createColumnOverriddenId, createColumnOverriddenKey, dataInfoToEntries, deriveNativeId, deriveSpecDelta, distillColumnDiscoveredKey, distillColumnOverriddenKey, entriesToDataInfo, extractPObjectId, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isColumnDiscoveredId, isColumnDiscoveredKey, isColumnFilteredId, isColumnFilteredKey, isColumnOverriddenKey, isDataInfo, isDataInfoEntries, isEmptySpecDelta, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPTableNA, isPartitionedDataInfoEntries, isValueNA, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, matchingModeToConstraints, mergeSpecOverrides, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnDiscoveredId, parseColumnId, parseColumnIdSafely, parseColumnOverriddenId, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, reconstructSpecFromId, resolveAnchors, resolveAnnotationParents, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnDiscoveredId, stringifyColumnFilteredId, stringifyColumnId, stringifyColumnOverriddenId, traverseQuerySpec, unwrapOverrides, validateRangeBytes, visitDataInfo };
22
+ export { AnchoredIdDeriver, Annotation, AnnotationJson, ChunkedStreamReader, Domain, DomainJson, LinkerMap, PAxisName, PColumnName, PTableNA, RangeBytes, ValueType, XLSX_MAX_ROWS_PER_SHEET, applyAxisFilters, applySpecOverrides, canonicalizeAxisId, canonicalizeAxisWithParents, collectSpecQueryColumns, createColumnDiscoveredId, createColumnDiscoveredKey, createColumnFilteredId, createColumnFilteredKey, createColumnOverriddenId, createColumnOverriddenKey, dataInfoToEntries, deriveNativeId, deriveSpecDelta, distillColumnDiscoveredKey, distillColumnOverriddenKey, entriesToDataInfo, extractPObjectId, getArrayFromAxisTree, getAxesId, getAxesTree, getAxisId, getColumnIdAndSpec, getDenormalizedAxesList, getFileNameFromHandle, getFilePathFromHandle, getNormalizedAxesList, getPColumnSpecId, getPTableColumnId, getSetFromAxisTree, getTypeFromPColumnOrAxisSpec, isAnchoredPColumnId, isAnyLogHandle, isAxisId, isBlockUIURL, isBooleanExpression, isColumnDiscoveredId, isColumnDiscoveredKey, isColumnFilteredId, isColumnFilteredKey, isColumnOverriddenKey, isColumnUniversalId, isColumnUniversalKey, isDataInfo, isDataInfoEntries, isEmptySpecDelta, isFilteredPColumn, isFolderURL, isImportFileHandleIndex, isImportFileHandleUpload, isLabelColumn, isLinkerColumn, isLiveLog, isPTableNA, isPartitionedDataInfoEntries, isValueNA, legacyColumnSelectorsToPredicate, mapDataInfo, mapDataInfoEntries, mapJoinEntry, mapPTableDef, mapPTableDefV2, mapSpecQueryColumns, matchAxis, matchAxisId, matchMultiColumnSelector, matchPColumn, matchingModeToConstraints, mergeSpecOverrides, multiColumnSelectorsToPredicate, newRangeBytesOpt, pTableValue, pTableValueBranded, parseColumnDiscoveredId, parseColumnId, parseColumnIdSafely, parseColumnOverriddenId, peelJsonLayers, readAnnotation, readAnnotationJson, readAnnotationJsonOrThrow, readDomain, readDomainJson, readDomainJsonOrThrow, readMetadata, readMetadataJson, readMetadataJsonOrThrow, reconstructSpecFromId, remapColumnIdBlockIds, resolveAnchors, resolveAnnotationParents, sortJoinEntry, sortPTableDef, sortSpecQuery, stringifyColumnDiscoveredId, stringifyColumnFilteredId, stringifyColumnId, stringifyColumnOverriddenId, traverseQuerySpec, unwrapOverrides, validateRangeBytes, visitDataInfo };
@@ -1 +1 @@
1
- {"version":3,"file":"data_types.cjs","names":["ValueType"],"sources":["../../../src/drivers/pframe/data_types.ts"],"sourcesContent":["import type { Branded } from \"../../branding\";\nimport { ValueType } from \"./spec/spec\";\n\nexport type PVectorDataInt = Int32Array;\nexport type PVectorDataLong = BigInt64Array;\nexport type PVectorDataFloat = Float32Array;\nexport type PVectorDataDouble = Float64Array;\nexport type PVectorDataString = (null | string)[];\nexport type PVectorDataBytes = (null | Uint8Array)[];\nexport type PVectorDataTyped<DataType extends ValueType> = DataType extends typeof ValueType.Int\n ? PVectorDataInt\n : DataType extends typeof ValueType.Long\n ? PVectorDataLong\n : DataType extends typeof ValueType.Float\n ? PVectorDataFloat\n : DataType extends typeof ValueType.Double\n ? PVectorDataDouble\n : DataType extends typeof ValueType.String\n ? PVectorDataString\n : DataType extends typeof ValueType.Bytes\n ? PVectorDataBytes\n : never;\nexport type PVectorData = PVectorDataTyped<ValueType>;\n\nexport type PTableVectorTyped<DataType extends ValueType> = {\n /** Stored data type */\n readonly type: DataType;\n\n /** Values for present positions */\n readonly data: PVectorDataTyped<DataType>;\n\n /**\n * Encoded bit array marking some elements of this vector as NA,\n * call {@link bitSet} to read the data.\n * In old desktop versions NA values are encoded as magic values in data array.\n * */\n readonly isNA?: Uint8Array;\n\n /** @deprecated Always empty. Kept for backwards compatibility with old blocks. */\n readonly absent?: Uint8Array;\n};\n/** Table column data */\nexport type PTableVector = PTableVectorTyped<ValueType>;\n\nfunction isBitSet(bitVector: Uint8Array, offset: number): boolean {\n const chunkIndex = Math.floor(offset / 8);\n const mask = 1 << (7 - (offset % 8));\n return (bitVector[chunkIndex] & mask) > 0;\n}\n\nexport function isValueNA(vector: PTableVector, row: number): boolean {\n if (vector.isNA) return isBitSet(vector.isNA, row);\n\n // Check for legacy magic values to support old desktop versions\n const valueType = vector.type;\n const value = vector.data[row];\n switch (valueType) {\n case ValueType.Int:\n return (value as PVectorDataInt[number]) === -2147483648;\n case ValueType.Long:\n return (value as PVectorDataLong[number]) === -9007199254740991n;\n case ValueType.Float:\n return Number.isNaN(value as PVectorDataFloat[number]);\n case ValueType.Double:\n return Number.isNaN(value as PVectorDataDouble[number]);\n case ValueType.String:\n return (value as PVectorDataString[number]) === null;\n case ValueType.Bytes:\n return (value as PVectorDataBytes[number]) === null;\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport const PTableNA = null;\nexport type PTableNA = typeof PTableNA;\n\n/** Type guard for NA value */\nexport function isPTableNA(value: unknown): value is PTableNA {\n return value === PTableNA;\n}\n\nexport type ValueTypeSupported = Exclude<ValueType, typeof ValueType.Bytes>;\n\nexport type PTableValueInt = number;\nexport type PTableValueLong = number;\nexport type PTableValueFloat = number;\nexport type PTableValueDouble = number;\nexport type PTableValueString = string;\nexport type PTableValueData<DataType extends ValueTypeSupported> =\n DataType extends typeof ValueType.Int\n ? PTableValueInt\n : DataType extends typeof ValueType.Long\n ? PTableValueLong\n : DataType extends typeof ValueType.Float\n ? PTableValueFloat\n : DataType extends typeof ValueType.Double\n ? PTableValueDouble\n : DataType extends typeof ValueType.String\n ? PTableValueString\n : never;\nexport type PTableValueDataBranded<DataType extends ValueTypeSupported> = Branded<\n PTableValueData<DataType>,\n DataType\n>;\nexport type PTableValue<NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> =\n | NA\n | PTableValueData<DataType>;\nexport type PTableValueBranded<\n NA = PTableNA,\n DataType extends ValueTypeSupported = ValueTypeSupported,\n> = NA | PTableValueDataBranded<DataType>;\n\nexport type PTableValueAxis<DataType extends ValueTypeSupported = ValueTypeSupported> =\n PTableValueData<DataType>;\n\nfunction pTableValueImpl<FillNA = PTableNA, DataType extends ValueType = ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options?: {\n na?: FillNA;\n dataType?: DataType;\n },\n) {\n const valueType = column.type;\n if (valueType === ValueType.Bytes) {\n throw Error(\"Bytes not yet supported\");\n }\n\n if (\n options &&\n \"dataType\" in options &&\n options.dataType !== undefined &&\n options.dataType !== valueType\n ) {\n throw Error(`expected column of type ${options.dataType}, got ${valueType}`);\n }\n\n if (isValueNA(column, row)) {\n return options?.na !== undefined ? options.na : PTableNA;\n }\n\n const value = column.data[row]!;\n switch (valueType) {\n case ValueType.Int:\n return value as PVectorDataInt[number];\n case ValueType.Long:\n return Number(value as PVectorDataLong[number]);\n case ValueType.Float:\n return value as PVectorDataFloat[number];\n case ValueType.Double:\n return value as PVectorDataDouble[number];\n case ValueType.String:\n return (value as PVectorDataString[number])!;\n }\n}\n\n/** Read PTableValue from PTable column at specified row */\nexport function pTableValue<DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n): DataType extends ValueTypeSupported ? PTableValue<PTableNA, DataType> : never;\nexport function pTableValue<FillNA, DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n options: {\n na: FillNA;\n },\n): DataType extends ValueTypeSupported ? PTableValue<FillNA, DataType> : never;\nexport function pTableValue<FillNA, DataType extends ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options: {\n na: FillNA;\n dataType: DataType;\n },\n): PTableValue<FillNA, DataType>;\nexport function pTableValue<FillNA = PTableNA, DataType extends ValueType = ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options?: {\n na?: FillNA;\n dataType?: DataType;\n },\n) {\n return pTableValueImpl(column, row, options);\n}\n\nexport function pTableValueBranded<DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n): DataType extends ValueTypeSupported ? PTableValueBranded<PTableNA, DataType> : never;\nexport function pTableValueBranded<FillNA, DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n options: {\n na: FillNA;\n },\n): DataType extends ValueTypeSupported ? PTableValueBranded<FillNA, DataType> : never;\nexport function pTableValueBranded<FillNA, DataType extends ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options: {\n na: FillNA;\n dataType: DataType;\n },\n): PTableValueBranded<FillNA, DataType>;\nexport function pTableValueBranded<\n FillNA = PTableNA,\n DataType extends ValueType = ValueTypeSupported,\n>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options?: {\n na?: FillNA;\n dataType?: DataType;\n },\n) {\n return pTableValueImpl(column, row, options);\n}\n\n/** Used in requests to partially retrieve table's data */\nexport type TableRange = {\n /** Index of the first record to retrieve */\n readonly offset: number;\n\n /** Block length */\n readonly length: number;\n};\n\n/** Unified information about table shape */\nexport type PTableShape = {\n /** Number of unified table columns, including all axes and PColumn values */\n columns: number;\n\n /** Number of rows */\n rows: number;\n};\n\n/** Supported formats for PTable file download. */\nexport type PTableDownloadFormat = \"csv\" | \"tsv\";\n\n/** Compression applied to the written file. */\nexport type PTableDownloadCompression = \"none\" | \"gzip\";\n\n/** Options for downloading PTable data to a file. */\nexport interface WritePTableToFsOptions {\n path: string;\n format: PTableDownloadFormat;\n columnIndices: number[];\n range?: TableRange;\n chunkSize?: number;\n includeHeader?: boolean;\n bom?: boolean;\n compression?: {\n type: \"gzip\";\n level?: number;\n };\n signal?: AbortSignal;\n}\n\n/** Result of a PTable file download. */\nexport interface WritePTableToFsResult {\n path: string;\n rowsWritten: number;\n bytesWritten: number;\n}\n\n/**\n * Maximum number of data rows allowed per sheet in an `xlsx` export, kept below\n * Excel's hard limit of 1,048,576. The driver rejects oversized `xlsx` exports\n * (see {@link PFrameDriver.exportPTable}); UIs use it to gate the `xlsx` option.\n */\nexport const XLSX_MAX_ROWS_PER_SHEET = 1_000_000;\n\n/** Options for {@link PFrameDriver.exportPTable}. */\nexport interface ExportPTableOptions {\n /** Destination file path; its extension selects the output format\n * (`csv`/`tsv`/`parquet`/`xlsx`). */\n path: string;\n /** Unified indices of the columns to export, in output order\n * (axes first, then data columns). */\n columnIndices: number[];\n}\n"],"mappings":";;AA4CA,SAAS,SAAS,WAAuB,QAAyB;CAChE,MAAM,aAAa,KAAK,MAAM,SAAS,CAAC;CACxC,MAAM,OAAO,KAAM,IAAK,SAAS;CACjC,QAAQ,UAAU,cAAc,QAAQ;AAC1C;AAEA,SAAgB,UAAU,QAAsB,KAAsB;CACpE,IAAI,OAAO,MAAM,OAAO,SAAS,OAAO,MAAM,GAAG;CAGjD,MAAM,YAAY,OAAO;CACzB,MAAM,QAAQ,OAAO,KAAK;CAC1B,QAAQ,WAAR;EACE,KAAKA,aAAAA,UAAU,KACb,OAAQ,UAAqC;EAC/C,KAAKA,aAAAA,UAAU,MACb,OAAQ,UAAsC,CAAC;EACjD,KAAKA,aAAAA,UAAU,OACb,OAAO,OAAO,MAAM,KAAiC;EACvD,KAAKA,aAAAA,UAAU,QACb,OAAO,OAAO,MAAM,KAAkC;EACxD,KAAKA,aAAAA,UAAU,QACb,OAAQ,UAAwC;EAClD,KAAKA,aAAAA,UAAU,OACb,OAAQ,UAAuC;EACjD,SACE,MAAM,MAAM,0BAA0B,WAA2B;CACrE;AACF;AAEA,MAAa,WAAW;;AAIxB,SAAgB,WAAW,OAAmC;CAC5D,OAAO,UAAA;AACT;AAoCA,SAAS,gBACP,QACA,KACA,SAIA;CACA,MAAM,YAAY,OAAO;CACzB,IAAI,cAAcA,aAAAA,UAAU,OAC1B,MAAM,MAAM,yBAAyB;CAGvC,IACE,WACA,cAAc,WACd,QAAQ,aAAa,KAAA,KACrB,QAAQ,aAAa,WAErB,MAAM,MAAM,2BAA2B,QAAQ,SAAS,QAAQ,WAAW;CAG7E,IAAI,UAAU,QAAQ,GAAG,GACvB,OAAO,SAAS,OAAO,KAAA,IAAY,QAAQ,KAAA;CAG7C,MAAM,QAAQ,OAAO,KAAK;CAC1B,QAAQ,WAAR;EACE,KAAKA,aAAAA,UAAU,KACb,OAAO;EACT,KAAKA,aAAAA,UAAU,MACb,OAAO,OAAO,KAAgC;EAChD,KAAKA,aAAAA,UAAU,OACb,OAAO;EACT,KAAKA,aAAAA,UAAU,QACb,OAAO;EACT,KAAKA,aAAAA,UAAU,QACb,OAAQ;CACZ;AACF;AAsBA,SAAgB,YACd,QACA,KACA,SAIA;CACA,OAAO,gBAAgB,QAAQ,KAAK,OAAO;AAC7C;AAqBA,SAAgB,mBAId,QACA,KACA,SAIA;CACA,OAAO,gBAAgB,QAAQ,KAAK,OAAO;AAC7C;;;;;;AAsDA,MAAa,0BAA0B"}
1
+ {"version":3,"file":"data_types.cjs","names":["ValueType"],"sources":["../../../src/drivers/pframe/data_types.ts"],"sourcesContent":["import type { Branded } from \"../../branding\";\nimport { ValueType } from \"./spec/spec\";\n\nexport type PVectorDataInt = Int32Array;\nexport type PVectorDataLong = BigInt64Array;\nexport type PVectorDataFloat = Float32Array;\nexport type PVectorDataDouble = Float64Array;\nexport type PVectorDataString = (null | string)[];\nexport type PVectorDataBytes = (null | Uint8Array)[];\nexport type PVectorDataTyped<DataType extends ValueType> = DataType extends typeof ValueType.Int\n ? PVectorDataInt\n : DataType extends typeof ValueType.Long\n ? PVectorDataLong\n : DataType extends typeof ValueType.Float\n ? PVectorDataFloat\n : DataType extends typeof ValueType.Double\n ? PVectorDataDouble\n : DataType extends typeof ValueType.String\n ? PVectorDataString\n : DataType extends typeof ValueType.Bytes\n ? PVectorDataBytes\n : never;\nexport type PVectorData = PVectorDataTyped<ValueType>;\n\nexport type PTableVectorTyped<DataType extends ValueType> = {\n /** Stored data type */\n readonly type: DataType;\n\n /** Values for present positions */\n readonly data: PVectorDataTyped<DataType>;\n\n /**\n * Encoded bit array marking some elements of this vector as NA,\n * call {@link bitSet} to read the data.\n * In old desktop versions NA values are encoded as magic values in data array.\n * */\n readonly isNA?: Uint8Array;\n\n /** @deprecated Always empty. Kept for backwards compatibility with old blocks. */\n readonly absent?: Uint8Array;\n};\n/** Table column data */\nexport type PTableVector = PTableVectorTyped<ValueType>;\n\nfunction isBitSet(bitVector: Uint8Array, offset: number): boolean {\n const chunkIndex = Math.floor(offset / 8);\n const mask = 1 << (7 - (offset % 8));\n return (bitVector[chunkIndex] & mask) > 0;\n}\n\nexport function isValueNA(vector: PTableVector, row: number): boolean {\n if (vector.isNA) return isBitSet(vector.isNA, row);\n\n // Check for legacy magic values to support old desktop versions\n const valueType = vector.type;\n const value = vector.data[row];\n switch (valueType) {\n case ValueType.Int:\n return (value as PVectorDataInt[number]) === -2147483648;\n case ValueType.Long:\n return (value as PVectorDataLong[number]) === -9007199254740991n;\n case ValueType.Float:\n return Number.isNaN(value as PVectorDataFloat[number]);\n case ValueType.Double:\n return Number.isNaN(value as PVectorDataDouble[number]);\n case ValueType.String:\n return (value as PVectorDataString[number]) === null;\n case ValueType.Bytes:\n return (value as PVectorDataBytes[number]) === null;\n default:\n throw Error(`unsupported data type: ${valueType satisfies never}`);\n }\n}\n\nexport const PTableNA = null;\nexport type PTableNA = typeof PTableNA;\n\n/** Type guard for NA value */\nexport function isPTableNA(value: unknown): value is PTableNA {\n return value === PTableNA;\n}\n\nexport type ValueTypeSupported = Exclude<ValueType, typeof ValueType.Bytes>;\n\nexport type PTableValueInt = number;\nexport type PTableValueLong = number;\nexport type PTableValueFloat = number;\nexport type PTableValueDouble = number;\nexport type PTableValueString = string;\nexport type PTableValueData<DataType extends ValueTypeSupported> =\n DataType extends typeof ValueType.Int\n ? PTableValueInt\n : DataType extends typeof ValueType.Long\n ? PTableValueLong\n : DataType extends typeof ValueType.Float\n ? PTableValueFloat\n : DataType extends typeof ValueType.Double\n ? PTableValueDouble\n : DataType extends typeof ValueType.String\n ? PTableValueString\n : never;\nexport type PTableValueDataBranded<DataType extends ValueTypeSupported> = Branded<\n PTableValueData<DataType>,\n DataType\n>;\nexport type PTableValue<NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> =\n | NA\n | PTableValueData<DataType>;\nexport type PTableValueBranded<\n NA = PTableNA,\n DataType extends ValueTypeSupported = ValueTypeSupported,\n> = NA | PTableValueDataBranded<DataType>;\n\nexport type PTableValueAxis<DataType extends ValueTypeSupported = ValueTypeSupported> =\n PTableValueData<DataType>;\n\nfunction pTableValueImpl<FillNA = PTableNA, DataType extends ValueType = ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options?: {\n na?: FillNA;\n dataType?: DataType;\n },\n) {\n const valueType = column.type;\n if (valueType === ValueType.Bytes) {\n throw Error(\"Bytes not yet supported\");\n }\n\n if (\n options &&\n \"dataType\" in options &&\n options.dataType !== undefined &&\n options.dataType !== valueType\n ) {\n throw Error(`expected column of type ${options.dataType}, got ${valueType}`);\n }\n\n if (isValueNA(column, row)) {\n return options?.na !== undefined ? options.na : PTableNA;\n }\n\n const value = column.data[row]!;\n switch (valueType) {\n case ValueType.Int:\n return value as PVectorDataInt[number];\n case ValueType.Long:\n return Number(value as PVectorDataLong[number]);\n case ValueType.Float:\n return value as PVectorDataFloat[number];\n case ValueType.Double:\n return value as PVectorDataDouble[number];\n case ValueType.String:\n return (value as PVectorDataString[number])!;\n }\n}\n\n/** Read PTableValue from PTable column at specified row */\nexport function pTableValue<DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n): DataType extends ValueTypeSupported ? PTableValue<PTableNA, DataType> : never;\nexport function pTableValue<FillNA, DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n options: {\n na: FillNA;\n },\n): DataType extends ValueTypeSupported ? PTableValue<FillNA, DataType> : never;\nexport function pTableValue<FillNA, DataType extends ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options: {\n na: FillNA;\n dataType: DataType;\n },\n): PTableValue<FillNA, DataType>;\nexport function pTableValue<FillNA = PTableNA, DataType extends ValueType = ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options?: {\n na?: FillNA;\n dataType?: DataType;\n },\n) {\n return pTableValueImpl(column, row, options);\n}\n\nexport function pTableValueBranded<DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n): DataType extends ValueTypeSupported ? PTableValueBranded<PTableNA, DataType> : never;\nexport function pTableValueBranded<FillNA, DataType extends ValueType>(\n column: PTableVectorTyped<DataType>,\n row: number,\n options: {\n na: FillNA;\n },\n): DataType extends ValueTypeSupported ? PTableValueBranded<FillNA, DataType> : never;\nexport function pTableValueBranded<FillNA, DataType extends ValueTypeSupported>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options: {\n na: FillNA;\n dataType: DataType;\n },\n): PTableValueBranded<FillNA, DataType>;\nexport function pTableValueBranded<\n FillNA = PTableNA,\n DataType extends ValueType = ValueTypeSupported,\n>(\n column: PTableVectorTyped<ValueType>,\n row: number,\n options?: {\n na?: FillNA;\n dataType?: DataType;\n },\n) {\n return pTableValueImpl(column, row, options);\n}\n\n/** Used in requests to partially retrieve table's data */\nexport type TableRange = {\n /** Index of the first record to retrieve */\n readonly offset: number;\n\n /** Block length */\n readonly length: number;\n};\n\n/** Unified information about table shape */\nexport type PTableShape = {\n /** Number of unified table columns, including all axes and PColumn values */\n columns: number;\n\n /** Number of rows */\n rows: number;\n};\n\n/** Supported formats for PTable file download. */\nexport type PTableDownloadFormat = \"csv\" | \"tsv\";\n\n/** Compression applied to the written file. */\nexport type PTableDownloadCompression = \"none\" | \"gzip\";\n\n/** Options for downloading PTable data to a file. */\nexport interface WritePTableToFsOptions {\n path: string;\n format: PTableDownloadFormat;\n columnIndices: number[];\n /**\n * Optional header names aligned 1:1 with {@link columnIndices}. When provided,\n * each is written verbatim — letting callers supply disambiguated labels the\n * spec's intrinsic `pl7.app/label` may not carry. When omitted (or an\n * individual entry is empty), the header falls back to the column's\n * spec-derived label.\n *\n * Additive on purpose: the UI (ui-vue) and the desktop-app runtime version\n * independently, so a newer UI must not send a shape an older runtime cannot\n * read. Older runtimes ignore this field and use {@link columnIndices} alone.\n */\n headerNames?: string[];\n range?: TableRange;\n chunkSize?: number;\n includeHeader?: boolean;\n bom?: boolean;\n compression?: {\n type: \"gzip\";\n level?: number;\n };\n signal?: AbortSignal;\n}\n\n/** Result of a PTable file download. */\nexport interface WritePTableToFsResult {\n path: string;\n rowsWritten: number;\n bytesWritten: number;\n}\n\n/**\n * Maximum number of data rows allowed per sheet in an `xlsx` export, kept below\n * Excel's hard limit of 1,048,576. The driver rejects oversized `xlsx` exports\n * (see {@link PFrameDriver.exportPTable}); UIs use it to gate the `xlsx` option.\n */\nexport const XLSX_MAX_ROWS_PER_SHEET = 1_000_000;\n\n/** Options for {@link PFrameDriver.exportPTable}. */\nexport interface ExportPTableOptions {\n /** Destination file path; its extension selects the output format\n * (`csv`/`tsv`/`parquet`/`xlsx`). */\n path: string;\n /** Unified indices of the columns to export, in output order\n * (axes first, then data columns). */\n columnIndices: number[];\n /**\n * Optional header names aligned 1:1 with {@link columnIndices}. When provided,\n * each is written verbatim — letting callers supply disambiguated labels the\n * spec's intrinsic `pl7.app/label` may not carry. When omitted (or an\n * individual entry is empty), the header falls back to the column's\n * spec-derived label.\n *\n * Additive on purpose: the UI (ui-vue) and the desktop-app runtime version\n * independently, so a newer UI must not send a shape an older runtime cannot\n * read. Older runtimes ignore this field and use {@link columnIndices} alone.\n */\n headerNames?: string[];\n}\n"],"mappings":";;AA4CA,SAAS,SAAS,WAAuB,QAAyB;CAChE,MAAM,aAAa,KAAK,MAAM,SAAS,CAAC;CACxC,MAAM,OAAO,KAAM,IAAK,SAAS;CACjC,QAAQ,UAAU,cAAc,QAAQ;AAC1C;AAEA,SAAgB,UAAU,QAAsB,KAAsB;CACpE,IAAI,OAAO,MAAM,OAAO,SAAS,OAAO,MAAM,GAAG;CAGjD,MAAM,YAAY,OAAO;CACzB,MAAM,QAAQ,OAAO,KAAK;CAC1B,QAAQ,WAAR;EACE,KAAKA,aAAAA,U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TableDownloadFormat;
77
77
  columnIndices: number[];
78
+ /**
79
+ * Optional header names aligned 1:1 with {@link columnIndices}. When provided,
80
+ * each is written verbatim — letting callers supply disambiguated labels the
81
+ * spec's intrinsic `pl7.app/label` may not carry. When omitted (or an
82
+ * individual entry is empty), the header falls back to the column's
83
+ * spec-derived label.
84
+ *
85
+ * Additive on purpose: the UI (ui-vue) and the desktop-app runtime version
86
+ * independently, so a newer UI must not send a shape an older runtime cannot
87
+ * read. Older runtimes ignore this field and use {@link columnIndices} alone.
88
+ */
89
+ headerNames?: string[];
78
90
  range?: TableRange;
79
91
  chunkSize?: number;
80
92
  includeHeader?: boolean;
@@ -105,6 +117,18 @@ interface ExportPTableOptions {
105
117
  /** Unified indices of the columns to export, in output order
106
118
  * (axes first, then data columns). */
107
119
  columnIndices: number[];
120
+ /**
121
+ * Optional header names aligned 1:1 with {@link columnIndices}. When provided,
122
+ * each is written verbatim — letting callers supply disambiguated labels the
123
+ * spec's intrinsic `pl7.app/label` may not carry. When omitted (or an
124
+ * individual entry is empty), the header falls back to the column's
125
+ * spec-derived label.
126
+ *
127
+ * Additive on purpose: the UI (ui-vue) and the desktop-app runtime version
128
+ * independently, so a newer UI must not send a shape an older runtime cannot
129
+ * read. Older runtimes ignore this field and use {@link columnIndices} alone.
130
+ */
131
+ headerNames?: string[];
108
132
  }
109
133
  //#endregion
110
134
  export { ExportPTableOptions, PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, XLSX_MAX_ROWS_PER_SHEET, isPTableNA, isValueNA, pTableValue, pTableValueBranded };
@@ -1 +1 @@
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