@fluidframework/tree 2.102.0 → 2.103.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/CHANGELOG.md +4 -0
- package/dist/codec/versioned/format.d.ts +5 -4
- package/dist/codec/versioned/format.d.ts.map +1 -1
- package/dist/codec/versioned/format.js +26 -3
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/core/rebase/types.d.ts +4 -3
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +27 -4
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/formatV1.d.ts +16 -15
- package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV1.js +31 -8
- package/dist/core/schema-stored/formatV1.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts +29 -28
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV2.js +33 -10
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +33 -10
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +25 -2
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts +19 -18
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js +33 -10
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js +36 -13
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +41 -18
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +26 -25
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +27 -4
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +24 -23
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js +30 -7
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +101 -36
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.js +26 -3
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +26 -3
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +48 -25
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -6
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +31 -8
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +34 -11
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +25 -2
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +15 -14
- package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js +27 -4
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +20 -19
- package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +27 -4
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +1 -3
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.d.ts +283 -282
- package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.js +63 -40
- package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.d.ts +180 -179
- package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.js +55 -32
- package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.d.ts +126 -125
- package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.js +27 -4
- package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +2 -2
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +28 -5
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +3 -3
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +2 -2
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +39 -16
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +33 -10
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +27 -4
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +25 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +31 -8
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js +29 -6
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +5 -0
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +37 -13
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +54 -31
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/dist/util/typeboxBrand.d.ts +1 -1
- package/dist/util/typeboxBrand.d.ts.map +1 -1
- package/dist/util/typeboxBrand.js +26 -3
- package/dist/util/typeboxBrand.js.map +1 -1
- package/dist/util/utils.d.ts +2 -2
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +25 -2
- package/dist/util/utils.js.map +1 -1
- package/eslint.config.mts +44 -0
- package/lib/codec/versioned/format.d.ts +5 -4
- package/lib/codec/versioned/format.d.ts.map +1 -1
- package/lib/codec/versioned/format.js +1 -1
- package/lib/codec/versioned/format.js.map +1 -1
- package/lib/core/rebase/types.d.ts +4 -3
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +1 -1
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/formatV1.d.ts +16 -15
- package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV1.js +1 -1
- package/lib/core/schema-stored/formatV1.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts +29 -28
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -1
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts +19 -18
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +26 -25
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +24 -23
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +101 -36
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.js +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +15 -14
- package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.js +1 -1
- package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +20 -19
- package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +1 -3
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.d.ts +283 -282
- package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.js +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.d.ts +180 -179
- package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.js +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.d.ts +126 -125
- package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.js +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +2 -2
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +1 -1
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +3 -3
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +1 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +2 -2
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +5 -0
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +35 -12
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/lib/util/typeboxBrand.d.ts +1 -1
- package/lib/util/typeboxBrand.d.ts.map +1 -1
- package/lib/util/typeboxBrand.js +1 -1
- package/lib/util/typeboxBrand.js.map +1 -1
- package/lib/util/utils.d.ts +2 -2
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +1 -1
- package/lib/util/utils.js.map +1 -1
- package/package.json +21 -21
- package/src/codec/versioned/format.ts +2 -1
- package/src/core/rebase/types.ts +1 -1
- package/src/core/schema-stored/formatV1.ts +2 -1
- package/src/core/schema-stored/formatV2.ts +2 -1
- package/src/core/tree/detachedFieldIndexFormatCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexFormatV2.ts +2 -1
- package/src/core/tree/persistedTreeTextFormat.ts +2 -1
- package/src/feature-libraries/chunked-forest/chunkTree.ts +3 -2
- package/src/feature-libraries/chunked-forest/codec/format/formatGeneric.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/format/formatV1.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/format/formatVText.ts +2 -1
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +131 -44
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -14
- package/src/feature-libraries/forest-summary/formatCommon.ts +2 -1
- package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +2 -1
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +2 -1
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +2 -1
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +2 -1
- package/src/feature-libraries/schema-index/formatV1.ts +2 -1
- package/src/feature-libraries/schema-index/formatV2.ts +2 -1
- package/src/feature-libraries/sequence-field/compose.ts +1 -4
- package/src/feature-libraries/sequence-field/formatV1.ts +2 -1
- package/src/feature-libraries/sequence-field/formatV2.ts +2 -1
- package/src/feature-libraries/sequence-field/formatV3.ts +2 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/sharedTree.ts +2 -5
- package/src/shared-tree/sharedTreeChangeFormat.ts +2 -1
- package/src/shared-tree/treeCheckout.ts +3 -6
- package/src/shared-tree-core/editManager.ts +2 -2
- package/src/shared-tree-core/editManagerFormatCommons.ts +2 -1
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -1
- package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +2 -1
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -1
- package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -1
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +2 -1
- package/src/simple-tree/core/treeNodeKernel.ts +39 -15
- package/src/simple-tree/simpleSchemaFormatV1.ts +2 -1
- package/src/util/typeboxBrand.ts +2 -1
- package/src/util/utils.ts +2 -1
|
@@ -3,21 +3,44 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
exports.EncodedChunkShapeV1 = exports.shapesV1 = exports.EncodedNodeShape = exports.EncodedValueShape = exports.SpecialField = exports.EncodedFieldShape = exports.EncodedAnyShape = exports.EncodedInlineArrayShape = exports.EncodedNestedArrayShape = void 0;
|
|
8
|
-
const
|
|
31
|
+
const Type = __importStar(require("@sinclair/typebox"));
|
|
9
32
|
const index_js_1 = require("../../../../codec/index.js");
|
|
10
33
|
const formatGeneric_js_1 = require("./formatGeneric.js");
|
|
11
34
|
exports.EncodedNestedArrayShape = formatGeneric_js_1.ShapeIndex;
|
|
12
|
-
exports.EncodedInlineArrayShape =
|
|
35
|
+
exports.EncodedInlineArrayShape = Type.Object({
|
|
13
36
|
length: formatGeneric_js_1.Count,
|
|
14
37
|
/**
|
|
15
38
|
* All entries are this shape.
|
|
16
39
|
*/
|
|
17
40
|
shape: formatGeneric_js_1.ShapeIndex,
|
|
18
41
|
}, { additionalProperties: false });
|
|
19
|
-
exports.EncodedAnyShape =
|
|
20
|
-
exports.EncodedFieldShape =
|
|
42
|
+
exports.EncodedAnyShape = Type.Literal(0);
|
|
43
|
+
exports.EncodedFieldShape = Type.Tuple([
|
|
21
44
|
/**
|
|
22
45
|
* Field key for this field.
|
|
23
46
|
*/
|
|
@@ -63,30 +86,30 @@ var SpecialField;
|
|
|
63
86
|
* @remarks
|
|
64
87
|
* See {@link EncodedNodeShape} for usage.
|
|
65
88
|
*/
|
|
66
|
-
exports.EncodedValueShape =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
exports.EncodedValueShape = Type.Union([
|
|
90
|
+
Type.Boolean(),
|
|
91
|
+
Type.Array(Type.Any(), { minItems: 1, maxItems: 1 }),
|
|
92
|
+
Type.Enum(SpecialField),
|
|
70
93
|
// TODO: support delta encoding and/or special node identifier handling
|
|
71
94
|
// EncodedCounter,
|
|
72
95
|
]);
|
|
73
|
-
exports.EncodedNodeShape =
|
|
96
|
+
exports.EncodedNodeShape = Type.Object({
|
|
74
97
|
/**
|
|
75
98
|
* If not provided, inlined in data.
|
|
76
99
|
*/
|
|
77
|
-
type:
|
|
78
|
-
value:
|
|
100
|
+
type: Type.Optional(formatGeneric_js_1.IdentifierOrIndex),
|
|
101
|
+
value: Type.Optional(exports.EncodedValueShape),
|
|
79
102
|
/**
|
|
80
103
|
* Fields with fixed (per key) shapes.
|
|
81
104
|
* They are encoded in the order they are specified here.
|
|
82
105
|
* To ensure the order is preserved, this is an array instead of an object with keys.
|
|
83
106
|
*/
|
|
84
|
-
fields:
|
|
107
|
+
fields: Type.Optional(Type.Array(exports.EncodedFieldShape)),
|
|
85
108
|
/**
|
|
86
109
|
* If undefined, no data. Otherwise, nested array of `[key, ...data]*`
|
|
87
110
|
* Covers any fields beyond those in `fields`.
|
|
88
111
|
*/
|
|
89
|
-
extraFields:
|
|
112
|
+
extraFields: Type.Optional(formatGeneric_js_1.ShapeIndex),
|
|
90
113
|
}, { additionalProperties: false });
|
|
91
114
|
/**
|
|
92
115
|
* The chunk shapes supported by the V1 format.
|
|
@@ -97,19 +120,19 @@ exports.shapesV1 = {
|
|
|
97
120
|
/**
|
|
98
121
|
* {@link EncodedNestedArrayShape} union member.
|
|
99
122
|
*/
|
|
100
|
-
a:
|
|
123
|
+
a: Type.Optional(exports.EncodedNestedArrayShape),
|
|
101
124
|
/**
|
|
102
125
|
* {@link EncodedInlineArrayShape} union member.
|
|
103
126
|
*/
|
|
104
|
-
b:
|
|
127
|
+
b: Type.Optional(exports.EncodedInlineArrayShape),
|
|
105
128
|
/**
|
|
106
129
|
* {@link EncodedNodeShape} union member.
|
|
107
130
|
*/
|
|
108
|
-
c:
|
|
131
|
+
c: Type.Optional(exports.EncodedNodeShape),
|
|
109
132
|
/**
|
|
110
133
|
* {@link EncodedAnyShape} union member.
|
|
111
134
|
*/
|
|
112
|
-
d:
|
|
135
|
+
d: Type.Optional(exports.EncodedAnyShape),
|
|
113
136
|
};
|
|
114
|
-
exports.EncodedChunkShapeV1 =
|
|
137
|
+
exports.EncodedChunkShapeV1 = Type.Object({ ...exports.shapesV1, e: Type.Optional(Type.Never()) }, index_js_1.unionOptions);
|
|
115
138
|
//# sourceMappingURL=formatV1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAA0C;AAG1C,yDAA0D;AAE1D,yDAA0E;AAO7D,QAAA,uBAAuB,GAAG,6BAAU,CAAC;AAMrC,QAAA,uBAAuB,GAAG,IAAI,CAAC,MAAM,CACjD;IACC,MAAM,EAAE,wBAAK;IACb;;OAEG;IACH,KAAK,EAAE,6BAAU;CACjB,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAC/B,CAAC;AAQW,QAAA,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAOlC,QAAA,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3C;;OAEG;IACH,oCAAiB;IACjB;;OAEG;IACH,6BAAU;CACV,CAAC,CAAC;AAEH;;GAEG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACvB;;OAEG;IACH,2DAAc,CAAA;AACf,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;IACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACpD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IACvB,uEAAuE;IACvE,kBAAkB;CAClB,CAAC,CAAC;AAOU,QAAA,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAC1C;IACC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,oCAAiB,CAAC;IACtC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACvC;;;;OAIG;IACH,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,yBAAiB,CAAC,CAAC;IACpD;;;OAGG;IACH,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,6BAAU,CAAC;CACtC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAC/B,CAAC;AAEF;;;;GAIG;AACU,QAAA,QAAQ,GAAG;IACvB;;OAEG;IACH,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,+BAAuB,CAAC;IACzC;;OAEG;IACH,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,+BAAuB,CAAC;IACzC;;OAEG;IACH,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,wBAAgB,CAAC;IAClC;;OAEG;IACH,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,uBAAe,CAAC;CACxB,CAAC;AAkBE,QAAA,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAC7C,EAAE,GAAG,gBAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAC/C,uBAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as Type from \"@sinclair/typebox\";\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../../../codec/index.js\";\n\nimport { Count, IdentifierOrIndex, ShapeIndex } from \"./formatGeneric.js\";\n\n/**\n * Top level length is implied from length of data array.\n * All content are of this shape.\n */\nexport type EncodedNestedArrayShape = Static<typeof EncodedNestedArrayShape>;\nexport const EncodedNestedArrayShape = ShapeIndex;\n\n/**\n * Inline array.\n */\nexport type EncodedInlineArrayShape = Static<typeof EncodedInlineArrayShape>;\nexport const EncodedInlineArrayShape = Type.Object(\n\t{\n\t\tlength: Count,\n\t\t/**\n\t\t * All entries are this shape.\n\t\t */\n\t\tshape: ShapeIndex,\n\t},\n\t{ additionalProperties: false },\n);\n\n/**\n * Encoded as `shape, ...[data for shape]`.\n *\n * Used for polymorphism.\n */\nexport type EncodedAnyShape = Static<typeof EncodedAnyShape>;\nexport const EncodedAnyShape = Type.Literal(0);\n\n/**\n * Content of the encoded field is specified by the Shape referenced by the ShapeIndex.\n * This is a tuple for conciseness.\n */\nexport type EncodedFieldShape = Static<typeof EncodedFieldShape>;\nexport const EncodedFieldShape = Type.Tuple([\n\t/**\n\t * Field key for this field.\n\t */\n\tIdentifierOrIndex,\n\t/**\n\t * Shape of data in this field.\n\t */\n\tShapeIndex,\n]);\n\n/**\n * Used in {@link EncodedValueShape} for special field kind handling.\n */\nexport enum SpecialField {\n\t/**\n\t * Special case for Identifier field kind.\n\t */\n\tIdentifier = 0,\n}\n\n/**\n * Shape of a value on a node.\n *\n * Due to limitations of TypeBox and differences between JavaScript objects, TypeScript types and JSON,\n * the case where no information about the value is captured in the shape is a bit confusing.\n * In TypeBox this is allowed by the user of this type putting it in an optional property.\n * In TypeScript it is modeled using `undefined`.\n * In JavaScript the property may be missing or explicitly `undefined`.\n * In JSON this will serialize as the property being omitted.\n * In this case, the value will be encoded as either:\n * - `false` (when there is no value) OR\n * - `true, value` when there is a value.\n *\n * For a more compact encoding, there are 4 options for the shape:\n * - `true`: there is a value, and it will simply be encoded by putting it in the output buffer (so `value`).\n * - `false`: there is never a value, and it takes up no space in the output buffer.\n * - `[value]`: there is a value, and its always the same.\n * - `SpecialField.Identifier`: special case for node identifier handling.\n * Takes up no space in the output buffer: the value comes from the shape arrays's content.\n * It is wrapped in an array to differentiate value shape types.\n *\n * In the future other value shape formats may be added, likely as objects.\n *\n * @remarks\n * See {@link EncodedNodeShape} for usage.\n */\nexport const EncodedValueShape = Type.Union([\n\tType.Boolean(),\n\tType.Array(Type.Any(), { minItems: 1, maxItems: 1 }),\n\tType.Enum(SpecialField),\n\t// TODO: support delta encoding and/or special node identifier handling\n\t// EncodedCounter,\n]);\nexport type EncodedValueShape = undefined | Static<typeof EncodedValueShape>;\n\n/**\n * The encoded form of a {@link Shape} for a node.\n */\nexport type EncodedNodeShape = Static<typeof EncodedNodeShape>;\nexport const EncodedNodeShape = Type.Object(\n\t{\n\t\t/**\n\t\t * If not provided, inlined in data.\n\t\t */\n\t\ttype: Type.Optional(IdentifierOrIndex),\n\t\tvalue: Type.Optional(EncodedValueShape),\n\t\t/**\n\t\t * Fields with fixed (per key) shapes.\n\t\t * They are encoded in the order they are specified here.\n\t\t * To ensure the order is preserved, this is an array instead of an object with keys.\n\t\t */\n\t\tfields: Type.Optional(Type.Array(EncodedFieldShape)),\n\t\t/**\n\t\t * If undefined, no data. Otherwise, nested array of `[key, ...data]*`\n\t\t * Covers any fields beyond those in `fields`.\n\t\t */\n\t\textraFields: Type.Optional(ShapeIndex),\n\t},\n\t{ additionalProperties: false },\n);\n\n/**\n * The chunk shapes supported by the V1 format.\n * @remarks\n * See {@link EncodedChunkShapeV1}.\n */\nexport const shapesV1 = {\n\t/**\n\t * {@link EncodedNestedArrayShape} union member.\n\t */\n\ta: Type.Optional(EncodedNestedArrayShape),\n\t/**\n\t * {@link EncodedInlineArrayShape} union member.\n\t */\n\tb: Type.Optional(EncodedInlineArrayShape),\n\t/**\n\t * {@link EncodedNodeShape} union member.\n\t */\n\tc: Type.Optional(EncodedNodeShape),\n\t/**\n\t * {@link EncodedAnyShape} union member.\n\t */\n\td: Type.Optional(EncodedAnyShape),\n} as const;\n\n/**\n * Discriminated union that represents the shapes of chunks in the encoded data.\n * \"Chunk\" here refers to a chunk of tree data, rooted at a range of nodes, that is encoded as a\n * single unit in a specific format represented by one of the shapes in this union.\n *\n * The concept of \"chunk\" is same for the tree data in memory and in the encoded wire format.\n * The physical representation of the chunk may differ, but the logical structure remains the same.\n * This is similar to other such concepts in the system.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n * @privateRemarks\n * Because the TypeScript types for how we model these unions don't require exactly one property,\n * to prevent a union with more options from being assignable to this one, we include Never.\n * This matters in this case because the V2 format only differs in that it has another entry in this Union.\n */\nexport type EncodedChunkShapeV1 = Static<typeof EncodedChunkShapeV1>;\nexport const EncodedChunkShapeV1 = Type.Object(\n\t{ ...shapesV1, e: Type.Optional(Type.Never()) },\n\tunionOptions,\n);\n"]}
|
|
@@ -2,32 +2,33 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import * as Type from "@sinclair/typebox";
|
|
6
|
+
import type { Static } from "@sinclair/typebox";
|
|
6
7
|
/**
|
|
7
8
|
* Encoded content is a {@link ChunkReferenceId}.
|
|
8
9
|
* This represents the shape of a chunk that is encoded separately and is referenced by its {@link ChunkReferenceId}.
|
|
9
10
|
*/
|
|
10
11
|
export type EncodedIncrementalChunkShape = Static<typeof EncodedIncrementalChunkShape>;
|
|
11
|
-
export declare const EncodedIncrementalChunkShape:
|
|
12
|
+
export declare const EncodedIncrementalChunkShape: Type.TLiteral<0>;
|
|
12
13
|
/**
|
|
13
14
|
* The chunk shapes supported by the V2 format.
|
|
14
15
|
* @remarks
|
|
15
16
|
* See {@link EncodedChunkShapeV2}.
|
|
16
17
|
*/
|
|
17
18
|
export declare const shapesV2: {
|
|
18
|
-
readonly e:
|
|
19
|
-
readonly a:
|
|
20
|
-
readonly b:
|
|
21
|
-
length:
|
|
22
|
-
shape:
|
|
19
|
+
readonly e: Type.TOptional<Type.TLiteral<0>>;
|
|
20
|
+
readonly a: Type.TOptional<Type.TNumber>;
|
|
21
|
+
readonly b: Type.TOptional<Type.TObject<{
|
|
22
|
+
length: Type.TNumber;
|
|
23
|
+
shape: Type.TNumber;
|
|
23
24
|
}>>;
|
|
24
|
-
readonly c:
|
|
25
|
-
type:
|
|
26
|
-
value:
|
|
27
|
-
fields:
|
|
28
|
-
extraFields:
|
|
25
|
+
readonly c: Type.TOptional<Type.TObject<{
|
|
26
|
+
type: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
27
|
+
value: Type.TOptional<Type.TUnion<[Type.TBoolean, Type.TArray<Type.TAny>, Type.TEnum<typeof import("./formatV1.js").SpecialField>]>>;
|
|
28
|
+
fields: Type.TOptional<Type.TArray<Type.TTuple<[Type.TUnion<[Type.TString, Type.TNumber]>, Type.TNumber]>>>;
|
|
29
|
+
extraFields: Type.TOptional<Type.TNumber>;
|
|
29
30
|
}>>;
|
|
30
|
-
readonly d:
|
|
31
|
+
readonly d: Type.TOptional<Type.TLiteral<0>>;
|
|
31
32
|
};
|
|
32
33
|
/**
|
|
33
34
|
* V2 extension of {@link EncodedChunkShapeV1}.
|
|
@@ -35,19 +36,19 @@ export declare const shapesV2: {
|
|
|
35
36
|
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
36
37
|
*/
|
|
37
38
|
export type EncodedChunkShapeV2 = Static<typeof EncodedChunkShapeV2>;
|
|
38
|
-
export declare const EncodedChunkShapeV2:
|
|
39
|
-
readonly e:
|
|
40
|
-
readonly a:
|
|
41
|
-
readonly b:
|
|
42
|
-
length:
|
|
43
|
-
shape:
|
|
39
|
+
export declare const EncodedChunkShapeV2: Type.TObject<{
|
|
40
|
+
readonly e: Type.TOptional<Type.TLiteral<0>>;
|
|
41
|
+
readonly a: Type.TOptional<Type.TNumber>;
|
|
42
|
+
readonly b: Type.TOptional<Type.TObject<{
|
|
43
|
+
length: Type.TNumber;
|
|
44
|
+
shape: Type.TNumber;
|
|
44
45
|
}>>;
|
|
45
|
-
readonly c:
|
|
46
|
-
type:
|
|
47
|
-
value:
|
|
48
|
-
fields:
|
|
49
|
-
extraFields:
|
|
46
|
+
readonly c: Type.TOptional<Type.TObject<{
|
|
47
|
+
type: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
48
|
+
value: Type.TOptional<Type.TUnion<[Type.TBoolean, Type.TArray<Type.TAny>, Type.TEnum<typeof import("./formatV1.js").SpecialField>]>>;
|
|
49
|
+
fields: Type.TOptional<Type.TArray<Type.TTuple<[Type.TUnion<[Type.TString, Type.TNumber]>, Type.TNumber]>>>;
|
|
50
|
+
extraFields: Type.TOptional<Type.TNumber>;
|
|
50
51
|
}>>;
|
|
51
|
-
readonly d:
|
|
52
|
+
readonly d: Type.TOptional<Type.TLiteral<0>>;
|
|
52
53
|
}>;
|
|
53
54
|
//# sourceMappingURL=formatV2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAMhD;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACvF,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;CAGX,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;EAAsC,CAAC"}
|
|
@@ -3,12 +3,35 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
exports.EncodedChunkShapeV2 = exports.shapesV2 = exports.EncodedIncrementalChunkShape = void 0;
|
|
8
|
-
const
|
|
31
|
+
const Type = __importStar(require("@sinclair/typebox"));
|
|
9
32
|
const index_js_1 = require("../../../../codec/index.js");
|
|
10
33
|
const formatV1_js_1 = require("./formatV1.js");
|
|
11
|
-
exports.EncodedIncrementalChunkShape =
|
|
34
|
+
exports.EncodedIncrementalChunkShape = Type.Literal(0);
|
|
12
35
|
/**
|
|
13
36
|
* The chunk shapes supported by the V2 format.
|
|
14
37
|
* @remarks
|
|
@@ -16,7 +39,7 @@ exports.EncodedIncrementalChunkShape = typebox_1.Type.Literal(0);
|
|
|
16
39
|
*/
|
|
17
40
|
exports.shapesV2 = {
|
|
18
41
|
...formatV1_js_1.shapesV1,
|
|
19
|
-
e:
|
|
42
|
+
e: Type.Optional(exports.EncodedIncrementalChunkShape),
|
|
20
43
|
};
|
|
21
|
-
exports.EncodedChunkShapeV2 =
|
|
44
|
+
exports.EncodedChunkShapeV2 = Type.Object(exports.shapesV2, index_js_1.unionOptions);
|
|
22
45
|
//# sourceMappingURL=formatV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAA0C;AAG1C,yDAA0D;AAE1D,+CAAyC;AAO5B,QAAA,4BAA4B,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAE5D;;;;GAIG;AACU,QAAA,QAAQ,GAAG;IACvB,GAAG,sBAAQ;IACX,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,oCAA4B,CAAC;CACrC,CAAC;AAQE,QAAA,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAQ,EAAE,uBAAY,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as Type from \"@sinclair/typebox\";\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../../../codec/index.js\";\n\nimport { shapesV1 } from \"./formatV1.js\";\n\n/**\n * Encoded content is a {@link ChunkReferenceId}.\n * This represents the shape of a chunk that is encoded separately and is referenced by its {@link ChunkReferenceId}.\n */\nexport type EncodedIncrementalChunkShape = Static<typeof EncodedIncrementalChunkShape>;\nexport const EncodedIncrementalChunkShape = Type.Literal(0);\n\n/**\n * The chunk shapes supported by the V2 format.\n * @remarks\n * See {@link EncodedChunkShapeV2}.\n */\nexport const shapesV2 = {\n\t...shapesV1,\n\te: Type.Optional(EncodedIncrementalChunkShape),\n} as const;\n\n/**\n * V2 extension of {@link EncodedChunkShapeV1}.\n * @remarks\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport type EncodedChunkShapeV2 = Static<typeof EncodedChunkShapeV2>;\nexport const EncodedChunkShapeV2 = Type.Object(shapesV2, unionOptions);\n"]}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import * as Type from "@sinclair/typebox";
|
|
6
|
+
import type { Static } from "@sinclair/typebox";
|
|
6
7
|
/**
|
|
7
8
|
* A node shape that derives from another node shape by overlaying property-level overrides.
|
|
8
9
|
*
|
|
@@ -27,14 +28,14 @@ import { type Static } from "@sinclair/typebox";
|
|
|
27
28
|
* Decoded by {@link applySpecialization}.
|
|
28
29
|
*/
|
|
29
30
|
export type EncodedSpecializedNodeShape = Static<typeof EncodedSpecializedNodeShape>;
|
|
30
|
-
export declare const EncodedSpecializedNodeShape:
|
|
31
|
+
export declare const EncodedSpecializedNodeShape: Type.TObject<{
|
|
31
32
|
/**
|
|
32
33
|
* Index into the enclosing batch's shapes array of the shape this specializes.
|
|
33
34
|
* Must resolve to either an {@link EncodedNodeShape} or another
|
|
34
35
|
* `EncodedSpecializedNodeShape`; chains are followed transitively until a node shape
|
|
35
36
|
* is reached. This restriction is enforced at runtime, not by the schema.
|
|
36
37
|
*/
|
|
37
|
-
base:
|
|
38
|
+
base: Type.TNumber;
|
|
38
39
|
/**
|
|
39
40
|
* Field-level overrides applied to the resolved base's `fields`. Entries whose key
|
|
40
41
|
* matches a base field replace that field's shape index in place; entries with new
|
|
@@ -42,17 +43,17 @@ export declare const EncodedSpecializedNodeShape: import("@sinclair/typebox").TO
|
|
|
42
43
|
* is preserved — this is the stream consumption order at decode time, so encoders
|
|
43
44
|
* must serialize per-field tokens in the resulting field order, not in this list's order.
|
|
44
45
|
*/
|
|
45
|
-
fields:
|
|
46
|
+
fields: Type.TOptional<Type.TArray<Type.TTuple<[Type.TUnion<[Type.TString, Type.TNumber]>, Type.TNumber]>>>;
|
|
46
47
|
/**
|
|
47
48
|
* If absent, inherits the resolved base's value shape. If `null`, the resulting shape
|
|
48
49
|
* has no value shape (explicit clear). Any other value replaces the base's.
|
|
49
50
|
*/
|
|
50
|
-
value:
|
|
51
|
+
value: Type.TOptional<Type.TUnion<[Type.TUnion<[Type.TBoolean, Type.TArray<Type.TAny>, Type.TEnum<typeof import("./formatV1.js").SpecialField>]>, Type.TNull]>>;
|
|
51
52
|
/**
|
|
52
53
|
* If absent, inherits the resolved base's extraFields shape. If `null`, the resulting
|
|
53
54
|
* shape has no extraFields (explicit clear). Any other value replaces the base's.
|
|
54
55
|
*/
|
|
55
|
-
extraFields:
|
|
56
|
+
extraFields: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
56
57
|
}>;
|
|
57
58
|
/**
|
|
58
59
|
* Experimental extension of {@link EncodedChunkShapeV2}.
|
|
@@ -60,15 +61,15 @@ export declare const EncodedSpecializedNodeShape: import("@sinclair/typebox").TO
|
|
|
60
61
|
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
61
62
|
*/
|
|
62
63
|
export type EncodedChunkShapeVTextExperimental = Static<typeof EncodedChunkShapeVTextExperimental>;
|
|
63
|
-
export declare const EncodedChunkShapeVTextExperimental:
|
|
64
|
-
f:
|
|
64
|
+
export declare const EncodedChunkShapeVTextExperimental: Type.TObject<{
|
|
65
|
+
f: Type.TOptional<Type.TObject<{
|
|
65
66
|
/**
|
|
66
67
|
* Index into the enclosing batch's shapes array of the shape this specializes.
|
|
67
68
|
* Must resolve to either an {@link EncodedNodeShape} or another
|
|
68
69
|
* `EncodedSpecializedNodeShape`; chains are followed transitively until a node shape
|
|
69
70
|
* is reached. This restriction is enforced at runtime, not by the schema.
|
|
70
71
|
*/
|
|
71
|
-
base:
|
|
72
|
+
base: Type.TNumber;
|
|
72
73
|
/**
|
|
73
74
|
* Field-level overrides applied to the resolved base's `fields`. Entries whose key
|
|
74
75
|
* matches a base field replace that field's shape index in place; entries with new
|
|
@@ -76,30 +77,30 @@ export declare const EncodedChunkShapeVTextExperimental: import("@sinclair/typeb
|
|
|
76
77
|
* is preserved — this is the stream consumption order at decode time, so encoders
|
|
77
78
|
* must serialize per-field tokens in the resulting field order, not in this list's order.
|
|
78
79
|
*/
|
|
79
|
-
fields:
|
|
80
|
+
fields: Type.TOptional<Type.TArray<Type.TTuple<[Type.TUnion<[Type.TString, Type.TNumber]>, Type.TNumber]>>>;
|
|
80
81
|
/**
|
|
81
82
|
* If absent, inherits the resolved base's value shape. If `null`, the resulting shape
|
|
82
83
|
* has no value shape (explicit clear). Any other value replaces the base's.
|
|
83
84
|
*/
|
|
84
|
-
value:
|
|
85
|
+
value: Type.TOptional<Type.TUnion<[Type.TUnion<[Type.TBoolean, Type.TArray<Type.TAny>, Type.TEnum<typeof import("./formatV1.js").SpecialField>]>, Type.TNull]>>;
|
|
85
86
|
/**
|
|
86
87
|
* If absent, inherits the resolved base's extraFields shape. If `null`, the resulting
|
|
87
88
|
* shape has no extraFields (explicit clear). Any other value replaces the base's.
|
|
88
89
|
*/
|
|
89
|
-
extraFields:
|
|
90
|
+
extraFields: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
90
91
|
}>>;
|
|
91
|
-
e:
|
|
92
|
-
a:
|
|
93
|
-
b:
|
|
94
|
-
length:
|
|
95
|
-
shape:
|
|
92
|
+
e: Type.TOptional<Type.TLiteral<0>>;
|
|
93
|
+
a: Type.TOptional<Type.TNumber>;
|
|
94
|
+
b: Type.TOptional<Type.TObject<{
|
|
95
|
+
length: Type.TNumber;
|
|
96
|
+
shape: Type.TNumber;
|
|
96
97
|
}>>;
|
|
97
|
-
c:
|
|
98
|
-
type:
|
|
99
|
-
value:
|
|
100
|
-
fields:
|
|
101
|
-
extraFields:
|
|
98
|
+
c: Type.TOptional<Type.TObject<{
|
|
99
|
+
type: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
100
|
+
value: Type.TOptional<Type.TUnion<[Type.TBoolean, Type.TArray<Type.TAny>, Type.TEnum<typeof import("./formatV1.js").SpecialField>]>>;
|
|
101
|
+
fields: Type.TOptional<Type.TArray<Type.TTuple<[Type.TUnion<[Type.TString, Type.TNumber]>, Type.TNumber]>>>;
|
|
102
|
+
extraFields: Type.TOptional<Type.TNumber>;
|
|
102
103
|
}>>;
|
|
103
|
-
d:
|
|
104
|
+
d: Type.TOptional<Type.TLiteral<0>>;
|
|
104
105
|
}>;
|
|
105
106
|
//# sourceMappingURL=formatVText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatVText.d.ts","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatVText.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"formatVText.d.ts","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatVText.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAQhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AACrF,eAAO,MAAM,2BAA2B;IAEtC;;;;;OAKG;;IAEH;;;;;;OAMG;;IAEH;;;OAGG;;IAEH;;;OAGG;;EAIJ,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACtD,OAAO,kCAAkC,CACzC,CAAC;AACF,eAAO,MAAM,kCAAkC;;QArC7C;;;;;WAKG;;QAEH;;;;;;WAMG;;QAEH;;;WAGG;;QAEH;;;WAGG;;;;;;;;;;;;;;;;EAoBJ,CAAC"}
|
|
@@ -3,14 +3,37 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
exports.EncodedChunkShapeVTextExperimental = exports.EncodedSpecializedNodeShape = void 0;
|
|
8
|
-
const
|
|
31
|
+
const Type = __importStar(require("@sinclair/typebox"));
|
|
9
32
|
const index_js_1 = require("../../../../codec/index.js");
|
|
10
33
|
const formatGeneric_js_1 = require("./formatGeneric.js");
|
|
11
34
|
const formatV1_js_1 = require("./formatV1.js");
|
|
12
35
|
const formatV2_js_1 = require("./formatV2.js");
|
|
13
|
-
exports.EncodedSpecializedNodeShape =
|
|
36
|
+
exports.EncodedSpecializedNodeShape = Type.Object({
|
|
14
37
|
/**
|
|
15
38
|
* Index into the enclosing batch's shapes array of the shape this specializes.
|
|
16
39
|
* Must resolve to either an {@link EncodedNodeShape} or another
|
|
@@ -25,20 +48,20 @@ exports.EncodedSpecializedNodeShape = typebox_1.Type.Object({
|
|
|
25
48
|
* is preserved — this is the stream consumption order at decode time, so encoders
|
|
26
49
|
* must serialize per-field tokens in the resulting field order, not in this list's order.
|
|
27
50
|
*/
|
|
28
|
-
fields:
|
|
51
|
+
fields: Type.Optional(Type.Array(formatV1_js_1.EncodedFieldShape)),
|
|
29
52
|
/**
|
|
30
53
|
* If absent, inherits the resolved base's value shape. If `null`, the resulting shape
|
|
31
54
|
* has no value shape (explicit clear). Any other value replaces the base's.
|
|
32
55
|
*/
|
|
33
|
-
value:
|
|
56
|
+
value: Type.Optional(Type.Union([formatV1_js_1.EncodedValueShape, Type.Null()])),
|
|
34
57
|
/**
|
|
35
58
|
* If absent, inherits the resolved base's extraFields shape. If `null`, the resulting
|
|
36
59
|
* shape has no extraFields (explicit clear). Any other value replaces the base's.
|
|
37
60
|
*/
|
|
38
|
-
extraFields:
|
|
61
|
+
extraFields: Type.Optional(Type.Union([formatGeneric_js_1.ShapeIndex, Type.Null()])),
|
|
39
62
|
}, { additionalProperties: false });
|
|
40
|
-
exports.EncodedChunkShapeVTextExperimental =
|
|
63
|
+
exports.EncodedChunkShapeVTextExperimental = Type.Object({
|
|
41
64
|
...formatV2_js_1.shapesV2,
|
|
42
|
-
f:
|
|
65
|
+
f: Type.Optional(exports.EncodedSpecializedNodeShape),
|
|
43
66
|
}, index_js_1.unionOptions);
|
|
44
67
|
//# sourceMappingURL=formatVText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatVText.js","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatVText.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"formatVText.js","sourceRoot":"","sources":["../../../../../src/feature-libraries/chunked-forest/codec/format/formatVText.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAA0C;AAG1C,yDAA0D;AAE1D,yDAAgD;AAChD,+CAAqE;AACrE,+CAAyC;AA0B5B,QAAA,2BAA2B,GAAG,IAAI,CAAC,MAAM,CACrD;IACC;;;;;OAKG;IACH,IAAI,EAAE,6BAAU;IAChB;;;;;;OAMG;IACH,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,+BAAiB,CAAC,CAAC;IACpD;;;OAGG;IACH,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,+BAAiB,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAClE;;;OAGG;IACH,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,6BAAU,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;CACjE,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAC/B,CAAC;AAUW,QAAA,kCAAkC,GAAG,IAAI,CAAC,MAAM,CAC5D;IACC,GAAG,sBAAQ;IACX,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,mCAA2B,CAAC;CAC7C,EACD,uBAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as Type from \"@sinclair/typebox\";\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../../../codec/index.js\";\n\nimport { ShapeIndex } from \"./formatGeneric.js\";\nimport { EncodedFieldShape, EncodedValueShape } from \"./formatV1.js\";\nimport { shapesV2 } from \"./formatV2.js\";\n\n/**\n * A node shape that derives from another node shape by overlaying property-level overrides.\n *\n * @remarks\n * Compresses runs of node shapes that differ only in a few properties: a base node shape\n * defines the structural skeleton, and the specialization narrows specific properties.\n *\n * For example, a base `FormatNode` with a variable-boolean `bold` field can be specialized\n * to a shape that pins `bold` to a constant `true` — every node decoded with the\n * specialization contributes zero stream tokens for `bold`.\n *\n * Specialization rules: `type` is always inherited from the resolved base. `fields` overrides\n * apply per-key: entries whose key matches a base field replace that entry's shape index in\n * place; entries with new keys are appended after all base fields. For `value` and\n * `extraFields`: if the property is absent on the wire, the base's value is inherited; if\n * `null`, the resulting shape has no value / no extraFields (explicit clear); any other value\n * replaces the base's.\n *\n * The `null` sentinel exists because JSON does not preserve `undefined`-valued properties,\n * so override-vs-inherit cannot be discriminated by property presence after persistence.\n *\n * Decoded by {@link applySpecialization}.\n */\nexport type EncodedSpecializedNodeShape = Static<typeof EncodedSpecializedNodeShape>;\nexport const EncodedSpecializedNodeShape = Type.Object(\n\t{\n\t\t/**\n\t\t * Index into the enclosing batch's shapes array of the shape this specializes.\n\t\t * Must resolve to either an {@link EncodedNodeShape} or another\n\t\t * `EncodedSpecializedNodeShape`; chains are followed transitively until a node shape\n\t\t * is reached. This restriction is enforced at runtime, not by the schema.\n\t\t */\n\t\tbase: ShapeIndex,\n\t\t/**\n\t\t * Field-level overrides applied to the resolved base's `fields`. Entries whose key\n\t\t * matches a base field replace that field's shape index in place; entries with new\n\t\t * keys are appended after all base fields, in the order given here. Base field order\n\t\t * is preserved — this is the stream consumption order at decode time, so encoders\n\t\t * must serialize per-field tokens in the resulting field order, not in this list's order.\n\t\t */\n\t\tfields: Type.Optional(Type.Array(EncodedFieldShape)),\n\t\t/**\n\t\t * If absent, inherits the resolved base's value shape. If `null`, the resulting shape\n\t\t * has no value shape (explicit clear). Any other value replaces the base's.\n\t\t */\n\t\tvalue: Type.Optional(Type.Union([EncodedValueShape, Type.Null()])),\n\t\t/**\n\t\t * If absent, inherits the resolved base's extraFields shape. If `null`, the resulting\n\t\t * shape has no extraFields (explicit clear). Any other value replaces the base's.\n\t\t */\n\t\textraFields: Type.Optional(Type.Union([ShapeIndex, Type.Null()])),\n\t},\n\t{ additionalProperties: false },\n);\n\n/**\n * Experimental extension of {@link EncodedChunkShapeV2}.\n * @remarks\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport type EncodedChunkShapeVTextExperimental = Static<\n\ttypeof EncodedChunkShapeVTextExperimental\n>;\nexport const EncodedChunkShapeVTextExperimental = Type.Object(\n\t{\n\t\t...shapesV2,\n\t\tf: Type.Optional(EncodedSpecializedNodeShape),\n\t},\n\tunionOptions,\n);\n"]}
|