@alloy-js/json 0.5.0 → 0.7.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 +15 -0
- package/babel.config.cjs +4 -1
- package/dist/src/components/JsonArray.d.ts +19 -8
- package/dist/src/components/JsonArray.d.ts.map +1 -1
- package/dist/src/components/JsonArray.js +67 -43
- package/dist/src/components/JsonArray.js.map +1 -1
- package/dist/src/components/JsonObject.d.ts +9 -1
- package/dist/src/components/JsonObject.d.ts.map +1 -1
- package/dist/src/components/JsonObject.js +47 -24
- package/dist/src/components/JsonObject.js.map +1 -1
- package/dist/src/components/JsonValue.d.ts +5 -0
- package/dist/src/components/JsonValue.d.ts.map +1 -1
- package/dist/src/components/JsonValue.js +7 -6
- package/dist/src/components/JsonValue.js.map +1 -1
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js.map +1 -1
- package/dist/src/components/stc/index.d.ts +5 -5
- package/dist/test/array.test.d.ts.map +1 -1
- package/dist/test/utils.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -5
- package/src/components/JsonArray.tsx +68 -42
- package/src/components/JsonObject.tsx +59 -31
- package/src/components/JsonValue.tsx +17 -6
- package/src/components/SourceFile.tsx +10 -7
- package/temp/api.json +211 -7
- package/test/array.test.tsx +36 -6
- package/test/object.test.tsx +40 -11
- package/test/reference.test.tsx +50 -41
- package/test/utils.tsx +7 -5
- package/test/vitest.d.ts +7 -1
- package/vitest.config.ts +1 -1
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alloy-js/json",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
|
-
"development": "./src/index.ts",
|
|
8
7
|
"import": "./dist/src/index.js"
|
|
9
8
|
},
|
|
10
9
|
"./stc": {
|
|
11
|
-
"development": "./src/components/stc/index.ts",
|
|
12
10
|
"import": "./dist/src/components/stc/index.js"
|
|
13
11
|
}
|
|
14
12
|
},
|
|
@@ -17,7 +15,7 @@
|
|
|
17
15
|
"license": "MIT",
|
|
18
16
|
"dependencies": {
|
|
19
17
|
"pathe": "^1.1.2",
|
|
20
|
-
"@alloy-js/core": "~0.
|
|
18
|
+
"@alloy-js/core": "~0.7.0"
|
|
21
19
|
},
|
|
22
20
|
"devDependencies": {
|
|
23
21
|
"@babel/cli": "^7.24.7",
|
|
@@ -28,7 +26,7 @@
|
|
|
28
26
|
"concurrently": "^8.2.2",
|
|
29
27
|
"typescript": "^5.7.3",
|
|
30
28
|
"vitest": "^3.0.4",
|
|
31
|
-
"@alloy-js/babel-preset": "~0.
|
|
29
|
+
"@alloy-js/babel-preset": "~0.2.0"
|
|
32
30
|
},
|
|
33
31
|
"type": "module",
|
|
34
32
|
"scripts": {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Children,
|
|
3
|
-
|
|
3
|
+
For,
|
|
4
|
+
Indent,
|
|
5
|
+
List,
|
|
4
6
|
MemberDeclaration,
|
|
5
7
|
MemberScope,
|
|
8
|
+
onCleanup,
|
|
6
9
|
OutputSymbolFlags,
|
|
7
10
|
Refkey,
|
|
8
11
|
useMemberDeclaration,
|
|
@@ -16,6 +19,12 @@ export interface JsonArrayPropsBase {
|
|
|
16
19
|
* elsewhere via this refkey.
|
|
17
20
|
**/
|
|
18
21
|
refkey?: Refkey;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The refkeys for the JSON array. When provided, this array can be referenced
|
|
25
|
+
* elsewhere via any of these refkeys.
|
|
26
|
+
**/
|
|
27
|
+
refkeys?: Refkey[];
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
/**
|
|
@@ -58,60 +67,68 @@ export function JsonArray(props: JsonArrayProps) {
|
|
|
58
67
|
const binder = memberSymbol.binder;
|
|
59
68
|
binder.addStaticMembersToSymbol(memberSymbol);
|
|
60
69
|
if (props.refkey) {
|
|
61
|
-
memberSymbol.
|
|
70
|
+
memberSymbol.refkeys = [
|
|
71
|
+
...(props.refkey ? [props.refkey] : []),
|
|
72
|
+
...(props.refkeys ?? []),
|
|
73
|
+
];
|
|
62
74
|
}
|
|
63
75
|
|
|
64
76
|
if (!("jsValue" in props)) {
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
return (
|
|
78
|
+
<MemberScope owner={memberSymbol}>
|
|
79
|
+
<group>
|
|
80
|
+
[
|
|
81
|
+
<Indent break="soft" trailingBreak>
|
|
82
|
+
<List comma line>
|
|
83
|
+
{props.children}
|
|
84
|
+
</List>
|
|
85
|
+
</Indent>
|
|
86
|
+
]
|
|
87
|
+
</group>
|
|
88
|
+
</MemberScope>
|
|
89
|
+
);
|
|
70
90
|
}
|
|
71
91
|
|
|
72
92
|
const jsValue = props.jsValue ?? [];
|
|
73
93
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
return (
|
|
95
|
+
<MemberScope owner={memberSymbol}>
|
|
96
|
+
<group>
|
|
97
|
+
[
|
|
98
|
+
<Indent break="soft" trailingBreak>
|
|
99
|
+
<For each={jsValue} comma line>
|
|
100
|
+
{(value) => <JsonArrayElement jsValue={value} />}
|
|
101
|
+
</For>
|
|
102
|
+
</Indent>
|
|
103
|
+
]
|
|
104
|
+
</group>
|
|
105
|
+
</MemberScope>
|
|
84
106
|
);
|
|
107
|
+
}
|
|
85
108
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{elements}
|
|
93
|
-
]
|
|
94
|
-
</>;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return <MemberScope owner={memberSymbol}>
|
|
98
|
-
{contents}
|
|
99
|
-
</MemberScope>;
|
|
109
|
+
/**
|
|
110
|
+
* Create a JSON Array element by providing a JS value that will be serialized
|
|
111
|
+
* to JSON.
|
|
112
|
+
*/
|
|
113
|
+
export interface JsonArrayElementPropsWithJsValue {
|
|
114
|
+
jsValue: unknown;
|
|
100
115
|
}
|
|
101
116
|
|
|
102
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Create a JSON Array element by providing children.
|
|
119
|
+
*/
|
|
120
|
+
export interface JsonArrayElementPropsWithChildren {
|
|
103
121
|
children: Children;
|
|
104
122
|
}
|
|
105
123
|
|
|
124
|
+
export type JsonArrayElementProps =
|
|
125
|
+
| JsonArrayElementPropsWithJsValue
|
|
126
|
+
| JsonArrayElementPropsWithChildren;
|
|
127
|
+
|
|
106
128
|
/**
|
|
107
129
|
* Create a JSON Array element. This component should be used inside of a
|
|
108
|
-
* {@link JsonArray} component.
|
|
109
|
-
*
|
|
110
|
-
* @remarks
|
|
111
|
-
*
|
|
112
|
-
* It does not add any syntax, but is required in
|
|
113
|
-
* order to establish the correct scope for the array element, allowing
|
|
114
|
-
* references to array elements to work properly.
|
|
130
|
+
* {@link JsonArray} component. Can either be provided `children`, or a JS
|
|
131
|
+
* value which will be serialized to JSON.
|
|
115
132
|
*
|
|
116
133
|
* @see {@link @alloy-js/core#(MemberDeclarationContext:variable)}
|
|
117
134
|
*/
|
|
@@ -132,7 +149,16 @@ export function JsonArrayElement(props: JsonArrayElementProps) {
|
|
|
132
149
|
flags: OutputSymbolFlags.StaticMember,
|
|
133
150
|
});
|
|
134
151
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
152
|
+
onCleanup(() => {
|
|
153
|
+
sym.binder.deleteSymbol(sym);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
function wrap(children: Children) {
|
|
157
|
+
return <MemberDeclaration symbol={sym}>{children}</MemberDeclaration>;
|
|
158
|
+
}
|
|
159
|
+
if (!("jsValue" in props)) {
|
|
160
|
+
return wrap(() => props.children);
|
|
161
|
+
} else {
|
|
162
|
+
return wrap(<JsonValue jsValue={props.jsValue} />);
|
|
163
|
+
}
|
|
138
164
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Children,
|
|
3
3
|
computed,
|
|
4
|
-
|
|
4
|
+
For,
|
|
5
|
+
Indent,
|
|
6
|
+
List,
|
|
5
7
|
MemberDeclaration,
|
|
6
8
|
MemberScope,
|
|
9
|
+
onCleanup,
|
|
7
10
|
OutputSymbolFlags,
|
|
8
11
|
Refkey,
|
|
9
12
|
useMemberDeclaration,
|
|
@@ -12,10 +15,18 @@ import { createJsonOutputSymbol } from "../symbols/json-symbol.js";
|
|
|
12
15
|
import { JsonValue } from "./JsonValue.jsx";
|
|
13
16
|
|
|
14
17
|
export interface JsonObjectPropsBase {
|
|
15
|
-
/** The refkey for the JSON
|
|
18
|
+
/** The refkey for the JSON object. When provided, this value can be referenced
|
|
16
19
|
* elsewhere via this refkey.
|
|
17
20
|
**/
|
|
18
21
|
refkey?: Refkey;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The refkeys for the JSON object. When provided, this value can be
|
|
25
|
+
* referenced elsewhere via any of these refkeys.
|
|
26
|
+
**/
|
|
27
|
+
refkeys?: Refkey[];
|
|
28
|
+
|
|
29
|
+
style?: { concise?: boolean };
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
/**
|
|
@@ -61,45 +72,56 @@ export function JsonObject(props: JsonObjectProps) {
|
|
|
61
72
|
const binder = memberSymbol.binder;
|
|
62
73
|
binder.addStaticMembersToSymbol(memberSymbol);
|
|
63
74
|
if (props.refkey) {
|
|
64
|
-
memberSymbol.
|
|
75
|
+
memberSymbol.refkeys = [
|
|
76
|
+
...(props.refkey ? [props.refkey] : []),
|
|
77
|
+
...(props.refkeys ?? []),
|
|
78
|
+
];
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
if (!("jsValue" in props)) {
|
|
68
|
-
return
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
return (
|
|
83
|
+
<MemberScope owner={memberSymbol}>
|
|
84
|
+
<group>
|
|
85
|
+
{"{"}
|
|
86
|
+
<Indent break={props.style?.concise ? "soft" : "hard"} trailingBreak>
|
|
87
|
+
<List comma softline>
|
|
88
|
+
{props.children}
|
|
89
|
+
</List>
|
|
90
|
+
</Indent>
|
|
91
|
+
{"}"}
|
|
92
|
+
</group>
|
|
93
|
+
</MemberScope>
|
|
94
|
+
);
|
|
73
95
|
}
|
|
74
96
|
|
|
75
|
-
const
|
|
97
|
+
const entries = computed(() => {
|
|
76
98
|
const jsValue = props.jsValue;
|
|
77
|
-
let properties: [string, unknown][];
|
|
78
99
|
if (Array.isArray(jsValue)) {
|
|
79
|
-
|
|
100
|
+
return jsValue;
|
|
80
101
|
} else if (jsValue instanceof Map) {
|
|
81
|
-
|
|
102
|
+
return [...jsValue.entries()];
|
|
82
103
|
} else if (jsValue !== undefined) {
|
|
83
|
-
|
|
104
|
+
return globalThis.Object.entries(jsValue);
|
|
84
105
|
} else {
|
|
85
|
-
|
|
106
|
+
return [];
|
|
86
107
|
}
|
|
87
|
-
const elements = mapJoin(
|
|
88
|
-
properties,
|
|
89
|
-
([name, value]) => {
|
|
90
|
-
return <JsonObjectProperty name={name} jsValue={value} />;
|
|
91
|
-
},
|
|
92
|
-
{ joiner: ",\n" },
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
return elements;
|
|
96
108
|
});
|
|
97
109
|
|
|
98
|
-
return
|
|
99
|
-
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
return (
|
|
111
|
+
<MemberScope owner={memberSymbol}>
|
|
112
|
+
<group>
|
|
113
|
+
{"{"}
|
|
114
|
+
<Indent break={props.style?.concise ? "soft" : "hard"} trailingBreak>
|
|
115
|
+
<For each={entries} comma softline>
|
|
116
|
+
{([name, value]) => (
|
|
117
|
+
<JsonObjectProperty name={name} jsValue={value} />
|
|
118
|
+
)}
|
|
119
|
+
</For>
|
|
120
|
+
</Indent>
|
|
121
|
+
{"}"}
|
|
122
|
+
</group>
|
|
123
|
+
</MemberScope>
|
|
124
|
+
);
|
|
103
125
|
}
|
|
104
126
|
|
|
105
127
|
/**
|
|
@@ -136,10 +158,16 @@ export function JsonObjectProperty(props: ObjectPropertyProps) {
|
|
|
136
158
|
flags: OutputSymbolFlags.StaticMember,
|
|
137
159
|
});
|
|
138
160
|
|
|
161
|
+
onCleanup(() => {
|
|
162
|
+
sym.binder.deleteSymbol(sym);
|
|
163
|
+
});
|
|
164
|
+
|
|
139
165
|
const wrap = (children: Children) => {
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
|
|
166
|
+
return (
|
|
167
|
+
<MemberDeclaration symbol={sym}>
|
|
168
|
+
"{props.name}": {children}
|
|
169
|
+
</MemberDeclaration>
|
|
170
|
+
);
|
|
143
171
|
};
|
|
144
172
|
|
|
145
173
|
if (!("jsValue" in props)) {
|
|
@@ -9,6 +9,12 @@ export interface JsonValueProps {
|
|
|
9
9
|
**/
|
|
10
10
|
refkey?: Refkey;
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The refkeys for the JSON value. When provided, these values can be
|
|
14
|
+
* referenced elsewhere via any of these refkeys.
|
|
15
|
+
**/
|
|
16
|
+
refkeys?: Refkey[];
|
|
17
|
+
|
|
12
18
|
/**
|
|
13
19
|
* The JS value to serialize to JSON. When provided, thi
|
|
14
20
|
*/
|
|
@@ -23,18 +29,22 @@ export interface JsonValueProps {
|
|
|
23
29
|
* appropriate.
|
|
24
30
|
*/
|
|
25
31
|
export function JsonValue(props: JsonValueProps) {
|
|
32
|
+
const refkeys = [
|
|
33
|
+
...(props.refkey ? [props.refkey] : []),
|
|
34
|
+
...(props.refkeys ?? []),
|
|
35
|
+
];
|
|
26
36
|
if (props.jsValue === null) {
|
|
27
|
-
setMemberRefkey(
|
|
37
|
+
setMemberRefkey(refkeys);
|
|
28
38
|
return "null";
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
if (typeof props.jsValue === "number" || typeof props.jsValue === "boolean") {
|
|
32
|
-
setMemberRefkey(
|
|
42
|
+
setMemberRefkey(refkeys);
|
|
33
43
|
return String(props.jsValue);
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
if (typeof props.jsValue === "string") {
|
|
37
|
-
setMemberRefkey(
|
|
47
|
+
setMemberRefkey(refkeys);
|
|
38
48
|
return `"${props.jsValue}"`;
|
|
39
49
|
}
|
|
40
50
|
|
|
@@ -49,11 +59,12 @@ export function JsonValue(props: JsonValueProps) {
|
|
|
49
59
|
throw new Error("Cannot emit js value with type of " + typeof props.jsValue);
|
|
50
60
|
}
|
|
51
61
|
|
|
52
|
-
function setMemberRefkey(
|
|
53
|
-
if (
|
|
62
|
+
function setMemberRefkey(keys: Refkey[]) {
|
|
63
|
+
if (keys.length === 0) return;
|
|
54
64
|
const member = useMemberDeclaration();
|
|
55
65
|
if (!member) {
|
|
56
66
|
throw new Error("Missing member declaration.");
|
|
57
67
|
}
|
|
58
|
-
|
|
68
|
+
|
|
69
|
+
member.refkeys = keys;
|
|
59
70
|
}
|
|
@@ -38,11 +38,14 @@ export function SourceFile(props: SourceFileProps) {
|
|
|
38
38
|
jsonValueSym.name = context.path;
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
return
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
return (
|
|
42
|
+
<CoreSourceFile filetype="json" path={props.path} reference={Reference}>
|
|
43
|
+
<SfTapper />
|
|
44
|
+
<JsonFileContext.Provider value={fileContext}>
|
|
45
|
+
<MemberDeclaration symbol={jsonValueSym}>
|
|
46
|
+
{props.children}
|
|
47
|
+
</MemberDeclaration>
|
|
48
|
+
</JsonFileContext.Provider>
|
|
49
|
+
</CoreSourceFile>
|
|
50
|
+
);
|
|
48
51
|
}
|
package/temp/api.json
CHANGED
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
{
|
|
330
330
|
"kind": "Function",
|
|
331
331
|
"canonicalReference": "@alloy-js/json!JsonArrayElement:function(1)",
|
|
332
|
-
"docComment": "/**\n * Create a JSON Array element. This component should be used inside of a {@link JsonArray} component
|
|
332
|
+
"docComment": "/**\n * Create a JSON Array element. This component should be used inside of a {@link JsonArray} component. Can either be provided `children`, or a JS value which will be serialized to JSON.\n *\n * @see\n *\n * {@link @alloy-js/core#(MemberDeclarationContext:variable)}\n */\n",
|
|
333
333
|
"excerptTokens": [
|
|
334
334
|
{
|
|
335
335
|
"kind": "Content",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
{
|
|
339
339
|
"kind": "Reference",
|
|
340
340
|
"text": "JsonArrayElementProps",
|
|
341
|
-
"canonicalReference": "@alloy-js/json!JsonArrayElementProps:
|
|
341
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementProps:type"
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
344
|
"kind": "Content",
|
|
@@ -374,23 +374,59 @@
|
|
|
374
374
|
"name": "JsonArrayElement"
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
|
-
"kind": "
|
|
378
|
-
"canonicalReference": "@alloy-js/json!JsonArrayElementProps:
|
|
377
|
+
"kind": "TypeAlias",
|
|
378
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementProps:type",
|
|
379
379
|
"docComment": "",
|
|
380
380
|
"excerptTokens": [
|
|
381
381
|
{
|
|
382
382
|
"kind": "Content",
|
|
383
|
-
"text": "export
|
|
383
|
+
"text": "export type JsonArrayElementProps = "
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"kind": "Reference",
|
|
387
|
+
"text": "JsonArrayElementPropsWithJsValue",
|
|
388
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementPropsWithJsValue:interface"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"kind": "Content",
|
|
392
|
+
"text": " | "
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"kind": "Reference",
|
|
396
|
+
"text": "JsonArrayElementPropsWithChildren",
|
|
397
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementPropsWithChildren:interface"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"kind": "Content",
|
|
401
|
+
"text": ";"
|
|
384
402
|
}
|
|
385
403
|
],
|
|
386
404
|
"fileUrlPath": "src/components/JsonArray.tsx",
|
|
387
405
|
"releaseTag": "Public",
|
|
388
406
|
"name": "JsonArrayElementProps",
|
|
407
|
+
"typeTokenRange": {
|
|
408
|
+
"startIndex": 1,
|
|
409
|
+
"endIndex": 4
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"kind": "Interface",
|
|
414
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementPropsWithChildren:interface",
|
|
415
|
+
"docComment": "/**\n * Create a JSON Array element by providing children.\n */\n",
|
|
416
|
+
"excerptTokens": [
|
|
417
|
+
{
|
|
418
|
+
"kind": "Content",
|
|
419
|
+
"text": "export interface JsonArrayElementPropsWithChildren "
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"fileUrlPath": "src/components/JsonArray.tsx",
|
|
423
|
+
"releaseTag": "Public",
|
|
424
|
+
"name": "JsonArrayElementPropsWithChildren",
|
|
389
425
|
"preserveMemberOrder": false,
|
|
390
426
|
"members": [
|
|
391
427
|
{
|
|
392
428
|
"kind": "PropertySignature",
|
|
393
|
-
"canonicalReference": "@alloy-js/json!
|
|
429
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementPropsWithChildren#children:member",
|
|
394
430
|
"docComment": "",
|
|
395
431
|
"excerptTokens": [
|
|
396
432
|
{
|
|
@@ -419,6 +455,51 @@
|
|
|
419
455
|
],
|
|
420
456
|
"extendsTokenRanges": []
|
|
421
457
|
},
|
|
458
|
+
{
|
|
459
|
+
"kind": "Interface",
|
|
460
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementPropsWithJsValue:interface",
|
|
461
|
+
"docComment": "/**\n * Create a JSON Array element by providing a JS value that will be serialized to JSON.\n */\n",
|
|
462
|
+
"excerptTokens": [
|
|
463
|
+
{
|
|
464
|
+
"kind": "Content",
|
|
465
|
+
"text": "export interface JsonArrayElementPropsWithJsValue "
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
"fileUrlPath": "src/components/JsonArray.tsx",
|
|
469
|
+
"releaseTag": "Public",
|
|
470
|
+
"name": "JsonArrayElementPropsWithJsValue",
|
|
471
|
+
"preserveMemberOrder": false,
|
|
472
|
+
"members": [
|
|
473
|
+
{
|
|
474
|
+
"kind": "PropertySignature",
|
|
475
|
+
"canonicalReference": "@alloy-js/json!JsonArrayElementPropsWithJsValue#jsValue:member",
|
|
476
|
+
"docComment": "",
|
|
477
|
+
"excerptTokens": [
|
|
478
|
+
{
|
|
479
|
+
"kind": "Content",
|
|
480
|
+
"text": "jsValue: "
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"kind": "Content",
|
|
484
|
+
"text": "unknown"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"kind": "Content",
|
|
488
|
+
"text": ";"
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
"isReadonly": false,
|
|
492
|
+
"isOptional": false,
|
|
493
|
+
"releaseTag": "Public",
|
|
494
|
+
"name": "jsValue",
|
|
495
|
+
"propertyTypeTokenRange": {
|
|
496
|
+
"startIndex": 1,
|
|
497
|
+
"endIndex": 2
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
"extendsTokenRanges": []
|
|
502
|
+
},
|
|
422
503
|
{
|
|
423
504
|
"kind": "TypeAlias",
|
|
424
505
|
"canonicalReference": "@alloy-js/json!JsonArrayProps:type",
|
|
@@ -497,6 +578,38 @@
|
|
|
497
578
|
"startIndex": 1,
|
|
498
579
|
"endIndex": 2
|
|
499
580
|
}
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"kind": "PropertySignature",
|
|
584
|
+
"canonicalReference": "@alloy-js/json!JsonArrayPropsBase#refkeys:member",
|
|
585
|
+
"docComment": "/**\n * The refkeys for the JSON array. When provided, this array can be referenced elsewhere via any of these refkeys.\n */\n",
|
|
586
|
+
"excerptTokens": [
|
|
587
|
+
{
|
|
588
|
+
"kind": "Content",
|
|
589
|
+
"text": "refkeys?: "
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"kind": "Reference",
|
|
593
|
+
"text": "Refkey",
|
|
594
|
+
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"kind": "Content",
|
|
598
|
+
"text": "[]"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"kind": "Content",
|
|
602
|
+
"text": ";"
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
"isReadonly": false,
|
|
606
|
+
"isOptional": true,
|
|
607
|
+
"releaseTag": "Public",
|
|
608
|
+
"name": "refkeys",
|
|
609
|
+
"propertyTypeTokenRange": {
|
|
610
|
+
"startIndex": 1,
|
|
611
|
+
"endIndex": 3
|
|
612
|
+
}
|
|
500
613
|
}
|
|
501
614
|
],
|
|
502
615
|
"extendsTokenRanges": []
|
|
@@ -905,7 +1018,7 @@
|
|
|
905
1018
|
{
|
|
906
1019
|
"kind": "PropertySignature",
|
|
907
1020
|
"canonicalReference": "@alloy-js/json!JsonObjectPropsBase#refkey:member",
|
|
908
|
-
"docComment": "/**\n * The refkey for the JSON
|
|
1021
|
+
"docComment": "/**\n * The refkey for the JSON object. When provided, this value can be referenced elsewhere via this refkey.\n */\n",
|
|
909
1022
|
"excerptTokens": [
|
|
910
1023
|
{
|
|
911
1024
|
"kind": "Content",
|
|
@@ -929,6 +1042,65 @@
|
|
|
929
1042
|
"startIndex": 1,
|
|
930
1043
|
"endIndex": 2
|
|
931
1044
|
}
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"kind": "PropertySignature",
|
|
1048
|
+
"canonicalReference": "@alloy-js/json!JsonObjectPropsBase#refkeys:member",
|
|
1049
|
+
"docComment": "/**\n * The refkeys for the JSON object. When provided, this value can be referenced elsewhere via any of these refkeys.\n */\n",
|
|
1050
|
+
"excerptTokens": [
|
|
1051
|
+
{
|
|
1052
|
+
"kind": "Content",
|
|
1053
|
+
"text": "refkeys?: "
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"kind": "Reference",
|
|
1057
|
+
"text": "Refkey",
|
|
1058
|
+
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"kind": "Content",
|
|
1062
|
+
"text": "[]"
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"kind": "Content",
|
|
1066
|
+
"text": ";"
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
"isReadonly": false,
|
|
1070
|
+
"isOptional": true,
|
|
1071
|
+
"releaseTag": "Public",
|
|
1072
|
+
"name": "refkeys",
|
|
1073
|
+
"propertyTypeTokenRange": {
|
|
1074
|
+
"startIndex": 1,
|
|
1075
|
+
"endIndex": 3
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"kind": "PropertySignature",
|
|
1080
|
+
"canonicalReference": "@alloy-js/json!JsonObjectPropsBase#style:member",
|
|
1081
|
+
"docComment": "",
|
|
1082
|
+
"excerptTokens": [
|
|
1083
|
+
{
|
|
1084
|
+
"kind": "Content",
|
|
1085
|
+
"text": "style?: "
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"kind": "Content",
|
|
1089
|
+
"text": "{\n concise?: boolean;\n }"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"kind": "Content",
|
|
1093
|
+
"text": ";"
|
|
1094
|
+
}
|
|
1095
|
+
],
|
|
1096
|
+
"isReadonly": false,
|
|
1097
|
+
"isOptional": true,
|
|
1098
|
+
"releaseTag": "Public",
|
|
1099
|
+
"name": "style",
|
|
1100
|
+
"propertyTypeTokenRange": {
|
|
1101
|
+
"startIndex": 1,
|
|
1102
|
+
"endIndex": 2
|
|
1103
|
+
}
|
|
932
1104
|
}
|
|
933
1105
|
],
|
|
934
1106
|
"extendsTokenRanges": []
|
|
@@ -1358,6 +1530,38 @@
|
|
|
1358
1530
|
"startIndex": 1,
|
|
1359
1531
|
"endIndex": 2
|
|
1360
1532
|
}
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"kind": "PropertySignature",
|
|
1536
|
+
"canonicalReference": "@alloy-js/json!JsonValueProps#refkeys:member",
|
|
1537
|
+
"docComment": "/**\n * The refkeys for the JSON value. When provided, these values can be referenced elsewhere via any of these refkeys.\n */\n",
|
|
1538
|
+
"excerptTokens": [
|
|
1539
|
+
{
|
|
1540
|
+
"kind": "Content",
|
|
1541
|
+
"text": "refkeys?: "
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"kind": "Reference",
|
|
1545
|
+
"text": "Refkey",
|
|
1546
|
+
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"kind": "Content",
|
|
1550
|
+
"text": "[]"
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
"kind": "Content",
|
|
1554
|
+
"text": ";"
|
|
1555
|
+
}
|
|
1556
|
+
],
|
|
1557
|
+
"isReadonly": false,
|
|
1558
|
+
"isOptional": true,
|
|
1559
|
+
"releaseTag": "Public",
|
|
1560
|
+
"name": "refkeys",
|
|
1561
|
+
"propertyTypeTokenRange": {
|
|
1562
|
+
"startIndex": 1,
|
|
1563
|
+
"endIndex": 3
|
|
1564
|
+
}
|
|
1361
1565
|
}
|
|
1362
1566
|
],
|
|
1363
1567
|
"extendsTokenRanges": []
|