@quillmark/svelte 0.30.0 → 0.32.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 +5 -5
- package/dist/core/address.d.ts +1 -1
- package/dist/core/address.js +1 -1
- package/dist/core/codec/atoms.js +1 -1
- package/dist/core/codec/breaks.js +3 -2
- package/dist/core/codec/decode.d.ts +4 -3
- package/dist/core/codec/decode.js +17 -13
- package/dist/core/codec/field.d.ts +5 -4
- package/dist/core/codec/field.js +139 -49
- package/dist/core/codec/index.d.ts +2 -0
- package/dist/core/codec/index.js +5 -1
- package/dist/core/codec/inputrules.js +3 -3
- package/dist/core/codec/islands.d.ts +1 -1
- package/dist/core/codec/islands.js +3 -3
- package/dist/core/codec/keymap.d.ts +1 -1
- package/dist/core/codec/keymap.js +3 -2
- package/dist/core/codec/list-move.js +2 -1
- package/dist/core/codec/list-paste.js +1 -1
- package/dist/core/codec/lists.d.ts +1 -1
- package/dist/core/codec/lists.js +7 -6
- package/dist/core/codec/markdown-paste.js +2 -2
- package/dist/core/codec/positions.d.ts +12 -1
- package/dist/core/codec/prose.css +3 -11
- package/dist/core/codec/schema.d.ts +3 -3
- package/dist/core/codec/schema.js +6 -6
- package/dist/core/codec/shortcuts.d.ts +91 -0
- package/dist/core/codec/shortcuts.js +135 -0
- package/dist/core/codec/slash.d.ts +4 -2
- package/dist/core/codec/slash.js +11 -1
- package/dist/core/codec/table-paste.js +1 -1
- package/dist/core/codec/table-view.d.ts +1 -1
- package/dist/core/codec/table-view.js +27 -37
- package/dist/core/codec/tasks.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/theme.css +16 -8
- package/dist/preset/scale.css +1 -1
- package/dist/preview/Preview.svelte +2 -3
- package/dist/preview/bridge.js +2 -2
- package/dist/preview/geometry.d.ts +2 -2
- package/dist/preview/geometry.js +2 -2
- package/dist/preview/paint.js +1 -1
- package/dist/visual/ArrayField.svelte +172 -87
- package/dist/visual/BooleanField.svelte +3 -3
- package/dist/visual/Card.svelte +68 -47
- package/dist/visual/CardControls.svelte +1 -1
- package/dist/visual/DateField.svelte +17 -2
- package/dist/visual/DiagnosticList.svelte +35 -3
- package/dist/visual/EnumField.svelte +59 -45
- package/dist/visual/Field.svelte +16 -6
- package/dist/visual/Field.svelte.d.ts +3 -1
- package/dist/visual/FieldHint.svelte +10 -3
- package/dist/visual/FormatPopover.svelte +9 -3
- package/dist/visual/MatrixAdd.svelte +4 -19
- package/dist/visual/MatrixField.svelte +21 -13
- package/dist/visual/NumberField.svelte +2 -3
- package/dist/visual/ObjectField.svelte +166 -147
- package/dist/visual/ProseField.svelte +8 -3
- package/dist/visual/SlashMenu.svelte +24 -12
- package/dist/visual/SlashMenu.svelte.d.ts +2 -0
- package/dist/visual/TextField.svelte +1 -1
- package/dist/visual/VariantField.svelte +1 -1
- package/dist/visual/VisualEditor.svelte +1 -1
- package/dist/visual/VisualEditor.svelte.d.ts +1 -1
- package/dist/visual/VisualEditorInner.svelte +159 -24
- package/dist/visual/VisualEditorInner.svelte.d.ts +1 -1
- package/dist/visual/controls.css +43 -5
- package/dist/visual/diagnostics.d.ts +2 -2
- package/dist/visual/diagnostics.js +2 -2
- package/dist/visual/index.d.ts +2 -0
- package/dist/visual/index.js +3 -0
- package/dist/visual/leaves.js +1 -1
- package/dist/visual/props.d.ts +2 -2
- package/dist/visual/strings.d.ts +33 -15
- package/dist/visual/strings.js +42 -7
- package/dist/visual/structure.d.ts +27 -18
- package/dist/visual/structure.js +32 -28
- package/dist/visual/tips.js +1 -1
- package/dist/visual/undo.svelte.d.ts +36 -0
- package/dist/visual/undo.svelte.js +119 -0
- package/package.json +2 -2
- package/dist/visual/hold.d.ts +0 -17
- package/dist/visual/hold.js +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quillmark/svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Editor, live-preview and source surfaces over a Quillmark WASM session.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@quillmark/wasm": ">=0.
|
|
72
|
+
"@quillmark/wasm": ">=0.135.0-0",
|
|
73
73
|
"svelte": "^5.33.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
package/dist/visual/hold.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run `change` and keep `anchor` inside the fold for the length of the move.
|
|
3
|
-
*
|
|
4
|
-
* A section closing above the pressed control carries that control off the fold with it,
|
|
5
|
-
* and what answers that is the trip every landing here already takes: the minimum, to the
|
|
6
|
-
* nearest edge, never a centring (VISUAL_EDITOR §"Focus and the preview bridge"). So a
|
|
7
|
-
* control the collapse never carries out of view costs no scroll at all, and one it would
|
|
8
|
-
* rides up and parks at the edge, which is where a section just opened wants its header:
|
|
9
|
-
* the fold below it is the room its fields unfold into, where a control held on the line
|
|
10
|
-
* it was pressed on opens its section into the screen it sits on the edge of.
|
|
11
|
-
*
|
|
12
|
-
* Per frame, because both panels move over the motion rung: a trip taken once is taken
|
|
13
|
-
* against a track that has not moved yet, the same flush a reveal's landing measures in
|
|
14
|
-
* (`Card.revealLeaf`). `instant`, because a host's `scroll-behavior: smooth` would
|
|
15
|
-
* otherwise animate each frame's correction toward the one before it.
|
|
16
|
-
*/
|
|
17
|
-
export declare function holdInView(anchor: HTMLElement | undefined, change: () => void): void;
|
package/dist/visual/hold.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// The gesture's anchor, which scroll anchoring is not: the platform picks its anchor off
|
|
2
|
-
// the layout, and what fills the viewport as a section collapses is that section's own
|
|
3
|
-
// content, whose top never moves.
|
|
4
|
-
import { flushSync } from 'svelte';
|
|
5
|
-
import { rungMs, rungStyle } from '../core/rungs.js';
|
|
6
|
-
/**
|
|
7
|
-
* Run `change` and keep `anchor` inside the fold for the length of the move.
|
|
8
|
-
*
|
|
9
|
-
* A section closing above the pressed control carries that control off the fold with it,
|
|
10
|
-
* and what answers that is the trip every landing here already takes: the minimum, to the
|
|
11
|
-
* nearest edge, never a centring (VISUAL_EDITOR §"Focus and the preview bridge"). So a
|
|
12
|
-
* control the collapse never carries out of view costs no scroll at all, and one it would
|
|
13
|
-
* rides up and parks at the edge, which is where a section just opened wants its header:
|
|
14
|
-
* the fold below it is the room its fields unfold into, where a control held on the line
|
|
15
|
-
* it was pressed on opens its section into the screen it sits on the edge of.
|
|
16
|
-
*
|
|
17
|
-
* Per frame, because both panels move over the motion rung: a trip taken once is taken
|
|
18
|
-
* against a track that has not moved yet, the same flush a reveal's landing measures in
|
|
19
|
-
* (`Card.revealLeaf`). `instant`, because a host's `scroll-behavior: smooth` would
|
|
20
|
-
* otherwise animate each frame's correction toward the one before it.
|
|
21
|
-
*/
|
|
22
|
-
export function holdInView(anchor, change) {
|
|
23
|
-
if (!anchor)
|
|
24
|
-
return void change();
|
|
25
|
-
change();
|
|
26
|
-
flushSync();
|
|
27
|
-
const reveal = () => anchor.scrollIntoView({ block: 'nearest', behavior: 'instant' });
|
|
28
|
-
reveal();
|
|
29
|
-
const rung = rungMs(rungStyle(anchor), '--_qm-duration-slow');
|
|
30
|
-
if (rung === undefined)
|
|
31
|
-
return;
|
|
32
|
-
const until = performance.now() + rung;
|
|
33
|
-
const step = (now) => {
|
|
34
|
-
reveal();
|
|
35
|
-
if (now < until)
|
|
36
|
-
requestAnimationFrame(step);
|
|
37
|
-
};
|
|
38
|
-
requestAnimationFrame(step);
|
|
39
|
-
}
|