@ai-matrx/records 0.99.29 → 0.99.30

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 (38) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/dist/entity/index.cjs +1 -1
  3. package/dist/entity/index.cjs.map +1 -1
  4. package/dist/entity/index.d.cts +3 -3
  5. package/dist/entity/index.d.ts +3 -3
  6. package/dist/entity/index.js +1 -1
  7. package/dist/entity/index.js.map +1 -1
  8. package/dist/entity/react.cjs +1 -1
  9. package/dist/entity/react.cjs.map +1 -1
  10. package/dist/entity/react.js +1 -1
  11. package/dist/entity/react.js.map +1 -1
  12. package/dist/{port-DWHLj_Sa.d.ts → port-Bk7TG0aE.d.ts} +3 -3
  13. package/dist/{port-BbWB9Pgq.d.cts → port-rqQEGhew.d.cts} +3 -3
  14. package/dist/react/index.cjs +4 -116
  15. package/dist/react/index.cjs.map +1 -1
  16. package/dist/react/index.d.cts +1 -2
  17. package/dist/react/index.d.ts +1 -2
  18. package/dist/react/index.js +3 -115
  19. package/dist/react/index.js.map +1 -1
  20. package/dist/realtime/index.cjs +1 -1
  21. package/dist/realtime/index.cjs.map +1 -1
  22. package/dist/realtime/index.d.cts +4 -4
  23. package/dist/realtime/index.d.ts +4 -4
  24. package/dist/realtime/index.js +1 -1
  25. package/dist/realtime/index.js.map +1 -1
  26. package/dist/setup/index.cjs +3 -3
  27. package/dist/setup/index.cjs.map +1 -1
  28. package/dist/setup/index.d.cts +2 -2
  29. package/dist/setup/index.d.ts +2 -2
  30. package/dist/setup/index.js +3 -3
  31. package/dist/setup/index.js.map +1 -1
  32. package/dist/typed-table/index.cjs +4 -116
  33. package/dist/typed-table/index.cjs.map +1 -1
  34. package/dist/typed-table/index.d.cts +1 -2
  35. package/dist/typed-table/index.d.ts +1 -2
  36. package/dist/typed-table/index.js +3 -115
  37. package/dist/typed-table/index.js.map +1 -1
  38. package/package.json +7 -5
@@ -1,8 +1,8 @@
1
1
  import { L as Lane, H as HostDataPort, V as Values } from './types-CrkzINrb.js';
2
2
  import { U as Uuid, R as RecordsResult } from './record-C8q21jjB.js';
3
3
  import { O as OpLedger } from './ports-BCNNghmf.js';
4
- import * as _ai_matrx_realtime from '@ai-matrx/realtime';
5
- import { RealtimeManager, ChannelSpec } from '@ai-matrx/realtime';
4
+ import * as _ai_matrx_data_realtime from '@ai-matrx/data/realtime';
5
+ import { RealtimeManager, ChannelSpec } from '@ai-matrx/data/realtime';
6
6
 
7
7
  /** A link as the door words it: `{token, id, label}`. */
