@xnetjs/data 0.2.0 → 0.4.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/{chunk-2UPMDBWD.js → chunk-E3J22ID2.js} +2670 -2539
- package/dist/{chunk-DWEXKD6E.js → chunk-FB63TZVI.js} +7 -1
- package/dist/{chunk-H4GA4BBK.js → chunk-MD553LDL.js} +11 -2
- package/dist/{chunk-3RUDVTMH.js → chunk-Q67VT5XL.js} +307 -138
- package/dist/{chunk-K7DOZWWT.js → chunk-YAUS3Q2Q.js} +4 -4
- package/dist/{clone-C0Jhk2UN.d.ts → clone-_owA3IXN.d.ts} +10 -171
- package/dist/database/index.d.ts +4 -4
- package/dist/database/index.js +17 -3
- package/dist/{database-row-6Q6TRVE4.js → database-row-5MEIOJ52.js} +1 -1
- package/dist/{database-view-5PLSOBI2.js → database-view-DM7YCTZT.js} +1 -1
- package/dist/form-types-BlZvpDEE.d.ts +645 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +20 -6
- package/dist/schema/index.d.ts +48 -29
- package/dist/schema/index.js +3 -3
- package/dist/store/index.d.ts +16 -70
- package/dist/store/index.js +1 -1
- package/dist/{store-DtIDjk7c.d.ts → store-CjjofiLR.d.ts} +10 -7
- package/package.json +7 -7
- package/dist/view-types-DSde-uT_.d.ts +0 -316
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ import * as Y from 'yjs';
|
|
|
7
7
|
export { Array as YArray, Doc as YDoc, Map as YMap, Text as YText, XmlElement as YXmlElement, XmlFragment as YXmlFragment, XmlText as YXmlText } from 'yjs';
|
|
8
8
|
export { CursorPosition, SelectionRange, UserPresence, clearLocalPresence, createAwareness, generateUserColor, getAllPresences, getLocalClientId, getRemotePresences, onPresenceChange, setLocalPresence } from './sync/awareness.js';
|
|
9
9
|
export { G as QUERY_AST_VERSION, r as QueryAST, n as QueryASTAggregate, A as QueryASTAggregateExecution, m as QueryASTAggregateFunction, y as QueryASTAggregateGroup, x as QueryASTAggregatePlan, z as QueryASTAggregateResult, d as QueryASTComparisonPredicate, e as QueryASTCompoundPredicate, a as QueryASTField, l as QueryASTIncludes, p as QueryASTNodeQuery, s as QueryASTNodeQueryOptions, f as QueryASTNotPredicate, c as QueryASTOperator, h as QueryASTOrderBy, i as QueryASTPage, B as QueryASTPlannerGate, g as QueryASTPredicate, q as QueryASTQuerySet, o as QueryASTQuerySetAggregate, j as QueryASTRelationDirection, k as QueryASTRelationInclude, t as QueryASTRelationIncludeOptions, w as QueryASTRelationIndexRequirement, b as QueryASTSchemaInput, u as QueryASTValidationError, v as QueryASTValidationResult, Q as QueryASTVersion, S as SavedViewDescriptor, F as SavedViewFeedDensity, E as SavedViewFeedLayout, C as SavedViewPresentationHint, D as SavedViewPresentationHintMode, V as and, a3 as avg, N as between, P as contains, a0 as count, a1 as countDistinct, a9 as dashboardQuerySet, Z as defineNodeQueryAST, a8 as defineQuerySetAST, ab as defineSavedViewDescriptor, H as eq, aj as evaluateQueryASTPlannerGate, af as executeQueryASTLoadedAggregates, ag as filterQueryASTLoadedRows, _ as follow, $ as from, ah as getQueryASTRelationIndexRequirements, a6 as groupBy, J as gt, K as gte, a7 as having, O as includesAny, U as isNotNull, T as isNull, L as lt, M as lte, ai as matchesQueryASTLoadedRow, a5 as max, a4 as min, I as neq, X as not, W as or, ae as planQueryASTAggregates, Y as queryOperators, aa as querySetCount, R as startsWith, a2 as sum, ac as validateQueryAST, ad as validateSavedViewDescriptor } from './query-ast-C3m6kZYv.js';
|
|
10
|
-
export { N as NodeStore } from './store-
|
|
10
|
+
export { N as NodeStore } from './store-CjjofiLR.js';
|
|
11
11
|
export { MemoryNodeStorageAdapter, PermissionError, SQLiteAdaptiveIndexingOptions, SQLiteNodeStorageAdapter, SQLiteNodeStorageAdapterOptions, SQLiteQueryVerificationOptions, createNodeStorageAdapter } from './store/index.js';
|
|
12
12
|
export { A as ActionPermission, b as DecisionCache, D as DefaultPolicyEvaluator, a as DefaultRoleResolver, G as GrantExpirationCleaner, H as HubPolicy, P as PermissionMatrix, R as RoleSummary, c as buildPermissionMatrix, d as describeRoleResolver, h as hubActionsForSpaceRole, s as schemaToHubPolicy } from './grant-expiration-cleaner-CY6BcmlR.js';
|
|
13
13
|
import { ContentId } from '@xnetjs/core';
|
|
14
14
|
import { ChunkManager } from '@xnetjs/storage';
|
|
15
|
-
export { a as CELL_PREFIX, D as CellDateRange, F as CellFileRef, C as CellValue,
|
|
16
|
-
export {
|
|
15
|
+
export { a as CELL_PREFIX, D as CellDateRange, F as CellFileRef, C as CellValue, G as ColumnConfig, E as ColumnDefinition, J as ColumnSelectOption, aq as ColumnSummaryResult, B as ColumnType, at as DEFAULT_ROW_HEIGHT, n as DateColumnConfig, n as DateFieldConfig, H as EmptyConfig, p as FIELD_TYPES, j as FieldConfig, k as FieldNode, h as FieldType, o as FileColumnConfig, o as FileFieldConfig, X as FilterCondition, W as FilterGroup, Y as FilterOperator, a6 as FormAudience, a3 as FormConfirmation, a5 as FormFieldRule, a2 as FormQuestion, a7 as FormSubmissionMeta, a8 as FormValidationError, a9 as FormValidationResult, a4 as FormViewConfig, m as FormulaColumnConfig, m as FormulaFieldConfig, N as NumberColumnConfig, N as NumberFieldConfig, ac as PUBLIC_SAFE_FORM_FIELD_TYPES, ab as PublicFormDefinition, aa as PublicFormQuestion, as as ROW_HEIGHTS, ar as ROW_HEIGHT_PX, R as RelationColumnConfig, R as RelationFieldConfig, L as RollupAggregation, l as RollupColumnConfig, l as RollupFieldConfig, ax as RowHeight, q as SELECT_COLORS, aj as SUMMARY_FUNCTIONS_BY_TYPE, K as SelectColor, I as SelectColumnConfig, S as SelectOptionNode, Z as SortConfig, ap as SummaryColumnLike, an as SummaryFunction, ao as SummaryRow, T as TextColumnConfig, T as TextFieldConfig, U as ViewConfig, V as ViewType, aw as asRowHeight, u as autoColor, ah as buildPublicFormDefinition, c as cellKey, b as columnIdFromKey, am as computeColumnSummary, f as fromCellProperties, P as isAutoColumnType, x as isAutoFieldType, d as isCellDateRange, e as isCellFileRef, i as isCellKey, g as isCellValue, O as isComputedColumnType, w as isComputedFieldType, r as isFieldType, al as isFilledValue, $ as isFilterCondition, _ as isFilterGroup, ad as isFormFieldTypeAllowed, ae as isFormQuestionVisible, M as isNodeStoreColumnType, v as isNodeStoreFieldType, s as isSelectColor, Q as isYDocColumnType, y as isYDocFieldType, a1 as requiresDateColumn, av as resolveRowHeightPx, au as rowHeightLabel, ai as submissionRowId, ak as summaryFunctionLabel, a0 as supportsGrouping, t as toCellProperties, z as toFieldNode, A as toSelectOptionNode, ag as validateFormSubmission, af as visibleFormQuestions } from './form-types-BlZvpDEE.js';
|
|
16
|
+
export { cD as CloneSchemaOptions, cE as CloneSchemaResult, cF as CloneSourceData, ax as ConvertContext, ay as ConvertedCell, cx as CreateDatabaseSchemaResolverOptions, O as CreateExtensionFieldOptions, w as CreateFieldOptions, C as CreateRowOptions, x as CreateSelectOptionOptions, Z as CreateViewOptions, b8 as CsvExportOptions, aV as CsvParseOptions, cm as DATABASE_SCHEMA_NAMESPACE, cn as DATABASE_SCHEMA_PREFIX, ag as DEFAULT_DATABASE_SCHEMA_VERSION, au as DatabaseDocumentModel, D as DatabaseRowNode, cp as DatabaseSchemaMetadata, cw as DocFetcher, N as EnsureExtensionOptions, b7 as ExportRow, bb as ExportedColumn, ba as ExportedJSON, bQ as FilterableRow, aH as FormulaRow, aF as FormulaService, aI as FormulaValidationResult, c2 as GroupAggregates, c0 as GroupConfig, b$ as GroupableRow, aX as InferredColumn, b9 as JsonExportOptions, aY as JsonParseOptions, M as MAX_KEY_LENGTH, co as MAX_VERSION_HISTORY, bF as OPERATORS_BY_TYPE, bG as OPERATOR_LABELS, aU as ParsedCSV, aW as ParsedJSON, ca as QueryOptions, cb as QueryResult, Q as QueryRowsOptions, a as QueryRowsResult, c9 as QueryableRow, R as RICHTEXT_PREFIX, aE as RollupContext, aD as RollupRow, c1 as RowGroup, cr as SchemaVersionEntry, af as SetupDatabaseResult, bW as SortableRow, cq as StoredColumn, U as UpdateFieldOptions, _ as UpdateViewOptions, cs as VersionBumpType, Y as ViewNode, ao as addDefaultTableView, an as addDefaultTitleColumn, bU as addOrToggleSort, bv as addViewSort, az as aggregate, aB as batchComputeRollups, ci as buildDatabaseSchema, ai as buildSchemaFromFields, cc as buildSchemaIRI, cg as bumpSchemaVersion, aw as cellValueToText, e as checkNeedsRebalancing, bt as clearViewFilters, bx as clearViewSorts, cz as cloneColumns, cA as cloneSampleRows, cy as cloneSchema, b_ as collapseAllGroups, bO as combineFiltersAnd, bP as combineFiltersOr, j as compareSortKeys, aA as computeRollup, av as convertCellValue, bN as createAnyOfFilter, bg as createColumn, b0 as createCsvBlob, ct as createDatabaseSchemaResolver, bM as createEqualsFilter, J as createExtensionField, B as createField, c4 as createFilterQuery, aG as createFormulaService, ch as createInitialSchemaMetadata, b5 as createJsonBlob, ak as createNodeDatabaseSchemaResolver, c6 as createPaginatedQuery, c as createRow, T as createSelectOption, bS as createSort, c5 as createSortQuery, cj as createVersionEntry, bo as createView, a1 as createViewNode, bi as deleteColumn, L as deleteExtensionField, F as deleteField, as as deleteMeta, t as deleteRichTextCell, d as deleteRow, W as deleteSelectOption, bq as deleteView, a3 as deleteViewNode, b1 as downloadCsv, b6 as downloadJson, bk as duplicateColumn, H as duplicateField, br as duplicateView, a4 as duplicateViewNode, ad as effectiveFieldSortKey, I as ensureSchemaExtension, a_ as escapeCSV, c3 as executeQuery, bZ as expandAllGroups, aZ as exportToCsv, b2 as exportToJson, b3 as exportToJsonArray, b4 as exportToNdjson, cu as extractSchemaFromDoc, ah as fieldsToStoredColumns, bL as filterRows, c7 as flattenGroups, a$ as formatValue, cB as generateColumnIdMap, f as generateSortKey, h as generateSortKeyWithJitter, bd as getColumn, be as getColumnIndex, bc as getColumns, at as getDatabaseDocumentModel, aj as getDatabaseSchemaIRI, S as getDatabaseSelectOptions, z as getField, y as getFields, aq as getMeta, bJ as getOperatorLabel, bH as getOperatorsForType, l as getRichTextCell, s as getRichTextColumnIds, v as getRichTextPlainText, g as getRow, cv as getSchemaIRIFromDoc, P as getSelectOptions, bf as getTitleColumn, A as getTitleField, c8 as getTotalFromGroups, cl as getVersionBumpType, bm as getView, bn as getViewByType, a0 as getViewNode, $ as getViewNodes, bl as getViews, bX as groupRows, aL as guessColumnType, p as hasRichTextColumns, o as hasRichTextContent, bC as hideColumn, aO as inferColumnTypes, aQ as inferColumnsFromRows, aR as inferTypeFromValues, al as initializeDatabaseDoc, am as isDatabaseDocInitialized, ce as isDatabaseSchemaIRI, bI as isValidOperator, i as isValidSortKey, G as moveField, m as moveRow, X as moveSelectOption, a5 as moveView, n as needsRebalancing, bK as operatorRequiresValue, aJ as parseCSV, aK as parseCSVLine, cd as parseDatabaseSchemaIRI, aP as parseJSON, aN as parseRow, aM as parseValue, cf as parseVersion, ck as pruneVersionHistory, q as queryRows, r as rebalanceDatabase, k as rebalanceSortKeys, cC as remapViewColumnIds, bV as removeSort, bw as removeViewSort, K as renameExtensionField, bj as reorderColumn, bD as reorderViewColumns, bE as setColumnWidth, aa as setFieldHidden, ar as setMeta, ac as setViewFieldOrder, ab as setViewFieldWidth, bs as setViewFilters, by as setViewGroupBy, a6 as setViewNodeFilters, a8 as setViewNodeGroupBy, a7 as setViewNodeSorts, bu as setViewSorts, bA as setVisibleColumns, ae as setupDatabase, ap as setupNewDatabase, bB as showColumn, bR as sortRows, aS as toColumnDefinitions, bz as toggleGroupCollapsed, bY as toggleGroupCollapsedState, bT as toggleSortDirection, a9 as toggleViewGroupCollapsed, u as updateCell, b as updateCells, bh as updateColumn, E as updateField, V as updateSelectOption, bp as updateView, a2 as updateViewNode, aT as validateJsonData, aC as validateRollupConfig } from './clone-_owA3IXN.js';
|
|
17
17
|
import '@xnetjs/crypto';
|
|
18
18
|
import '@xnetjs/sqlite';
|
|
19
19
|
import '@xnetjs/sync';
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
MAX_VERSION_HISTORY,
|
|
18
18
|
OPERATORS_BY_TYPE,
|
|
19
19
|
OPERATOR_LABELS,
|
|
20
|
+
PUBLIC_SAFE_FORM_FIELD_TYPES,
|
|
20
21
|
RICHTEXT_PREFIX,
|
|
21
22
|
ROW_HEIGHTS,
|
|
22
23
|
ROW_HEIGHT_PX,
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
autoColor,
|
|
32
33
|
batchComputeRollups,
|
|
33
34
|
buildDatabaseSchema,
|
|
35
|
+
buildPublicFormDefinition,
|
|
34
36
|
buildSchemaFromFields,
|
|
35
37
|
buildSchemaIRI,
|
|
36
38
|
bumpSchemaVersion,
|
|
@@ -149,6 +151,8 @@ import {
|
|
|
149
151
|
isFilledValue,
|
|
150
152
|
isFilterCondition,
|
|
151
153
|
isFilterGroup,
|
|
154
|
+
isFormFieldTypeAllowed,
|
|
155
|
+
isFormQuestionVisible,
|
|
152
156
|
isNodeStoreColumnType,
|
|
153
157
|
isNodeStoreFieldType,
|
|
154
158
|
isSelectColor,
|
|
@@ -195,6 +199,7 @@ import {
|
|
|
195
199
|
setupNewDatabase,
|
|
196
200
|
showColumn,
|
|
197
201
|
sortRows,
|
|
202
|
+
submissionRowId,
|
|
198
203
|
summaryFunctionLabel,
|
|
199
204
|
supportsGrouping,
|
|
200
205
|
toCellProperties,
|
|
@@ -212,9 +217,11 @@ import {
|
|
|
212
217
|
updateSelectOption,
|
|
213
218
|
updateView,
|
|
214
219
|
updateView2,
|
|
220
|
+
validateFormSubmission,
|
|
215
221
|
validateJsonData,
|
|
216
|
-
validateRollupConfig
|
|
217
|
-
|
|
222
|
+
validateRollupConfig,
|
|
223
|
+
visibleFormQuestions
|
|
224
|
+
} from "./chunk-Q67VT5XL.js";
|
|
218
225
|
import {
|
|
219
226
|
LensRegistry,
|
|
220
227
|
MAX_MENTION_DIDS,
|
|
@@ -280,7 +287,7 @@ import {
|
|
|
280
287
|
taskBranchName,
|
|
281
288
|
transform,
|
|
282
289
|
when
|
|
283
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-YAUS3Q2Q.js";
|
|
284
291
|
import {
|
|
285
292
|
UserWidgetSchema
|
|
286
293
|
} from "./chunk-53F4PRNC.js";
|
|
@@ -544,7 +551,7 @@ import {
|
|
|
544
551
|
} from "./chunk-QWFTRZQT.js";
|
|
545
552
|
import {
|
|
546
553
|
DatabaseRowSchema
|
|
547
|
-
} from "./chunk-
|
|
554
|
+
} from "./chunk-FB63TZVI.js";
|
|
548
555
|
import {
|
|
549
556
|
DatabaseFieldSchema
|
|
550
557
|
} from "./chunk-KQAT4XBL.js";
|
|
@@ -553,7 +560,7 @@ import {
|
|
|
553
560
|
} from "./chunk-6OMG4I7M.js";
|
|
554
561
|
import {
|
|
555
562
|
DatabaseViewSchema
|
|
556
|
-
} from "./chunk-
|
|
563
|
+
} from "./chunk-MD553LDL.js";
|
|
557
564
|
import "./chunk-OCMSAKWV.js";
|
|
558
565
|
import {
|
|
559
566
|
MemoryNodeStorageAdapter,
|
|
@@ -605,7 +612,7 @@ import {
|
|
|
605
612
|
sum,
|
|
606
613
|
validateQueryAST,
|
|
607
614
|
validateSavedViewDescriptor
|
|
608
|
-
} from "./chunk-
|
|
615
|
+
} from "./chunk-E3J22ID2.js";
|
|
609
616
|
import {
|
|
610
617
|
applyNodeQueryDescriptor,
|
|
611
618
|
createNodeQueryDescriptor,
|
|
@@ -2114,6 +2121,7 @@ export {
|
|
|
2114
2121
|
POSTING_SCHEMA_IRI,
|
|
2115
2122
|
PRODUCT_KINDS,
|
|
2116
2123
|
PRODUCT_SCHEMA_IRI,
|
|
2124
|
+
PUBLIC_SAFE_FORM_FIELD_TYPES,
|
|
2117
2125
|
PageSchema,
|
|
2118
2126
|
PermissionError,
|
|
2119
2127
|
PipelineSchema,
|
|
@@ -2208,6 +2216,7 @@ export {
|
|
|
2208
2216
|
buildEffectiveSchema,
|
|
2209
2217
|
buildFolderTree,
|
|
2210
2218
|
buildPermissionMatrix,
|
|
2219
|
+
buildPublicFormDefinition,
|
|
2211
2220
|
buildSchemaFromFields,
|
|
2212
2221
|
buildSchemaIRI,
|
|
2213
2222
|
buildSpaceTree,
|
|
@@ -2426,6 +2435,8 @@ export {
|
|
|
2426
2435
|
isFilledValue,
|
|
2427
2436
|
isFilterCondition,
|
|
2428
2437
|
isFilterGroup,
|
|
2438
|
+
isFormFieldTypeAllowed,
|
|
2439
|
+
isFormQuestionVisible,
|
|
2429
2440
|
isGrantActive,
|
|
2430
2441
|
isMoneyValue,
|
|
2431
2442
|
isNode,
|
|
@@ -2562,6 +2573,7 @@ export {
|
|
|
2562
2573
|
spaceRoleGrantActions,
|
|
2563
2574
|
spaceRoleToShareRole,
|
|
2564
2575
|
startsWith,
|
|
2576
|
+
submissionRowId,
|
|
2565
2577
|
sum,
|
|
2566
2578
|
summarizePresenceNodes,
|
|
2567
2579
|
summaryFunctionLabel,
|
|
@@ -2587,12 +2599,14 @@ export {
|
|
|
2587
2599
|
updated,
|
|
2588
2600
|
url,
|
|
2589
2601
|
validateBlock,
|
|
2602
|
+
validateFormSubmission,
|
|
2590
2603
|
validateJsonData,
|
|
2591
2604
|
validateQueryAST,
|
|
2592
2605
|
validateRollupConfig,
|
|
2593
2606
|
validateSavedViewDescriptor,
|
|
2594
2607
|
validateSchemaDefinitionNode,
|
|
2595
2608
|
verifyUpdate,
|
|
2609
|
+
visibleFormQuestions,
|
|
2596
2610
|
when,
|
|
2597
2611
|
withoutNodeQueryMaterializedView,
|
|
2598
2612
|
withoutNodeQueryPagination,
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { P as PropertyBuilder, S as SchemaIRI, D as DefinedSchema, ba as Documen
|
|
|
2
2
|
export { H as CreateNodeOptions, bb as DEFAULT_SCHEMA_VERSION, I as InferCreateProps, K as InferProperties, J as InferPropertyType, Z as LensRegistry, Y as MigrationError, X as MigrationResult, x as Node, b as ParsedSchemaIRI, E as PropertyDefinition, bd as buildSchemaIRI, A as createNodeId, bf as getBaseSchemaIRI, bh as getSchemaVersion, z as isNode, bg as isSameSchema, _ as lensRegistry, be as normalizeSchemaIRI, bc as parseSchemaIRI } from '../types-S-BJAKyK.js';
|
|
3
3
|
import { AuthorizationDefinition } from '@xnetjs/core';
|
|
4
4
|
import { S as SavedViewDescriptor } from '../query-ast-C3m6kZYv.js';
|
|
5
|
-
import {
|
|
6
|
-
import { N as NodeStore } from '../store-
|
|
5
|
+
import { a7 as FormSubmissionMeta, W as FilterGroup, Z as SortConfig, an as SummaryFunction, a4 as FormViewConfig, a5 as FormFieldRule } from '../form-types-BlZvpDEE.js';
|
|
6
|
+
import { N as NodeStore } from '../store-CjjofiLR.js';
|
|
7
7
|
export { S as SchemaRegistry, s as schemaRegistry } from '../registry-DunPv__d.js';
|
|
8
8
|
import '@xnetjs/crypto';
|
|
9
9
|
import '@xnetjs/sqlite';
|
|
@@ -1101,30 +1101,6 @@ declare const DatabaseSchema: DefinedSchema<{
|
|
|
1101
1101
|
*/
|
|
1102
1102
|
type Database = InferNode<(typeof DatabaseSchema)['_properties']>;
|
|
1103
1103
|
|
|
1104
|
-
declare const DatabaseRowSchema: DefinedSchema<{
|
|
1105
|
-
/**
|
|
1106
|
-
* Reference to the parent database.
|
|
1107
|
-
* This is a typed relation that only accepts Database node IDs.
|
|
1108
|
-
*/
|
|
1109
|
-
database: PropertyBuilder<string>;
|
|
1110
|
-
/**
|
|
1111
|
-
* Fractional index for row ordering.
|
|
1112
|
-
* Uses a string-based fractional indexing scheme (like Figma/Linear)
|
|
1113
|
-
* that allows inserting between any two rows without reindexing.
|
|
1114
|
-
*
|
|
1115
|
-
* @see packages/data/src/database/fractional-index.ts
|
|
1116
|
-
*/
|
|
1117
|
-
sortKey: PropertyBuilder<string>;
|
|
1118
|
-
}>;
|
|
1119
|
-
/**
|
|
1120
|
-
* A DatabaseRow node type (inferred from schema).
|
|
1121
|
-
*
|
|
1122
|
-
* Note: Cell values are stored as dynamic properties with `cell_` prefix,
|
|
1123
|
-
* so they won't appear in this type. Use `fromCellProperties()` to extract
|
|
1124
|
-
* cell values from a row's properties.
|
|
1125
|
-
*/
|
|
1126
|
-
type DatabaseRow = InferNode<(typeof DatabaseRowSchema)['_properties']>;
|
|
1127
|
-
|
|
1128
1104
|
declare const DatabaseFieldSchema: DefinedSchema<{
|
|
1129
1105
|
/** Parent database */
|
|
1130
1106
|
database: PropertyBuilder<string>;
|
|
@@ -1173,13 +1149,42 @@ declare const DatabaseSelectOptionSchema: DefinedSchema<{
|
|
|
1173
1149
|
*/
|
|
1174
1150
|
type DatabaseSelectOption = InferNode<(typeof DatabaseSelectOptionSchema)['_properties']>;
|
|
1175
1151
|
|
|
1152
|
+
declare const DatabaseRowSchema: DefinedSchema<{
|
|
1153
|
+
/**
|
|
1154
|
+
* Reference to the parent database.
|
|
1155
|
+
* This is a typed relation that only accepts Database node IDs.
|
|
1156
|
+
*/
|
|
1157
|
+
database: PropertyBuilder<string>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Fractional index for row ordering.
|
|
1160
|
+
* Uses a string-based fractional indexing scheme (like Figma/Linear)
|
|
1161
|
+
* that allows inserting between any two rows without reindexing.
|
|
1162
|
+
*
|
|
1163
|
+
* @see packages/data/src/database/fractional-index.ts
|
|
1164
|
+
*/
|
|
1165
|
+
sortKey: PropertyBuilder<string>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Provenance for rows created by a form submission (exploration 0278):
|
|
1168
|
+
* which form view, when, and the submitter's idempotency nonce.
|
|
1169
|
+
*/
|
|
1170
|
+
submissionMeta: PropertyBuilder<FormSubmissionMeta>;
|
|
1171
|
+
}>;
|
|
1172
|
+
/**
|
|
1173
|
+
* A DatabaseRow node type (inferred from schema).
|
|
1174
|
+
*
|
|
1175
|
+
* Note: Cell values are stored as dynamic properties with `cell_` prefix,
|
|
1176
|
+
* so they won't appear in this type. Use `fromCellProperties()` to extract
|
|
1177
|
+
* cell values from a row's properties.
|
|
1178
|
+
*/
|
|
1179
|
+
type DatabaseRow = InferNode<(typeof DatabaseRowSchema)['_properties']>;
|
|
1180
|
+
|
|
1176
1181
|
declare const DatabaseViewSchema: DefinedSchema<{
|
|
1177
1182
|
/** Parent database */
|
|
1178
1183
|
database: PropertyBuilder<string>;
|
|
1179
1184
|
/** Display name */
|
|
1180
1185
|
name: PropertyBuilder<string>;
|
|
1181
1186
|
/** View type */
|
|
1182
|
-
type: PropertyBuilder<"list" | "table" | "timeline" | "board" | "gallery" | "calendar">;
|
|
1187
|
+
type: PropertyBuilder<"list" | "table" | "timeline" | "board" | "gallery" | "calendar" | "form">;
|
|
1183
1188
|
/** Filter tree (FilterGroup) — whole-tree LWW */
|
|
1184
1189
|
filters: PropertyBuilder<FilterGroup>;
|
|
1185
1190
|
/** Sort list (SortConfig[]) — whole-list LWW */
|
|
@@ -1210,6 +1215,12 @@ declare const DatabaseViewSchema: DefinedSchema<{
|
|
|
1210
1215
|
dateField: PropertyBuilder<string>;
|
|
1211
1216
|
/** End date field ID */
|
|
1212
1217
|
endDateField: PropertyBuilder<string>;
|
|
1218
|
+
/** Form question config (FormViewConfig) — whole-object LWW */
|
|
1219
|
+
formConfig: PropertyBuilder<FormViewConfig>;
|
|
1220
|
+
/** Per-question show-if rules: fieldId -> FormFieldRule — whole-map LWW */
|
|
1221
|
+
formRules: PropertyBuilder<Record<string, FormFieldRule>>;
|
|
1222
|
+
/** Accepting responses toggle (form view) */
|
|
1223
|
+
formAccepting: PropertyBuilder<boolean>;
|
|
1213
1224
|
}>;
|
|
1214
1225
|
/**
|
|
1215
1226
|
* A DatabaseView node type (inferred from schema).
|
|
@@ -3988,6 +3999,7 @@ declare const builtInSchemas: {
|
|
|
3988
3999
|
readonly 'xnet://xnet.fyi/DatabaseRow@2.0.0': () => Promise<DefinedSchema<{
|
|
3989
4000
|
database: PropertyBuilder<string>;
|
|
3990
4001
|
sortKey: PropertyBuilder<string>;
|
|
4002
|
+
submissionMeta: PropertyBuilder<FormSubmissionMeta>;
|
|
3991
4003
|
}>>;
|
|
3992
4004
|
readonly 'xnet://xnet.fyi/DatabaseField@1.0.0': () => Promise<DefinedSchema<{
|
|
3993
4005
|
database: PropertyBuilder<string>;
|
|
@@ -4009,7 +4021,7 @@ declare const builtInSchemas: {
|
|
|
4009
4021
|
readonly 'xnet://xnet.fyi/DatabaseView@1.0.0': () => Promise<DefinedSchema<{
|
|
4010
4022
|
database: PropertyBuilder<string>;
|
|
4011
4023
|
name: PropertyBuilder<string>;
|
|
4012
|
-
type: PropertyBuilder<"list" | "table" | "timeline" | "board" | "gallery" | "calendar">;
|
|
4024
|
+
type: PropertyBuilder<"list" | "table" | "timeline" | "board" | "gallery" | "calendar" | "form">;
|
|
4013
4025
|
filters: PropertyBuilder<FilterGroup>;
|
|
4014
4026
|
sorts: PropertyBuilder<SortConfig[]>;
|
|
4015
4027
|
groupBy: PropertyBuilder<string>;
|
|
@@ -4025,6 +4037,9 @@ declare const builtInSchemas: {
|
|
|
4025
4037
|
cardSize: PropertyBuilder<string>;
|
|
4026
4038
|
dateField: PropertyBuilder<string>;
|
|
4027
4039
|
endDateField: PropertyBuilder<string>;
|
|
4040
|
+
formConfig: PropertyBuilder<FormViewConfig>;
|
|
4041
|
+
formRules: PropertyBuilder<Record<string, FormFieldRule>>;
|
|
4042
|
+
formAccepting: PropertyBuilder<boolean>;
|
|
4028
4043
|
}>>;
|
|
4029
4044
|
readonly 'xnet://xnet.fyi/SchemaExtension@1.0.0': () => Promise<DefinedSchema<{
|
|
4030
4045
|
targetSchema: PropertyBuilder<string>;
|
|
@@ -5017,6 +5032,7 @@ declare const builtInSchemas: {
|
|
|
5017
5032
|
readonly 'xnet://xnet.fyi/DatabaseRow': () => Promise<DefinedSchema<{
|
|
5018
5033
|
database: PropertyBuilder<string>;
|
|
5019
5034
|
sortKey: PropertyBuilder<string>;
|
|
5035
|
+
submissionMeta: PropertyBuilder<FormSubmissionMeta>;
|
|
5020
5036
|
}>>;
|
|
5021
5037
|
readonly 'xnet://xnet.fyi/DatabaseField': () => Promise<DefinedSchema<{
|
|
5022
5038
|
database: PropertyBuilder<string>;
|
|
@@ -5038,7 +5054,7 @@ declare const builtInSchemas: {
|
|
|
5038
5054
|
readonly 'xnet://xnet.fyi/DatabaseView': () => Promise<DefinedSchema<{
|
|
5039
5055
|
database: PropertyBuilder<string>;
|
|
5040
5056
|
name: PropertyBuilder<string>;
|
|
5041
|
-
type: PropertyBuilder<"list" | "table" | "timeline" | "board" | "gallery" | "calendar">;
|
|
5057
|
+
type: PropertyBuilder<"list" | "table" | "timeline" | "board" | "gallery" | "calendar" | "form">;
|
|
5042
5058
|
filters: PropertyBuilder<FilterGroup>;
|
|
5043
5059
|
sorts: PropertyBuilder<SortConfig[]>;
|
|
5044
5060
|
groupBy: PropertyBuilder<string>;
|
|
@@ -5054,6 +5070,9 @@ declare const builtInSchemas: {
|
|
|
5054
5070
|
cardSize: PropertyBuilder<string>;
|
|
5055
5071
|
dateField: PropertyBuilder<string>;
|
|
5056
5072
|
endDateField: PropertyBuilder<string>;
|
|
5073
|
+
formConfig: PropertyBuilder<FormViewConfig>;
|
|
5074
|
+
formRules: PropertyBuilder<Record<string, FormFieldRule>>;
|
|
5075
|
+
formAccepting: PropertyBuilder<boolean>;
|
|
5057
5076
|
}>>;
|
|
5058
5077
|
readonly 'xnet://xnet.fyi/SchemaExtension': () => Promise<DefinedSchema<{
|
|
5059
5078
|
targetSchema: PropertyBuilder<string>;
|
package/dist/schema/index.js
CHANGED
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
taskBranchName,
|
|
64
64
|
transform,
|
|
65
65
|
when
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-YAUS3Q2Q.js";
|
|
67
67
|
import {
|
|
68
68
|
UserWidgetSchema
|
|
69
69
|
} from "../chunk-53F4PRNC.js";
|
|
@@ -319,7 +319,7 @@ import {
|
|
|
319
319
|
import "../chunk-QWFTRZQT.js";
|
|
320
320
|
import {
|
|
321
321
|
DatabaseRowSchema
|
|
322
|
-
} from "../chunk-
|
|
322
|
+
} from "../chunk-FB63TZVI.js";
|
|
323
323
|
import {
|
|
324
324
|
DatabaseFieldSchema
|
|
325
325
|
} from "../chunk-KQAT4XBL.js";
|
|
@@ -328,7 +328,7 @@ import {
|
|
|
328
328
|
} from "../chunk-6OMG4I7M.js";
|
|
329
329
|
import {
|
|
330
330
|
DatabaseViewSchema
|
|
331
|
-
} from "../chunk-
|
|
331
|
+
} from "../chunk-MD553LDL.js";
|
|
332
332
|
import "../chunk-OCMSAKWV.js";
|
|
333
333
|
import {
|
|
334
334
|
PresenceSummarySchema,
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as NodeStorageAdapter, r as NodeChange, i as NodeId, h as NodeState, aa as NodeBatchPreflightResult, a3 as ImportNodesOptions, a5 as ApplyNodeBatchInput, a6 as ApplyNodeBatchResult, L as ListNodesOptions, ae as CountNodesOptions, a2 as SetNodeOptions, j as NodeQueryDescriptor, k as NodeQueryResult, S as SchemaIRI, a4 as RebuildNodeIndexesOptions, bi as NodeReadAuthorizer, bj as AuthorizationStateVersion } from '../types-S-BJAKyK.js';
|
|
2
2
|
export { av as ConflictResult, ay as ContentKeyCache, C as CreateNodeOptions, ab as DeterministicNodeBatchWriteInput, m as DeterministicNodeImportDraft, G as GetWithMigrationOptions, n as ImportDeterministicNodesOptions, o as ImportDeterministicNodesResult, s as MergeConflict, M as MigratedNodeState, az as MigrationInfo, aw as NodeBatchChangeEvent, u as NodeBatchChangeListener, a7 as NodeBatchIndexMode, a8 as NodeBatchNotificationMode, a9 as NodeBatchSyncMode, p as NodeBatchWriteInput, ac as NodeBatchWritePolicy, q as NodeBatchWriteResult, ad as NodeBatchWriteTimings, v as NodeChangeEvent, t as NodeChangeListener, ax as NodeContentCipher, a0 as NodePayload, ar as NodeQueryCursor, aq as NodeQueryCursorOrderEntry, ao as NodeQueryMaterializedViewOptions, as as NodeQueryOptions, N as NodeQueryPageCountMode, ap as NodeQueryPageOptions, au as NodeQueryParityCheckMetadata, at as NodeQueryPlanMetadata, am as NodeQuerySearchField, an as NodeQuerySearchFilter, al as NodeQuerySpatialFilter, af as NodeQuerySpatialPoint, ah as NodeQuerySpatialPointFields, ak as NodeQuerySpatialRadius, ag as NodeQuerySpatialRect, ai as NodeQuerySpatialRectFields, aj as NodeQuerySpatialWindow, f as NodeStoreOptions, bk as OperationNodeBatchWriteInput, $ as PropertyKey, bl as PropertyLookup, a1 as PropertyTimestamp, aR as SchemaLookup, c as SortDirection, d as SystemOrderField, aO as TEMP_ID_PREFIX, aS as TempIdResolution, T as TransactionOperation, l as TransactionResult, U as UpdateNodeOptions, aI as applyNodeQueryDescriptor, aA as createNodeQueryDescriptor, bm as createPropertyLookup, aQ as createSchemaLookup, aC as decodeNodeQueryCursor, aB as encodeNodeQueryCursor, aG as filterNodeQueryResults, aJ as getNodeQuerySearchTokens, aN as isTempId, aF as matchesNodeQueryDescriptor, aK as nodeQueryDescriptorNeedsBoundedReload, aD as nodeQueryDescriptorToOptions, aP as resolveTempIds, aE as serializeNodeQueryDescriptor, aH as sortNodeQueryResults, aM as withoutNodeQueryMaterializedView, aL as withoutNodeQueryPagination } from '../types-S-BJAKyK.js';
|
|
3
3
|
export { G as QUERY_AST_VERSION, r as QueryAST, n as QueryASTAggregate, A as QueryASTAggregateExecution, m as QueryASTAggregateFunction, y as QueryASTAggregateGroup, x as QueryASTAggregatePlan, z as QueryASTAggregateResult, d as QueryASTComparisonPredicate, e as QueryASTCompoundPredicate, a as QueryASTField, l as QueryASTIncludes, p as QueryASTNodeQuery, s as QueryASTNodeQueryOptions, f as QueryASTNotPredicate, c as QueryASTOperator, h as QueryASTOrderBy, i as QueryASTPage, B as QueryASTPlannerGate, g as QueryASTPredicate, q as QueryASTQuerySet, o as QueryASTQuerySetAggregate, j as QueryASTRelationDirection, k as QueryASTRelationInclude, t as QueryASTRelationIncludeOptions, w as QueryASTRelationIndexRequirement, b as QueryASTSchemaInput, u as QueryASTValidationError, v as QueryASTValidationResult, Q as QueryASTVersion, S as SavedViewDescriptor, F as SavedViewFeedDensity, E as SavedViewFeedLayout, C as SavedViewPresentationHint, D as SavedViewPresentationHintMode, V as and, a3 as avg, N as between, P as contains, a0 as count, a1 as countDistinct, a9 as dashboardQuerySet, Z as defineNodeQueryAST, a8 as defineQuerySetAST, ab as defineSavedViewDescriptor, H as eq, aj as evaluateQueryASTPlannerGate, af as executeQueryASTLoadedAggregates, ag as filterQueryASTLoadedRows, _ as follow, $ as from, ah as getQueryASTRelationIndexRequirements, a6 as groupBy, J as gt, K as gte, a7 as having, O as includesAny, U as isNotNull, T as isNull, L as lt, M as lte, ai as matchesQueryASTLoadedRow, a5 as max, a4 as min, I as neq, X as not, W as or, ae as planQueryASTAggregates, Y as queryOperators, aa as querySetCount, R as startsWith, a2 as sum, ac as validateQueryAST, ad as validateSavedViewDescriptor } from '../query-ast-C3m6kZYv.js';
|
|
4
|
-
export { N as NodeStore } from '../store-
|
|
4
|
+
export { N as NodeStore } from '../store-CjjofiLR.js';
|
|
5
5
|
import { AuthAction, DID, AuthDenyReason, AuthDecision, ContentId } from '@xnetjs/core';
|
|
6
6
|
import { SQLiteAdapter, SQLiteOperationStats } from '@xnetjs/sqlite';
|
|
7
7
|
import '@xnetjs/crypto';
|
|
@@ -187,8 +187,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
187
187
|
* round-trips convoyed the single serial worker at boot.
|
|
188
188
|
*/
|
|
189
189
|
private compiledQueryDiagnosticsMemo;
|
|
190
|
-
private spatialTablesState;
|
|
191
|
-
private fullTextSearchTablesState;
|
|
192
190
|
private writeQueue;
|
|
193
191
|
/**
|
|
194
192
|
* Read-authorization filter applied before persisting a materialized view's
|
|
@@ -199,6 +197,21 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
199
197
|
private nodeReadAuthorizer?;
|
|
200
198
|
/** One-time guard: ensure the `auth_fingerprint` column exists on upgraded DBs. */
|
|
201
199
|
private materializationColumnsReady;
|
|
200
|
+
/**
|
|
201
|
+
* Descriptor→SQL compilation lives in `query-compiler.ts` (exploration
|
|
202
|
+
* 0276). Flags are read per-compile so the compiler never captures stale
|
|
203
|
+
* adapter state.
|
|
204
|
+
*/
|
|
205
|
+
private readonly queryCompiler;
|
|
206
|
+
/**
|
|
207
|
+
* The three sidecar index families — scalar / full-text / spatial — live
|
|
208
|
+
* behind `IndexingStrategy` in ./indexing (exploration 0276). Each takes
|
|
209
|
+
* the narrow `IndexingContext` capability set; table-existence memos live
|
|
210
|
+
* inside the family instances.
|
|
211
|
+
*/
|
|
212
|
+
private readonly scalarIndexing;
|
|
213
|
+
private readonly fullTextIndexing;
|
|
214
|
+
private readonly spatialIndexing;
|
|
202
215
|
constructor(db: SQLiteAdapter, options?: SQLiteNodeStorageAdapterOptions);
|
|
203
216
|
getSQLiteAdapter(): SQLiteAdapter;
|
|
204
217
|
open(): Promise<void>;
|
|
@@ -340,11 +353,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
340
353
|
private createAppendChangeOperation;
|
|
341
354
|
private createSetLastLamportTimeOperation;
|
|
342
355
|
private createInvalidateMaterializedViewsOperation;
|
|
343
|
-
private createDeleteRemovedPropertiesOperation;
|
|
344
|
-
private createScalarIndexOperations;
|
|
345
|
-
private createFullTextIndexOperations;
|
|
346
|
-
private countScalarIndexRowsForNode;
|
|
347
|
-
private hasSearchableNodeContent;
|
|
348
356
|
private syncTouchedIndexesForNodes;
|
|
349
357
|
/**
|
|
350
358
|
* Refresh the full query-planner statistics (`ANALYZE`). Call after a bulk
|
|
@@ -360,9 +368,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
360
368
|
optimize(): Promise<void>;
|
|
361
369
|
rebuildIndexesForSchemas(schemaIds: readonly SchemaIRI[], options?: RebuildNodeIndexesOptions): Promise<void>;
|
|
362
370
|
private rebuildIndexesForSchemasInternal;
|
|
363
|
-
private rebuildScalarIndexesForSchemas;
|
|
364
|
-
private rebuildSpatialIndexesForSchemas;
|
|
365
|
-
private rebuildFullTextIndexesForSchemas;
|
|
366
371
|
/**
|
|
367
372
|
* Rebuild the scalar sidecar from materialized node_properties.
|
|
368
373
|
*/
|
|
@@ -378,19 +383,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
378
383
|
* Clear all data (for testing or reset).
|
|
379
384
|
*/
|
|
380
385
|
clear(): Promise<void>;
|
|
381
|
-
private hydrateJoinedRows;
|
|
382
|
-
private buildHydrateChunkQuery;
|
|
383
|
-
private hydrateNodesByIds;
|
|
384
|
-
/**
|
|
385
|
-
* Aggregated hydrate (exploration 0264, Wave 2): collapse the EAV rows to
|
|
386
|
-
* ONE row per node inside SQL via `json_group_object`, so the boundary
|
|
387
|
-
* ships N rows instead of N × properties. `value` is stored as JSON text
|
|
388
|
-
* in a BLOB — `json(CAST(… AS TEXT))` re-emits it as real JSON inside the
|
|
389
|
-
* aggregate (without the cast/wrap it would double-encode as a string).
|
|
390
|
-
*/
|
|
391
|
-
private buildAggregatedHydrateChunkQuery;
|
|
392
|
-
/** Parse one-row-per-node aggregated hydrate results into NodeStates. */
|
|
393
|
-
private hydrateAggregatedRows;
|
|
394
386
|
/**
|
|
395
387
|
* Read (or refresh) a materialized view.
|
|
396
388
|
*
|
|
@@ -426,29 +418,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
426
418
|
private readMaterializedViewPage;
|
|
427
419
|
private invalidateMaterializedViewsForSchema;
|
|
428
420
|
private clearMaterializedViewRows;
|
|
429
|
-
private deleteRemovedProperties;
|
|
430
|
-
private syncScalarRowsForNode;
|
|
431
|
-
private prepareFullTextSearchQueryPlan;
|
|
432
|
-
private hasFullTextSearchTable;
|
|
433
|
-
private prepareSpatialQueryPlan;
|
|
434
|
-
private ensureSpatialTables;
|
|
435
|
-
private hasSpatialTables;
|
|
436
|
-
private createSpatialIndexConfig;
|
|
437
|
-
private syncSpatialRowsForNode;
|
|
438
|
-
private replaceSpatialRowForConfig;
|
|
439
|
-
private deleteSpatialRowsForNode;
|
|
440
|
-
private deleteSpatialRow;
|
|
441
|
-
private clearSpatialRowsForConfig;
|
|
442
|
-
private clearSpatialRows;
|
|
443
|
-
private buildSpatialIndexKey;
|
|
444
|
-
private getSpatialFieldConfig;
|
|
445
|
-
private getSpatialSearchBounds;
|
|
446
|
-
private getNodeSpatialBounds;
|
|
447
|
-
private getFiniteNumberProperty;
|
|
448
|
-
private toScalarIndexValue;
|
|
449
|
-
private hashScalarValue;
|
|
450
|
-
private stringifyStable;
|
|
451
|
-
private quoteSqlLiteral;
|
|
452
421
|
private quoteSqlIdentifier;
|
|
453
422
|
private recordQueryTelemetry;
|
|
454
423
|
/**
|
|
@@ -491,28 +460,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
491
460
|
private buildAdaptiveIndexDDL;
|
|
492
461
|
private getAdaptiveIndexColumns;
|
|
493
462
|
private countCompiledNodeQuery;
|
|
494
|
-
private compileNodeQuery;
|
|
495
|
-
/**
|
|
496
|
-
* A custom-property sort can push down when it is the descriptor's ONLY
|
|
497
|
-
* order key and no cursor/spatial/search accelerator is in play. Gated on
|
|
498
|
-
* the adaptive-indexing flag: the typed partial indexes on
|
|
499
|
-
* `node_property_scalars` make the join+order cheap, and the flag keeps
|
|
500
|
-
* the behavioural change opt-in while it soaks (exploration 0264).
|
|
501
|
-
*/
|
|
502
|
-
private resolvePropertySortPushdown;
|
|
503
|
-
private compileSqlQuery;
|
|
504
|
-
private getCompiledPostFilterReason;
|
|
505
|
-
private appendScalarPredicate;
|
|
506
|
-
/**
|
|
507
|
-
* ORDER BY for a pushed-down custom-property sort (0264). Mirrors the JS
|
|
508
|
-
* comparator in `applyNodeQueryDescriptor`: missing properties sort last
|
|
509
|
-
* ascending / first descending; typed value columns carry the order (for a
|
|
510
|
-
* homogeneous property exactly one is non-NULL). `n.id` breaks ties so the
|
|
511
|
-
* page boundary is a total order.
|
|
512
|
-
*/
|
|
513
|
-
private buildPropertySortOrderBy;
|
|
514
|
-
private buildSqlOrderBy;
|
|
515
|
-
private hasOnlySystemOrdering;
|
|
516
463
|
private serializePayload;
|
|
517
464
|
/**
|
|
518
465
|
* Serialize a change for the `changes` table (exploration 0272).
|
|
@@ -530,7 +477,6 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
|
|
|
530
477
|
*/
|
|
531
478
|
private serializeChangeRecord;
|
|
532
479
|
private serializeValue;
|
|
533
|
-
private deserializeValue;
|
|
534
480
|
private deserializeChange;
|
|
535
481
|
}
|
|
536
482
|
/**
|
package/dist/store/index.js
CHANGED
|
@@ -22,6 +22,7 @@ declare class NodeStore {
|
|
|
22
22
|
private changeSigner?;
|
|
23
23
|
private clock;
|
|
24
24
|
private conflicts;
|
|
25
|
+
private writeHost?;
|
|
25
26
|
private listeners;
|
|
26
27
|
private nodeListeners;
|
|
27
28
|
private batchListeners;
|
|
@@ -184,12 +185,7 @@ declare class NodeStore {
|
|
|
184
185
|
private appendImportedChanges;
|
|
185
186
|
private executeTransactionOperations;
|
|
186
187
|
/**
|
|
187
|
-
* Transaction fast path
|
|
188
|
-
* materialization and signing, then one transactional applyNodeBatch.
|
|
189
|
-
* Avoids the per-operation storage round trips of
|
|
190
|
-
* {@link executeTransactionOperations} and the adapter-level
|
|
191
|
-
* withTransaction snapshotting that dominates small interactive
|
|
192
|
-
* transactions.
|
|
188
|
+
* Transaction fast path — see `transaction-executor.ts` (0263/0264/0276).
|
|
193
189
|
*/
|
|
194
190
|
private executeTransactionOperationsFast;
|
|
195
191
|
/**
|
|
@@ -303,6 +299,12 @@ declare class NodeStore {
|
|
|
303
299
|
/**
|
|
304
300
|
* Apply a change to storage and update materialized state.
|
|
305
301
|
*/
|
|
302
|
+
/**
|
|
303
|
+
* The narrow capability set the write orchestration modules
|
|
304
|
+
* (transaction-executor.ts, batch-write-orchestrator.ts) run on — one seam
|
|
305
|
+
* for every write strategy (exploration 0276).
|
|
306
|
+
*/
|
|
307
|
+
private writeExecutionHost;
|
|
306
308
|
private applyChange;
|
|
307
309
|
private materializeNodeChange;
|
|
308
310
|
/**
|
|
@@ -312,7 +314,8 @@ declare class NodeStore {
|
|
|
312
314
|
*/
|
|
313
315
|
private applyPropertyChangeWithLWW;
|
|
314
316
|
/**
|
|
315
|
-
* Determine if newTs should replace existingTs (LWW).
|
|
317
|
+
* Determine if newTs should replace existingTs (LWW). Delegates to the ONE
|
|
318
|
+
* protocol ordering in `@xnetjs/core` (§L1.7; exploration 0276).
|
|
316
319
|
*/
|
|
317
320
|
private shouldReplace;
|
|
318
321
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xnetjs/data",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"nanoid": "^5.1.6",
|
|
58
58
|
"y-protocols": "^1.0.6",
|
|
59
59
|
"yjs": "^13.6.24",
|
|
60
|
-
"@xnetjs/crypto": "0.
|
|
61
|
-
"@xnetjs/
|
|
62
|
-
"@xnetjs/
|
|
63
|
-
"@xnetjs/
|
|
64
|
-
"@xnetjs/
|
|
65
|
-
"@xnetjs/
|
|
60
|
+
"@xnetjs/crypto": "0.4.0",
|
|
61
|
+
"@xnetjs/identity": "0.4.0",
|
|
62
|
+
"@xnetjs/sqlite": "0.4.0",
|
|
63
|
+
"@xnetjs/storage": "0.4.0",
|
|
64
|
+
"@xnetjs/sync": "0.4.0",
|
|
65
|
+
"@xnetjs/core": "0.4.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"tsup": "^8.0.0",
|