@xnetjs/data 2.3.0 → 2.5.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.
- package/dist/auth/index.d.ts +4 -4
- package/dist/{chunk-Y2XWK7AA.js → chunk-JF4VCZER.js} +14 -0
- package/dist/{chunk-32IVMT6Z.js → chunk-MAB662PR.js} +2 -2
- package/dist/{chunk-27AF2RSY.js → chunk-ODOPVGUX.js} +12 -0
- package/dist/{chunk-56EXPOJ4.js → chunk-TW5XJHNF.js} +25 -10
- package/dist/{clone-rOJgldM-.d.ts → clone-VRVODkBn.d.ts} +16 -6
- package/dist/database/index.d.ts +17 -5
- package/dist/database/index.js +2 -2
- package/dist/{form-types-BrHYdpi0.d.ts → form-types-Dkqm9UO2.d.ts} +1 -1
- package/dist/{grant-expiration-cleaner-CRS9OyhV.d.ts → grant-expiration-cleaner-CTsW0hvU.d.ts} +3 -3
- package/dist/index.d.ts +319 -8
- package/dist/index.js +723 -72
- package/dist/{page-RUS2BKMX.js → page-MADZ5OHM.js} +1 -1
- package/dist/{query-ast-DQJO7yRV.d.ts → query-ast-h31svZnG.d.ts} +1 -1
- package/dist/{registry-C9IRLLeR.d.ts → registry-Dh4Kr3fo.d.ts} +1 -1
- package/dist/schema/index.d.ts +15 -6
- package/dist/schema/index.js +2 -2
- package/dist/store/index.d.ts +4 -4
- package/dist/store/index.js +1 -1
- package/dist/{store-BYkdPZRJ.d.ts → store-jukJYsvr.d.ts} +9 -1
- package/dist/{types-gws1tSf-.d.ts → types-Z9dUzbDF.d.ts} +1 -1
- package/package.json +11 -7
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AllowExpr, DenyExpr, AuthExpression, AndExpr, OrExpr, NotExpr, PublicExpr, AuthenticatedExpr, CreatorRoleResolver, PropertyRoleResolver, RelationRoleResolver, MembershipRoleResolver, AuthorizationDefinition, SerializedAuthorization, SerializedAuthExpression, DID } from '@xnetjs/core';
|
|
2
2
|
export { AUTH_ACTIONS, AllowExpr, AndExpr, AuthAction, AuthCheckInput, AuthDecision, AuthDenyReason, AuthExpression, AuthTrace, AuthTraceStep, AuthenticatedExpr, AuthorizationDefinition, CreatorRoleResolver, DenyExpr, MembershipRoleResolver, NotExpr, OrExpr, PolicyEvaluator, PropertyRoleResolver, PublicExpr, RelationRoleResolver, RoleRefExpr, RoleResolver, SerializedAuthExpression, SerializedAuthorization, SerializedRoleResolver } from '@xnetjs/core';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
export { A as ActionPermission, m as AuthDecisionEvent,
|
|
3
|
+
import { y as PropertyDefinition, a as Schema, h as NodeState, S as SchemaIRI } from '../types-Z9dUzbDF.js';
|
|
4
|
+
export { H as DEFAULT_OFFLINE_POLICY, z as GRANT_SCHEMA_IRI, $ as Grant, x as GrantIndex, F as GrantIndexOptions, E as GrantIndexStore, _ as GrantInput, B as GrantNode, Q as GrantRateLimiter, V as GrantRateLimiterOptions, O as OfflineAuthPolicy, K as RevocationConfig, R as RevocationConsistency, W as StoreAuth, e as StoreAuthAPI, a0 as StoreAuthError, a1 as StoreAuthErrorCode, Z as StoreAuthKeyManager, X as StoreAuthOptions, Y as StoreAuthStore, A as isGrantActive, J as mergeOfflinePolicy } from '../types-Z9dUzbDF.js';
|
|
5
|
+
export { A as ActionPermission, m as AuthDecisionEvent, D as DecisionCache, g as DecisionCacheOptions, c as DefaultPolicyEvaluator, j as DefaultPolicyEvaluatorOptions, a as DefaultRoleResolver, i as DefaultRoleResolverOptions, k as DefinedSchemaLike, G as GrantExpirationCleaner, o as GrantExpirationCleanerOptions, n as GrantExpirationStore, H as HubPolicy, N as NodeStoreReader, P as PermissionMatrix, l as RevalidationEvent, R as RoleSummary, S as SchemaRegistryReader, b as buildPermissionMatrix, f as createPolicyEvaluator, d as describeRoleResolver, e as evaluateExpression, h as hubActionsForSpaceRole, s as schemaToHubPolicy } from '../grant-expiration-cleaner-CTsW0hvU.js';
|
|
6
6
|
import { PublicKeyResolver } from '@xnetjs/crypto';
|
|
7
7
|
import '@xnetjs/sqlite';
|
|
8
8
|
import '@xnetjs/sync';
|
|
9
|
-
import '../registry-
|
|
9
|
+
import '../registry-Dh4Kr3fo.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Authorization expression builders for schema definitions.
|
|
@@ -37,6 +37,20 @@ var PageSchema = defineSchema({
|
|
|
37
37
|
{ id: "public", name: "Public", color: "green" }
|
|
38
38
|
],
|
|
39
39
|
default: "inherit"
|
|
40
|
+
}),
|
|
41
|
+
/**
|
|
42
|
+
* Page geometry (exploration 0346): how the page's frame children
|
|
43
|
+
* arrange — a linear stack (document, default), a tiled grid
|
|
44
|
+
* (dashboard-style), or free space (canvas-style). A view property:
|
|
45
|
+
* toggling never converts the frames themselves.
|
|
46
|
+
*/
|
|
47
|
+
geometry: select({
|
|
48
|
+
options: [
|
|
49
|
+
{ id: "stack", name: "Stack", color: "gray" },
|
|
50
|
+
{ id: "grid", name: "Grid", color: "blue" },
|
|
51
|
+
{ id: "space", name: "Space", color: "purple" }
|
|
52
|
+
],
|
|
53
|
+
default: "stack"
|
|
40
54
|
})
|
|
41
55
|
},
|
|
42
56
|
document: "yjs",
|
|
@@ -353,7 +353,7 @@ function filterOrphanedComments(comments, resolvers) {
|
|
|
353
353
|
// src/schema/schemas/index.ts
|
|
354
354
|
var builtInSchemas = {
|
|
355
355
|
// Versioned IRIs (canonical)
|
|
356
|
-
"xnet://xnet.fyi/Page@1.0.0": () => import("./page-
|
|
356
|
+
"xnet://xnet.fyi/Page@1.0.0": () => import("./page-MADZ5OHM.js").then((m) => m.PageSchema),
|
|
357
357
|
"xnet://xnet.fyi/Folder@1.0.0": () => import("./folder-D4IL7UHP.js").then((m) => m.FolderSchema),
|
|
358
358
|
"xnet://xnet.fyi/Tag@1.0.0": () => import("./tag-LHP2J53R.js").then((m) => m.TagSchema),
|
|
359
359
|
"xnet://xnet.fyi/Database@2.0.0": () => import("./database-VJSYCFXH.js").then((m) => m.DatabaseSchema),
|
|
@@ -452,7 +452,7 @@ var builtInSchemas = {
|
|
|
452
452
|
"xnet://xnet.fyi/AgentApproval@1.0.0": () => import("./agent-IJLOS2LA.js").then((m) => m.AgentApprovalSchema),
|
|
453
453
|
"xnet://xnet.fyi/AgentNotification@1.0.0": () => import("./agent-IJLOS2LA.js").then((m) => m.AgentNotificationSchema),
|
|
454
454
|
// Legacy unversioned IRIs (aliases for the current version)
|
|
455
|
-
"xnet://xnet.fyi/Page": () => import("./page-
|
|
455
|
+
"xnet://xnet.fyi/Page": () => import("./page-MADZ5OHM.js").then((m) => m.PageSchema),
|
|
456
456
|
"xnet://xnet.fyi/Folder": () => import("./folder-D4IL7UHP.js").then((m) => m.FolderSchema),
|
|
457
457
|
"xnet://xnet.fyi/Tag": () => import("./tag-LHP2J53R.js").then((m) => m.TagSchema),
|
|
458
458
|
"xnet://xnet.fyi/Database": () => import("./database-VJSYCFXH.js").then((m) => m.DatabaseSchema),
|
|
@@ -2807,6 +2807,18 @@ var NodeStore = class {
|
|
|
2807
2807
|
async getAllChanges() {
|
|
2808
2808
|
return this.storage.getAllChanges();
|
|
2809
2809
|
}
|
|
2810
|
+
/**
|
|
2811
|
+
* Whether a change with this hash is already in the local log. Cheap
|
|
2812
|
+
* existence probe (falls back to a full fetch when the adapter lacks the
|
|
2813
|
+
* optional fast path) — used for idempotent import and bundle
|
|
2814
|
+
* prerequisite checks (exploration 0344).
|
|
2815
|
+
*/
|
|
2816
|
+
async hasChange(hash) {
|
|
2817
|
+
if (this.storage.hasChange) {
|
|
2818
|
+
return this.storage.hasChange(hash);
|
|
2819
|
+
}
|
|
2820
|
+
return await this.storage.getChangeByHash(hash) !== null;
|
|
2821
|
+
}
|
|
2810
2822
|
/**
|
|
2811
2823
|
* Get changes since a Lamport time (for delta sync).
|
|
2812
2824
|
*/
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createNodeQueryDescriptor
|
|
3
|
+
} from "./chunk-WOEFYS7Y.js";
|
|
1
4
|
import {
|
|
2
5
|
extKey
|
|
3
6
|
} from "./chunk-PMUQACPY.js";
|
|
@@ -26,9 +29,6 @@ import {
|
|
|
26
29
|
import {
|
|
27
30
|
DatabaseViewSchema
|
|
28
31
|
} from "./chunk-UFV5QWCL.js";
|
|
29
|
-
import {
|
|
30
|
-
createNodeQueryDescriptor
|
|
31
|
-
} from "./chunk-WOEFYS7Y.js";
|
|
32
32
|
|
|
33
33
|
// src/database/cell-types.ts
|
|
34
34
|
var CELL_PREFIX = "cell_";
|
|
@@ -3384,6 +3384,18 @@ function evaluateUnary(operator, operand, context) {
|
|
|
3384
3384
|
}
|
|
3385
3385
|
}
|
|
3386
3386
|
function evaluateCall(name, args, context) {
|
|
3387
|
+
if (name === "RELATED") {
|
|
3388
|
+
const evaluated = args.map((arg) => evaluate(arg, context));
|
|
3389
|
+
const relationColumnId = String(evaluated[0] ?? "");
|
|
3390
|
+
const targetColumnId = evaluated[1] === void 0 ? void 0 : String(evaluated[1]);
|
|
3391
|
+
return context.getRelatedValues?.(relationColumnId, targetColumnId) ?? [];
|
|
3392
|
+
}
|
|
3393
|
+
if (name === "NODE") {
|
|
3394
|
+
const evaluated = args.map((arg) => evaluate(arg, context));
|
|
3395
|
+
const nodeId = String(evaluated[0] ?? "");
|
|
3396
|
+
const property = String(evaluated[1] ?? "");
|
|
3397
|
+
return context.getNodeProperty?.(nodeId, property) ?? null;
|
|
3398
|
+
}
|
|
3387
3399
|
const fn = FUNCTIONS[name];
|
|
3388
3400
|
if (!fn) {
|
|
3389
3401
|
throw new Error(`Unknown function: ${name}`);
|
|
@@ -3585,15 +3597,16 @@ var FormulaService = class {
|
|
|
3585
3597
|
* const value = service.compute(row, formulaColumn, columns)
|
|
3586
3598
|
* ```
|
|
3587
3599
|
*/
|
|
3588
|
-
compute(row, column, columns) {
|
|
3600
|
+
compute(row, column, columns, scope) {
|
|
3589
3601
|
if (column.type !== "formula") {
|
|
3590
3602
|
throw new Error(`Column ${column.id} is not a formula column`);
|
|
3591
3603
|
}
|
|
3592
3604
|
const config = column.config;
|
|
3605
|
+
const usesScope = /\b(RELATED|NODE)\s*\(/.test(config.expression);
|
|
3593
3606
|
const cacheKey = `${row.id}:${column.id}`;
|
|
3594
3607
|
const deps = config.dependencies ?? extractDependencies(config.expression);
|
|
3595
3608
|
const hash = this.computeHash(row, deps);
|
|
3596
|
-
const cached = this.valueCache.get(cacheKey);
|
|
3609
|
+
const cached = usesScope ? void 0 : this.valueCache.get(cacheKey);
|
|
3597
3610
|
if (cached && cached.hash === hash) {
|
|
3598
3611
|
return cached.value;
|
|
3599
3612
|
}
|
|
@@ -3606,16 +3619,18 @@ var FormulaService = class {
|
|
|
3606
3619
|
getValue: (columnId) => {
|
|
3607
3620
|
const depColumn = columns.find((c) => c.id === columnId);
|
|
3608
3621
|
if (depColumn?.type === "formula") {
|
|
3609
|
-
return this.compute(row, depColumn, columns);
|
|
3622
|
+
return this.compute(row, depColumn, columns, scope);
|
|
3610
3623
|
}
|
|
3611
3624
|
return row.cells[columnId];
|
|
3612
3625
|
},
|
|
3613
|
-
getColumn: (columnId) => columns.find((c) => c.id === columnId)
|
|
3626
|
+
getColumn: (columnId) => columns.find((c) => c.id === columnId),
|
|
3627
|
+
getRelatedValues: scope?.getRelatedValues,
|
|
3628
|
+
getNodeProperty: scope?.getNodeProperty
|
|
3614
3629
|
};
|
|
3615
3630
|
try {
|
|
3616
3631
|
const value = evaluate(ast, context);
|
|
3617
3632
|
const coerced = this.coerceResult(value, config.resultType);
|
|
3618
|
-
this.valueCache.set(cacheKey, { value: coerced, hash });
|
|
3633
|
+
if (!usesScope) this.valueCache.set(cacheKey, { value: coerced, hash });
|
|
3619
3634
|
return coerced;
|
|
3620
3635
|
} catch (error) {
|
|
3621
3636
|
console.error(`Formula error in ${column.name}:`, error);
|
|
@@ -3625,10 +3640,10 @@ var FormulaService = class {
|
|
|
3625
3640
|
/**
|
|
3626
3641
|
* Batch compute formulas for multiple rows.
|
|
3627
3642
|
*/
|
|
3628
|
-
batchCompute(rows, column, columns) {
|
|
3643
|
+
batchCompute(rows, column, columns, scope) {
|
|
3629
3644
|
const results = /* @__PURE__ */ new Map();
|
|
3630
3645
|
for (const row of rows) {
|
|
3631
|
-
const value = this.compute(row, column, columns);
|
|
3646
|
+
const value = this.compute(row, column, columns, scope);
|
|
3632
3647
|
results.set(row.id, value);
|
|
3633
3648
|
}
|
|
3634
3649
|
return results;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { N as NodeStore } from './store-
|
|
1
|
+
import { b as CellValue, a2 as FormSubmissionMeta, C as ColumnDefinition, m as FieldType, n as FieldConfig, P as SelectColor, o as FieldNode, p as SelectOptionNode, V as ViewType, F as FilterGroup, S as SortConfig, ae as ViewConfig, a as ColumnType, ag as FilterOperator, Q as RollupAggregation, q as RollupColumnConfig } from './form-types-Dkqm9UO2.js';
|
|
2
|
+
import { aK as NodeQueryMaterializedViewOptions, h as NodeState, a7 as PropertyType, S as SchemaIRI, a as Schema } from './types-Z9dUzbDF.js';
|
|
3
|
+
import { N as NodeStore } from './store-jukJYsvr.js';
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1553,6 +1553,16 @@ interface FormulaValidationResult {
|
|
|
1553
1553
|
error?: string;
|
|
1554
1554
|
dependencies?: string[];
|
|
1555
1555
|
}
|
|
1556
|
+
/**
|
|
1557
|
+
* Cross-node scope resolvers (0346): pre-resolved, synchronous access
|
|
1558
|
+
* for `RELATED()` and `NODE()` — scope widened row → relations → named
|
|
1559
|
+
* nodes without a second engine. Recompute on related-node change rides
|
|
1560
|
+
* the reload path until 0317's predicate-aware invalidation lands.
|
|
1561
|
+
*/
|
|
1562
|
+
interface FormulaScope {
|
|
1563
|
+
getRelatedValues?: (relationColumnId: string, targetColumnId?: string) => unknown[];
|
|
1564
|
+
getNodeProperty?: (nodeId: string, property: string) => unknown;
|
|
1565
|
+
}
|
|
1556
1566
|
declare class FormulaService {
|
|
1557
1567
|
private parser;
|
|
1558
1568
|
private astCache;
|
|
@@ -1566,11 +1576,11 @@ declare class FormulaService {
|
|
|
1566
1576
|
* const value = service.compute(row, formulaColumn, columns)
|
|
1567
1577
|
* ```
|
|
1568
1578
|
*/
|
|
1569
|
-
compute(row: FormulaRow, column: ColumnDefinition, columns: ColumnDefinition[]): unknown;
|
|
1579
|
+
compute(row: FormulaRow, column: ColumnDefinition, columns: ColumnDefinition[], scope?: FormulaScope): unknown;
|
|
1570
1580
|
/**
|
|
1571
1581
|
* Batch compute formulas for multiple rows.
|
|
1572
1582
|
*/
|
|
1573
|
-
batchCompute(rows: FormulaRow[], column: ColumnDefinition, columns: ColumnDefinition[]): Map<string, unknown>;
|
|
1583
|
+
batchCompute(rows: FormulaRow[], column: ColumnDefinition, columns: ColumnDefinition[], scope?: FormulaScope): Map<string, unknown>;
|
|
1574
1584
|
/**
|
|
1575
1585
|
* Validate a formula expression.
|
|
1576
1586
|
*
|
|
@@ -2041,4 +2051,4 @@ declare function cloneSampleRows(rows: Array<Record<string, unknown>>, idMap: Ma
|
|
|
2041
2051
|
*/
|
|
2042
2052
|
declare function cloneSchema(source: CloneSourceData, options?: CloneSchemaOptions): CloneSchemaResult;
|
|
2043
2053
|
|
|
2044
|
-
export { getViews$1 as $, getTitleField as A, createField as B, type CreateRowOptions as C, type DatabaseRowNode as D, updateField as E, deleteField as F, moveField as G, duplicateField as H,
|
|
2054
|
+
export { getViews$1 as $, getTitleField as A, createField as B, type CreateRowOptions as C, type DatabaseRowNode as D, updateField as E, deleteField as F, moveField as G, duplicateField as H, getSelectOptions as I, getDatabaseSelectOptions as J, createSelectOption as K, updateSelectOption as L, MAX_KEY_LENGTH as M, deleteSelectOption as N, moveSelectOption as O, type EnsureExtensionOptions as P, type QueryRowsOptions as Q, RICHTEXT_PREFIX as R, type CreateExtensionFieldOptions as S, ensureSchemaExtension as T, type UpdateFieldOptions as U, createExtensionField as V, renameExtensionField as W, deleteExtensionField as X, type ViewNode as Y, type CreateViewOptions as Z, type UpdateViewOptions as _, type QueryRowsResult as a, setColumnWidth as a$, getView$1 as a0, createView$1 as a1, updateView$1 as a2, deleteView$1 as a3, duplicateView$1 as a4, moveView as a5, setViewFilters$1 as a6, setViewSorts$1 as a7, setViewGroupBy$1 as a8, toggleViewGroupCollapsed as a9, getColumn as aA, getColumnIndex as aB, getTitleColumn as aC, createColumn as aD, updateColumn as aE, deleteColumn as aF, reorderColumn as aG, duplicateColumn as aH, getViews as aI, getView as aJ, getViewByType as aK, createView as aL, updateView as aM, deleteView as aN, duplicateView as aO, setViewFilters as aP, clearViewFilters as aQ, setViewSorts as aR, addViewSort as aS, removeViewSort as aT, clearViewSorts as aU, setViewGroupBy as aV, toggleGroupCollapsed$1 as aW, setVisibleColumns as aX, showColumn as aY, hideColumn as aZ, reorderViewColumns as a_, setFieldHidden as aa, setViewFieldWidth as ab, setViewFieldOrder as ac, effectiveFieldSortKey as ad, convertCellValue as ae, cellValueToText as af, type ConvertContext as ag, type ConvertedCell as ah, setupDatabase as ai, type SetupDatabaseResult as aj, DEFAULT_DATABASE_SCHEMA_VERSION as ak, fieldsToStoredColumns as al, buildSchemaFromFields as am, getDatabaseSchemaIRI as an, createNodeDatabaseSchemaResolver as ao, initializeDatabaseDoc as ap, isDatabaseDocInitialized as aq, addDefaultTitleColumn as ar, addDefaultTableView as as, setupNewDatabase as at, getMeta as au, setMeta as av, deleteMeta as aw, getDatabaseDocumentModel as ax, type DatabaseDocumentModel as ay, getColumns as az, updateCells as b, type JsonParseOptions as b$, OPERATORS_BY_TYPE as b0, OPERATOR_LABELS as b1, getOperatorsForType as b2, isValidOperator as b3, getOperatorLabel as b4, operatorRequiresValue as b5, filterRows as b6, createEqualsFilter as b7, createAnyOfFilter as b8, combineFiltersAnd as b9, getEmptyValue as bA, computeRollup as bB, batchComputeRollups as bC, validateRollupConfig as bD, isNumericAggregation as bE, getAggregationResultType as bF, type RollupRow as bG, type RollupContext as bH, FormulaService as bI, createFormulaService as bJ, type FormulaRow as bK, type FormulaValidationResult as bL, parseCSV as bM, parseCSVLine as bN, guessColumnType as bO, parseValue as bP, parseRow as bQ, inferColumnTypes as bR, parseJSON as bS, inferColumnsFromRows as bT, inferTypeFromValues as bU, toColumnDefinitions as bV, validateJsonData as bW, type ParsedCSV as bX, type CsvParseOptions as bY, type ParsedJSON as bZ, type InferredColumn as b_, combineFiltersOr as ba, type FilterableRow as bb, sortRows as bc, createSort as bd, toggleSortDirection as be, addOrToggleSort as bf, removeSort as bg, type SortableRow as bh, groupRows as bi, toggleGroupCollapsed as bj, expandAllGroups as bk, collapseAllGroups as bl, type GroupableRow as bm, type GroupConfig as bn, type RowGroup as bo, type GroupAggregates as bp, executeQuery as bq, createFilterQuery as br, createSortQuery as bs, createPaginatedQuery as bt, flattenGroups as bu, getTotalFromGroups as bv, type QueryableRow as bw, type QueryOptions as bx, type QueryResult as by, aggregate as bz, createRow as c, exportToCsv as c0, escapeCSV as c1, formatValue as c2, createCsvBlob as c3, downloadCsv as c4, exportToJson as c5, exportToJsonArray as c6, exportToNdjson as c7, createJsonBlob as c8, downloadJson as c9, type CreateDatabaseSchemaResolverOptions as cA, cloneSchema as cB, cloneColumns as cC, cloneSampleRows as cD, generateColumnIdMap as cE, remapViewColumnIds as cF, type CloneSchemaOptions as cG, type CloneSchemaResult as cH, type CloneSourceData as cI, type ExportRow$1 as ca, type CsvExportOptions as cb, type JsonExportOptions as cc, type ExportedJSON as cd, type ExportedColumn as ce, buildSchemaIRI as cf, parseDatabaseSchemaIRI as cg, isDatabaseSchemaIRI as ch, parseVersion as ci, bumpSchemaVersion as cj, createInitialSchemaMetadata as ck, buildDatabaseSchema as cl, createVersionEntry as cm, pruneVersionHistory as cn, getVersionBumpType as co, DATABASE_SCHEMA_NAMESPACE as cp, DATABASE_SCHEMA_PREFIX as cq, MAX_VERSION_HISTORY as cr, type DatabaseSchemaMetadata as cs, type StoredColumn as ct, type SchemaVersionEntry as cu, type VersionBumpType as cv, createDatabaseSchemaResolver as cw, extractSchemaFromDoc as cx, getSchemaIRIFromDoc as cy, type DocFetcher as cz, deleteRow as d, checkNeedsRebalancing as e, generateSortKey as f, getRow as g, generateSortKeyWithJitter as h, isValidSortKey as i, compareSortKeys as j, rebalanceSortKeys as k, getRichTextCell as l, moveRow as m, needsRebalancing as n, hasRichTextContent as o, hasRichTextColumns as p, queryRows as q, rebalanceDatabase as r, getRichTextColumnIds as s, deleteRichTextCell as t, updateCell as u, getRichTextPlainText as v, type CreateFieldOptions as w, type CreateSelectOptionOptions as x, getFields as y, getField as z };
|
package/dist/database/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
import '../types-
|
|
1
|
+
import { F as FilterGroup, C as ColumnDefinition, a as ColumnType, V as ViewType, S as SortConfig } from '../form-types-Dkqm9UO2.js';
|
|
2
|
+
export { d as CELL_PREFIX, b as CellValue, K as ColumnConfig, as as ColumnSummaryResult, av as DEFAULT_ROW_HEIGHT, s as DateColumnConfig, s as DateFieldConfig, D as DateRange, L as EmptyConfig, v as FIELD_TYPES, n as FieldConfig, o as FieldNode, m as FieldType, u as FileColumnConfig, u as FileFieldConfig, c as FileRef, af as FilterCondition, ag as FilterOperator, a1 as FormAudience, _ as FormConfirmation, a0 as FormFieldRule, Z as FormQuestion, a2 as FormSubmissionMeta, a3 as FormValidationError, a4 as FormValidationResult, $ as FormViewConfig, r as FormulaColumnConfig, r as FormulaFieldConfig, G as GeoPoint, N as NumberColumnConfig, N as NumberFieldConfig, a7 as PUBLIC_SAFE_FORM_FIELD_TYPES, a6 as PublicFormDefinition, a5 as PublicFormQuestion, au as ROW_HEIGHTS, at as ROW_HEIGHT_PX, R as RelationColumnConfig, R as RelationFieldConfig, Q as RollupAggregation, q as RollupColumnConfig, q as RollupFieldConfig, az as RowHeight, w as SELECT_COLORS, al as SUMMARY_FUNCTIONS_BY_TYPE, P as SelectColor, M as SelectColumnConfig, O as SelectOption, p as SelectOptionNode, ar as SummaryColumnLike, ap as SummaryFunction, aq as SummaryRow, T as TextColumnConfig, T as TextFieldConfig, ae as ViewConfig, ay as asRowHeight, z as autoColor, ac as buildPublicFormDefinition, e as cellKey, f as columnIdFromKey, ao as computeColumnSummary, g as fromCellProperties, X as isAutoColumnType, E as isAutoFieldType, i as isCellKey, l as isCellValue, W as isComputedColumnType, B as isComputedFieldType, h as isDateRange, x as isFieldType, j as isFileRef, an as isFilledValue, ai as isFilterCondition, ah as isFilterGroup, a8 as isFormFieldTypeAllowed, a9 as isFormQuestionVisible, k as isGeoPoint, U as isNodeStoreColumnType, A as isNodeStoreFieldType, y as isSelectColor, Y as isYDocColumnType, H as isYDocFieldType, ak as requiresDateColumn, ax as resolveRowHeightPx, aw as rowHeightLabel, ad as submissionRowId, am as summaryFunctionLabel, aj as supportsGrouping, t as toCellProperties, I as toFieldNode, J as toSelectOptionNode, ab as validateFormSubmission, aa as visibleFormQuestions } from '../form-types-Dkqm9UO2.js';
|
|
3
|
+
export { cG as CloneSchemaOptions, cH as CloneSchemaResult, cI as CloneSourceData, ag as ConvertContext, ah as ConvertedCell, cA as CreateDatabaseSchemaResolverOptions, S as CreateExtensionFieldOptions, w as CreateFieldOptions, C as CreateRowOptions, x as CreateSelectOptionOptions, Z as CreateViewOptions, cb as CsvExportOptions, bY as CsvParseOptions, cp as DATABASE_SCHEMA_NAMESPACE, cq as DATABASE_SCHEMA_PREFIX, ak as DEFAULT_DATABASE_SCHEMA_VERSION, ay as DatabaseDocumentModel, D as DatabaseRowNode, cs as DatabaseSchemaMetadata, cz as DocFetcher, P as EnsureExtensionOptions, ca as ExportRow, ce as ExportedColumn, cd as ExportedJSON, bb as FilterableRow, bK as FormulaRow, bI as FormulaService, bL as FormulaValidationResult, bp as GroupAggregates, bn as GroupConfig, bm as GroupableRow, b_ as InferredColumn, cc as JsonExportOptions, b$ as JsonParseOptions, M as MAX_KEY_LENGTH, cr as MAX_VERSION_HISTORY, b0 as OPERATORS_BY_TYPE, b1 as OPERATOR_LABELS, bX as ParsedCSV, bZ as ParsedJSON, bx as QueryOptions, by as QueryResult, Q as QueryRowsOptions, a as QueryRowsResult, bw as QueryableRow, R as RICHTEXT_PREFIX, bH as RollupContext, bG as RollupRow, bo as RowGroup, cu as SchemaVersionEntry, aj as SetupDatabaseResult, bh as SortableRow, ct as StoredColumn, U as UpdateFieldOptions, _ as UpdateViewOptions, cv as VersionBumpType, Y as ViewNode, as as addDefaultTableView, ar as addDefaultTitleColumn, bf as addOrToggleSort, aS as addViewSort, bz as aggregate, bC as batchComputeRollups, cl as buildDatabaseSchema, am as buildSchemaFromFields, cf as buildSchemaIRI, cj as bumpSchemaVersion, af as cellValueToText, e as checkNeedsRebalancing, aQ as clearViewFilters, aU as clearViewSorts, cC as cloneColumns, cD as cloneSampleRows, cB as cloneSchema, bl as collapseAllGroups, b9 as combineFiltersAnd, ba as combineFiltersOr, j as compareSortKeys, bB as computeRollup, ae as convertCellValue, b8 as createAnyOfFilter, aD as createColumn, c3 as createCsvBlob, cw as createDatabaseSchemaResolver, b7 as createEqualsFilter, V as createExtensionField, B as createField, br as createFilterQuery, bJ as createFormulaService, ck as createInitialSchemaMetadata, c8 as createJsonBlob, ao as createNodeDatabaseSchemaResolver, bt as createPaginatedQuery, c as createRow, K as createSelectOption, bd as createSort, bs as createSortQuery, cm as createVersionEntry, aL as createView, a1 as createViewNode, aF as deleteColumn, X as deleteExtensionField, F as deleteField, aw as deleteMeta, t as deleteRichTextCell, d as deleteRow, N as deleteSelectOption, aN as deleteView, a3 as deleteViewNode, c4 as downloadCsv, c9 as downloadJson, aH as duplicateColumn, H as duplicateField, aO as duplicateView, a4 as duplicateViewNode, ad as effectiveFieldSortKey, T as ensureSchemaExtension, c1 as escapeCSV, bq as executeQuery, bk as expandAllGroups, c0 as exportToCsv, c5 as exportToJson, c6 as exportToJsonArray, c7 as exportToNdjson, cx as extractSchemaFromDoc, al as fieldsToStoredColumns, b6 as filterRows, bu as flattenGroups, c2 as formatValue, cE as generateColumnIdMap, f as generateSortKey, h as generateSortKeyWithJitter, bF as getAggregationResultType, aA as getColumn, aB as getColumnIndex, az as getColumns, ax as getDatabaseDocumentModel, an as getDatabaseSchemaIRI, J as getDatabaseSelectOptions, bA as getEmptyValue, z as getField, y as getFields, au as getMeta, b4 as getOperatorLabel, b2 as getOperatorsForType, l as getRichTextCell, s as getRichTextColumnIds, v as getRichTextPlainText, g as getRow, cy as getSchemaIRIFromDoc, I as getSelectOptions, aC as getTitleColumn, A as getTitleField, bv as getTotalFromGroups, co as getVersionBumpType, aJ as getView, aK as getViewByType, a0 as getViewNode, $ as getViewNodes, aI as getViews, bi as groupRows, bO as guessColumnType, p as hasRichTextColumns, o as hasRichTextContent, aZ as hideColumn, bR as inferColumnTypes, bT as inferColumnsFromRows, bU as inferTypeFromValues, ap as initializeDatabaseDoc, aq as isDatabaseDocInitialized, ch as isDatabaseSchemaIRI, bE as isNumericAggregation, b3 as isValidOperator, i as isValidSortKey, G as moveField, m as moveRow, O as moveSelectOption, a5 as moveView, n as needsRebalancing, b5 as operatorRequiresValue, bM as parseCSV, bN as parseCSVLine, cg as parseDatabaseSchemaIRI, bS as parseJSON, bQ as parseRow, bP as parseValue, ci as parseVersion, cn as pruneVersionHistory, q as queryRows, r as rebalanceDatabase, k as rebalanceSortKeys, cF as remapViewColumnIds, bg as removeSort, aT as removeViewSort, W as renameExtensionField, aG as reorderColumn, a_ as reorderViewColumns, a$ as setColumnWidth, aa as setFieldHidden, av as setMeta, ac as setViewFieldOrder, ab as setViewFieldWidth, aP as setViewFilters, aV as setViewGroupBy, a6 as setViewNodeFilters, a8 as setViewNodeGroupBy, a7 as setViewNodeSorts, aR as setViewSorts, aX as setVisibleColumns, ai as setupDatabase, at as setupNewDatabase, aY as showColumn, bc as sortRows, bV as toColumnDefinitions, aW as toggleGroupCollapsed, bj as toggleGroupCollapsedState, be as toggleSortDirection, a9 as toggleViewGroupCollapsed, u as updateCell, b as updateCells, aE as updateColumn, E as updateField, L as updateSelectOption, aM as updateView, a2 as updateViewNode, bW as validateJsonData, bD as validateRollupConfig } from '../clone-VRVODkBn.js';
|
|
4
|
+
import '../types-Z9dUzbDF.js';
|
|
5
5
|
import '@xnetjs/core';
|
|
6
6
|
import '@xnetjs/crypto';
|
|
7
7
|
import '@xnetjs/sqlite';
|
|
8
8
|
import '@xnetjs/sync';
|
|
9
|
-
import '../store-
|
|
9
|
+
import '../store-jukJYsvr.js';
|
|
10
10
|
import 'yjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -306,6 +306,18 @@ interface EvalContext {
|
|
|
306
306
|
getValue: (columnId: string) => unknown;
|
|
307
307
|
/** Get column definition */
|
|
308
308
|
getColumn: (columnId: string) => ColumnDefinition | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* Cross-node scope (0346): values of a target column across the rows
|
|
311
|
+
* this row relates to through a relation column. Pre-resolved by the
|
|
312
|
+
* host (formulas stay synchronous); absent on hosts without relation
|
|
313
|
+
* access — RELATED() then evaluates to [].
|
|
314
|
+
*/
|
|
315
|
+
getRelatedValues?: (relationColumnId: string, targetColumnId?: string) => unknown[];
|
|
316
|
+
/**
|
|
317
|
+
* Cross-node scope (0346): a named node's property, pre-resolved by
|
|
318
|
+
* the host. Absent → NODE() evaluates to null.
|
|
319
|
+
*/
|
|
320
|
+
getNodeProperty?: (nodeId: string, property: string) => unknown;
|
|
309
321
|
}
|
|
310
322
|
/**
|
|
311
323
|
* Evaluate an AST node against a context.
|
package/dist/database/index.js
CHANGED
|
@@ -253,7 +253,8 @@ import {
|
|
|
253
253
|
validateTemplate,
|
|
254
254
|
visibleFormQuestions,
|
|
255
255
|
wouldCreateCircular
|
|
256
|
-
} from "../chunk-
|
|
256
|
+
} from "../chunk-TW5XJHNF.js";
|
|
257
|
+
import "../chunk-WOEFYS7Y.js";
|
|
257
258
|
import "../chunk-PMUQACPY.js";
|
|
258
259
|
import "../chunk-2JROE7ML.js";
|
|
259
260
|
import {
|
|
@@ -270,7 +271,6 @@ import "../chunk-IKREWSCX.js";
|
|
|
270
271
|
import "../chunk-XP3VSSXD.js";
|
|
271
272
|
import "../chunk-UFV5QWCL.js";
|
|
272
273
|
import "../chunk-RLRAWZJE.js";
|
|
273
|
-
import "../chunk-WOEFYS7Y.js";
|
|
274
274
|
import "../chunk-GSLOK5KV.js";
|
|
275
275
|
import "../chunk-NH6OLO3X.js";
|
|
276
276
|
import "../chunk-D4LUUZYD.js";
|
|
@@ -657,4 +657,4 @@ interface FormValidationResult {
|
|
|
657
657
|
*/
|
|
658
658
|
declare function validateFormSubmission(config: FormViewConfig, rules: Record<string, FormFieldRule> | undefined, answers: Record<string, CellValue>, columns: ColumnDefinition[], audience: FormAudience): FormValidationResult;
|
|
659
659
|
|
|
660
|
-
export { type
|
|
660
|
+
export { type FormViewConfig as $, isNodeStoreFieldType as A, isComputedFieldType as B, type ColumnDefinition as C, type DateRange as D, isAutoFieldType as E, type FilterGroup as F, type GeoPoint as G, isYDocFieldType as H, toFieldNode as I, toSelectOptionNode as J, type ColumnConfig as K, type EmptyConfig as L, type SelectColumnConfig as M, type NumberColumnConfig as N, type SelectOption as O, type SelectColor as P, type RollupAggregation as Q, type RelationColumnConfig as R, type SortConfig as S, type TextColumnConfig as T, isNodeStoreColumnType as U, type ViewType as V, isComputedColumnType as W, isAutoColumnType as X, isYDocColumnType as Y, type FormQuestion as Z, type FormConfirmation as _, type ColumnType as a, type FormFieldRule as a0, type FormAudience as a1, type FormSubmissionMeta as a2, type FormValidationError as a3, type FormValidationResult as a4, type PublicFormQuestion as a5, type PublicFormDefinition as a6, PUBLIC_SAFE_FORM_FIELD_TYPES as a7, isFormFieldTypeAllowed as a8, isFormQuestionVisible as a9, visibleFormQuestions as aa, validateFormSubmission as ab, buildPublicFormDefinition as ac, submissionRowId as ad, type ViewConfig as ae, type FilterCondition as af, type FilterOperator as ag, isFilterGroup as ah, isFilterCondition as ai, supportsGrouping as aj, requiresDateColumn as ak, SUMMARY_FUNCTIONS_BY_TYPE as al, summaryFunctionLabel as am, isFilledValue as an, computeColumnSummary as ao, type SummaryFunction as ap, type SummaryRow as aq, type SummaryColumnLike as ar, type ColumnSummaryResult as as, ROW_HEIGHT_PX as at, ROW_HEIGHTS as au, DEFAULT_ROW_HEIGHT as av, rowHeightLabel as aw, resolveRowHeightPx as ax, asRowHeight as ay, type RowHeight as az, type CellValue as b, type FileRef as c, CELL_PREFIX as d, cellKey as e, columnIdFromKey as f, fromCellProperties as g, isDateRange as h, isCellKey as i, isFileRef as j, isGeoPoint as k, isCellValue as l, type FieldType as m, type FieldConfig as n, type FieldNode as o, type SelectOptionNode as p, type RollupColumnConfig as q, type FormulaColumnConfig as r, type DateColumnConfig as s, toCellProperties as t, type FileColumnConfig as u, FIELD_TYPES as v, SELECT_COLORS as w, isFieldType as x, isSelectColor as y, autoColor as z };
|
package/dist/{grant-expiration-cleaner-CRS9OyhV.d.ts → grant-expiration-cleaner-CTsW0hvU.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SerializedAuthorization, SerializedRoleResolver, PolicyEvaluator, DID, AuthDecision, RoleResolver, AuthDenyReason, AuthCheckInput, AuthTrace, AuthExpression } from '@xnetjs/core';
|
|
2
|
-
import { a as Schema, h as NodeState, w as NodeChangeEvent, x as GrantIndex, O as OfflineAuthPolicy, D as DefinedSchema } from './types-
|
|
3
|
-
import { S as SchemaRegistry } from './registry-
|
|
2
|
+
import { a as Schema, h as NodeState, w as NodeChangeEvent, x as GrantIndex, O as OfflineAuthPolicy, D as DefinedSchema } from './types-Z9dUzbDF.js';
|
|
3
|
+
import { S as SchemaRegistry } from './registry-Dh4Kr3fo.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Permission-matrix reflection.
|
|
@@ -251,4 +251,4 @@ declare class GrantExpirationCleaner {
|
|
|
251
251
|
}>;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
export { type ActionPermission as A,
|
|
254
|
+
export { type ActionPermission as A, DecisionCache as D, GrantExpirationCleaner as G, type HubPolicy as H, type NodeStoreReader as N, type PermissionMatrix as P, type RoleSummary as R, type SchemaRegistryReader as S, DefaultRoleResolver as a, buildPermissionMatrix as b, DefaultPolicyEvaluator as c, describeRoleResolver as d, evaluateExpression as e, createPolicyEvaluator as f, type DecisionCacheOptions as g, hubActionsForSpaceRole as h, type DefaultRoleResolverOptions as i, type DefaultPolicyEvaluatorOptions as j, type DefinedSchemaLike as k, type RevalidationEvent as l, type AuthDecisionEvent as m, type GrantExpirationStore as n, type GrantExpirationCleanerOptions as o, schemaToHubPolicy as s };
|