@alloy-js/typescript 0.14.0 → 0.16.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 +21 -0
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.js +6 -1
- package/dist/src/components/ImportStatement.d.ts.map +1 -1
- package/dist/src/components/ImportStatement.js +8 -2
- package/dist/src/components/MemberExpression.d.ts +21 -4
- package/dist/src/components/MemberExpression.d.ts.map +1 -1
- package/dist/src/components/MemberExpression.js +302 -88
- package/dist/src/components/ObjectExpression.d.ts +6 -0
- package/dist/src/components/ObjectExpression.d.ts.map +1 -1
- package/dist/src/components/ObjectExpression.js +17 -1
- package/dist/src/components/index.d.ts +0 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +0 -1
- package/dist/src/components/stc/index.d.ts +0 -1
- package/dist/src/components/stc/index.d.ts.map +1 -1
- package/dist/src/components/stc/index.js +0 -1
- package/dist/src/parameter-descriptor.d.ts +9 -0
- package/dist/src/parameter-descriptor.d.ts.map +1 -1
- package/dist/test/arrow-function.test.js +17 -0
- package/dist/test/basic.test.js +1 -1
- package/dist/test/externals.test.js +3 -3
- package/dist/test/function-declaration.test.js +18 -0
- package/dist/test/function-expression.test.js +17 -0
- package/dist/test/function-type.test.js +14 -0
- package/dist/test/imports.test.js +114 -4
- package/dist/test/member-expression.test.js +285 -5
- package/dist/test/object.test.d.ts +2 -0
- package/dist/test/object.test.d.ts.map +1 -0
- package/dist/test/object.test.js +57 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/FunctionBase.tsx +1 -0
- package/src/components/ImportStatement.tsx +12 -2
- package/src/components/MemberExpression.tsx +364 -103
- package/src/components/ObjectExpression.tsx +21 -1
- package/src/components/index.ts +0 -1
- package/src/components/stc/index.ts +0 -1
- package/src/parameter-descriptor.ts +10 -0
- package/temp/api.json +231 -94
- package/test/arrow-function.test.tsx +22 -0
- package/test/basic.test.tsx +1 -1
- package/test/externals.test.tsx +3 -3
- package/test/function-declaration.test.tsx +22 -0
- package/test/function-expression.test.tsx +22 -0
- package/test/function-type.test.tsx +17 -0
- package/test/imports.test.tsx +75 -4
- package/test/member-expression.test.tsx +221 -8
- package/test/object.test.tsx +48 -0
- package/dist/src/components/MemberChainExpression.d.ts +0 -11
- package/dist/src/components/MemberChainExpression.d.ts.map +0 -1
- package/dist/src/components/MemberChainExpression.js +0 -98
- package/dist/test/member-chain.test.d.ts +0 -2
- package/dist/test/member-chain.test.d.ts.map +0 -1
- package/dist/test/member-chain.test.js +0 -141
- package/src/components/MemberChainExpression.tsx +0 -91
- package/test/member-chain.test.tsx +0 -124
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog - @alloy-js/typescript
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#150](https://github.com/alloy-framework/alloy/pull/150) Allow providing explicit children to a MemberExpression.Part.
|
|
8
|
+
- [#150](https://github.com/alloy-framework/alloy/pull/150) Format member expressions with multiple calls in a much better way.
|
|
9
|
+
|
|
10
|
+
### Breaking Changes
|
|
11
|
+
|
|
12
|
+
- [#150](https://github.com/alloy-framework/alloy/pull/150) Remove `MemberChainExpression` component. Use `MemberExpression` component instead, which accomplishes the same goals but formats better, handles optional chaining, and more.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 0.15.0
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- [#146](https://github.com/alloy-framework/alloy/pull/146) Add support for rest parameters in function components
|
|
20
|
+
- [#146](https://github.com/alloy-framework/alloy/pull/146) Add support for object spread properties
|
|
21
|
+
- [#145](https://github.com/alloy-framework/alloy/pull/145) Sort import statements and named imports
|
|
22
|
+
|
|
23
|
+
|
|
3
24
|
## 0.14.0
|
|
4
25
|
|
|
5
26
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionBase.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionBase.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAYrE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,oCAAoC;AACpC,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;IACvD,mBAAmB;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB;IACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;IACvD,mBAAmB;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,gCAAgC;AAChC,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,UAAU,CAAC,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,CAAC;IAClD,mBAAmB;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,sIAKxB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,kJAmB9B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,0JAmBlC,CAAC;
|
|
1
|
+
{"version":3,"file":"FunctionBase.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionBase.tsx"],"names":[],"mappings":"AASA,OAAO,KA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, fun
|
|
|
90
90
|
function parameter(param) {
|
|
91
91
|
return _$createIntrinsic("group", {
|
|
92
92
|
get children() {
|
|
93
|
-
return [_$
|
|
93
|
+
return [_$createComponent(Show, {
|
|
94
|
+
get when() {
|
|
95
|
+
return param.rest;
|
|
96
|
+
},
|
|
97
|
+
children: "..."
|
|
98
|
+
}), _$memo(() => param.symbol.name), _$createComponent(Show, {
|
|
94
99
|
get when() {
|
|
95
100
|
return !!param.optional;
|
|
96
101
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,aAAa,EAGd,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,6CAgD5D;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAqD1D"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { mapJoin, memo, SourceDirectoryContext, useContext } from "@alloy-js/core";
|
|
2
|
+
import { computed, mapJoin, memo, SourceDirectoryContext, useContext } from "@alloy-js/core";
|
|
3
3
|
import { relative } from "pathe";
|
|
4
4
|
import { TSSymbolFlags } from "../symbols/index.js";
|
|
5
5
|
import { modulePath } from "../utils.js";
|
|
6
6
|
import { usePackage } from "./PackageDirectory.js";
|
|
7
7
|
export function ImportStatements(props) {
|
|
8
8
|
const pkg = usePackage();
|
|
9
|
-
|
|
9
|
+
const imports = computed(() => [...props.records].sort(([a], [b]) => {
|
|
10
|
+
return a.name.localeCompare(b.name);
|
|
11
|
+
}));
|
|
12
|
+
return mapJoin(() => imports.value, ([module, importedSymbols]) => {
|
|
10
13
|
let targetPath;
|
|
11
14
|
if (pkg && pkg.scope !== module.parent || !pkg && module.parent.kind !== "global") {
|
|
12
15
|
// importing from another package, so let's calculate the import.
|
|
@@ -58,6 +61,9 @@ export function ImportStatement(props) {
|
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
if (namedImportSymbols.length > 0) {
|
|
64
|
+
namedImportSymbols.sort((a, b) => {
|
|
65
|
+
return a.local.name.localeCompare(b.local.name);
|
|
66
|
+
});
|
|
61
67
|
const allNamedImportsAreTypes = namedImportSymbols.every(nis => nis.local.tsFlags & TSSymbolFlags.TypeSymbol);
|
|
62
68
|
if (allNamedImportsAreTypes) {
|
|
63
69
|
parts.push("type ");
|
|
@@ -7,12 +7,18 @@ export interface MemberExpressionProps {
|
|
|
7
7
|
* the following:
|
|
8
8
|
*
|
|
9
9
|
* * **id**: The identifier for the member expression part
|
|
10
|
-
* * **refkey**:
|
|
10
|
+
* * **refkey**: a refkey for a symbol whose name becomes the identifier
|
|
11
11
|
* * **symbol**: a symbol whose name becomes the identifier part
|
|
12
12
|
* * **args**: create a method call with the given args
|
|
13
|
+
* * **children**: arbitrary contents for the identifier part.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* Each part can have a nullish prop, which indicates that the part may be null
|
|
16
|
+
* or undefined.
|
|
17
|
+
*
|
|
18
|
+
* Each part can also have a quoteId prop, which indicates that the identifier
|
|
19
|
+
* of the part should be quoted (i.e. `["foo"]` instead of `.foo`). This is only
|
|
20
|
+
* necessary when providing the children prop, otherwise it is determined
|
|
21
|
+
* automatically.
|
|
16
22
|
*
|
|
17
23
|
* @example
|
|
18
24
|
*
|
|
@@ -22,6 +28,7 @@ export interface MemberExpressionProps {
|
|
|
22
28
|
* <MemberExpression.Part refkey={rk} nullish />
|
|
23
29
|
* <MemberExpression.Part symbol={sym} />
|
|
24
30
|
* <MemberExpression.Part args={["hello", "world"]} />
|
|
31
|
+
* <MemberExpression.Part>SomeValue</MemberExpression.Part>
|
|
25
32
|
* </MemberExpression>
|
|
26
33
|
* ```
|
|
27
34
|
*
|
|
@@ -29,7 +36,7 @@ export interface MemberExpressionProps {
|
|
|
29
36
|
* with a name of "prop2", this will render:
|
|
30
37
|
*
|
|
31
38
|
* ```ts
|
|
32
|
-
* base.prop1?.prop2("hello", "world")
|
|
39
|
+
* base.prop1?.prop2("hello", "world").SomeValue
|
|
33
40
|
* ```
|
|
34
41
|
*/
|
|
35
42
|
export declare function MemberExpression(props: MemberExpressionProps): Children;
|
|
@@ -41,6 +48,11 @@ export interface MemberExpressionPartProps {
|
|
|
41
48
|
* The identifier for this part of the member expression.
|
|
42
49
|
*/
|
|
43
50
|
id?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the identifier should be quoted or not. Only needed when
|
|
53
|
+
* providing the `children` prop, otherwise it is determined automatically.
|
|
54
|
+
*/
|
|
55
|
+
quoteId?: boolean;
|
|
44
56
|
/**
|
|
45
57
|
* A refkey for a symbol whose name becomes the identifier.
|
|
46
58
|
*/
|
|
@@ -57,5 +69,10 @@ export interface MemberExpressionPartProps {
|
|
|
57
69
|
* This part is nullish. Subsequent parts use conditional access operators.
|
|
58
70
|
*/
|
|
59
71
|
nullish?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* The contents of this part. When passed, overrides the other props except
|
|
74
|
+
* nullish.
|
|
75
|
+
*/
|
|
76
|
+
children?: Children;
|
|
60
77
|
}
|
|
61
78
|
//# sourceMappingURL=MemberExpression.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberExpression.d.ts","sourceRoot":"","sources":["../../../src/components/MemberExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKR,YAAY,EAGZ,MAAM,
|
|
1
|
+
{"version":3,"file":"MemberExpression.d.ts","sourceRoot":"","sources":["../../../src/components/MemberExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKR,YAAY,EAGZ,MAAM,EAIP,MAAM,gBAAgB,CAAC;AAKxB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,QAAQ,CA0BvE;yBA1Be,gBAAgB;sBA8aS,yBAAyB;;AAtDlE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createIntrinsic as _$createIntrinsic, memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { childrenArray, computed, For, isComponentCreator, ref,
|
|
2
|
+
import { childrenArray, computed, For, isComponentCreator, reactive, ref, Show, useBinder } from "@alloy-js/core";
|
|
3
3
|
import { TSSymbolFlags } from "../symbols/ts-output-symbol.js";
|
|
4
4
|
import { isValidJSIdentifier } from "../utils.js";
|
|
5
5
|
/**
|
|
@@ -7,12 +7,18 @@ import { isValidJSIdentifier } from "../utils.js";
|
|
|
7
7
|
* the following:
|
|
8
8
|
*
|
|
9
9
|
* * **id**: The identifier for the member expression part
|
|
10
|
-
* * **refkey**:
|
|
10
|
+
* * **refkey**: a refkey for a symbol whose name becomes the identifier
|
|
11
11
|
* * **symbol**: a symbol whose name becomes the identifier part
|
|
12
12
|
* * **args**: create a method call with the given args
|
|
13
|
+
* * **children**: arbitrary contents for the identifier part.
|
|
14
|
+
*
|
|
15
|
+
* Each part can have a nullish prop, which indicates that the part may be null
|
|
16
|
+
* or undefined.
|
|
13
17
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
18
|
+
* Each part can also have a quoteId prop, which indicates that the identifier
|
|
19
|
+
* of the part should be quoted (i.e. `["foo"]` instead of `.foo`). This is only
|
|
20
|
+
* necessary when providing the children prop, otherwise it is determined
|
|
21
|
+
* automatically.
|
|
16
22
|
*
|
|
17
23
|
* @example
|
|
18
24
|
*
|
|
@@ -22,6 +28,7 @@ import { isValidJSIdentifier } from "../utils.js";
|
|
|
22
28
|
* <MemberExpression.Part refkey={rk} nullish />
|
|
23
29
|
* <MemberExpression.Part symbol={sym} />
|
|
24
30
|
* <MemberExpression.Part args={["hello", "world"]} />
|
|
31
|
+
* <MemberExpression.Part>SomeValue</MemberExpression.Part>
|
|
25
32
|
* </MemberExpression>
|
|
26
33
|
* ```
|
|
27
34
|
*
|
|
@@ -29,119 +36,317 @@ import { isValidJSIdentifier } from "../utils.js";
|
|
|
29
36
|
* with a name of "prop2", this will render:
|
|
30
37
|
*
|
|
31
38
|
* ```ts
|
|
32
|
-
* base.prop1?.prop2("hello", "world")
|
|
39
|
+
* base.prop1?.prop2("hello", "world").SomeValue
|
|
33
40
|
* ```
|
|
34
41
|
*/
|
|
35
42
|
export function MemberExpression(props) {
|
|
36
43
|
const children = flattenMemberExpression(childrenArray(() => props.children));
|
|
44
|
+
const parts = childrenToPartDescriptors(children);
|
|
45
|
+
if (parts.length === 0) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const isCallChain = computed(() => {
|
|
49
|
+
let callCount = 0;
|
|
50
|
+
for (const part of parts) {
|
|
51
|
+
if (part.args !== undefined) callCount++;
|
|
52
|
+
}
|
|
53
|
+
return callCount > 1;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// construct a member expression from the parts. When a part is nullish,
|
|
57
|
+
// and there is a subsequent part, we use `?.` instead of `.`. accessStyle determines
|
|
58
|
+
// whether we use dot or bracket notation.
|
|
59
|
+
|
|
60
|
+
return computed(() => {
|
|
61
|
+
return isCallChain.value ? formatCallChain(parts) : formatNonCallChain(parts);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Build part descriptors from the children of a MemberExpression.
|
|
67
|
+
*/
|
|
68
|
+
function childrenToPartDescriptors(children) {
|
|
37
69
|
const parts = [];
|
|
38
70
|
for (const child of children) {
|
|
39
71
|
if (!isComponentCreator(child, MemberExpression.Part)) {
|
|
40
72
|
// we ignore non-parts
|
|
41
73
|
continue;
|
|
42
74
|
}
|
|
43
|
-
|
|
44
|
-
const part = {
|
|
45
|
-
base: "",
|
|
46
|
-
accessStyle: ref("dot"),
|
|
47
|
-
nullish: ref(!!partProps.nullish)
|
|
48
|
-
};
|
|
49
|
-
if (partProps.id) {
|
|
50
|
-
part.base = partProps.id;
|
|
51
|
-
part.accessStyle.value = accessStyleForMemberName(partProps.id);
|
|
52
|
-
} else if (partProps.refkey) {
|
|
53
|
-
const binder = useBinder();
|
|
54
|
-
const symbolRef = binder.getSymbolForRefkey(partProps.refkey);
|
|
55
|
-
part.base = computed(() => {
|
|
56
|
-
if (symbolRef.value) {
|
|
57
|
-
part.nullish.value = !!(symbolRef.value.tsFlags & TSSymbolFlags.Nullish);
|
|
58
|
-
part.accessStyle.value = accessStyleForMemberName(symbolRef.value.name);
|
|
59
|
-
return symbolRef.value.name;
|
|
60
|
-
} else {
|
|
61
|
-
return "<unresolved symbol>";
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
} else if (partProps.symbol) {
|
|
65
|
-
part.nullish.value = !!(partProps.symbol.tsFlags & TSSymbolFlags.Nullish);
|
|
66
|
-
part.accessStyle = computed(() => {
|
|
67
|
-
return accessStyleForMemberName(partProps.symbol.name);
|
|
68
|
-
});
|
|
69
|
-
part.base = toRef(partProps.symbol, "name");
|
|
70
|
-
} else if (partProps.args) {
|
|
71
|
-
part.args = partProps.args;
|
|
72
|
-
}
|
|
73
|
-
parts.push(part);
|
|
75
|
+
parts.push(createPartDescriptorFromProps(child.props, child === children[0]));
|
|
74
76
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
return parts;
|
|
78
|
+
}
|
|
79
|
+
const exclusiveParts = ["children", "args", "refkey", "symbol", "id"];
|
|
80
|
+
/**
|
|
81
|
+
* Creates a reactive part descriptor from the given part props.
|
|
82
|
+
*
|
|
83
|
+
* @param partProps The props for the part.
|
|
84
|
+
* @param first Whether this is the first part in the expression. Refkeys are
|
|
85
|
+
* handled specially for the first part.
|
|
86
|
+
*/
|
|
87
|
+
function createPartDescriptorFromProps(partProps, first) {
|
|
88
|
+
const foundProps = exclusiveParts.filter(key => {
|
|
89
|
+
return key in partProps;
|
|
90
|
+
});
|
|
91
|
+
if (foundProps.length > 1) {
|
|
92
|
+
throw new Error(`Only one of ${foundProps.join(", ")} can be used for a MemberExpression part at a time`);
|
|
77
93
|
}
|
|
94
|
+
const symbolSource = computed(() => {
|
|
95
|
+
if (partProps.refkey) {
|
|
96
|
+
return getSymbolForRefkey(partProps.refkey).value;
|
|
97
|
+
} else if (partProps.symbol) {
|
|
98
|
+
return partProps.symbol;
|
|
99
|
+
} else {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const part = {
|
|
104
|
+
id: computed(() => {
|
|
105
|
+
if (partProps.args) {
|
|
106
|
+
return undefined;
|
|
107
|
+
} else if ("children" in partProps && partProps.children !== undefined) {
|
|
108
|
+
return partProps.children;
|
|
109
|
+
} else if (first && partProps.refkey) {
|
|
110
|
+
return partProps.refkey;
|
|
111
|
+
} else if (partProps.id) {
|
|
112
|
+
return escapeId(partProps.id);
|
|
113
|
+
} else if (symbolSource.value) {
|
|
114
|
+
return escapeId(symbolSource.value.name);
|
|
115
|
+
} else {
|
|
116
|
+
return "<unresolved symbol>";
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
accessStyle: computed(() => {
|
|
120
|
+
if (partProps.args) {
|
|
121
|
+
// not used
|
|
122
|
+
return "dot";
|
|
123
|
+
} else if (partProps.quoteId) {
|
|
124
|
+
return "bracket";
|
|
125
|
+
} else if (partProps.id) {
|
|
126
|
+
return accessStyleForMemberName(partProps.id);
|
|
127
|
+
} else if (symbolSource.value) {
|
|
128
|
+
return accessStyleForMemberName(symbolSource.value.name);
|
|
129
|
+
} else {
|
|
130
|
+
return "dot";
|
|
131
|
+
}
|
|
132
|
+
}),
|
|
133
|
+
quoteId: computed(() => {
|
|
134
|
+
if (partProps.quoteId) {
|
|
135
|
+
return partProps.quoteId;
|
|
136
|
+
} else if (partProps.id) {
|
|
137
|
+
return !isValidJSIdentifier(partProps.id);
|
|
138
|
+
} else if (symbolSource.value) {
|
|
139
|
+
return !isValidJSIdentifier(symbolSource.value.name);
|
|
140
|
+
} else {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
}),
|
|
144
|
+
nullish: computed(() => {
|
|
145
|
+
if (partProps.nullish) {
|
|
146
|
+
return partProps.nullish;
|
|
147
|
+
}
|
|
148
|
+
if (symbolSource.value) {
|
|
149
|
+
return isNullish(symbolSource.value);
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
}),
|
|
153
|
+
args: ref(partProps.args === true ? [] : partProps.args)
|
|
154
|
+
};
|
|
155
|
+
return reactive(part);
|
|
156
|
+
}
|
|
78
157
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
158
|
+
/**
|
|
159
|
+
* replaces quotes with escaped quotes
|
|
160
|
+
*/
|
|
161
|
+
function escapeId(id) {
|
|
162
|
+
return id.replace(/"/g, '\\"');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Convert a refkey to a symbol ref using the current binder.
|
|
167
|
+
*/
|
|
168
|
+
function getSymbolForRefkey(refkey) {
|
|
169
|
+
const binder = useBinder();
|
|
170
|
+
return binder.getSymbolForRefkey(refkey);
|
|
171
|
+
}
|
|
82
172
|
|
|
83
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Check if the given symbol is nullish.
|
|
175
|
+
*/
|
|
176
|
+
function isNullish(symbol) {
|
|
177
|
+
return !!(symbol.tsFlags & TSSymbolFlags.Nullish);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Formatting of call chains (i.e. member expressions which have more than one
|
|
182
|
+
* call in them). The general approach is that line breaks occur after each
|
|
183
|
+
* call, and there is only one call per line. When there are non-call elements,
|
|
184
|
+
* they occur prior to the call part. The first part of the member expression
|
|
185
|
+
* contains all but the last non-call part.
|
|
186
|
+
*
|
|
187
|
+
* The following is an example of proper formatting:
|
|
188
|
+
*
|
|
189
|
+
* ```ts
|
|
190
|
+
* z.dummy // all but the last non-call part for the first element
|
|
191
|
+
* .object({ // the first call part with line break after
|
|
192
|
+
* a: 1,
|
|
193
|
+
* })
|
|
194
|
+
* .dummy.partial() // the next call part with non-call parts before it
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
function formatCallChain(parts) {
|
|
198
|
+
return computed(() => {
|
|
199
|
+
const expression = [];
|
|
200
|
+
|
|
201
|
+
// break the expression into parts.
|
|
202
|
+
const chunks = [];
|
|
203
|
+
|
|
204
|
+
// the first part is all the non-call parts
|
|
205
|
+
let partIndex = 0;
|
|
206
|
+
function pushPart() {
|
|
207
|
+
const part = parts[partIndex];
|
|
208
|
+
if (!part) throw new Error("No part to push");
|
|
209
|
+
chunks.at(-1).push(part);
|
|
210
|
+
partIndex++;
|
|
211
|
+
}
|
|
212
|
+
function pushChunk() {
|
|
213
|
+
chunks.push([]);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// For the first chunk, take all the non-call parts except the last one
|
|
217
|
+
// and put them in a chunk.
|
|
218
|
+
pushChunk();
|
|
219
|
+
while (partIndex < parts.length && (partIndex === parts.length - 1 || chunks.at(-1).length === 0 || parts[partIndex + 1].args === undefined)) {
|
|
220
|
+
pushPart();
|
|
221
|
+
if (chunks.at(-1).at(-1).args !== undefined) {
|
|
222
|
+
// the first segment always ends after we see a call
|
|
223
|
+
// if we happen to take one
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// then for all remaining parts, collect all the non-call parts and end with
|
|
229
|
+
// a call chunk
|
|
230
|
+
while (partIndex < parts.length) {
|
|
231
|
+
pushChunk();
|
|
232
|
+
while (partIndex < parts.length && !parts[partIndex].args) {
|
|
233
|
+
pushPart();
|
|
234
|
+
}
|
|
235
|
+
while (partIndex < parts.length && parts[partIndex].args) {
|
|
236
|
+
pushPart();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
for (let chunkIndex = 0; chunkIndex < chunks.length; chunkIndex++) {
|
|
240
|
+
const chunk = chunks[chunkIndex];
|
|
241
|
+
const chunkExpression = [];
|
|
242
|
+
for (let partIndex = 0; partIndex < chunk.length; partIndex++) {
|
|
243
|
+
if (chunkIndex === 0 && partIndex === 0) {
|
|
244
|
+
// first part is just gonna be the id
|
|
245
|
+
chunkExpression.push(chunk[0].id);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
const part = chunk[partIndex];
|
|
249
|
+
const prevPart = partIndex === 0 ? chunks[chunkIndex - 1].at(-1) : chunk[partIndex - 1];
|
|
250
|
+
if (part.args !== undefined) {
|
|
251
|
+
// For parts with only args (no name), append function call directly with appropriate nullish operator
|
|
252
|
+
chunkExpression.push(formatCallExpr(prevPart, part));
|
|
253
|
+
} else if (part.accessStyle === "dot") {
|
|
254
|
+
chunkExpression.push(formatDotAccess(prevPart, part));
|
|
255
|
+
} else {
|
|
256
|
+
// bracket notation - don't include the dot
|
|
257
|
+
chunkExpression.push(formatArrayAccess(prevPart, part));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
expression.push(chunkIndex === 0 ? chunkExpression : [_$createIntrinsic("sbr", {}), chunkExpression]);
|
|
261
|
+
}
|
|
262
|
+
return _$createIntrinsic("group", {
|
|
263
|
+
get children() {
|
|
264
|
+
return _$createIntrinsic("indent", {
|
|
265
|
+
children: expression
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function formatNonCallChain(parts) {
|
|
272
|
+
return computed(() => {
|
|
84
273
|
const expression = [];
|
|
85
274
|
for (let i = 0; i < parts.length; i++) {
|
|
86
275
|
const part = parts[i];
|
|
87
|
-
const base =
|
|
88
|
-
const hasName = base !== "";
|
|
276
|
+
const base = part.id;
|
|
89
277
|
if (i === 0) {
|
|
90
278
|
expression.push(base);
|
|
91
279
|
} else {
|
|
92
280
|
// Determine if we should use nullish operator from previous part
|
|
93
281
|
const prevPart = parts[i - 1];
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// Handle parts with name vs. parts with only args differently
|
|
97
|
-
if (hasName) {
|
|
98
|
-
// Apply dot or bracket notation based on accessStyle for named parts
|
|
99
|
-
if (part.accessStyle.value === "dot") {
|
|
100
|
-
expression.push(_$createIntrinsic("group", {
|
|
101
|
-
get children() {
|
|
102
|
-
return _$createIntrinsic("indent", {
|
|
103
|
-
get children() {
|
|
104
|
-
return [_$createIntrinsic("sbr", {}), isNullish ? "?." : ".", base];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}));
|
|
109
|
-
} else {
|
|
110
|
-
// bracket notation - don't include the dot
|
|
111
|
-
expression.push(_$createIntrinsic("group", {
|
|
112
|
-
get children() {
|
|
113
|
-
return [isNullish ? "?." : "", "[", _$createIntrinsic("indent", {
|
|
114
|
-
get children() {
|
|
115
|
-
return [_$createIntrinsic("sbr", {}), _$memo(() => JSON.stringify(base))];
|
|
116
|
-
}
|
|
117
|
-
}), _$createIntrinsic("sbr", {}), "]"];
|
|
118
|
-
}
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
} else if (part.args !== undefined) {
|
|
282
|
+
if (part.args !== undefined) {
|
|
122
283
|
// For parts with only args (no name), append function call directly with appropriate nullish operator
|
|
123
|
-
expression.push(
|
|
284
|
+
expression.push(formatCallExpr(prevPart, part));
|
|
285
|
+
} else if (part.accessStyle === "dot") {
|
|
286
|
+
expression.push(formatDotAccess(prevPart, part));
|
|
287
|
+
} else {
|
|
288
|
+
// bracket notation - don't include the dot
|
|
289
|
+
expression.push(formatArrayAccess(prevPart, part));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return expression;
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
function formatArrayAccess(prevPart, part) {
|
|
297
|
+
return _$createIntrinsic("group", {
|
|
298
|
+
get children() {
|
|
299
|
+
return [_$memo(() => prevPart.nullish ? "?." : ""), "[", _$createIntrinsic("indent", {
|
|
300
|
+
get children() {
|
|
301
|
+
return [_$createIntrinsic("sbr", {}), _$memo(() => part.quoteId && '"'), _$memo(() => part.id), _$memo(() => part.quoteId && '"')];
|
|
302
|
+
}
|
|
303
|
+
}), _$createIntrinsic("sbr", {}), "]"];
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function formatDotAccess(prevPart, part) {
|
|
308
|
+
return _$createIntrinsic("group", {
|
|
309
|
+
get children() {
|
|
310
|
+
return _$createIntrinsic("indent", {
|
|
311
|
+
get children() {
|
|
312
|
+
return [_$createIntrinsic("sbr", {}), _$memo(() => prevPart.nullish ? "?." : "."), _$memo(() => part.id)];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
function formatCallExpr(prevPart, part) {
|
|
319
|
+
const args = computed(() => {
|
|
320
|
+
return typeof part.args === "boolean" ? [] : part.args ?? [];
|
|
321
|
+
});
|
|
322
|
+
return _$createIntrinsic("group", {
|
|
323
|
+
get children() {
|
|
324
|
+
return [_$memo(() => prevPart.nullish ? "?." : ""), "(", _$createComponent(Show, {
|
|
325
|
+
get when() {
|
|
326
|
+
return args.value.length <= 1;
|
|
327
|
+
},
|
|
328
|
+
get children() {
|
|
329
|
+
return args.value[0];
|
|
330
|
+
}
|
|
331
|
+
}), _$createComponent(Show, {
|
|
332
|
+
get when() {
|
|
333
|
+
return args.value.length > 1;
|
|
334
|
+
},
|
|
335
|
+
get children() {
|
|
336
|
+
return [_$createIntrinsic("indent", {
|
|
124
337
|
get children() {
|
|
125
|
-
return [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
comma: true,
|
|
132
|
-
line: true,
|
|
133
|
-
children: arg => arg
|
|
134
|
-
}), ")"];
|
|
135
|
-
}
|
|
338
|
+
return [_$createIntrinsic("sbr", {}), _$createComponent(For, {
|
|
339
|
+
each: args,
|
|
340
|
+
comma: true,
|
|
341
|
+
line: true,
|
|
342
|
+
children: arg => arg
|
|
136
343
|
})];
|
|
137
344
|
}
|
|
138
|
-
}));
|
|
345
|
+
}), _$createIntrinsic("sbr", {})];
|
|
139
346
|
}
|
|
140
|
-
}
|
|
347
|
+
}), ")"];
|
|
141
348
|
}
|
|
142
|
-
return expression;
|
|
143
349
|
});
|
|
144
|
-
return [_$memo(() => result.value)];
|
|
145
350
|
}
|
|
146
351
|
function accessStyleForMemberName(name) {
|
|
147
352
|
if (isValidJSIdentifier(name)) {
|
|
@@ -168,6 +373,15 @@ function flattenMemberExpression(children) {
|
|
|
168
373
|
* * **refkey**: A refkey for a symbol whose name becomes the identifier
|
|
169
374
|
* * **symbol**: a symbol whose name becomes the identifier part
|
|
170
375
|
* * **args**: create a method call with the given args
|
|
376
|
+
* * **children**: arbitrary contents for the identifier part.
|
|
377
|
+
*
|
|
378
|
+
* Each part can have a nullish prop, which indicates that the part may be null
|
|
379
|
+
* or undefined.
|
|
380
|
+
*
|
|
381
|
+
* Each part can also have a quoteId prop, which indicates that the identifier
|
|
382
|
+
* of the part should be quoted (i.e. `["foo"]` instead of `.foo`). This is only
|
|
383
|
+
* necessary when providing the children prop, otherwise it is determined
|
|
384
|
+
* automatically.
|
|
171
385
|
*/
|
|
172
386
|
MemberExpression.Part = function (props) {
|
|
173
387
|
/**
|
|
@@ -13,4 +13,10 @@ export interface ObjectPropertyProps {
|
|
|
13
13
|
refkey?: Refkey | Refkey[];
|
|
14
14
|
}
|
|
15
15
|
export declare function ObjectProperty(props: ObjectPropertyProps): Children;
|
|
16
|
+
export interface ObjectSpreadPropertyProps {
|
|
17
|
+
value?: Children;
|
|
18
|
+
jsValue?: unknown;
|
|
19
|
+
children?: Children;
|
|
20
|
+
}
|
|
21
|
+
export declare function ObjectSpreadProperty(props: ObjectSpreadPropertyProps): Children;
|
|
16
22
|
//# sourceMappingURL=ObjectExpression.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAQR,MAAM,EAGP,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EACJ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YA0D5D;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,YA0CxD"}
|
|
1
|
+
{"version":3,"file":"ObjectExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAQR,MAAM,EAGP,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EACJ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YA0D5D;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,YA0CxD;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,YAYpE"}
|
|
@@ -90,7 +90,7 @@ export function ObjectProperty(props) {
|
|
|
90
90
|
let value;
|
|
91
91
|
if (props.value) {
|
|
92
92
|
value = props.value;
|
|
93
|
-
} else if (Object.
|
|
93
|
+
} else if (Object.hasOwn(props, "jsValue")) {
|
|
94
94
|
// need the hasOwnProperty check because the value might be falsy.
|
|
95
95
|
value = _$createComponent(ValueExpression, {
|
|
96
96
|
get jsValue() {
|
|
@@ -105,4 +105,20 @@ export function ObjectProperty(props) {
|
|
|
105
105
|
value: assignmentContext,
|
|
106
106
|
children: value
|
|
107
107
|
})];
|
|
108
|
+
}
|
|
109
|
+
export function ObjectSpreadProperty(props) {
|
|
110
|
+
let value;
|
|
111
|
+
if (props.value) {
|
|
112
|
+
value = props.value;
|
|
113
|
+
} else if (Object.hasOwn(props, "jsValue")) {
|
|
114
|
+
// need the hasOwnProperty check because the value might be falsy.
|
|
115
|
+
value = _$createComponent(ValueExpression, {
|
|
116
|
+
get jsValue() {
|
|
117
|
+
return props.jsValue;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
} else if (props.children) {
|
|
121
|
+
value = props.children;
|
|
122
|
+
}
|
|
123
|
+
return ["...", value];
|
|
108
124
|
}
|
|
@@ -22,7 +22,6 @@ export * from "./InterfaceMethod.jsx";
|
|
|
22
22
|
export * from "./JSDoc.jsx";
|
|
23
23
|
export * from "./JSDocComment.jsx";
|
|
24
24
|
export * from "./JSDocExample.jsx";
|
|
25
|
-
export * from "./MemberChainExpression.jsx";
|
|
26
25
|
export * from "./MemberExpression.jsx";
|
|
27
26
|
export * from "./ObjectExpression.js";
|
|
28
27
|
export * from "./PackageDirectory.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,q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