@popcorn245/cornfield-components 0.50.1 → 0.51.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/README.md +6 -2
- package/dist/chunks/corn-map-B240mjGE.js +122 -0
- package/dist/chunks/corn-review-CJ4u6APS.js +4417 -0
- package/dist/chunks/{_corn-default-tokens-DfrjTpZt.js → engine-ClfnAsgM.js} +990 -1046
- package/dist/chunks/{corn-map-Bd7PO6yD.js → map-B6AeKeiu.js} +772 -887
- package/dist/chunks/review-source-CPiFTfyc.js +60 -0
- package/dist/chunks/scope-Dg_uzefP.js +136 -0
- package/dist/chunks/source-address-B7hYRgt8.js +251 -0
- package/dist/chunks/status-CYQD5PwL.js +614 -0
- package/dist/corn-map.js +1 -1
- package/dist/corn-review.js +1 -0
- package/dist/corn-scope.js +3 -3
- package/dist/index.js +5 -4
- package/dist/manifest.json +57 -22
- package/dist/tokens.css +2 -0
- package/dist/types/components.d.ts +135 -0
- package/dist/types/corn-review.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/version.json +1 -1
- package/package.json +5 -1
- package/dist/chunks/scope-HD2C0JDl.js +0 -847
package/dist/manifest.json
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcorn245/cornfield-components",
|
|
3
|
-
"cornfield": "0.
|
|
3
|
+
"cornfield": "0.51.0",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "chunks/
|
|
7
|
-
"bytes":
|
|
8
|
-
"sha256": "
|
|
6
|
+
"path": "chunks/corn-map-B240mjGE.js",
|
|
7
|
+
"bytes": 6979,
|
|
8
|
+
"sha256": "53722f2158fd675f1a208dcea77124f4b7d22482e765a7e80b5bd2ffd72e65b0"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"path": "chunks/corn-
|
|
12
|
-
"bytes":
|
|
13
|
-
"sha256": "
|
|
11
|
+
"path": "chunks/corn-review-CJ4u6APS.js",
|
|
12
|
+
"bytes": 261309,
|
|
13
|
+
"sha256": "ec4cba41f778fe3e3fc0ef6504bfb4bea087f7bbb0af8f627b7e6e3f4431cdd1"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "chunks/engine-ClfnAsgM.js",
|
|
17
|
+
"bytes": 142410,
|
|
18
|
+
"sha256": "ad758cc528e95bc8ae395f93ea3bbe38527706519da1f34d4d9cacde1cbd3a9e"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "chunks/map-B6AeKeiu.js",
|
|
22
|
+
"bytes": 88136,
|
|
23
|
+
"sha256": "8caee9e232d7dc805f52bd2bd9212419779873d1d8cea4eba6e2d2687e6ecaeb"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "chunks/review-source-CPiFTfyc.js",
|
|
27
|
+
"bytes": 1482,
|
|
28
|
+
"sha256": "da3b37a1c67688434275fad6e93ec17627bbae2800d3c76e3a86de3b12dd7263"
|
|
14
29
|
},
|
|
15
30
|
{
|
|
16
31
|
"path": "chunks/rolldown-runtime-CGnMp29N.js",
|
|
@@ -23,40 +38,60 @@
|
|
|
23
38
|
"sha256": "47327281b56616b00075dd5e4b52c0142fc3414509eb8258d9b98c8b56fc372d"
|
|
24
39
|
},
|
|
25
40
|
{
|
|
26
|
-
"path": "chunks/scope-
|
|
27
|
-
"bytes":
|
|
28
|
-
"sha256": "
|
|
41
|
+
"path": "chunks/scope-Dg_uzefP.js",
|
|
42
|
+
"bytes": 3769,
|
|
43
|
+
"sha256": "047c0e94e994c373aa523a94b2278bcd4fc14543d4f4d170484b352a6770713d"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "chunks/source-address-B7hYRgt8.js",
|
|
47
|
+
"bytes": 7608,
|
|
48
|
+
"sha256": "0a6a5d2f692df54c69173cc2304a4f640e80506212bed977c7f58354ba44cdf9"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "chunks/status-CYQD5PwL.js",
|
|
52
|
+
"bytes": 19929,
|
|
53
|
+
"sha256": "7bd89b233cab9f3d05a0962dfea5b73edba9c4065cfd3de9c96b1feaff8995cd"
|
|
29
54
|
},
|
|
30
55
|
{
|
|
31
56
|
"path": "corn-map.js",
|
|
32
57
|
"bytes": 62,
|
|
33
|
-
"sha256": "
|
|
58
|
+
"sha256": "d656967bf3a395cf07e00a511f6d44d663e9a19028e0276e1c3b0f48397d0af5"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "corn-review.js",
|
|
62
|
+
"bytes": 68,
|
|
63
|
+
"sha256": "8df8767d56569407b96ced24a4726d72c467524881d1f09b6364b5137de367bb"
|
|
34
64
|
},
|
|
35
65
|
{
|
|
36
66
|
"path": "corn-scope.js",
|
|
37
|
-
"bytes":
|
|
38
|
-
"sha256": "
|
|
67
|
+
"bytes": 1877,
|
|
68
|
+
"sha256": "6e1dfdad6dacc0f61f7479f3c954011708f57b20d705ba0cb66a42a544ef3298"
|
|
39
69
|
},
|
|
40
70
|
{
|
|
41
71
|
"path": "index.js",
|
|
42
|
-
"bytes":
|
|
43
|
-
"sha256": "
|
|
72
|
+
"bytes": 266,
|
|
73
|
+
"sha256": "299dae60889a385c7d68bedf649df2dedbc18c423e4463207c64c428af42d0cb"
|
|
44
74
|
},
|
|
45
75
|
{
|
|
46
76
|
"path": "tokens.css",
|
|
47
|
-
"bytes":
|
|
48
|
-
"sha256": "
|
|
77
|
+
"bytes": 22475,
|
|
78
|
+
"sha256": "585ea930140d195b2f6c5903caf3c5b68e66d1f94e595e124647f6ae5d148dfa"
|
|
49
79
|
},
|
|
50
80
|
{
|
|
51
81
|
"path": "types/components.d.ts",
|
|
52
|
-
"bytes":
|
|
53
|
-
"sha256": "
|
|
82
|
+
"bytes": 22051,
|
|
83
|
+
"sha256": "87bb200f744029296d8f7ba3215a3f12b2a0e023efb83b54e525d8bf2f7865f8"
|
|
54
84
|
},
|
|
55
85
|
{
|
|
56
86
|
"path": "types/corn-map.d.ts",
|
|
57
87
|
"bytes": 126,
|
|
58
88
|
"sha256": "55a73109062f33a77cfb61cd01a3c26241112518b4c09b3e27655be1c6e9f08d"
|
|
59
89
|
},
|
|
90
|
+
{
|
|
91
|
+
"path": "types/corn-review.d.ts",
|
|
92
|
+
"bytes": 135,
|
|
93
|
+
"sha256": "c574859c4b1b1abed9b0ba51a8b36a99da358b861036e5e7e6afb433b398fc05"
|
|
94
|
+
},
|
|
60
95
|
{
|
|
61
96
|
"path": "types/corn-scope.d.ts",
|
|
62
97
|
"bytes": 132,
|
|
@@ -64,13 +99,13 @@
|
|
|
64
99
|
},
|
|
65
100
|
{
|
|
66
101
|
"path": "types/index.d.ts",
|
|
67
|
-
"bytes":
|
|
68
|
-
"sha256": "
|
|
102
|
+
"bytes": 467,
|
|
103
|
+
"sha256": "08157585330a32ea501785334c388249a88d58b9775023299ac0c92e67e25fed"
|
|
69
104
|
},
|
|
70
105
|
{
|
|
71
106
|
"path": "version.json",
|
|
72
107
|
"bytes": 65,
|
|
73
|
-
"sha256": "
|
|
108
|
+
"sha256": "88fe18fdf80be56814b4f599260ad191d0134c1eccfe2352346ab509e549bdc6"
|
|
74
109
|
}
|
|
75
110
|
]
|
|
76
111
|
}
|
package/dist/tokens.css
CHANGED
|
@@ -315,6 +315,7 @@
|
|
|
315
315
|
|
|
316
316
|
/* theme="light" on an element: this mode's tokens, on the element itself */
|
|
317
317
|
:where(corn-map[theme="light"]),
|
|
318
|
+
:where(corn-review[theme="light"]),
|
|
318
319
|
:where(corn-scope[theme="light"]) {
|
|
319
320
|
--corn-ground: #f4f6fa;
|
|
320
321
|
--corn-ground-image: radial-gradient(circle at 14% 18%, rgba(66, 153, 225, 0.06) 0%, transparent 45%),
|
|
@@ -433,6 +434,7 @@
|
|
|
433
434
|
|
|
434
435
|
/* theme="dark" on an element: this mode's tokens, on the element itself */
|
|
435
436
|
:where(corn-map[theme="dark"]),
|
|
437
|
+
:where(corn-review[theme="dark"]),
|
|
436
438
|
:where(corn-scope[theme="dark"]) {
|
|
437
439
|
--corn-ground: #090d16;
|
|
438
440
|
--corn-ground-image: radial-gradient(circle at 14% 18%, rgba(66, 153, 225, 0.2) 0%, transparent 45%),
|
|
@@ -26,6 +26,59 @@ export interface CornSelectDetail {
|
|
|
26
26
|
to?: string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export interface CornDecisionDetail {
|
|
30
|
+
/** `approved`, or `notes` for a send back */
|
|
31
|
+
outcome: 'approved' | 'notes';
|
|
32
|
+
/** The proposal the decision was for, by name (the one that was open when the button was pressed), or null for a proposal that has no name */
|
|
33
|
+
proposal: string | null;
|
|
34
|
+
/** The copy of it the decision was for (`pull/31`), or null */
|
|
35
|
+
source: string | null;
|
|
36
|
+
/** Whether that proposal is still the one shown: false when another was opened, or this one closed, while the decision was sent */
|
|
37
|
+
open: boolean;
|
|
38
|
+
/** What the server answered */
|
|
39
|
+
review: CornReviewRecord;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface CornNavigateDetail {
|
|
43
|
+
/** The proposal's name, or null once it is closed (or for a proposal handed in as an object with no name) */
|
|
44
|
+
proposal: string | null;
|
|
45
|
+
/** The copy of it that was asked for by name (`checkout`, `pull/31`, a worktree), only when it was; null otherwise, as cornfield's page leaves it out of the address */
|
|
46
|
+
source: string | null;
|
|
47
|
+
/** `before`, `diff` or `after`, or null once the proposal is closed */
|
|
48
|
+
view: 'before' | 'diff' | 'after' | null;
|
|
49
|
+
/** `opened` (a proposal opened), `view` (Before, Diff or After changed) or `closed` */
|
|
50
|
+
change: 'opened' | 'view' | 'closed';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface CornReviewAuthDetail {
|
|
54
|
+
/** 401 or 403 */
|
|
55
|
+
status: number;
|
|
56
|
+
/** `<src>/auth/start?returnTo=<this page's address>`: a link the host or the piece puts in front of the person; the component never navigates the window */
|
|
57
|
+
signIn: string;
|
|
58
|
+
/** What was refused: `load` (the map), `proposal` (opening it), `facts` (the line above Approve), `review` (reading the last decision), `send` (the press itself) or `landing` (Undo of the hold) */
|
|
59
|
+
during: 'load' | 'proposal' | 'facts' | 'review' | 'send' | 'landing';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface CornReviewErrorDetail {
|
|
63
|
+
/** `not-listed` (the server gave this page no CORS answer: its origin is not in `embed.origins`), `offline`, `server` (it answered with something that is not a config or a map), `address` (`src` is not an http(s) address), `version` (the package and the server differ by a minor or more; it keeps working), `theme` (the server's theme could not be had) or `proposal` (the proposal did not open: no such proposal, or the server refused) */
|
|
64
|
+
kind: 'not-listed' | 'offline' | 'server' | 'address' | 'version' | 'theme' | 'proposal';
|
|
65
|
+
/** A few words more, plain text: the origin to list, the problem with the address, the two versions, what the proposal's bar says */
|
|
66
|
+
message?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface CornReviewRecord {
|
|
70
|
+
/** `approved` or `notes` (a send back) */
|
|
71
|
+
verdict: 'approved' | 'notes';
|
|
72
|
+
/** When the server took it, an ISO time */
|
|
73
|
+
at: string;
|
|
74
|
+
/** Who it is recorded as: the signed-in maintainer */
|
|
75
|
+
by?: string;
|
|
76
|
+
/** false when the same approval stood already and the server posted nothing new */
|
|
77
|
+
posted?: boolean;
|
|
78
|
+
/** Anything else the server says about it */
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
|
|
29
82
|
export namespace Components {
|
|
30
83
|
interface CornMap {
|
|
31
84
|
/** The map to draw: the object topology.json holds (`{ nodes, edges }`). The object is not changed; the map works on copies. */
|
|
@@ -49,6 +102,36 @@ export namespace Components {
|
|
|
49
102
|
/** 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>`) */
|
|
50
103
|
'refresh': () => Promise<void>;
|
|
51
104
|
}
|
|
105
|
+
interface CornReview {
|
|
106
|
+
/** 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
|
+
'src'?: string | undefined;
|
|
108
|
+
/** The proposal to review: its name (`0042-retire-the-old-export`), which the review reads from the server, or, as a property only, the proposal object itself (shown for reading: a decision needs the name). It follows the reviewer: null once they close it in the bar, the name of a copy they open from it. Not reflected. */
|
|
109
|
+
'proposal'?: string | { [key: string]: unknown } | null | undefined;
|
|
110
|
+
/** Which copy of the proposal: `checkout`, `pull/31` (a spec PR) or a worktree's name; with none the server answers with the first it lists */
|
|
111
|
+
'source'?: string | null | undefined;
|
|
112
|
+
/** `before`, `diff` or `after`. Set it to choose; it follows the reviewer's own choice (the buttons on the bar) and is reflected as an attribute. */
|
|
113
|
+
'view'?: 'before' | 'diff' | 'after' | null | undefined;
|
|
114
|
+
/** The id of the selected node. Set it to select; it follows the map's selection (a click, a key) and is reflected as an attribute. */
|
|
115
|
+
'node'?: string | null | undefined;
|
|
116
|
+
/** The ground the review is drawn for: `light` or `dark` forces it for this element, `auto` (or none) follows the page's own `data-theme` or the system's setting */
|
|
117
|
+
'theme'?: 'light' | 'dark' | 'auto' | undefined;
|
|
118
|
+
/** With `src`: wear the server's theme (its stylesheet in this shadow root and its `--corn-*` tokens on this element). Off by default: a host app has its own look. */
|
|
119
|
+
'useTheme': boolean;
|
|
120
|
+
/** The map to draw, for a host that fetches for itself: the object `topology.json` holds. With it and `config` the review reads no map from the server. */
|
|
121
|
+
'topology'?: { nodes: Array<{ id: string; [key: string]: unknown }>; edges?: Array<{ from: string; to: string; [key: string]: unknown }> } | null | undefined;
|
|
122
|
+
/** The object `/cornfield/config.json` holds, for a host that fetches for itself */
|
|
123
|
+
'config'?: { [key: string]: unknown } | null | undefined;
|
|
124
|
+
/** The words the host overrides (a flat map of `strings` keys to text); they win over the server's */
|
|
125
|
+
'strings'?: { [key: string]: string } | null | undefined;
|
|
126
|
+
/** The permission checker for the scenarios, a module the host imported itself: `{ check(items, { signal }) }`. A config never names one that is loaded (D10); with none, a checked step reads "Not checked". */
|
|
127
|
+
'checker'?: { check(items: unknown[], options?: { signal?: AbortSignal }): unknown; apps?: unknown; max?: number } | null | undefined;
|
|
128
|
+
/** Puts the whole map in view */
|
|
129
|
+
'fit': () => Promise<void>;
|
|
130
|
+
/** Selects the node with this id and brings it into view; nothing happens when the map has no such node */
|
|
131
|
+
'focusNode': (id: string) => Promise<void>;
|
|
132
|
+
/** Reads the tokens again and draws: for a token changed at run time by something the review cannot see (a rule added to the page's head, a class on `<html>`) */
|
|
133
|
+
'refresh': () => Promise<void>;
|
|
134
|
+
}
|
|
52
135
|
interface CornScope {
|
|
53
136
|
/** The base address of a cornfield server, `https://map.example.com` (an http(s) origin with an optional path). Another value is refused, and said in the pieces and in `cornError`. */
|
|
54
137
|
'src'?: string | undefined;
|
|
@@ -70,6 +153,11 @@ export interface CornMapCustomEvent<T> extends CustomEvent<T> {
|
|
|
70
153
|
target: HTMLCornMapElement;
|
|
71
154
|
}
|
|
72
155
|
|
|
156
|
+
export interface CornReviewCustomEvent<T> extends CustomEvent<T> {
|
|
157
|
+
detail: T;
|
|
158
|
+
target: HTMLCornReviewElement;
|
|
159
|
+
}
|
|
160
|
+
|
|
73
161
|
export interface CornScopeCustomEvent<T> extends CustomEvent<T> {
|
|
74
162
|
detail: T;
|
|
75
163
|
target: HTMLCornScopeElement;
|
|
@@ -89,6 +177,25 @@ export namespace LocalJSX {
|
|
|
89
177
|
'onCornAuth'?: (event: CornMapCustomEvent<CornAuthDetail>) => void;
|
|
90
178
|
'onCornError'?: (event: CornMapCustomEvent<CornErrorDetail>) => void;
|
|
91
179
|
}
|
|
180
|
+
interface CornReview {
|
|
181
|
+
'src'?: string | undefined;
|
|
182
|
+
'proposal'?: string | { [key: string]: unknown } | null | undefined;
|
|
183
|
+
'source'?: string | null | undefined;
|
|
184
|
+
'view'?: 'before' | 'diff' | 'after' | null | undefined;
|
|
185
|
+
'node'?: string | null | undefined;
|
|
186
|
+
'theme'?: 'light' | 'dark' | 'auto' | undefined;
|
|
187
|
+
'useTheme'?: boolean;
|
|
188
|
+
'topology'?: { nodes: Array<{ id: string; [key: string]: unknown }>; edges?: Array<{ from: string; to: string; [key: string]: unknown }> } | null | undefined;
|
|
189
|
+
'config'?: { [key: string]: unknown } | null | undefined;
|
|
190
|
+
'strings'?: { [key: string]: string } | null | undefined;
|
|
191
|
+
'checker'?: { check(items: unknown[], options?: { signal?: AbortSignal }): unknown; apps?: unknown; max?: number } | null | undefined;
|
|
192
|
+
'onCornReady'?: (event: CornReviewCustomEvent<void>) => void;
|
|
193
|
+
'onCornSelect'?: (event: CornReviewCustomEvent<CornSelectDetail>) => void;
|
|
194
|
+
'onCornNavigate'?: (event: CornReviewCustomEvent<CornNavigateDetail>) => void;
|
|
195
|
+
'onCornDecision'?: (event: CornReviewCustomEvent<CornDecisionDetail>) => void;
|
|
196
|
+
'onCornAuth'?: (event: CornReviewCustomEvent<CornReviewAuthDetail>) => void;
|
|
197
|
+
'onCornError'?: (event: CornReviewCustomEvent<CornReviewErrorDetail>) => void;
|
|
198
|
+
}
|
|
92
199
|
interface CornScope {
|
|
93
200
|
'src'?: string | undefined;
|
|
94
201
|
'theme'?: 'light' | 'dark' | 'auto' | undefined;
|
|
@@ -102,6 +209,7 @@ export namespace LocalJSX {
|
|
|
102
209
|
}
|
|
103
210
|
interface IntrinsicElements {
|
|
104
211
|
'corn-map': LocalJSX.CornMap & { [attribute: string]: unknown };
|
|
212
|
+
'corn-review': LocalJSX.CornReview & { [attribute: string]: unknown };
|
|
105
213
|
'corn-scope': LocalJSX.CornScope & { [attribute: string]: unknown };
|
|
106
214
|
}
|
|
107
215
|
}
|
|
@@ -129,6 +237,32 @@ declare global {
|
|
|
129
237
|
}
|
|
130
238
|
var HTMLCornMapElement: { prototype: HTMLCornMapElement; new (): HTMLCornMapElement };
|
|
131
239
|
|
|
240
|
+
/** What `<corn-review>` sends: the event's name and the type of its `detail` */
|
|
241
|
+
interface HTMLCornReviewElementEventMap {
|
|
242
|
+
/** 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 */
|
|
243
|
+
'cornReady': void;
|
|
244
|
+
/** The selection changed, whoever changed it: a click, a key, `node` or `focusNode()`. Once per change. */
|
|
245
|
+
'cornSelect': CornSelectDetail;
|
|
246
|
+
/** The open proposal, or its view, changed: what cornfield's own page would put in its address bar. The host decides what to do with it. */
|
|
247
|
+
'cornNavigate': CornNavigateDetail;
|
|
248
|
+
/** The server took a decision, Approve or Send back. Once per decision, after the server answered. */
|
|
249
|
+
'cornDecision': CornDecisionDetail;
|
|
250
|
+
/** The server wants the maintainer signed in (the read, or the press, was refused with 401 or 403). The review shows a link to `signIn`. */
|
|
251
|
+
'cornAuth': CornReviewAuthDetail;
|
|
252
|
+
/** Something the review could not do (see `kind`) */
|
|
253
|
+
'cornError': CornReviewErrorDetail;
|
|
254
|
+
}
|
|
255
|
+
/** The one-tag review (spec 0011 D4, D5, D6): a proposal on the map, what it changes, its scenarios, and Approve and Send back, in a shadow root. A thin shell (spec 0011 D1): it declares properties and events, mounts the engine's review piece (explorer/pieces/review.js) in its shadow root, passes each property change in, turns the piece's callbacks into events, and ends the piece when it leaves the page. It holds no behaviour (test/shell.test.ts fails if this file imports anything but the Stencil runtime, the engine's pieces and CSS, or grows past a shell). `src` is the address of a cornfield server it reads the map and the proposal from, and decides on, as the signed-in maintainer. It needs a height from its host. */
|
|
256
|
+
interface HTMLCornReviewElement extends Components.CornReview, HTMLElement {
|
|
257
|
+
addEventListener<K extends keyof HTMLCornReviewElementEventMap>(type: K, listener: (this: HTMLCornReviewElement, ev: CornReviewCustomEvent<HTMLCornReviewElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
258
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornReviewElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
259
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
260
|
+
removeEventListener<K extends keyof HTMLCornReviewElementEventMap>(type: K, listener: (this: HTMLCornReviewElement, ev: CornReviewCustomEvent<HTMLCornReviewElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
261
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCornReviewElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
262
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
263
|
+
}
|
|
264
|
+
var HTMLCornReviewElement: { prototype: HTMLCornReviewElement; new (): HTMLCornReviewElement };
|
|
265
|
+
|
|
132
266
|
/** What `<corn-scope>` sends: the event's name and the type of its `detail` */
|
|
133
267
|
interface HTMLCornScopeElementEventMap {
|
|
134
268
|
/** The scope has its data: read from the server, or handed in. Once per server. */
|
|
@@ -151,6 +285,7 @@ declare global {
|
|
|
151
285
|
|
|
152
286
|
interface HTMLElementTagNameMap {
|
|
153
287
|
'corn-map': HTMLCornMapElement;
|
|
288
|
+
'corn-review': HTMLCornReviewElement;
|
|
154
289
|
'corn-scope': HTMLCornScopeElement;
|
|
155
290
|
}
|
|
156
291
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ 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
4
|
export declare const CornMap: { prototype: HTMLCornMapElement; new (): HTMLCornMapElement };
|
|
5
|
+
export declare const CornReview: { prototype: HTMLCornReviewElement; new (): HTMLCornReviewElement };
|
|
5
6
|
export declare const CornScope: { prototype: HTMLCornScopeElement; new (): HTMLCornScopeElement };
|
package/dist/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@popcorn245/cornfield-components","cornfield":"0.
|
|
1
|
+
{"name":"@popcorn245/cornfield-components","cornfield":"0.51.0"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcorn245/cornfield-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "cornfield's interface as web components (spec 0011): <corn-map> and what follows, 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)",
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"types": "./dist/types/corn-map.d.ts",
|
|
35
35
|
"default": "./dist/corn-map.js"
|
|
36
36
|
},
|
|
37
|
+
"./corn-review": {
|
|
38
|
+
"types": "./dist/types/corn-review.d.ts",
|
|
39
|
+
"default": "./dist/corn-review.js"
|
|
40
|
+
},
|
|
37
41
|
"./corn-scope": {
|
|
38
42
|
"types": "./dist/types/corn-scope.d.ts",
|
|
39
43
|
"default": "./dist/corn-scope.js"
|