@dialecte/core 0.0.13 → 0.0.15
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/chain-methods/chain-assembler.d.ts +5 -4
- package/dist/chain-methods/chain-assembler.d.ts.map +1 -1
- package/dist/chain-methods/chain-creator.d.ts +13 -13
- package/dist/chain-methods/chain-creator.d.ts.map +1 -1
- package/dist/chain-methods/ending/queries/descendants/filter-utils.helper.d.ts +5 -3
- package/dist/chain-methods/ending/queries/descendants/filter-utils.helper.d.ts.map +1 -1
- package/dist/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts +9 -0
- package/dist/chain-methods/ending/queries/descendants/find-descendants-as-tree.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts +2 -2
- package/dist/chain-methods/ending/queries/descendants/find-descendants.d.ts.map +1 -1
- package/dist/chain-methods/ending/queries/descendants/group-records.helper.d.ts +5 -11
- package/dist/chain-methods/ending/queries/descendants/group-records.helper.d.ts.map +1 -1
- package/dist/chain-methods/ending/queries/descendants/index.d.ts +1 -0
- package/dist/chain-methods/ending/queries/descendants/index.d.ts.map +1 -1
- package/dist/chain-methods/ending/queries/descendants/match-conditions.helper.d.ts +11 -0
- package/dist/chain-methods/ending/queries/descendants/match-conditions.helper.d.ts.map +1 -0
- package/dist/chain-methods/ending/queries/descendants/types.d.ts +8 -14
- package/dist/chain-methods/ending/queries/descendants/types.d.ts.map +1 -1
- package/dist/chain-methods/ending/queries/descendants/walk-ancestry.helper.d.ts +15 -0
- package/dist/chain-methods/ending/queries/descendants/walk-ancestry.helper.d.ts.map +1 -0
- package/dist/chain-methods/mutations/clone.d.ts +5 -4
- package/dist/chain-methods/mutations/clone.d.ts.map +1 -1
- package/dist/chain-methods/mutations/create.d.ts +5 -4
- package/dist/chain-methods/mutations/create.d.ts.map +1 -1
- package/dist/chain-methods/mutations/delete.d.ts +5 -4
- package/dist/chain-methods/mutations/delete.d.ts.map +1 -1
- package/dist/chain-methods/mutations/delete.types.d.ts +6 -0
- package/dist/chain-methods/mutations/delete.types.d.ts.map +1 -0
- package/dist/chain-methods/mutations/index.d.ts +1 -0
- package/dist/chain-methods/mutations/index.d.ts.map +1 -1
- package/dist/chain-methods/mutations/update.d.ts +4 -4
- package/dist/chain-methods/mutations/update.d.ts.map +1 -1
- package/dist/chain-methods/navigation/go-to-element.d.ts +4 -4
- package/dist/chain-methods/navigation/go-to-element.d.ts.map +1 -1
- package/dist/chain-methods/navigation/go-to-parent.d.ts +5 -4
- package/dist/chain-methods/navigation/go-to-parent.d.ts.map +1 -1
- package/dist/chain-methods/navigation/types.d.ts +3 -1
- package/dist/chain-methods/navigation/types.d.ts.map +1 -1
- package/dist/chain-methods/types.d.ts +26 -21
- package/dist/chain-methods/types.d.ts.map +1 -1
- package/dist/database/types.d.ts +0 -8
- package/dist/database/types.d.ts.map +1 -1
- package/dist/dialecte/entrypoints.d.ts +7 -5
- package/dist/dialecte/entrypoints.d.ts.map +1 -1
- package/dist/dialecte/main.d.ts +4 -3
- package/dist/dialecte/main.d.ts.map +1 -1
- package/dist/dialecte/types.d.ts +4 -4
- package/dist/dialecte/types.d.ts.map +1 -1
- package/dist/helpers/record/query/find-by-attributes.d.ts +4 -1
- package/dist/helpers/record/query/find-by-attributes.d.ts.map +1 -1
- package/dist/helpers/record/query/types.d.ts +0 -1
- package/dist/helpers/record/query/types.d.ts.map +1 -1
- package/dist/helpers/test-fixtures/config.d.ts +0 -1
- package/dist/helpers/test-fixtures/config.d.ts.map +1 -1
- package/dist/helpers/test-fixtures/create-test-dialecte.d.ts +4 -3
- package/dist/helpers/test-fixtures/create-test-dialecte.d.ts.map +1 -1
- package/dist/helpers/test-fixtures/test-operations.d.ts +7 -4
- package/dist/helpers/test-fixtures/test-operations.d.ts.map +1 -1
- package/dist/helpers/test-fixtures/test-operations.types.d.ts +10 -4
- package/dist/helpers/test-fixtures/test-operations.types.d.ts.map +1 -1
- package/dist/index.js +2950 -2962
- package/dist/script/element-parent-mapping.d.ts.map +1 -1
- package/dist/script/generate-definition.d.ts.map +1 -1
- package/dist/script/pyodide.d.ts +12 -0
- package/dist/script/pyodide.d.ts.map +1 -0
- package/dist/script/test-pyodide.d.ts +9 -0
- package/dist/script/test-pyodide.d.ts.map +1 -0
- package/dist/types/dialecte-config.d.ts +9 -9
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/package.json +7 -3
- package/dist/chain-methods/ending/queries/descendants/validate-descendants.helper.d.ts +0 -17
- package/dist/chain-methods/ending/queries/descendants/validate-descendants.helper.d.ts.map +0 -1
- package/dist/script/generate-descendants-ancestors.d.ts +0 -17
- package/dist/script/generate-descendants-ancestors.d.ts.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Chain } from './types';
|
|
2
2
|
import { DatabaseInstance } from '../database';
|
|
3
|
-
import { Context, AnyDialecteConfig, ElementsOf } from '../types';
|
|
4
|
-
export declare function chain<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
3
|
+
import { Context, AnyDialecteConfig, ElementsOf, ExtensionRegistry } from '../types';
|
|
4
|
+
export declare function chain<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig>>(params: {
|
|
5
5
|
dialecteConfig: GenericConfig;
|
|
6
6
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
7
7
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
extensions: GenericExtensionRegistry;
|
|
9
|
+
focusedTagName: GenericElement;
|
|
10
|
+
}): Chain<GenericConfig, GenericElement, GenericExtensionRegistry>;
|
|
10
11
|
//# sourceMappingURL=chain-assembler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-assembler.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-assembler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"chain-assembler.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-assembler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAExF,wBAAgB,KAAK,CACpB,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,EAChE,MAAM,EAAE;IACT,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,UAAU,EAAE,wBAAwB,CAAA;IACpC,cAAc,EAAE,cAAc,CAAA;CAC9B,GAAG,KAAK,CAAC,aAAa,EAAE,cAAc,EAAE,wBAAwB,CAAC,CA8CjE"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { CoreChain,
|
|
1
|
+
import { CoreChain, ChainFactory, ExtensionChain } from './types';
|
|
2
2
|
import { DatabaseInstance } from '../database';
|
|
3
|
-
import { Context, AnyDialecteConfig, ElementsOf } from '../types';
|
|
4
|
-
export declare function createCoreChain<GenericConfig extends AnyDialecteConfig,
|
|
5
|
-
chain: ChainFactory
|
|
6
|
-
contextPromise: Promise<Context<GenericConfig,
|
|
3
|
+
import { Context, AnyDialecteConfig, ElementsOf, ExtensionRegistry } from '../types';
|
|
4
|
+
export declare function createCoreChain<GenericConfig extends AnyDialecteConfig, GenericFocusedElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
5
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
6
|
+
contextPromise: Promise<Context<GenericConfig, GenericFocusedElement>>;
|
|
7
7
|
dialecteConfig: GenericConfig;
|
|
8
8
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
9
|
-
|
|
10
|
-
}): CoreChain<GenericConfig,
|
|
11
|
-
export declare function createExtensionChain<GenericConfig extends AnyDialecteConfig,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
chain: ChainFactory
|
|
9
|
+
focusedTagName: GenericFocusedElement;
|
|
10
|
+
}): CoreChain<GenericConfig, GenericFocusedElement, GenericExtensionRegistry>;
|
|
11
|
+
export declare function createExtensionChain<GenericConfig extends AnyDialecteConfig, GenericFocusedElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig>>(params: {
|
|
12
|
+
focusedTagName: GenericFocusedElement;
|
|
13
|
+
extensions: GenericExtensionRegistry;
|
|
14
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
|
-
contextPromise: Promise<Context<GenericConfig,
|
|
17
|
-
}):
|
|
16
|
+
contextPromise: Promise<Context<GenericConfig, GenericFocusedElement>>;
|
|
17
|
+
}): ExtensionChain<GenericConfig, GenericFocusedElement, GenericExtensionRegistry>;
|
|
18
18
|
//# sourceMappingURL=chain-creator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-creator.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-creator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-creator.d.ts","sourceRoot":"","sources":["../../src/chain-methods/chain-creator.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAExF,wBAAgB,eAAe,CAC9B,aAAa,SAAS,iBAAiB,EACvC,qBAAqB,SAAS,UAAU,CAAC,aAAa,CAAC,EACvD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAA;IACtE,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,cAAc,EAAE,qBAAqB,CAAA;CACrC,GAAG,SAAS,CAAC,aAAa,EAAE,qBAAqB,EAAE,wBAAwB,CAAC,CAsG5E;AAED,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,qBAAqB,SAAS,UAAU,CAAC,aAAa,CAAC,EACvD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,EAChE,MAAM,EAAE;IACT,cAAc,EAAE,qBAAqB,CAAA;IACrC,UAAU,EAAE,wBAAwB,CAAA;IACpC,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAA;CACtE,GAAG,cAAc,CAAC,aAAa,EAAE,qBAAqB,EAAE,wBAAwB,CAAC,CAsBjF"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { DescendantsFilter,
|
|
1
|
+
import { DescendantsFilter, FilterCondition } from './types';
|
|
2
2
|
import { AnyDialecteConfig, ElementsOf } from '../../../../types';
|
|
3
3
|
/**
|
|
4
|
-
* Flatten nested filter to
|
|
4
|
+
* Flatten nested filter to flat array of conditions
|
|
5
|
+
* Each condition represents a level in the descendant chain
|
|
6
|
+
* Conditions without attributes are marked as optional (collect if exists, don't require)
|
|
5
7
|
*/
|
|
6
|
-
export declare function
|
|
8
|
+
export declare function flattenFilterToConditions<GenericConfig extends AnyDialecteConfig>(filter: DescendantsFilter<GenericConfig>): FilterCondition<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
7
9
|
/**
|
|
8
10
|
* Extract all tag names from nested filter
|
|
9
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-utils.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/filter-utils.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"filter-utils.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/filter-utils.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE5D;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,SAAS,iBAAiB,EAChF,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,eAAe,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAgB7D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,aAAa,SAAS,iBAAiB,EAClE,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,UAAU,CAAC,aAAa,CAAC,EAAE,CAQ7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DatabaseInstance } from '../../../../database';
|
|
2
|
+
import { DescendantsFilter } from './types';
|
|
3
|
+
import { AnyDialecteConfig, Context, ElementsOf, TreeRecord } from '../../../../types';
|
|
4
|
+
export declare function createFindDescendantsAsTreeMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
5
|
+
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
6
|
+
dialecteConfig: GenericConfig;
|
|
7
|
+
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
8
|
+
}): <GenericFilter extends DescendantsFilter<GenericConfig>>(filter: GenericFilter) => Promise<TreeRecord<GenericConfig, GenericFilter["tagName"]>[]>;
|
|
9
|
+
//# sourceMappingURL=find-descendants-as-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-descendants-as-tree.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/find-descendants-as-tree.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAe,UAAU,EAAE,MAAM,SAAS,CAAA;AAE9F,wBAAgB,iCAAiC,CAChD,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGqC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,UAClF,aAAa,KACnB,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CA6DjE"}
|
|
@@ -2,11 +2,11 @@ import { DatabaseInstance } from '../../../../database';
|
|
|
2
2
|
import { FindDescendantsReturn, DescendantsFilter } from './types';
|
|
3
3
|
import { AnyDialecteConfig, Context, ElementsOf } from '../../../../types';
|
|
4
4
|
/**
|
|
5
|
-
* Find descendants matching filter with
|
|
5
|
+
* Find descendants matching filter with "any depth" semantic
|
|
6
6
|
*
|
|
7
7
|
* Two modes:
|
|
8
8
|
* 1. No filter → get all descendants from tree
|
|
9
|
-
* 2. With filter → query deepest level, validate
|
|
9
|
+
* 2. With filter → query deepest level, validate ancestors at any depth
|
|
10
10
|
*/
|
|
11
11
|
export declare function createFindDescendantsMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
12
12
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-descendants.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/find-descendants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-descendants.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/find-descendants.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAA;AAEjG;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAIC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAAG,SAAS,WACxD,aAAa,KAAG,qBAAqB,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,CAAC,CAqB9F"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { CollectedTags, ResultMap } from './types';
|
|
2
1
|
import { AnyDialecteConfig, ChainRecord, ElementsOf } from '../../../../types';
|
|
3
2
|
/**
|
|
4
|
-
* Group records by tagName
|
|
3
|
+
* Group records by tagName and deduplicate by id
|
|
5
4
|
*/
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare function deduplicateByTag<GenericConfig extends AnyDialecteConfig>(collected: CollectedTags<GenericConfig>): CollectedTags<GenericConfig>;
|
|
11
|
-
/**
|
|
12
|
-
* Convert Map to result object with empty arrays for missing tags
|
|
13
|
-
*/
|
|
14
|
-
export declare function mapToResult<GenericConfig extends AnyDialecteConfig>(collected: CollectedTags<GenericConfig>, tags: Set<string>): Record<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
|
|
5
|
+
export declare function groupAndDeduplicate<GenericConfig extends AnyDialecteConfig>(params: {
|
|
6
|
+
collected: Map<string, Map<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>>>;
|
|
7
|
+
collectTags: Set<string>;
|
|
8
|
+
}): Record<string, ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
|
|
15
9
|
//# sourceMappingURL=group-records.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-records.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/group-records.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"group-records.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/group-records.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,SAAS,iBAAiB,EAAE,MAAM,EAAE;IACpF,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1F,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAkB1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,mBAAmB,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,mBAAmB,SAAS,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilterCondition } from './types';
|
|
2
|
+
import { AnyDialecteConfig, ChainRecord, ElementsOf } from '../../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Check if all required filter conditions exist in ancestry chain (any depth)
|
|
5
|
+
* Optional conditions (no attributes) are skipped if not found
|
|
6
|
+
*/
|
|
7
|
+
export declare function matchesAllConditions<GenericConfig extends AnyDialecteConfig>(params: {
|
|
8
|
+
ancestry: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
9
|
+
conditions: FilterCondition<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
10
|
+
}): boolean;
|
|
11
|
+
//# sourceMappingURL=match-conditions.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-conditions.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/match-conditions.helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,SAAS,iBAAiB,EAAE,MAAM,EAAE;IACrF,QAAQ,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;IACjE,UAAU,EAAE,eAAe,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;CACvE,GAAG,OAAO,CA2BV"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { FilterAttributes } from '../../../../helpers';
|
|
2
2
|
import { AnyDialecteConfig, DescendantsOf, ElementsOf, ChainRecord } from '../../../../types';
|
|
3
|
-
export type FindDescendantsReturn<GenericConfig extends AnyDialecteConfig, GenericFilter extends DescendantsFilter<GenericConfig> | undefined, GenericElement extends ElementsOf<GenericConfig> = ElementsOf<GenericConfig>> = Promise<GenericFilter extends undefined ? {
|
|
4
|
-
[K in GenericElement | DescendantsOf<GenericConfig, GenericElement>]: ChainRecord<GenericConfig, K>[];
|
|
5
|
-
} : GenericFilter extends DescendantsFilter<GenericConfig> ? ResultMap<GenericConfig, ExtractTags<GenericFilter>> : never>;
|
|
6
|
-
export type PathLevel<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
7
|
-
tagName: GenericElement;
|
|
8
|
-
attributes?: FilterAttributes<GenericConfig, GenericElement>;
|
|
9
|
-
};
|
|
10
3
|
type Depth = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
11
4
|
type FilterNode<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, D extends number> = Depth[D] extends never ? never : {
|
|
12
5
|
[K in DescendantsOf<GenericConfig, GenericElement>]: {
|
|
@@ -22,20 +15,21 @@ export type DescendantsFilter<GenericConfig extends AnyDialecteConfig> = {
|
|
|
22
15
|
descendant?: FilterNode<GenericConfig, K, 10>;
|
|
23
16
|
};
|
|
24
17
|
}[ElementsOf<GenericConfig>];
|
|
18
|
+
export type FilterCondition<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = {
|
|
19
|
+
tagName: GenericElement;
|
|
20
|
+
attributes?: FilterAttributes<GenericConfig, GenericElement>;
|
|
21
|
+
optional?: boolean;
|
|
22
|
+
};
|
|
25
23
|
export type ExtractTags<F> = F extends {
|
|
26
24
|
tagName: infer T;
|
|
27
25
|
} ? T | (F extends {
|
|
28
26
|
descendant?: infer D;
|
|
29
27
|
} ? ExtractTags<D> : never) : never;
|
|
30
|
-
export type TagsArray<F> = ExtractTags<F> extends infer U ? ReadonlyArray<U> : never;
|
|
31
28
|
export type ResultMap<GenericConfig extends AnyDialecteConfig, GenericTags extends string> = {
|
|
32
29
|
[K in GenericTags]: ChainRecord<GenericConfig, K>[];
|
|
33
30
|
};
|
|
34
|
-
export type
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
valid: boolean;
|
|
38
|
-
ancestors?: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[];
|
|
39
|
-
};
|
|
31
|
+
export type FindDescendantsReturn<GenericConfig extends AnyDialecteConfig, GenericFilter extends DescendantsFilter<GenericConfig> | undefined, GenericElement extends ElementsOf<GenericConfig> = ElementsOf<GenericConfig>> = Promise<GenericFilter extends undefined ? {
|
|
32
|
+
[K in GenericElement | DescendantsOf<GenericConfig, GenericElement>]: ChainRecord<GenericConfig, K>[];
|
|
33
|
+
} : GenericFilter extends DescendantsFilter<GenericConfig> ? ResultMap<GenericConfig, ExtractTags<GenericFilter>> : never>;
|
|
40
34
|
export {};
|
|
41
35
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAMxF,KAAK,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AAEtD,KAAK,UAAU,CACd,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,CAAC,SAAS,MAAM,IACb,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,GACvB,KAAK,GACL;KACC,CAAC,IAAI,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG;QACpD,OAAO,EAAE,CAAC,CAAA;QACV,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;QAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;KACnD;CACD,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;AAEjD,MAAM,MAAM,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,IAAI;KACvE,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,GAAG;QACjC,OAAO,EAAE,CAAC,CAAA;QACV,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;QAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;KAC7C;CACD,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;AAM5B,MAAM,MAAM,eAAe,CAC1B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAC7C;IACH,OAAO,EAAE,cAAc,CAAA;IACvB,UAAU,CAAC,EAAE,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAMD,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC,CAAA;CAAE,GACxD,CAAC,GAAG,CAAC,CAAC,SAAS;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GACjE,KAAK,CAAA;AAMR,MAAM,MAAM,SAAS,CAAC,aAAa,SAAS,iBAAiB,EAAE,WAAW,SAAS,MAAM,IAAI;KAC3F,CAAC,IAAI,WAAW,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;CACnD,CAAA;AAED,MAAM,MAAM,qBAAqB,CAChC,aAAa,SAAS,iBAAiB,EACvC,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAAG,SAAS,EAClE,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,IACzE,OAAO,CACV,aAAa,SAAS,SAAS,GAC5B;KACC,CAAC,IAAI,cAAc,GAAG,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,WAAW,CAChF,aAAa,EACb,CAAC,CACD,EAAE;CACH,GACA,aAAa,SAAS,iBAAiB,CAAC,aAAa,CAAC,GACrD,SAAS,CAAC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,GACpD,KAAK,CACT,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DatabaseInstance } from '../../../../database';
|
|
2
|
+
import { AnyDialecteConfig, ChainRecord, ElementsOf, Operation } from '../../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Walk up from record to focus, collecting all ancestors
|
|
5
|
+
* Stops when reaching focus element (inclusive)
|
|
6
|
+
* Fetches full parent records from database as needed
|
|
7
|
+
*/
|
|
8
|
+
export declare function walkAncestryToFocus<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
9
|
+
record: ChainRecord<GenericConfig, GenericElement>;
|
|
10
|
+
focus: ChainRecord<GenericConfig, ElementsOf<GenericConfig>>;
|
|
11
|
+
dialecteConfig: GenericConfig;
|
|
12
|
+
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
13
|
+
stagedOperations: Operation<GenericConfig>[];
|
|
14
|
+
}): Promise<ChainRecord<GenericConfig, ElementsOf<GenericConfig>>[]>;
|
|
15
|
+
//# sourceMappingURL=walk-ancestry.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walk-ancestry.helper.d.ts","sourceRoot":"","sources":["../../../../../src/chain-methods/ending/queries/descendants/walk-ancestry.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEpF;;;;GAIG;AACH,wBAAsB,mBAAmB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;IAClD,KAAK,EAAE,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IAC5D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACjD,gBAAgB,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE,CAAA;CAC5C,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CA0CnE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeepCloneChildParams } from './clone.types';
|
|
2
2
|
import { Chain, ChainFactory } from '../types';
|
|
3
|
-
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context } from '../../types';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context, ExtensionRegistry } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Deep clones the child element under the current focused element.
|
|
6
6
|
*
|
|
@@ -9,9 +9,10 @@ import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context } from '../../types'
|
|
|
9
9
|
* @param dialecteConfig - Dialecte configuration
|
|
10
10
|
* @returns Function to create element (sync chainable)
|
|
11
11
|
*/
|
|
12
|
-
export declare function createDeepCloneChildMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
13
|
-
chain: ChainFactory
|
|
12
|
+
export declare function createDeepCloneChildMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
13
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
14
14
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
|
-
|
|
16
|
+
focusedTagName: GenericElement;
|
|
17
|
+
}): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: DeepCloneChildParams<GenericConfig, GenericChildElement>) => Chain<GenericConfig, GenericElement, GenericExtensionRegistry> | Chain<GenericConfig, GenericChildElement, GenericExtensionRegistry>;
|
|
17
18
|
//# sourceMappingURL=clone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAIpD,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EAEP,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,cAAc,CAAA;CAC9B,IAGiB,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,oBAAoB,CAAC,aAAa,EAAE,mBAAmB,CAAC,0IAsCjE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AddChildParams } from './create.types';
|
|
2
2
|
import { ChainFactory } from '../types';
|
|
3
|
-
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context } from '../../types';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context, ExtensionRegistry } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a child element under the current focused element.
|
|
6
6
|
*
|
|
@@ -9,9 +9,10 @@ import { AnyDialecteConfig, ElementsOf, ChildrenOf, Context } from '../../types'
|
|
|
9
9
|
* @param dialecteConfig - Dialecte configuration
|
|
10
10
|
* @returns Function to create element (sync chainable)
|
|
11
11
|
*/
|
|
12
|
-
export declare function createAddChildMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
13
|
-
chain: ChainFactory
|
|
12
|
+
export declare function createAddChildMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
13
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
14
14
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
|
-
|
|
16
|
+
focusedTagName: GenericElement;
|
|
17
|
+
}): <GenericChildElement extends ChildrenOf<GenericConfig, GenericElement>>(params: AddChildParams<GenericConfig, GenericElement, GenericChildElement>) => import('../types').Chain<GenericConfig, GenericChildElement, GenericExtensionRegistry> | import('../types').Chain<GenericConfig, GenericElement, GenericExtensionRegistry>;
|
|
17
18
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EAGP,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,OAAO,EAGP,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,cAAc,EAAE,cAAc,CAAA;CAC9B,IAGiB,mBAAmB,SAAS,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,cAAc,CAAC,aAAa,EAAE,cAAc,EAAE,mBAAmB,CAAC,gLAiE3E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DatabaseInstance } from '../../index';
|
|
2
2
|
import { ChainFactory } from '../types';
|
|
3
|
-
import {
|
|
3
|
+
import { DeleteElementParams } from './delete.types';
|
|
4
|
+
import { AnyDialecteConfig, ElementsOf, Context, ParentsOf, ExtensionRegistry } from '../../types';
|
|
4
5
|
/**
|
|
5
6
|
* Deletes the current focused element.
|
|
6
7
|
* Returns builder focused on parent element.
|
|
@@ -10,10 +11,10 @@ import { AnyDialecteConfig, ElementsOf, Context, ParentsOf } from '../../types';
|
|
|
10
11
|
* @param dialecteConfig - Dialecte configuration
|
|
11
12
|
* @returns Function to delete element (sync chainable, narrows to parent)
|
|
12
13
|
*/
|
|
13
|
-
export declare function createDeleteElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
14
|
-
chain: ChainFactory
|
|
14
|
+
export declare function createDeleteElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
15
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
15
16
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
16
17
|
dialecteConfig: GenericConfig;
|
|
17
18
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
18
|
-
}): () => import('../../index').Chain<GenericConfig,
|
|
19
|
+
}): <GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>(params: DeleteElementParams<GenericConfig, GenericElement, GenericParentElement>) => import('../../index').Chain<GenericConfig, GenericParentElement, GenericExtensionRegistry>;
|
|
19
20
|
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EAEV,OAAO,EACP,SAAS,EAGT,MAAM,SAAS,CAAA;AAEhB;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EAEV,OAAO,EACP,SAAS,EAGT,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAGiB,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,EACrF,QAAQ,mBAAmB,CAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,CAAC,4FA+CjF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf, AnyElement, ParentsOf, AnyParent } from '../../types';
|
|
2
|
+
export type DeleteElementParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericParentElement extends ParentsOf<GenericConfig, GenericElement>> = {
|
|
3
|
+
parentTagName: GenericParentElement;
|
|
4
|
+
};
|
|
5
|
+
export type AnyDeleteParams = DeleteElementParams<AnyDialecteConfig, AnyElement, AnyParent>;
|
|
6
|
+
//# sourceMappingURL=delete.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/delete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE9F,MAAM,MAAM,mBAAmB,CAC9B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE;IAAE,aAAa,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAE3C,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,iBAAiB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,eAAe,CAAA;AAClC,mBAAmB,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,eAAe,CAAA;AAClC,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,gBAAgB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateElementParams } from './update.types';
|
|
2
2
|
import { ChainFactory } from '../types';
|
|
3
|
-
import { AnyDialecteConfig, ElementsOf, Context } from '../../types';
|
|
3
|
+
import { AnyDialecteConfig, ElementsOf, Context, ExtensionRegistry } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Updates the current focused element's attributes or value.
|
|
6
6
|
*
|
|
@@ -9,9 +9,9 @@ import { AnyDialecteConfig, ElementsOf, Context } from '../../types';
|
|
|
9
9
|
* @param dialecteConfig - Dialecte configuration
|
|
10
10
|
* @returns Function to update element (sync chainable)
|
|
11
11
|
*/
|
|
12
|
-
export declare function createUpdateElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
13
|
-
chain: ChainFactory
|
|
12
|
+
export declare function createUpdateElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
13
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
14
14
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
15
15
|
dialecteConfig: GenericConfig;
|
|
16
|
-
}): (params: UpdateElementParams<GenericConfig, GenericElement>) => import('../types').Chain<GenericConfig, GenericElement>;
|
|
16
|
+
}): (params: UpdateElementParams<GenericConfig, GenericElement>) => import('../types').Chain<GenericConfig, GenericElement, GenericExtensionRegistry>;
|
|
17
17
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAIpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/mutations/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAIpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAExF;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACxC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;CAC7B,IAGiB,QAAQ,mBAAmB,CAAC,aAAa,EAAE,cAAc,CAAC,uFA6C3E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GoToElementParams } from './types';
|
|
2
2
|
import { ChainFactory } from '../types';
|
|
3
3
|
import { DatabaseInstance } from '../../database';
|
|
4
|
-
import { AnyDialecteConfig, ElementsOf, Context } from '../../types';
|
|
4
|
+
import { AnyDialecteConfig, ElementsOf, Context, ExtensionRegistry } from '../../types';
|
|
5
5
|
/**
|
|
6
6
|
* Navigate to a specific element by tagName and id.
|
|
7
7
|
* Type narrows to the target element.
|
|
@@ -10,10 +10,10 @@ import { AnyDialecteConfig, ElementsOf, Context } from '../../types';
|
|
|
10
10
|
* @param dialecteConfig - Dialecte configuration
|
|
11
11
|
* @returns Function to navigate to element (sync chainable, type narrows)
|
|
12
12
|
*/
|
|
13
|
-
export declare function createGoToElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
14
|
-
chain: ChainFactory
|
|
13
|
+
export declare function createGoToElementMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
14
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
15
15
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
16
16
|
dialecteConfig: GenericConfig;
|
|
17
17
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
18
|
-
}): <
|
|
18
|
+
}): <GenericFocusElement extends ElementsOf<GenericConfig>>(params: GoToElementParams<GenericConfig, GenericFocusElement>) => import('../types').Chain<GenericConfig, GenericFocusElement, GenericExtensionRegistry>;
|
|
19
19
|
//# sourceMappingURL=go-to-element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go-to-element.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/navigation/go-to-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"go-to-element.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/navigation/go-to-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAExF;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACtC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAG4B,mBAAmB,SAAS,UAAU,CAAC,aAAa,CAAC,EAChF,QAAQ,iBAAiB,CAAC,aAAa,EAAE,mBAAmB,CAAC,4FAsD9D"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChainFactory } from '../types';
|
|
2
|
+
import { GoToParentParams } from './types';
|
|
2
3
|
import { DatabaseInstance } from '../../database';
|
|
3
|
-
import { AnyDialecteConfig, ElementsOf, Context, ParentsOf } from '../../types';
|
|
4
|
+
import { AnyDialecteConfig, ElementsOf, Context, ParentsOf, ExtensionRegistry } from '../../types';
|
|
4
5
|
/**
|
|
5
6
|
* Navigate to the parent element.
|
|
6
7
|
* Type narrows to the target element.
|
|
@@ -9,10 +10,10 @@ import { AnyDialecteConfig, ElementsOf, Context, ParentsOf } from '../../types';
|
|
|
9
10
|
* @param dialecteConfig - Dialecte configuration
|
|
10
11
|
* @returns Function to navigate to the parent (sync chainable, type narrows)
|
|
11
12
|
*/
|
|
12
|
-
export declare function createGoToParentMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
13
|
-
chain: ChainFactory
|
|
13
|
+
export declare function createGoToParentMethod<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericExtensionRegistry extends ExtensionRegistry<GenericConfig> = ExtensionRegistry<GenericConfig>>(params: {
|
|
14
|
+
chain: ChainFactory<GenericConfig, GenericExtensionRegistry>;
|
|
14
15
|
contextPromise: Promise<Context<GenericConfig, GenericElement>>;
|
|
15
16
|
dialecteConfig: GenericConfig;
|
|
16
17
|
databaseInstance: DatabaseInstance<GenericConfig>;
|
|
17
|
-
}): <GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>() => import('../types').Chain<GenericConfig, GenericParentElement>;
|
|
18
|
+
}): <GenericParentElement extends ParentsOf<GenericConfig, GenericElement>>(parentTagName: GoToParentParams<GenericConfig, GenericElement, GenericParentElement>) => import('../types').Chain<GenericConfig, GenericParentElement, GenericExtensionRegistry>;
|
|
18
19
|
//# sourceMappingURL=go-to-parent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"go-to-parent.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/navigation/go-to-parent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"go-to-parent.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/navigation/go-to-parent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,OAAO,EAEP,SAAS,EACT,iBAAiB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,wBAAwB,SAAS,iBAAiB,CAAC,aAAa,CAAC,GAChE,iBAAiB,CAAC,aAAa,CAAC,EAChC,MAAM,EAAE;IACT,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;IAC5D,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;IAC/D,cAAc,EAAE,aAAa,CAAA;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;CACjD,IAG2B,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,EAC/F,eAAe,gBAAgB,CAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,CAAC,6FAyCrF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyDialecteConfig, ElementsOf, SingletonElementsOf, AnyElement } from '../../types';
|
|
1
|
+
import { AnyDialecteConfig, ElementsOf, SingletonElementsOf, AnyElement, ParentsOf, AnyParent } from '../../types';
|
|
2
2
|
export type GoToElementParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>> = GenericElement extends SingletonElementsOf<GenericConfig> ? {
|
|
3
3
|
tagName: GenericElement;
|
|
4
4
|
id?: string;
|
|
@@ -7,4 +7,6 @@ export type GoToElementParams<GenericConfig extends AnyDialecteConfig, GenericEl
|
|
|
7
7
|
id: string;
|
|
8
8
|
};
|
|
9
9
|
export type AnyGoToElementParams = GoToElementParams<AnyDialecteConfig, AnyElement>;
|
|
10
|
+
export type GoToParentParams<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>, GenericParentElement extends ParentsOf<GenericConfig, GenericElement>> = GenericParentElement;
|
|
11
|
+
export type AnyGoToParentParams = GoToParentParams<AnyDialecteConfig, AnyElement, AnyParent>;
|
|
10
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/chain-methods/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,SAAS,EACT,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,iBAAiB,CAC5B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,IAEhD,cAAc,SAAS,mBAAmB,CAAC,aAAa,CAAC,GACtD;IAAE,OAAO,EAAE,cAAc,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,OAAO,EAAE,cAAc,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3C,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAA;AAEnF,MAAM,MAAM,gBAAgB,CAC3B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAChD,oBAAoB,SAAS,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC,IAClE,oBAAoB,CAAA;AAExB,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA"}
|