@ai-matrx/records 0.99.29 → 0.99.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -2
- package/dist/core/index.cjs +64 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +188 -1
- package/dist/core/index.d.ts +188 -1
- package/dist/core/index.js +64 -0
- package/dist/core/index.js.map +1 -1
- package/dist/entity/index.cjs +1 -1
- package/dist/entity/index.cjs.map +1 -1
- package/dist/entity/index.d.cts +3 -3
- package/dist/entity/index.d.ts +3 -3
- package/dist/entity/index.js +1 -1
- package/dist/entity/index.js.map +1 -1
- package/dist/entity/react.cjs +1 -1
- package/dist/entity/react.cjs.map +1 -1
- package/dist/entity/react.js +1 -1
- package/dist/entity/react.js.map +1 -1
- package/dist/{port-DWHLj_Sa.d.ts → port-Bk7TG0aE.d.ts} +3 -3
- package/dist/{port-BbWB9Pgq.d.cts → port-rqQEGhew.d.cts} +3 -3
- package/dist/react/index.cjs +4 -116
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1 -2
- package/dist/react/index.d.ts +1 -2
- package/dist/react/index.js +3 -115
- package/dist/react/index.js.map +1 -1
- package/dist/realtime/index.cjs +1 -1
- package/dist/realtime/index.cjs.map +1 -1
- package/dist/realtime/index.d.cts +4 -4
- package/dist/realtime/index.d.ts +4 -4
- package/dist/realtime/index.js +1 -1
- package/dist/realtime/index.js.map +1 -1
- package/dist/setup/index.cjs +3 -3
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +2 -2
- package/dist/setup/index.d.ts +2 -2
- package/dist/setup/index.js +3 -3
- package/dist/setup/index.js.map +1 -1
- package/dist/typed-table/index.cjs +4 -116
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.d.cts +1 -2
- package/dist/typed-table/index.d.ts +1 -2
- package/dist/typed-table/index.js +3 -115
- package/dist/typed-table/index.js.map +1 -1
- package/package.json +8 -6
|
@@ -275,7 +275,6 @@ type InsertOf<D extends AnyTypedTableDef> = Simplify<{
|
|
|
275
275
|
* token, a `key` that is not a unique field, no fields.
|
|
276
276
|
*/
|
|
277
277
|
declare function defineTypedTable<F extends AppFields, K extends UniqueKeys<F> = never>(input: TypedTableInput<F, K>): TypedTableDef<F, K>;
|
|
278
|
-
declare function sha256Hex(text: string): string;
|
|
279
278
|
|
|
280
279
|
interface TypedTableEnsured {
|
|
281
280
|
table: Uuid;
|
|
@@ -514,4 +513,4 @@ declare function updateTableRow<T extends AnyStoreTable>(client: RecordsClient,
|
|
|
514
513
|
/** Archive one row (the store's soft delete; restorable from the archive). */
|
|
515
514
|
declare function archiveTableRow<T extends AnyStoreTable>(client: RecordsClient, table: T, rowId: Uuid): Promise<RecordsResult<string>>;
|
|
516
515
|
|
|
517
|
-
export { APP_ROWS_CEILING, type AnyStoreTable, type AnyTypedTableDef, type AppAutomationSpec, type AppField, type AppFields, type AppRows, type AppUpsertOptions, type ArchiveDeliberatelyArgs, type ConfidentialRequest, type ConfidentialState, type FieldOptions, GRADUATION_BASE_COLUMNS, type GraduatedRelation, type GraduatedRow, type InsertOf, type ListTableRowsOptions, type RowOf, STORE_ROWS_CEILING, type StoreInsertOf, type StoreRowOf, type StoreRowSnapshot, type StoreTable, type StoreTableColumn, type StoreTableRows, type StoreTableSort, type StoreTableWhere, TO_ASSOCIATION, TO_CUSTOM_FIELDS, type TypedTableChecked, type TypedTableConfidential, type TypedTableDef, type TypedTableEnsured, type TypedTableGraduation, type TypedTableInput, type TypedTableOrgOptions, type TypedTableReader, type TypedTableScope, type TypedTableStatus, type UniqueKeys, archiveTableRow, archiveTypedTableDeliberately, checkTypedTable, confidentialGate, confidentialRefusal, confidentialRequest, confidentialState, defineTypedTable, ensureAppAutomations, ensureTypedTable, f, graduatedRow, graduationProblems, listAppRows, listTableRows, readersMatch, removeAppRow, rowFromDocument,
|
|
516
|
+
export { APP_ROWS_CEILING, type AnyStoreTable, type AnyTypedTableDef, type AppAutomationSpec, type AppField, type AppFields, type AppRows, type AppUpsertOptions, type ArchiveDeliberatelyArgs, type ConfidentialRequest, type ConfidentialState, type FieldOptions, GRADUATION_BASE_COLUMNS, type GraduatedRelation, type GraduatedRow, type InsertOf, type ListTableRowsOptions, type RowOf, STORE_ROWS_CEILING, type StoreInsertOf, type StoreRowOf, type StoreRowSnapshot, type StoreTable, type StoreTableColumn, type StoreTableRows, type StoreTableSort, type StoreTableWhere, TO_ASSOCIATION, TO_CUSTOM_FIELDS, type TypedTableChecked, type TypedTableConfidential, type TypedTableDef, type TypedTableEnsured, type TypedTableGraduation, type TypedTableInput, type TypedTableOrgOptions, type TypedTableReader, type TypedTableScope, type TypedTableStatus, type UniqueKeys, archiveTableRow, archiveTypedTableDeliberately, checkTypedTable, confidentialGate, confidentialRefusal, confidentialRequest, confidentialState, defineTypedTable, ensureAppAutomations, ensureTypedTable, f, graduatedRow, graduationProblems, listAppRows, listTableRows, readersMatch, removeAppRow, rowFromDocument, storeTable, updateTableRow, upsertAppRow, writeTableRow };
|
|
@@ -275,7 +275,6 @@ type InsertOf<D extends AnyTypedTableDef> = Simplify<{
|
|
|
275
275
|
* token, a `key` that is not a unique field, no fields.
|
|
276
276
|
*/
|
|
277
277
|
declare function defineTypedTable<F extends AppFields, K extends UniqueKeys<F> = never>(input: TypedTableInput<F, K>): TypedTableDef<F, K>;
|
|
278
|
-
declare function sha256Hex(text: string): string;
|
|
279
278
|
|
|
280
279
|
interface TypedTableEnsured {
|
|
281
280
|
table: Uuid;
|
|
@@ -514,4 +513,4 @@ declare function updateTableRow<T extends AnyStoreTable>(client: RecordsClient,
|
|
|
514
513
|
/** Archive one row (the store's soft delete; restorable from the archive). */
|
|
515
514
|
declare function archiveTableRow<T extends AnyStoreTable>(client: RecordsClient, table: T, rowId: Uuid): Promise<RecordsResult<string>>;
|
|
516
515
|
|
|
517
|
-
export { APP_ROWS_CEILING, type AnyStoreTable, type AnyTypedTableDef, type AppAutomationSpec, type AppField, type AppFields, type AppRows, type AppUpsertOptions, type ArchiveDeliberatelyArgs, type ConfidentialRequest, type ConfidentialState, type FieldOptions, GRADUATION_BASE_COLUMNS, type GraduatedRelation, type GraduatedRow, type InsertOf, type ListTableRowsOptions, type RowOf, STORE_ROWS_CEILING, type StoreInsertOf, type StoreRowOf, type StoreRowSnapshot, type StoreTable, type StoreTableColumn, type StoreTableRows, type StoreTableSort, type StoreTableWhere, TO_ASSOCIATION, TO_CUSTOM_FIELDS, type TypedTableChecked, type TypedTableConfidential, type TypedTableDef, type TypedTableEnsured, type TypedTableGraduation, type TypedTableInput, type TypedTableOrgOptions, type TypedTableReader, type TypedTableScope, type TypedTableStatus, type UniqueKeys, archiveTableRow, archiveTypedTableDeliberately, checkTypedTable, confidentialGate, confidentialRefusal, confidentialRequest, confidentialState, defineTypedTable, ensureAppAutomations, ensureTypedTable, f, graduatedRow, graduationProblems, listAppRows, listTableRows, readersMatch, removeAppRow, rowFromDocument,
|
|
516
|
+
export { APP_ROWS_CEILING, type AnyStoreTable, type AnyTypedTableDef, type AppAutomationSpec, type AppField, type AppFields, type AppRows, type AppUpsertOptions, type ArchiveDeliberatelyArgs, type ConfidentialRequest, type ConfidentialState, type FieldOptions, GRADUATION_BASE_COLUMNS, type GraduatedRelation, type GraduatedRow, type InsertOf, type ListTableRowsOptions, type RowOf, STORE_ROWS_CEILING, type StoreInsertOf, type StoreRowOf, type StoreRowSnapshot, type StoreTable, type StoreTableColumn, type StoreTableRows, type StoreTableSort, type StoreTableWhere, TO_ASSOCIATION, TO_CUSTOM_FIELDS, type TypedTableChecked, type TypedTableConfidential, type TypedTableDef, type TypedTableEnsured, type TypedTableGraduation, type TypedTableInput, type TypedTableOrgOptions, type TypedTableReader, type TypedTableScope, type TypedTableStatus, type UniqueKeys, archiveTableRow, archiveTypedTableDeliberately, checkTypedTable, confidentialGate, confidentialRefusal, confidentialRequest, confidentialState, defineTypedTable, ensureAppAutomations, ensureTypedTable, f, graduatedRow, graduationProblems, listAppRows, listTableRows, readersMatch, removeAppRow, rowFromDocument, storeTable, updateTableRow, upsertAppRow, writeTableRow };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/typed-table/define.ts
|
|
2
|
+
import { sha256Hex } from "@ai-matrx/kit/sha256";
|
|
3
|
+
|
|
1
4
|
// src/typed-table/graduate.ts
|
|
2
5
|
import { isUuidShape } from "@ai-matrx/kit/uuid";
|
|
3
6
|
var TO_CUSTOM_FIELDS = "custom_fields";
|
|
@@ -272,120 +275,6 @@ function defineTypedTable(input) {
|
|
|
272
275
|
} : null
|
|
273
276
|
});
|
|
274
277
|
}
|
|
275
|
-
var K256 = new Uint32Array([
|
|
276
|
-
1116352408,
|
|
277
|
-
1899447441,
|
|
278
|
-
3049323471,
|
|
279
|
-
3921009573,
|
|
280
|
-
961987163,
|
|
281
|
-
1508970993,
|
|
282
|
-
2453635748,
|
|
283
|
-
2870763221,
|
|
284
|
-
3624381080,
|
|
285
|
-
310598401,
|
|
286
|
-
607225278,
|
|
287
|
-
1426881987,
|
|
288
|
-
1925078388,
|
|
289
|
-
2162078206,
|
|
290
|
-
2614888103,
|
|
291
|
-
3248222580,
|
|
292
|
-
3835390401,
|
|
293
|
-
4022224774,
|
|
294
|
-
264347078,
|
|
295
|
-
604807628,
|
|
296
|
-
770255983,
|
|
297
|
-
1249150122,
|
|
298
|
-
1555081692,
|
|
299
|
-
1996064986,
|
|
300
|
-
2554220882,
|
|
301
|
-
2821834349,
|
|
302
|
-
2952996808,
|
|
303
|
-
3210313671,
|
|
304
|
-
3336571891,
|
|
305
|
-
3584528711,
|
|
306
|
-
113926993,
|
|
307
|
-
338241895,
|
|
308
|
-
666307205,
|
|
309
|
-
773529912,
|
|
310
|
-
1294757372,
|
|
311
|
-
1396182291,
|
|
312
|
-
1695183700,
|
|
313
|
-
1986661051,
|
|
314
|
-
2177026350,
|
|
315
|
-
2456956037,
|
|
316
|
-
2730485921,
|
|
317
|
-
2820302411,
|
|
318
|
-
3259730800,
|
|
319
|
-
3345764771,
|
|
320
|
-
3516065817,
|
|
321
|
-
3600352804,
|
|
322
|
-
4094571909,
|
|
323
|
-
275423344,
|
|
324
|
-
430227734,
|
|
325
|
-
506948616,
|
|
326
|
-
659060556,
|
|
327
|
-
883997877,
|
|
328
|
-
958139571,
|
|
329
|
-
1322822218,
|
|
330
|
-
1537002063,
|
|
331
|
-
1747873779,
|
|
332
|
-
1955562222,
|
|
333
|
-
2024104815,
|
|
334
|
-
2227730452,
|
|
335
|
-
2361852424,
|
|
336
|
-
2428436474,
|
|
337
|
-
2756734187,
|
|
338
|
-
3204031479,
|
|
339
|
-
3329325298
|
|
340
|
-
]);
|
|
341
|
-
function sha256Hex(text2) {
|
|
342
|
-
const bytes = new TextEncoder().encode(text2);
|
|
343
|
-
const bitLength = bytes.length * 8;
|
|
344
|
-
const padded = new Uint8Array(bytes.length + 9 + 63 >> 6 << 6);
|
|
345
|
-
padded.set(bytes);
|
|
346
|
-
padded[bytes.length] = 128;
|
|
347
|
-
const view = new DataView(padded.buffer);
|
|
348
|
-
view.setUint32(padded.length - 8, Math.floor(bitLength / 4294967296));
|
|
349
|
-
view.setUint32(padded.length - 4, bitLength >>> 0);
|
|
350
|
-
const h = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]);
|
|
351
|
-
const w = new Uint32Array(64);
|
|
352
|
-
const rotr = (x, n) => x >>> n | x << 32 - n;
|
|
353
|
-
for (let off = 0; off < padded.length; off += 64) {
|
|
354
|
-
for (let i = 0; i < 16; i++) w[i] = view.getUint32(off + i * 4);
|
|
355
|
-
for (let i = 16; i < 64; i++) {
|
|
356
|
-
const a2 = w[i - 15], b2 = w[i - 2];
|
|
357
|
-
const s0 = rotr(a2, 7) ^ rotr(a2, 18) ^ a2 >>> 3;
|
|
358
|
-
const s1 = rotr(b2, 17) ^ rotr(b2, 19) ^ b2 >>> 10;
|
|
359
|
-
w[i] = w[i - 16] + s0 + w[i - 7] + s1 >>> 0;
|
|
360
|
-
}
|
|
361
|
-
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];
|
|
362
|
-
for (let i = 0; i < 64; i++) {
|
|
363
|
-
const S1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
|
|
364
|
-
const ch = e & f2 ^ ~e & g;
|
|
365
|
-
const t1 = hh + S1 + ch + K256[i] + w[i] >>> 0;
|
|
366
|
-
const S0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
|
|
367
|
-
const maj = a & b ^ a & c ^ b & c;
|
|
368
|
-
const t2 = S0 + maj >>> 0;
|
|
369
|
-
hh = g;
|
|
370
|
-
g = f2;
|
|
371
|
-
f2 = e;
|
|
372
|
-
e = d + t1 >>> 0;
|
|
373
|
-
d = c;
|
|
374
|
-
c = b;
|
|
375
|
-
b = a;
|
|
376
|
-
a = t1 + t2 >>> 0;
|
|
377
|
-
}
|
|
378
|
-
h[0] = h[0] + a >>> 0;
|
|
379
|
-
h[1] = h[1] + b >>> 0;
|
|
380
|
-
h[2] = h[2] + c >>> 0;
|
|
381
|
-
h[3] = h[3] + d >>> 0;
|
|
382
|
-
h[4] = h[4] + e >>> 0;
|
|
383
|
-
h[5] = h[5] + f2 >>> 0;
|
|
384
|
-
h[6] = h[6] + g >>> 0;
|
|
385
|
-
h[7] = h[7] + hh >>> 0;
|
|
386
|
-
}
|
|
387
|
-
return Array.from(h, (x) => x.toString(16).padStart(8, "0")).join("");
|
|
388
|
-
}
|
|
389
278
|
|
|
390
279
|
// src/core/primedBundle.ts
|
|
391
280
|
var PRIMED_TTL_MS = 15e3;
|
|
@@ -8114,7 +8003,6 @@ export {
|
|
|
8114
8003
|
readersMatch,
|
|
8115
8004
|
removeAppRow,
|
|
8116
8005
|
rowFromDocument,
|
|
8117
|
-
sha256Hex,
|
|
8118
8006
|
storeTable,
|
|
8119
8007
|
updateTableRow,
|
|
8120
8008
|
upsertAppRow,
|