@popcorn245/cornfield-components 0.51.8 → 0.52.1
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/README.md +1 -1
- package/dist/chunks/around-BFqYTZ0K.js +78 -0
- package/dist/chunks/corn-layers-Cni5rISZ.js +275 -0
- package/dist/chunks/{corn-map-M7xt4MYk.js → corn-map-B2-YxiEL.js} +8 -5
- package/dist/chunks/corn-node-panel-BkvJThlp.js +42 -0
- package/dist/chunks/{corn-review-yQU3IpY5.js → corn-review-5wf7AT4o.js} +1047 -2564
- package/dist/chunks/corn-search-CXs5d06S.js +484 -0
- package/dist/chunks/{engine-ClfnAsgM.js → engine-BmXtSISH.js} +3691 -3577
- package/dist/chunks/layers-Bj4Tluxe.js +191 -0
- package/dist/chunks/{map-LS9aQk6z.js → map-BZRFOYkt.js} +803 -751
- package/dist/chunks/node-panel-BdvFvWCE.js +1291 -0
- package/dist/chunks/{review-source-CPiFTfyc.js → review-source-CK5tYIqk.js} +1 -1
- package/dist/chunks/{scope-Dg_uzefP.js → scope-CqPbHcKL.js} +24 -23
- package/dist/chunks/sheets-D-sMZzSs.js +204 -0
- package/dist/chunks/source-address-C70zNPIj.js +79 -0
- package/dist/chunks/{status-CYQD5PwL.js → status-DI5QLlAp.js} +78 -77
- package/dist/corn-layers.js +1 -0
- package/dist/corn-map.js +1 -1
- package/dist/corn-node-panel.js +1 -0
- package/dist/corn-review.js +1 -1
- package/dist/corn-scope.js +3 -3
- package/dist/corn-search.js +1 -0
- package/dist/index.js +8 -5
- package/dist/manifest.json +101 -36
- package/dist/tokens.css +8 -2
- package/dist/types/components.d.ts +90 -0
- package/dist/types/corn-layers.d.ts +2 -0
- package/dist/types/corn-node-panel.d.ts +2 -0
- package/dist/types/corn-search.d.ts +2 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/version.json +1 -1
- package/package.json +14 -2
- package/dist/chunks/source-address-B7hYRgt8.js +0 -251
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CornLayers } from "./chunks/corn-layers-Cni5rISZ.js";
|
package/dist/corn-map.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CornMap } from "./chunks/corn-map-
|
|
1
|
+
export { t as CornMap } from "./chunks/corn-map-B2-YxiEL.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CornNodePanel } from "./chunks/corn-node-panel-BkvJThlp.js";
|
package/dist/corn-review.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CornReview } from "./chunks/corn-review-
|
|
1
|
+
export { t as CornReview } from "./chunks/corn-review-5wf7AT4o.js";
|
package/dist/corn-scope.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t, t as n } from "./chunks/runtime-DFu6W5g-.js";
|
|
2
|
-
import { t as r } from "./chunks/scope-
|
|
3
|
-
import { t as i } from "./chunks/engine-
|
|
2
|
+
import { t as r } from "./chunks/scope-CqPbHcKL.js";
|
|
3
|
+
import { t as i } from "./chunks/engine-BmXtSISH.js";
|
|
4
4
|
// src/components/corn-scope/corn-scope.tsx
|
|
5
5
|
var a = class extends n {
|
|
6
6
|
constructor(t) {
|
|
@@ -38,7 +38,7 @@ var a = class extends n {
|
|
|
38
38
|
config: this.config,
|
|
39
39
|
strings: this.strings,
|
|
40
40
|
tokens: i,
|
|
41
|
-
version: "0.
|
|
41
|
+
version: "0.52.1",
|
|
42
42
|
pageUrl: () => typeof location > "u" ? "" : location.href,
|
|
43
43
|
onReady: () => this.cornReady.emit(),
|
|
44
44
|
onAuth: (e) => this.cornAuth.emit(e),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CornSearch } from "./chunks/corn-search-CXs5d06S.js";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { t as e } from "./chunks/corn-
|
|
2
|
-
import { t } from "./chunks/corn-
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "./chunks/corn-layers-Cni5rISZ.js";
|
|
2
|
+
import { t } from "./chunks/corn-map-B2-YxiEL.js";
|
|
3
|
+
import { t as n } from "./chunks/corn-node-panel-BkvJThlp.js";
|
|
4
|
+
import { t as r } from "./chunks/corn-review-5wf7AT4o.js";
|
|
5
|
+
import { CornScope as i } from "./corn-scope.js";
|
|
6
|
+
import { t as a } from "./chunks/corn-search-CXs5d06S.js";
|
|
4
7
|
// src/index.ts
|
|
5
|
-
var
|
|
6
|
-
export { e as
|
|
8
|
+
var o = "0.52.1";
|
|
9
|
+
export { e as CornLayers, t as CornMap, n as CornNodePanel, r as CornReview, i as CornScope, a as CornSearch, o as version };
|
package/dist/manifest.json
CHANGED
|
@@ -1,31 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcorn245/cornfield-components",
|
|
3
|
-
"cornfield": "0.
|
|
3
|
+
"cornfield": "0.52.1",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "chunks/
|
|
7
|
-
"bytes":
|
|
8
|
-
"sha256": "
|
|
6
|
+
"path": "chunks/around-BFqYTZ0K.js",
|
|
7
|
+
"bytes": 2896,
|
|
8
|
+
"sha256": "9d1f527b8e9570a460b5258073739159e7399bbecde37f10c46fcd4851c648e0"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"path": "chunks/corn-
|
|
12
|
-
"bytes":
|
|
13
|
-
"sha256": "
|
|
11
|
+
"path": "chunks/corn-layers-Cni5rISZ.js",
|
|
12
|
+
"bytes": 29459,
|
|
13
|
+
"sha256": "0a0b82f36f3e3eb8d7f156095cfed0e02d4c6e6deebd0cda63f9bd3b09ce2426"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"path": "chunks/
|
|
17
|
-
"bytes":
|
|
18
|
-
"sha256": "
|
|
16
|
+
"path": "chunks/corn-map-B2-YxiEL.js",
|
|
17
|
+
"bytes": 7117,
|
|
18
|
+
"sha256": "8bd1374bcbd80a39c90698dd63ce0eac41d524d18ad4fe52e737dc4f48841d9a"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
"path": "chunks/
|
|
22
|
-
"bytes":
|
|
23
|
-
"sha256": "
|
|
21
|
+
"path": "chunks/corn-node-panel-BkvJThlp.js",
|
|
22
|
+
"bytes": 22896,
|
|
23
|
+
"sha256": "7736a35c70aacfed1e29b1828aa8a28dd8b9ab1337ef196714aa4fd783c383a0"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
"path": "chunks/review-
|
|
26
|
+
"path": "chunks/corn-review-5wf7AT4o.js",
|
|
27
|
+
"bytes": 186364,
|
|
28
|
+
"sha256": "944daf44e60351759d434f2d313e40bf245324e7fb87f01efc6e4f029fdbc781"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "chunks/corn-search-CXs5d06S.js",
|
|
32
|
+
"bytes": 35167,
|
|
33
|
+
"sha256": "20fefdc1a5e7f70c6fa354fe1fd3de2119ec3a3647e84c2adf1a90186be00697"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "chunks/engine-BmXtSISH.js",
|
|
37
|
+
"bytes": 146493,
|
|
38
|
+
"sha256": "e6d9526497526120f38b079e5602d96f6ec62db2d97e498672a00d1d0fa5b685"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "chunks/layers-Bj4Tluxe.js",
|
|
42
|
+
"bytes": 6493,
|
|
43
|
+
"sha256": "c93d0d2cc5526610865301cdee3c6d5b7cc48cb3f033fc7ad78be8acbf951e00"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "chunks/map-BZRFOYkt.js",
|
|
47
|
+
"bytes": 90990,
|
|
48
|
+
"sha256": "ad465b215c232d22885152b79881ae62b0ef0693d029c031ea76ecea86d8e424"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "chunks/node-panel-BdvFvWCE.js",
|
|
52
|
+
"bytes": 67520,
|
|
53
|
+
"sha256": "3fc233a5d6e71389fab5d9a5e26d6186def39f1cc069d975504d820856e7ce88"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"path": "chunks/review-source-CK5tYIqk.js",
|
|
27
57
|
"bytes": 1482,
|
|
28
|
-
"sha256": "
|
|
58
|
+
"sha256": "663faa3e8a677994c59bb668f5c975c3b2926613c8cfef1a4acbd1abc5dfb142"
|
|
29
59
|
},
|
|
30
60
|
{
|
|
31
61
|
"path": "chunks/rolldown-runtime-CGnMp29N.js",
|
|
@@ -38,55 +68,85 @@
|
|
|
38
68
|
"sha256": "47327281b56616b00075dd5e4b52c0142fc3414509eb8258d9b98c8b56fc372d"
|
|
39
69
|
},
|
|
40
70
|
{
|
|
41
|
-
"path": "chunks/scope-
|
|
42
|
-
"bytes":
|
|
43
|
-
"sha256": "
|
|
71
|
+
"path": "chunks/scope-CqPbHcKL.js",
|
|
72
|
+
"bytes": 3812,
|
|
73
|
+
"sha256": "ebd3f9facc995e636b482d58f4cfdc07c108655a9fde046a501311203537816b"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "chunks/sheets-D-sMZzSs.js",
|
|
77
|
+
"bytes": 7813,
|
|
78
|
+
"sha256": "e2511ecb63d522c3c88693cfd408015eb4f6b8770761e86c1d43b9b5c537072a"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "chunks/source-address-C70zNPIj.js",
|
|
82
|
+
"bytes": 1910,
|
|
83
|
+
"sha256": "4227bb62d97d74a9ffe339ee437c9b7aab0c7049544d85af4c408b29d19a5a4b"
|
|
44
84
|
},
|
|
45
85
|
{
|
|
46
|
-
"path": "chunks/
|
|
47
|
-
"bytes":
|
|
48
|
-
"sha256": "
|
|
86
|
+
"path": "chunks/status-DI5QLlAp.js",
|
|
87
|
+
"bytes": 19972,
|
|
88
|
+
"sha256": "46f80cc2ff9e0026086500fee197876a484f947ac79c5e209d6283370de0da32"
|
|
49
89
|
},
|
|
50
90
|
{
|
|
51
|
-
"path": "
|
|
52
|
-
"bytes":
|
|
53
|
-
"sha256": "
|
|
91
|
+
"path": "corn-layers.js",
|
|
92
|
+
"bytes": 68,
|
|
93
|
+
"sha256": "783c8008b2145011d5a5b530b8844d3f17ffe5230d9a049c26bf470322ce2f13"
|
|
54
94
|
},
|
|
55
95
|
{
|
|
56
96
|
"path": "corn-map.js",
|
|
57
97
|
"bytes": 62,
|
|
58
|
-
"sha256": "
|
|
98
|
+
"sha256": "7196935576e93d680b57aa69116d16720a07b20e8307d9721b6ac53aa99ed62d"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"path": "corn-node-panel.js",
|
|
102
|
+
"bytes": 75,
|
|
103
|
+
"sha256": "6f98a3fb4c1045a461e0c6cfe707de889b546af73637e47381310052bd20cdce"
|
|
59
104
|
},
|
|
60
105
|
{
|
|
61
106
|
"path": "corn-review.js",
|
|
62
107
|
"bytes": 68,
|
|
63
|
-
"sha256": "
|
|
108
|
+
"sha256": "55a17ddf23ae37eff8f82e7e66ce984809a4e06587bafb21674022029c1230fe"
|
|
64
109
|
},
|
|
65
110
|
{
|
|
66
111
|
"path": "corn-scope.js",
|
|
67
112
|
"bytes": 1877,
|
|
68
|
-
"sha256": "
|
|
113
|
+
"sha256": "4c1faf95126eceba1b523ffb1aa7bdfda105e4d87a45ae3670c5c5a4d9e4f890"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"path": "corn-search.js",
|
|
117
|
+
"bytes": 68,
|
|
118
|
+
"sha256": "2afcefef5b2cccf1eaf80b90e6f7e5d8e4b3f868545134ea19f2bbffd91a8bd7"
|
|
69
119
|
},
|
|
70
120
|
{
|
|
71
121
|
"path": "index.js",
|
|
72
|
-
"bytes":
|
|
73
|
-
"sha256": "
|
|
122
|
+
"bytes": 501,
|
|
123
|
+
"sha256": "a337babbe250f4518d489365d194ebb5ea12058aecab84d2bee608a5854d2980"
|
|
74
124
|
},
|
|
75
125
|
{
|
|
76
126
|
"path": "tokens.css",
|
|
77
|
-
"bytes":
|
|
78
|
-
"sha256": "
|
|
127
|
+
"bytes": 22696,
|
|
128
|
+
"sha256": "4b2b297897f0110c010c065e528e62bce7b60f9467748a64369c221055f5bd88"
|
|
79
129
|
},
|
|
80
130
|
{
|
|
81
131
|
"path": "types/components.d.ts",
|
|
82
|
-
"bytes":
|
|
83
|
-
"sha256": "
|
|
132
|
+
"bytes": 29804,
|
|
133
|
+
"sha256": "5ead47bcb5ff8fdc98eeb1c244b060023dcbbe721500fecd2c65d69a570ae959"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"path": "types/corn-layers.d.ts",
|
|
137
|
+
"bytes": 135,
|
|
138
|
+
"sha256": "3805158791f0ebca0d847d7027fbe52ba81093bde420a7c5f1bb97366b6f3c3f"
|
|
84
139
|
},
|
|
85
140
|
{
|
|
86
141
|
"path": "types/corn-map.d.ts",
|
|
87
142
|
"bytes": 126,
|
|
88
143
|
"sha256": "55a73109062f33a77cfb61cd01a3c26241112518b4c09b3e27655be1c6e9f08d"
|
|
89
144
|
},
|
|
145
|
+
{
|
|
146
|
+
"path": "types/corn-node-panel.d.ts",
|
|
147
|
+
"bytes": 144,
|
|
148
|
+
"sha256": "3cc470c8b4327068a5dbfe4f12ba2b83670dfd0a41216c5c372f240487af0fcf"
|
|
149
|
+
},
|
|
90
150
|
{
|
|
91
151
|
"path": "types/corn-review.d.ts",
|
|
92
152
|
"bytes": 135,
|
|
@@ -97,15 +157,20 @@
|
|
|
97
157
|
"bytes": 132,
|
|
98
158
|
"sha256": "bccea440b30e794e8d5d57bb24c006d96ad86752d0602d9c1c244f3dcc5bcb05"
|
|
99
159
|
},
|
|
160
|
+
{
|
|
161
|
+
"path": "types/corn-search.d.ts",
|
|
162
|
+
"bytes": 135,
|
|
163
|
+
"sha256": "fa5ac78ca2680e2732d45fb268200d8e22fb50e7e441827cc800babd19de6e9d"
|
|
164
|
+
},
|
|
100
165
|
{
|
|
101
166
|
"path": "types/index.d.ts",
|
|
102
|
-
"bytes":
|
|
103
|
-
"sha256": "
|
|
167
|
+
"bytes": 782,
|
|
168
|
+
"sha256": "976b599ceecd957faace0a18964cfbe0fe9f1491c8a82db791f2ed05996f0064"
|
|
104
169
|
},
|
|
105
170
|
{
|
|
106
171
|
"path": "version.json",
|
|
107
172
|
"bytes": 65,
|
|
108
|
-
"sha256": "
|
|
173
|
+
"sha256": "93eea33531fd5e16173f6669db098b628413d6fecee5459cea0a3963b7d42266"
|
|
109
174
|
}
|
|
110
175
|
]
|
|
111
176
|
}
|
package/dist/tokens.css
CHANGED
|
@@ -314,9 +314,12 @@
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
/* theme="light" on an element: this mode's tokens, on the element itself */
|
|
317
|
+
:where(corn-layers[theme="light"]),
|
|
317
318
|
:where(corn-map[theme="light"]),
|
|
319
|
+
:where(corn-node-panel[theme="light"]),
|
|
318
320
|
:where(corn-review[theme="light"]),
|
|
319
|
-
:where(corn-scope[theme="light"])
|
|
321
|
+
:where(corn-scope[theme="light"]),
|
|
322
|
+
:where(corn-search[theme="light"]) {
|
|
320
323
|
--corn-ground: #f4f6fa;
|
|
321
324
|
--corn-ground-image: radial-gradient(circle at 14% 18%, rgba(66, 153, 225, 0.06) 0%, transparent 45%),
|
|
322
325
|
radial-gradient(circle at 86% 82%, rgba(229, 62, 62, 0.04) 0%, transparent 45%);
|
|
@@ -433,9 +436,12 @@
|
|
|
433
436
|
}
|
|
434
437
|
|
|
435
438
|
/* theme="dark" on an element: this mode's tokens, on the element itself */
|
|
439
|
+
:where(corn-layers[theme="dark"]),
|
|
436
440
|
:where(corn-map[theme="dark"]),
|
|
441
|
+
:where(corn-node-panel[theme="dark"]),
|
|
437
442
|
:where(corn-review[theme="dark"]),
|
|
438
|
-
:where(corn-scope[theme="dark"])
|
|
443
|
+
:where(corn-scope[theme="dark"]),
|
|
444
|
+
:where(corn-search[theme="dark"]) {
|
|
439
445
|
--corn-ground: #090d16;
|
|
440
446
|
--corn-ground-image: radial-gradient(circle at 14% 18%, rgba(66, 153, 225, 0.2) 0%, transparent 45%),
|
|
441
447
|
radial-gradient(circle at 86% 82%, rgba(229, 62, 62, 0.16) 0%, transparent 45%),
|
|
@@ -79,7 +79,16 @@ export interface CornReviewRecord {
|
|
|
79
79
|
[key: string]: unknown;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
export interface CornSearchDetail {
|
|
83
|
+
/** What is searched for now (trimmed), or an empty string once it is cleared */
|
|
84
|
+
query: string;
|
|
85
|
+
/** The id of the match chosen with Enter, a row or the arrow buttons, or null while none is */
|
|
86
|
+
current: string | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
82
89
|
export namespace Components {
|
|
90
|
+
interface CornLayers {
|
|
91
|
+
}
|
|
83
92
|
interface CornMap {
|
|
84
93
|
/** The map to draw: the object topology.json holds (`{ nodes, edges }`). The object is not changed; the map works on copies. */
|
|
85
94
|
'topology'?: { nodes: Array<{ id: string; [key: string]: unknown }>; edges?: Array<{ from: string; to: string; [key: string]: unknown }> } | null | undefined;
|
|
@@ -102,6 +111,8 @@ export namespace Components {
|
|
|
102
111
|
/** Reads the tokens again and draws: for a token changed at run time by something the map cannot see (a rule added to the page's head, a class on `<html>`) */
|
|
103
112
|
'refresh': () => Promise<void>;
|
|
104
113
|
}
|
|
114
|
+
interface CornNodePanel {
|
|
115
|
+
}
|
|
105
116
|
interface CornReview {
|
|
106
117
|
/** The base address of a cornfield server, `https://map.example.com` (an http(s) origin with an optional path): the review reads the config and the map from there, opens the proposal, and sends its decision, with the signed-in maintainer's session. Another value is refused, and said in the box and in `cornError`. Read when the element connects: a new `src` makes a new review. */
|
|
107
118
|
'src'?: string | undefined;
|
|
@@ -146,6 +157,17 @@ export namespace Components {
|
|
|
146
157
|
/** The words the host overrides (a flat map of `strings` keys to text); they win over the server's */
|
|
147
158
|
'strings'?: { [key: string]: string } | null | undefined;
|
|
148
159
|
}
|
|
160
|
+
interface CornSearch {
|
|
161
|
+
/** What is searched for. Set it to search; it follows what the person types. It is not reflected: a query changes with every key. */
|
|
162
|
+
'query'?: string | undefined;
|
|
163
|
+
/** Puts the focus in the field, its text selected: for a shortcut of the host's own */
|
|
164
|
+
'focusField': () => Promise<void>;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface CornLayersCustomEvent<T> extends CustomEvent<T> {
|
|
169
|
+
detail: T;
|
|
170
|
+
target: HTMLCornLayersElement;
|
|
149
171
|
}
|
|
150
172
|
|
|
151
173
|
export interface CornMapCustomEvent<T> extends CustomEvent<T> {
|
|
@@ -153,6 +175,11 @@ export interface CornMapCustomEvent<T> extends CustomEvent<T> {
|
|
|
153
175
|
target: HTMLCornMapElement;
|
|
154
176
|
}
|
|
155
177
|
|
|
178
|
+
export interface CornNodePanelCustomEvent<T> extends CustomEvent<T> {
|
|
179
|
+
detail: T;
|
|
180
|
+
target: HTMLCornNodePanelElement;
|
|
181
|
+
}
|
|
182
|
+
|
|
156
183
|
export interface CornReviewCustomEvent<T> extends CustomEvent<T> {
|
|
157
184
|
detail: T;
|
|
158
185
|
target: HTMLCornReviewElement;
|
|
@@ -163,7 +190,14 @@ export interface CornScopeCustomEvent<T> extends CustomEvent<T> {
|
|
|
163
190
|
target: HTMLCornScopeElement;
|
|
164
191
|
}
|
|
165
192
|
|
|
193
|
+
export interface CornSearchCustomEvent<T> extends CustomEvent<T> {
|
|
194
|
+
detail: T;
|
|
195
|
+
target: HTMLCornSearchElement;
|
|
196
|
+
}
|
|
197
|
+
|
|
166
198
|
export namespace LocalJSX {
|
|
199
|
+
interface CornLayers {
|
|
200
|
+
}
|
|
167
201
|
interface CornMap {
|
|
168
202
|
'topology'?: { nodes: Array<{ id: string; [key: string]: unknown }>; edges?: Array<{ from: string; to: string; [key: string]: unknown }> } | null | undefined;
|
|
169
203
|
'node'?: string | null | undefined;
|
|
@@ -177,6 +211,8 @@ export namespace LocalJSX {
|
|
|
177
211
|
'onCornAuth'?: (event: CornMapCustomEvent<CornAuthDetail>) => void;
|
|
178
212
|
'onCornError'?: (event: CornMapCustomEvent<CornErrorDetail>) => void;
|
|
179
213
|
}
|
|
214
|
+
interface CornNodePanel {
|
|
215
|
+
}
|
|
180
216
|
interface CornReview {
|
|
181
217
|
'src'?: string | undefined;
|
|
182
218
|
'proposal'?: string | { [key: string]: unknown } | null | undefined;
|
|
@@ -207,14 +243,35 @@ export namespace LocalJSX {
|
|
|
207
243
|
'onCornAuth'?: (event: CornScopeCustomEvent<CornAuthDetail>) => void;
|
|
208
244
|
'onCornError'?: (event: CornScopeCustomEvent<CornErrorDetail>) => void;
|
|
209
245
|
}
|
|
246
|
+
interface CornSearch {
|
|
247
|
+
'query'?: string | undefined;
|
|
248
|
+
'onCornSearch'?: (event: CornSearchCustomEvent<CornSearchDetail>) => void;
|
|
249
|
+
}
|
|
210
250
|
interface IntrinsicElements {
|
|
251
|
+
'corn-layers': LocalJSX.CornLayers & { [attribute: string]: unknown };
|
|
211
252
|
'corn-map': LocalJSX.CornMap & { [attribute: string]: unknown };
|
|
253
|
+
'corn-node-panel': LocalJSX.CornNodePanel & { [attribute: string]: unknown };
|
|
212
254
|
'corn-review': LocalJSX.CornReview & { [attribute: string]: unknown };
|
|
213
255
|
'corn-scope': LocalJSX.CornScope & { [attribute: string]: unknown };
|
|
256
|
+
'corn-search': LocalJSX.CornSearch & { [attribute: string]: unknown };
|
|
214
257
|
}
|
|
215
258
|
}
|
|
216
259
|
|
|
217
260
|
declare global {
|
|
261
|
+
/** What `<corn-layers>` sends: the event's name and the type of its `detail` */
|
|
262
|
+
interface HTMLCornLayersElementEventMap {
|
|
263
|
+
}
|
|
264
|
+
/** The Layers menu: one switch per kind of node and the key to the lines, for the map in the same `<corn-scope>`. A thin shell (spec 0011 D1): it mounts the engine's piece (explorer/pieces/layers.js) in its shadow root on the instance of the nearest `<corn-scope>`, through explorer/pieces/around.js, and ends it when it leaves the page. It holds no behaviour (test/shell.test.ts). It has no properties of its own: the layers are the scope's (the server's config, or the one the host handed the scope). */
|
|
265
|
+
interface HTMLCornLayersElement extends Components.CornLayers, HTMLElement {
|
|
266
|
+
addEventListener<K extends keyof HTMLCornLayersElementEventMap>(type: K, listener: (this: HTMLCornLayersElement, ev: CornLayersCustomEvent<HTMLCornLayersElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
267
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornLayersElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
268
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
269
|
+
removeEventListener<K extends keyof HTMLCornLayersElementEventMap>(type: K, listener: (this: HTMLCornLayersElement, ev: CornLayersCustomEvent<HTMLCornLayersElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
270
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornLayersElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
271
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
272
|
+
}
|
|
273
|
+
var HTMLCornLayersElement: { prototype: HTMLCornLayersElement; new (): HTMLCornLayersElement };
|
|
274
|
+
|
|
218
275
|
/** What `<corn-map>` sends: the event's name and the type of its `detail` */
|
|
219
276
|
interface HTMLCornMapElementEventMap {
|
|
220
277
|
/** The selection changed, whoever changed it: a click, a key, `node` or `focusNode()`. Once per change. */
|
|
@@ -237,6 +294,20 @@ declare global {
|
|
|
237
294
|
}
|
|
238
295
|
var HTMLCornMapElement: { prototype: HTMLCornMapElement; new (): HTMLCornMapElement };
|
|
239
296
|
|
|
297
|
+
/** What `<corn-node-panel>` sends: the event's name and the type of its `detail` */
|
|
298
|
+
interface HTMLCornNodePanelElementEventMap {
|
|
299
|
+
}
|
|
300
|
+
/** What is selected: the node the map has selected, its facts, flows, data, threads and (with a proposal) its diff, in a panel that fills the box its host gives it. It is for use inside a `<corn-scope>`, beside a `<corn-map>`. A thin shell (spec 0011 D1): it mounts the engine's piece (explorer/pieces/node-panel.js) in its shadow root on the instance of the nearest `<corn-scope>`, through explorer/pieces/around.js, and ends it when it leaves the page. It holds no behaviour (test/shell.test.ts). It has no properties of its own: the scope's selection is what it shows (set `node` on the map), and the map reports every change as `cornSelect`. */
|
|
301
|
+
interface HTMLCornNodePanelElement extends Components.CornNodePanel, HTMLElement {
|
|
302
|
+
addEventListener<K extends keyof HTMLCornNodePanelElementEventMap>(type: K, listener: (this: HTMLCornNodePanelElement, ev: CornNodePanelCustomEvent<HTMLCornNodePanelElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
303
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornNodePanelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
304
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
305
|
+
removeEventListener<K extends keyof HTMLCornNodePanelElementEventMap>(type: K, listener: (this: HTMLCornNodePanelElement, ev: CornNodePanelCustomEvent<HTMLCornNodePanelElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
306
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornNodePanelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
307
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
308
|
+
}
|
|
309
|
+
var HTMLCornNodePanelElement: { prototype: HTMLCornNodePanelElement; new (): HTMLCornNodePanelElement };
|
|
310
|
+
|
|
240
311
|
/** What `<corn-review>` sends: the event's name and the type of its `detail` */
|
|
241
312
|
interface HTMLCornReviewElementEventMap {
|
|
242
313
|
/** The first frame is drawn that shows the proposal asked for open, its title on the bar (or the bar saying why it is not): once per time the element is connected */
|
|
@@ -283,10 +354,29 @@ declare global {
|
|
|
283
354
|
}
|
|
284
355
|
var HTMLCornScopeElement: { prototype: HTMLCornScopeElement; new (): HTMLCornScopeElement };
|
|
285
356
|
|
|
357
|
+
/** What `<corn-search>` sends: the event's name and the type of its `detail` */
|
|
358
|
+
interface HTMLCornSearchElementEventMap {
|
|
359
|
+
/** The query, or the chosen match, changed, whoever changed it: typing, `query`, Enter, a row. Once per change. */
|
|
360
|
+
'cornSearch': CornSearchDetail;
|
|
361
|
+
}
|
|
362
|
+
/** Search: a field, the count of what it found, a list of the matches by kind, and stepping through them. Choosing a match selects it on the map in the same `<corn-scope>` and flies the map to it. A thin shell (spec 0011 D1): it mounts the engine's piece (explorer/pieces/search.js) in its shadow root on the instance of the nearest `<corn-scope>`, through explorer/pieces/around.js, and ends it when it leaves the page. It holds no behaviour (test/shell.test.ts). */
|
|
363
|
+
interface HTMLCornSearchElement extends Components.CornSearch, HTMLElement {
|
|
364
|
+
addEventListener<K extends keyof HTMLCornSearchElementEventMap>(type: K, listener: (this: HTMLCornSearchElement, ev: CornSearchCustomEvent<HTMLCornSearchElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
365
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornSearchElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
366
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
367
|
+
removeEventListener<K extends keyof HTMLCornSearchElementEventMap>(type: K, listener: (this: HTMLCornSearchElement, ev: CornSearchCustomEvent<HTMLCornSearchElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
368
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornSearchElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
369
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
370
|
+
}
|
|
371
|
+
var HTMLCornSearchElement: { prototype: HTMLCornSearchElement; new (): HTMLCornSearchElement };
|
|
372
|
+
|
|
286
373
|
interface HTMLElementTagNameMap {
|
|
374
|
+
'corn-layers': HTMLCornLayersElement;
|
|
287
375
|
'corn-map': HTMLCornMapElement;
|
|
376
|
+
'corn-node-panel': HTMLCornNodePanelElement;
|
|
288
377
|
'corn-review': HTMLCornReviewElement;
|
|
289
378
|
'corn-scope': HTMLCornScopeElement;
|
|
379
|
+
'corn-search': HTMLCornSearchElement;
|
|
290
380
|
}
|
|
291
381
|
}
|
|
292
382
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './components.js';
|
|
2
2
|
/** The version of cornfield these components were built from (the server reports the same number) */
|
|
3
3
|
export declare const version: string;
|
|
4
|
+
export declare const CornLayers: { prototype: HTMLCornLayersElement; new (): HTMLCornLayersElement };
|
|
4
5
|
export declare const CornMap: { prototype: HTMLCornMapElement; new (): HTMLCornMapElement };
|
|
6
|
+
export declare const CornNodePanel: { prototype: HTMLCornNodePanelElement; new (): HTMLCornNodePanelElement };
|
|
5
7
|
export declare const CornReview: { prototype: HTMLCornReviewElement; new (): HTMLCornReviewElement };
|
|
6
8
|
export declare const CornScope: { prototype: HTMLCornScopeElement; new (): HTMLCornScopeElement };
|
|
9
|
+
export declare const CornSearch: { prototype: HTMLCornSearchElement; new (): HTMLCornSearchElement };
|
package/dist/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@popcorn245/cornfield-components","cornfield":"0.
|
|
1
|
+
{"name":"@popcorn245/cornfield-components","cornfield":"0.52.1"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcorn245/cornfield-components",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "cornfield's interface as web components (spec 0011): <corn-map> and
|
|
3
|
+
"version": "0.52.1",
|
|
4
|
+
"description": "cornfield's interface as web components (spec 0011): <corn-map>, <corn-review>, <corn-scope> and the pieces around the map (<corn-node-panel>, <corn-layers>, <corn-search>), thin StencilRS shells over the engine in cornfield. The same files are served by every cornfield server at /cornfield/components/.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "popcorn245 (https://github.com/popcorn245)",
|
|
7
7
|
"homepage": "https://github.com/popcorn245/CornField/blob/main/docs/embedding.md",
|
|
@@ -34,6 +34,14 @@
|
|
|
34
34
|
"types": "./dist/types/corn-map.d.ts",
|
|
35
35
|
"default": "./dist/corn-map.js"
|
|
36
36
|
},
|
|
37
|
+
"./corn-layers": {
|
|
38
|
+
"types": "./dist/types/corn-layers.d.ts",
|
|
39
|
+
"default": "./dist/corn-layers.js"
|
|
40
|
+
},
|
|
41
|
+
"./corn-node-panel": {
|
|
42
|
+
"types": "./dist/types/corn-node-panel.d.ts",
|
|
43
|
+
"default": "./dist/corn-node-panel.js"
|
|
44
|
+
},
|
|
37
45
|
"./corn-review": {
|
|
38
46
|
"types": "./dist/types/corn-review.d.ts",
|
|
39
47
|
"default": "./dist/corn-review.js"
|
|
@@ -42,6 +50,10 @@
|
|
|
42
50
|
"types": "./dist/types/corn-scope.d.ts",
|
|
43
51
|
"default": "./dist/corn-scope.js"
|
|
44
52
|
},
|
|
53
|
+
"./corn-search": {
|
|
54
|
+
"types": "./dist/types/corn-search.d.ts",
|
|
55
|
+
"default": "./dist/corn-search.js"
|
|
56
|
+
},
|
|
45
57
|
"./tokens.css": "./dist/tokens.css",
|
|
46
58
|
"./version.json": "./dist/version.json"
|
|
47
59
|
},
|