8
8
  interface EntityWireRef {
@@ -177,7 +177,7 @@ interface EntityClient {
177
177
  declare function createEntityClient(options: CreateEntityClientOptions): EntityClient;
178
178
 
179
179
  /** The topic is a CONTRACT WITH THE DATABASE (a trigger writes it, an RLS policy parses it): built once, here. */
180
- declare const entityOrgChannel: _ai_matrx_realtime.ChannelNamespace;
180
+ declare const entityOrgChannel: _ai_matrx_data_realtime.ChannelNamespace;
181
181
  /** The broadcast event the database sends on an organization topic. */
182
182
  declare const ENTITY_NOTICE_EVENT = "entity_bump";
183
183
  /** Starting values of the knobs the runtime coalesces with (entity_data.realtime_batch_ms / _max_wait_ms). */
@@ -1,8 +1,8 @@
1
1
  import { L as Lane, H as HostDataPort, V as Values } from './types-C4XCuv8O.cjs';
2
2
  import { U as Uuid, R as RecordsResult } from './record-C8q21jjB.cjs';
3
3
  import { O as OpLedger } from './ports-iATV-A2v.cjs';
4
- import * as _ai_matrx_realtime from '@ai-matrx/realtime';
5
- import { RealtimeManager, ChannelSpec } from '@ai-matrx/realtime';
4
+ import * as _ai_matrx_data_realtime from '@ai-matrx/data/realtime';
5
+ import { RealtimeManager, ChannelSpec } from '@ai-matrx/data/realtime';
6
6
 
7
7
  /** A link as the door words it: `{token, id, label}`. */
8
8
  interface EntityWireRef {
@@ -177,7 +177,7 @@ interface EntityClient {
177
177
  declare function createEntityClient(options: CreateEntityClientOptions): EntityClient;
178
178
 
179
179
  /** The topic is a CONTRACT WITH THE DATABASE (a trigger writes it, an RLS policy parses it): built once, here. */
180
- declare const entityOrgChannel: _ai_matrx_realtime.ChannelNamespace;
180
+ declare const entityOrgChannel: _ai_matrx_data_realtime.ChannelNamespace;
181
181
  /** The broadcast event the database sends on an organization topic. */
182
182
  declare const ENTITY_NOTICE_EVENT = "entity_bump";
183
183
  /** Starting values of the knobs the runtime coalesces with (entity_data.realtime_batch_ms / _max_wait_ms). */
@@ -270,7 +270,6 @@ __export(react_exports, {
270
270
  safeLinkHref: () => safeLinkHref,
271
271
  sameDocument: () => sameDocument,
272
272
  scopeChip: () => scopeChip,
273
- sha256Hex: () => sha256Hex2,
274
273
  sheetSyncSpec: () => sheetSyncSpec,
275
274
  snapshotBase: () => snapshotBase,
276
275
  sourceArchivedOf: () => sourceArchivedOf,
@@ -12680,6 +12679,9 @@ function useStoreTable(table, options = {}) {
12680
12679
  };
12681
12680
  }
12682
12681
 
12682
+ // src/typed-table/define.ts
12683
+ var import_sha256 = require("@ai-matrx/kit/sha256");
12684
+
12683
12685
  // src/typed-table/graduate.ts
12684
12686
  var import_uuid6 = require("@ai-matrx/kit/uuid");
12685
12687
  var TO_CUSTOM_FIELDS = "custom_fields";
@@ -12945,7 +12947,7 @@ function defineTypedTable(input) {
12945
12947
  fields: { ...input.fields },
12946
12948
  specs,
12947
12949
  canonicalSpec,
12948
- specHash: sha256Hex2(canonicalSpec),
12950
+ specHash: (0, import_sha256.sha256Hex)(canonicalSpec),
12949
12951
  graduatedTo: input.graduatedTo ? { token: input.graduatedTo.token, map: { ...input.graduatedTo.map } } : null,
12950
12952
  confidential: input.confidential ? {
12951
12953
  readers: input.confidential.readers.map((r) => ({ field: r.field, level: r.level, ...r.when ? { when: { ...r.when } } : {} })),
@@ -12954,120 +12956,6 @@ function defineTypedTable(input) {
12954
12956
  } : null
12955
12957
  });
12956
12958
  }
12957
- var K256 = new Uint32Array([
12958
- 1116352408,
12959
- 1899447441,
12960
- 3049323471,
12961
- 3921009573,
12962
- 961987163,
12963
- 1508970993,
12964
- 2453635748,
12965
- 2870763221,
12966
- 3624381080,
12967
- 310598401,
12968
- 607225278,
12969
- 1426881987,
12970
- 1925078388,
12971
- 2162078206,
12972
- 2614888103,
12973
- 3248222580,
12974
- 3835390401,
12975
- 4022224774,
12976
- 264347078,
12977
- 604807628,
12978
- 770255983,
12979
- 1249150122,
12980
- 1555081692,
12981
- 1996064986,
12982
- 2554220882,
12983
- 2821834349,
12984
- 2952996808,
12985
- 3210313671,
12986
- 3336571891,
12987
- 3584528711,
12988
- 113926993,
12989
- 338241895,
12990
- 666307205,
12991
- 773529912,
12992
- 1294757372,
12993
- 1396182291,
12994
- 1695183700,
12995
- 1986661051,
12996
- 2177026350,
12997
- 2456956037,
12998
- 2730485921,
12999
- 2820302411,
13000
- 3259730800,
13001
- 3345764771,
13002
- 3516065817,
13003
- 3600352804,
13004
- 4094571909,
13005
- 275423344,
13006
- 430227734,
13007
- 506948616,
13008
- 659060556,
13009
- 883997877,
13010
- 958139571,
13011
- 1322822218,
13012
- 1537002063,
13013
- 1747873779,
13014
- 1955562222,
13015
- 2024104815,
13016
- 2227730452,
13017
- 2361852424,
13018
- 2428436474,
13019
- 2756734187,
13020
- 3204031479,
13021
- 3329325298
13022
- ]);
13023
- function sha256Hex2(text2) {
13024
- const bytes = new TextEncoder().encode(text2);
13025
- const bitLength = bytes.length * 8;
13026
- const padded = new Uint8Array(bytes.length + 9 + 63 >> 6 << 6);
13027
- padded.set(bytes);
13028
- padded[bytes.length] = 128;
13029
- const view = new DataView(padded.buffer);
13030
- view.setUint32(padded.length - 8, Math.floor(bitLength / 4294967296));
13031
- view.setUint32(padded.length - 4, bitLength >>> 0);
13032
- const h = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]);
13033
- const w = new Uint32Array(64);
13034
- const rotr = (x, n) => x >>> n | x << 32 - n;
13035
- for (let off = 0; off < padded.length; off += 64) {
13036
- for (let i = 0; i < 16; i++) w[i] = view.getUint32(off + i * 4);
13037
- for (let i = 16; i < 64; i++) {
13038
- const a2 = w[i - 15], b2 = w[i - 2];
13039
- const s0 = rotr(a2, 7) ^ rotr(a2, 18) ^ a2 >>> 3;
13040
- const s1 = rotr(b2, 17) ^ rotr(b2, 19) ^ b2 >>> 10;
13041
- w[i] = w[i - 16] + s0 + w[i - 7] + s1 >>> 0;
13042
- }
13043
- let a = h[0], b = h[1], c = h[2], d = h[3], e = h[4], f2 = h[5], g = h[6], hh = h[7];
13044
- for (let i = 0; i < 64; i++) {
13045
- const S1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
13046
- const ch = e & f2 ^ ~e & g;
13047
- const t1 = hh + S1 + ch + K256[i] + w[i] >>> 0;
13048
- const S0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
13049
- const maj = a & b ^ a & c ^ b & c;
13050
- const t2 = S0 + maj >>> 0;
13051
- hh = g;
13052
- g = f2;
13053
- f2 = e;
13054
- e = d + t1 >>> 0;
13055
- d = c;
13056
- c = b;
13057
- b = a;
13058
- a = t1 + t2 >>> 0;
13059
- }
13060
- h[0] = h[0] + a >>> 0;
13061
- h[1] = h[1] + b >>> 0;
13062
- h[2] = h[2] + c >>> 0;
13063
- h[3] = h[3] + d >>> 0;
13064
- h[4] = h[4] + e >>> 0;
13065
- h[5] = h[5] + f2 >>> 0;
13066
- h[6] = h[6] + g >>> 0;
13067
- h[7] = h[7] + hh >>> 0;
13068
- }
13069
- return Array.from(h, (x) => x.toString(16).padStart(8, "0")).join("");
13070
- }
13071
12959
 
13072
12960
  // src/typed-table/archive.ts
13073
12961
  var MAX_PASSES = 200;