limber-ui 4.2.2 → 4.3.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/declarations/{code.d.ts → code.d.gts.ts} +2 -2
- package/declarations/code.d.gts.ts.map +1 -0
- package/declarations/frame-messaging.d.ts +33 -8
- package/declarations/frame-messaging.d.ts.map +1 -1
- package/declarations/index.d.ts +2 -1
- package/declarations/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/package.json +21 -29
- package/declarations/code.d.ts.map +0 -1
|
@@ -82,9 +82,9 @@ export default class Code extends Component<Signature> {
|
|
|
82
82
|
get liveData(): {
|
|
83
83
|
code: string;
|
|
84
84
|
format: AllowedFormat;
|
|
85
|
-
shadowdom:
|
|
85
|
+
shadowdom: "0" | "1" | "false" | "true" | boolean | undefined;
|
|
86
86
|
};
|
|
87
87
|
triggerLoad: () => void;
|
|
88
88
|
}
|
|
89
89
|
export {};
|
|
90
|
-
//# sourceMappingURL=code.d.ts.map
|
|
90
|
+
//# sourceMappingURL=code.d.gts.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.d.gts.ts","sourceRoot":"","sources":["../src/code.gts"],"names":[],"mappings":"AACA,OAAO,YAAY,CAAC;AAEpB,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,KAAK,aAAa,GAChB,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAG/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAWrD,UAAU,SAAS;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE;QACJ;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;;;;;;;;WAUG;QACH,MAAM,CAAC,EAAE,aAAa,CAAC;QAEvB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;;;;;WAOG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB;;;;WAIG;QAIH;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;;;;;WAOG;QACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;QAE3C;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;QAErD;;;;WAIG;QACH,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;KACpD,CAAC;CACH;AAiCD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,aAAa,CAAC;IAE7C,UAAU,UAAS;IAE5B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC,YAAY,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAWhD;IAED,IAAI,IAAI,YAMP;IAED,IAAI,IAAI,WAMP;IAED,IAAI,MAAM,kBAMT;IAED,IAAI,KAAK,WAMR;IAED,IAAI,KAAK,WAER;IAED,IAAI,QAAQ;QAER,IAAI;QACJ,MAAM;QACN,SAAS;MAEZ;IAED,WAAW,aAET;CAgCH"}
|
|
@@ -1,15 +1,41 @@
|
|
|
1
1
|
import type { ModifierLike } from '@glint/template';
|
|
2
2
|
import type { Connection } from 'penpal';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The messages between a page and the REPL in its frame.
|
|
5
|
+
*
|
|
6
|
+
* There are two such pairs. `<REPL>` frames the edit page,
|
|
7
|
+
* and the edit page frames the output page for a pinned ember-source.
|
|
8
|
+
* Both pairs use these types.
|
|
9
|
+
*/
|
|
10
|
+
export interface FrameDocument {
|
|
4
11
|
code: string;
|
|
5
12
|
format: string;
|
|
6
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The files next to `code`, as path → text.
|
|
15
|
+
* `undefined` keeps what the frame has.
|
|
16
|
+
*/
|
|
17
|
+
files?: Record<string, string>;
|
|
18
|
+
/**
|
|
19
|
+
* `undefined` keeps what the frame has.
|
|
20
|
+
*/
|
|
21
|
+
shadowdom?: undefined | boolean | string;
|
|
22
|
+
/**
|
|
23
|
+
* Pins, as package name → version.
|
|
24
|
+
*/
|
|
25
|
+
versions?: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
export interface GuestMethods {
|
|
28
|
+
update: (document: FrameDocument) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface HostMethods {
|
|
31
|
+
/**
|
|
32
|
+
* The packages that the frame loaded, after each compile.
|
|
33
|
+
*/
|
|
34
|
+
dependencies: (entries: [name: string, version: string | undefined][]) => void;
|
|
7
35
|
}
|
|
8
36
|
export declare class HostMessaging {
|
|
9
37
|
frameStatus: unknown;
|
|
10
|
-
connection?: Connection<
|
|
11
|
-
update: (data: ParentToChildData) => void;
|
|
12
|
-
}>;
|
|
38
|
+
connection?: Connection<GuestMethods>;
|
|
13
39
|
/**
|
|
14
40
|
* We can't post right away, because we might do so before the iframe is ready.
|
|
15
41
|
* We need to wait until the frame initiates contact.
|
|
@@ -17,13 +43,12 @@ export declare class HostMessaging {
|
|
|
17
43
|
postMessage: ModifierLike<{
|
|
18
44
|
Element: HTMLIFrameElement;
|
|
19
45
|
Args: {
|
|
20
|
-
Positional: [data:
|
|
46
|
+
Positional: [data: FrameDocument];
|
|
21
47
|
};
|
|
22
48
|
}>;
|
|
23
49
|
onMessage: ModifierLike<{
|
|
24
50
|
Element: HTMLIFrameElement;
|
|
25
51
|
}>;
|
|
26
|
-
queuePayload(data:
|
|
52
|
+
queuePayload(data: FrameDocument): Promise<void>;
|
|
27
53
|
}
|
|
28
|
-
export {};
|
|
29
54
|
//# sourceMappingURL=frame-messaging.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-messaging.d.ts","sourceRoot":"","sources":["../src/frame-messaging.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,
|
|
1
|
+
{"version":3,"file":"frame-messaging.d.ts","sourceRoot":"","sources":["../src/frame-messaging.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,YAAY,EAAE,CACZ,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,KACnD,IAAI,CAAC;CACX;AAkCD,qBAAa,aAAa;IACf,WAAW,EAAE,OAAO,CAAC;IAE9B,UAAU,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IAEtC;;;OAGG;IACH,WAAW;iBAlCF,iBAAiB;cACpB;YACJ,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;SACnC;OA+BiE;IAClE,SAAS;iBAlBgB,iBAAiB;OA2BvC;IAGG,YAAY,CAAC,IAAI,EAAE,aAAa,iBAWrC;CACF"}
|
package/declarations/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EACV,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "./code.css"
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
-
import { on } from '@ember/modifier';
|
|
5
4
|
import { guidFor } from '@ember/object/internals';
|
|
6
5
|
import { htmlSafe } from '@ember/template';
|
|
7
6
|
import { link } from 'reactiveweb/link';
|
|
@@ -39,6 +38,8 @@ class HostMessaging {
|
|
|
39
38
|
g(this.prototype, "frameStatus", [tracked]);
|
|
40
39
|
}
|
|
41
40
|
#frameStatus = (i(this, "frameStatus"), void 0);
|
|
41
|
+
connection;
|
|
42
|
+
|
|
42
43
|
/**
|
|
43
44
|
* We can't post right away, because we might do so before the iframe is ready.
|
|
44
45
|
* We need to wait until the frame initiates contact.
|
|
@@ -47,7 +48,9 @@ class HostMessaging {
|
|
|
47
48
|
onMessage = HandleMessage(element => {
|
|
48
49
|
this.connection = connectToChild({
|
|
49
50
|
iframe: element,
|
|
50
|
-
methods: {
|
|
51
|
+
methods: {
|
|
52
|
+
dependencies: () => {}
|
|
53
|
+
}
|
|
51
54
|
});
|
|
52
55
|
waitForPromise(this.connection.promise).catch(console.error);
|
|
53
56
|
return () => void this.connection?.destroy();
|
|
@@ -65,7 +68,6 @@ class HostMessaging {
|
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
69
71
|
const DEFAULT_DEMO = `
|
|
70
72
|
// Welcome
|
|
71
73
|
//
|
|
@@ -164,8 +166,7 @@ class Code extends Component {
|
|
|
164
166
|
scope: () => ({
|
|
165
167
|
htmlSafe,
|
|
166
168
|
INITIAL_URL,
|
|
167
|
-
defaultStyle
|
|
168
|
-
on
|
|
169
|
+
defaultStyle
|
|
169
170
|
})
|
|
170
171
|
}), this);
|
|
171
172
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "limber-ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Components for interacting with the Limber REPL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -19,42 +19,36 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@ember/test-waiters": "^4.1.1",
|
|
22
|
-
"@embroider/addon-shim": "1.
|
|
23
|
-
"@glimmer/component": "^2.
|
|
24
|
-
"decorator-transforms": "2.
|
|
22
|
+
"@embroider/addon-shim": "1.11.0",
|
|
23
|
+
"@glimmer/component": "^2.2.1",
|
|
24
|
+
"decorator-transforms": "2.4.0",
|
|
25
25
|
"ember-modifier": "^4.2.2",
|
|
26
26
|
"penpal": "^6.2.2",
|
|
27
27
|
"reactiveweb": "1.9.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@babel/core": "^
|
|
31
|
-
"@babel/plugin-
|
|
32
|
-
"@babel/
|
|
33
|
-
"@babel/plugin-syntax-decorators": "^7.27.1",
|
|
34
|
-
"@babel/plugin-transform-typescript": "^7.28.5",
|
|
35
|
-
"@babel/preset-typescript": "^7.28.5",
|
|
30
|
+
"@babel/core": "^8.1.3",
|
|
31
|
+
"@babel/plugin-transform-typescript": "^8.1.3",
|
|
32
|
+
"@babel/preset-typescript": "^8.0.7",
|
|
36
33
|
"@ember/library-tsconfig": "^2.0.0",
|
|
37
|
-
"@embroider/addon-dev": "^8.1
|
|
38
|
-
"@glint/ember-tsc": "^1.
|
|
39
|
-
"@glint/template": "1.
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"babel-plugin-ember-template-compilation": "^4.0.0",
|
|
34
|
+
"@embroider/addon-dev": "^8.3.1",
|
|
35
|
+
"@glint/ember-tsc": "^1.11.0",
|
|
36
|
+
"@glint/template": "1.8.0",
|
|
37
|
+
"@nullvoxpopuli/eslint-configs": "^7.1.0",
|
|
38
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
39
|
+
"babel-plugin-ember-template-compilation": "^4.0.2",
|
|
44
40
|
"concurrently": "^9.2.1",
|
|
45
41
|
"ember-async-data": "2.0.1",
|
|
46
|
-
"ember-
|
|
42
|
+
"ember-content-mapper": "^0.2.0",
|
|
43
|
+
"ember-primitives": "^0.64.3",
|
|
47
44
|
"ember-resources": "^7.1.0",
|
|
48
|
-
"ember-source": "7.
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"fix-bad-declaration-output": "^1.1.5",
|
|
53
|
-
"prettier": "^3.7.4",
|
|
54
|
-
"prettier-plugin-ember-template-tag": "2.1.2",
|
|
45
|
+
"ember-source": "7.5.0-alpha.3",
|
|
46
|
+
"eslint": "^10.0.0",
|
|
47
|
+
"prettier": "^3.9.6",
|
|
48
|
+
"prettier-plugin-ember-template-tag": "2.1.8",
|
|
55
49
|
"rollup": "^4.53.3",
|
|
56
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
57
50
|
"typescript": "5.9.3",
|
|
51
|
+
"typescript-7": "npm:typescript@7.1.0-dev.20260825.1",
|
|
58
52
|
"vite": "^8.0.8"
|
|
59
53
|
},
|
|
60
54
|
"publishConfig": {
|
|
@@ -89,14 +83,12 @@
|
|
|
89
83
|
},
|
|
90
84
|
"scripts": {
|
|
91
85
|
"build": "rollup --config",
|
|
92
|
-
"lint:types": "
|
|
86
|
+
"lint:types": "node node_modules/typescript-7/bin/tsc --noEmit --runExternalCode",
|
|
93
87
|
"lint:fix": "pnpm -w exec lint fix",
|
|
94
88
|
"start": "rollup --config --watch",
|
|
95
89
|
"lint": "pnpm -w exec lint",
|
|
96
90
|
"lint:js": "pnpm -w exec lint js",
|
|
97
91
|
"lint:js:fix": "pnpm -w exec lint js:fix",
|
|
98
|
-
"lint:hbs": "pnpm -w exec lint hbs",
|
|
99
|
-
"lint:hbs:fix": "pnpm -w exec lint hbs:fix",
|
|
100
92
|
"lint:prettier:fix": "pnpm -w exec lint prettier:fix",
|
|
101
93
|
"lint:prettier": "pnpm -w exec lint prettier"
|
|
102
94
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../src/code.gts"],"names":[],"mappings":"AAkPA,OAAO,YAAY,CAAC;AAEpB,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAQ3C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,KAAK,aAAa,GACd,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,SAAS,CAAC;AAGd,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAWrD,UAAU,SAAS;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE;QACJ;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;;;;;;;;WAUG;QACH,MAAM,CAAC,EAAE,aAAa,CAAC;QAEvB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;;;;;WAOG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB;;;;WAIG;QAIH;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;;;;;WAOG;QACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;QAE3C;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;QAErD;;;;WAIG;QACH,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC;KACpD,CAAC;CACH;AAiCD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,aAAa,CAAC;IAE7C,UAAU,UAAS;IAE5B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAErB,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC;IAajD,IAAI,IAAI,YAMP;IAED,IAAI,IAAI,WAMP;IAED,IAAI,MAAM,kBAMT;IAED,IAAI,KAAK,WAMR;IAED,IAAI,KAAK,WAER;IAED,IAAI,QAAQ;;;;MAMX;IAED,WAAW,aAET;CAmDH"}
|