@stacksjs/components 0.2.863 → 0.2.865
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/dist/{Button-k3j4cc3h.stx → Button-sebyqeva.stx} +6 -0
- package/dist/{CodeEditor-jg4w7e15.stx → CodeEditor-kaywcb83.stx} +111 -23
- package/dist/code-editor/editor.js +551 -10
- package/dist/index.js +12 -12
- package/dist/ui/code-editor/CodeEditor.d.ts +6 -1
- package/dist/ui/code-editor/controller.d.ts +31 -1
- package/dist/ui/code-editor/core/completion.d.ts +1 -0
- package/dist/ui/code-editor/core/hints.d.ts +68 -0
- package/dist/ui/code-editor/core/index.d.ts +1 -0
- package/dist/ui/code-editor/index.d.ts +6 -3
- package/dist/ui/code-editor/view.d.ts +30 -1
- package/package.json +3 -3
- package/src/ui/button/Button.stx +6 -0
- package/src/ui/code-editor/CodeEditor.stx +111 -23
- package/src/ui/code-editor/README.md +56 -2
- package/src/ui/code-editor/controller.ts +378 -6
- package/src/ui/code-editor/core/completion.ts +2 -0
- package/src/ui/code-editor/core/hints.ts +241 -0
- package/src/ui/code-editor/core/index.ts +1 -0
- package/src/ui/code-editor/core/keymap.ts +2 -0
- package/src/ui/code-editor/index.ts +9 -3
- package/src/ui/code-editor/view.ts +272 -7
- package/src/ui/preview-frame/README.md +15 -7
- package/src/ui/preview-frame/index.ts +6 -1
- package/src/ui/preview-frame/view.ts +5 -3
|
@@ -14,7 +14,12 @@ export interface PreviewFrameProps {
|
|
|
14
14
|
frameHeight?: number
|
|
15
15
|
/** Turn a phone or tablet on its side. */
|
|
16
16
|
landscape?: boolean
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The colour scheme the frame is drawn with, which is what the page's
|
|
19
|
+
* `prefers-color-scheme` reports in an engine that passes a frame's scheme
|
|
20
|
+
* to its page (Chromium; WebKit reports the system's). `auto` (default)
|
|
21
|
+
* follows the host page.
|
|
22
|
+
*/
|
|
18
23
|
scheme?: PreviewScheme
|
|
19
24
|
/** Let the page's own scripts run. They get an origin of their own and cannot reach the host. Default off. */
|
|
20
25
|
scripts?: boolean
|
|
@@ -222,9 +222,11 @@ export class PreviewFrameView {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
225
|
+
* The scheme is set here, on the host's side, as the frame element's
|
|
226
|
+
* `color-scheme`. Chromium hands that to the page as its
|
|
227
|
+
* `prefers-color-scheme`, so the page follows with no script and no
|
|
228
|
+
* cooperation. WebKit does not hand it over: there the page keeps the
|
|
229
|
+
* system's scheme whatever is set here (stacksjs/stx#2186).
|
|
228
230
|
*/
|
|
229
231
|
private applyScheme(): void {
|
|
230
232
|
const scheme = this.effectiveScheme()
|