@almadar/ui 6.8.0 → 6.9.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/dist/avl/index.cjs +527 -46
- package/dist/avl/index.js +527 -46
- package/dist/{cn-sgpqpN0U.d.ts → cn-C7fvp9gH.d.ts} +37 -10
- package/dist/{cn-CCjFspAo.d.cts → cn-DnLYahyL.d.cts} +37 -10
- package/dist/components/index.cjs +557 -47
- package/dist/components/index.d.cts +8 -6
- package/dist/components/index.d.ts +8 -6
- package/dist/components/index.js +556 -48
- package/dist/hooks/index.cjs +30 -1
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +29 -2
- package/dist/lib/drawable/three/index.cjs +21 -2
- package/dist/lib/drawable/three/index.js +21 -2
- package/dist/lib/index.cjs +238 -9
- package/dist/lib/index.d.cts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +234 -10
- package/dist/marketing/index.cjs +12 -3
- package/dist/marketing/index.js +12 -3
- package/dist/providers/index.cjs +527 -46
- package/dist/providers/index.js +527 -46
- package/dist/runtime/index.cjs +541 -50
- package/dist/runtime/index.d.cts +7 -2
- package/dist/runtime/index.d.ts +7 -2
- package/dist/runtime/index.js +541 -50
- package/dist/{useKeyboardRouter-D84cNWmA.d.ts → useKeyboardRouter-B1pIi9jo.d.ts} +11 -1
- package/dist/{useKeyboardRouter-DQEE_9mq.d.cts → useKeyboardRouter-CVn8lfiX.d.cts} +11 -1
- package/package.json +3 -3
|
@@ -9,23 +9,50 @@ import { ClassValue } from 'clsx';
|
|
|
9
9
|
* E2); this module only computes offsets and text.
|
|
10
10
|
*
|
|
11
11
|
* Caret convention: an integer offset in `[0, text.length]`, a gap position
|
|
12
|
-
* (matches `textarea.selectionStart`) — except `word-end
|
|
13
|
-
* which land ON the index of their target character (vim's
|
|
14
|
-
* cursor convention), so `motionRange` widens those by one
|
|
15
|
-
* operator's range inclusive of that char.
|
|
12
|
+
* (matches `textarea.selectionStart`) — except `word-end`, `line-end` and
|
|
13
|
+
* `match-bracket`, which land ON the index of their target character (vim's
|
|
14
|
+
* `e`/`$`/`%` block-cursor convention), so `motionRange` widens those by one
|
|
15
|
+
* to make an operator's range inclusive of that char.
|
|
16
|
+
*
|
|
17
|
+
* `EDITOR_MOTIONS` / `EDITOR_OPERATORS` are the single source of truth for
|
|
18
|
+
* the closed vocabularies — `CodeBlock.tsx`'s `motions`/`operators` prop
|
|
19
|
+
* defaults must list the same members (kept as JSON literals there for the
|
|
20
|
+
* pattern-registry parser; `test/CodeBlock.editable.test.tsx` asserts they
|
|
21
|
+
* stay in sync).
|
|
16
22
|
*/
|
|
17
|
-
|
|
18
|
-
type
|
|
23
|
+
declare const EDITOR_MOTIONS: readonly ["left", "right", "up", "down", "word-forward", "word-back", "word-end", "line-start", "line-end", "first-nonblank", "doc-start", "doc-end", "paragraph-forward", "paragraph-back", "line", "selection", "match-bracket"];
|
|
24
|
+
type EditorMotion = (typeof EDITOR_MOTIONS)[number];
|
|
25
|
+
declare const EDITOR_OPERATORS: readonly ["delete", "yank", "change", "put", "put-before", "undo", "redo", "join", "toggle-case", "indent", "dedent", "replace"];
|
|
26
|
+
type EditorOperator = (typeof EDITOR_OPERATORS)[number];
|
|
27
|
+
declare function isEditorMotion(value: string): value is EditorMotion;
|
|
28
|
+
declare function isEditorOperator(value: string): value is EditorOperator;
|
|
29
|
+
/** Fixed indent unit for the `indent`/`dedent` operators (two spaces). */
|
|
30
|
+
declare const INDENT_UNIT = " ";
|
|
19
31
|
/** New caret offset after applying `motion` `count` times. `line`/`selection` are range-only — caret is unchanged. */
|
|
20
32
|
declare function applyMotion(text: string, caret: number, motion: EditorMotion, count: number): number;
|
|
21
33
|
/** The `[start, end)` range an operator acts on for `motion`. */
|
|
22
34
|
declare function motionRange(text: string, caret: number, motion: EditorMotion, count: number, selection?: [number, number]): [number, number];
|
|
23
|
-
|
|
24
|
-
declare function applyOperator(text: string, range: [number, number], operator: EditorOperator, register: string): {
|
|
35
|
+
interface ApplyOperatorInput {
|
|
25
36
|
text: string;
|
|
37
|
+
/** `textarea.selectionStart` at the time the operator fired — the anchor for caret-based operators (put/put-before/join) that don't act over `range`. */
|
|
26
38
|
caret: number;
|
|
39
|
+
/** The `[start, end)` range from `motionRange` — the anchor for range-based operators (delete/yank/change/toggle-case/indent/dedent/replace). */
|
|
40
|
+
range: [number, number];
|
|
41
|
+
operator: EditorOperator;
|
|
42
|
+
/** The motion paired with this operator. `change` special-cases `line`; delete/yank/change use it to set the returned `registerLinewise`. */
|
|
43
|
+
motion: EditorMotion;
|
|
44
|
+
count: number;
|
|
27
45
|
register: string;
|
|
28
|
-
|
|
46
|
+
registerLinewise: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface ApplyOperatorResult {
|
|
49
|
+
text: string;
|
|
50
|
+
caret: number;
|
|
51
|
+
register: string;
|
|
52
|
+
registerLinewise: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** Apply `operator`. `undo`/`redo` never reach here — they're history-stack operations handled by `useEditorCapabilities`. */
|
|
55
|
+
declare function applyOperator(input: ApplyOperatorInput): ApplyOperatorResult;
|
|
29
56
|
|
|
30
57
|
/**
|
|
31
58
|
* Content Segment Parsing Utilities
|
|
@@ -400,4 +427,4 @@ declare function clearVerification(): void;
|
|
|
400
427
|
*/
|
|
401
428
|
declare function cn(...inputs: ClassValue[]): string;
|
|
402
429
|
|
|
403
|
-
export {
|
|
430
|
+
export { renderStateMachineToSvg as $, type ApplyOperatorInput as A, getEffectSummary as B, type ContentSegment as C, DEFAULT_CONFIG as D, EDITOR_MOTIONS as E, getSnapshot as F, getSummary as G, getTraitSnapshots as H, INDENT_UNIT as I, getTransitions as J, getTransitionsForTrait as K, type LessonSegment as L, isEditorMotion as M, isEditorOperator as N, motionRange as O, parseContentSegments as P, parseLessonSegments as Q, type RenderOptions as R, type StateDefinition as S, type TraitSnapshotGetter as T, parseMarkdownWithCodeBlocks$1 as U, type VisualizerConfig as V, recordServerResponse as W, recordTransition as X, registerCheck as Y, registerTraitSnapshot as Z, renderStateMachineToDomData as _, type ApplyOperatorResult as a, subscribeToVerification as a0, updateAssetStatus as a1, updateBridgeHealth as a2, updateCheck as a3, waitForTransition as a4, type InteractiveOrbitalType as a5, type BloomLevel as a6, BloomQuizBlock as a7, type BloomQuizBlockProps as a8, type MixedSegment as a9, parseMarkdownWithCodeBlocks as aa, type DomEntityBox as b, type DomLayoutData as c, type DomOutputsBox as d, type DomStateNode as e, type DomTransitionLabel as f, type DomTransitionPath as g, EDITOR_OPERATORS as h, type EditorMotion as i, type EditorOperator as j, type EntityDefinition as k, type StateMachineDefinition as l, type TransitionDefinition as m, applyMotion as n, applyOperator as o, bindCanvasCapture as p, bindEventBus as q, bindLastDrawables as r, bindTraitStateGetter as s, clearVerification as t, cn as u, extractOutputsFromTransitions as v, extractStateMachine as w, formatGuard as x, getAllChecks as y, getBridgeHealth as z };
|
|
@@ -9,23 +9,50 @@ import { ClassValue } from 'clsx';
|
|
|
9
9
|
* E2); this module only computes offsets and text.
|
|
10
10
|
*
|
|
11
11
|
* Caret convention: an integer offset in `[0, text.length]`, a gap position
|
|
12
|
-
* (matches `textarea.selectionStart`) — except `word-end
|
|
13
|
-
* which land ON the index of their target character (vim's
|
|
14
|
-
* cursor convention), so `motionRange` widens those by one
|
|
15
|
-
* operator's range inclusive of that char.
|
|
12
|
+
* (matches `textarea.selectionStart`) — except `word-end`, `line-end` and
|
|
13
|
+
* `match-bracket`, which land ON the index of their target character (vim's
|
|
14
|
+
* `e`/`$`/`%` block-cursor convention), so `motionRange` widens those by one
|
|
15
|
+
* to make an operator's range inclusive of that char.
|
|
16
|
+
*
|
|
17
|
+
* `EDITOR_MOTIONS` / `EDITOR_OPERATORS` are the single source of truth for
|
|
18
|
+
* the closed vocabularies — `CodeBlock.tsx`'s `motions`/`operators` prop
|
|
19
|
+
* defaults must list the same members (kept as JSON literals there for the
|
|
20
|
+
* pattern-registry parser; `test/CodeBlock.editable.test.tsx` asserts they
|
|
21
|
+
* stay in sync).
|
|
16
22
|
*/
|
|
17
|
-
|
|
18
|
-
type
|
|
23
|
+
declare const EDITOR_MOTIONS: readonly ["left", "right", "up", "down", "word-forward", "word-back", "word-end", "line-start", "line-end", "first-nonblank", "doc-start", "doc-end", "paragraph-forward", "paragraph-back", "line", "selection", "match-bracket"];
|
|
24
|
+
type EditorMotion = (typeof EDITOR_MOTIONS)[number];
|
|
25
|
+
declare const EDITOR_OPERATORS: readonly ["delete", "yank", "change", "put", "put-before", "undo", "redo", "join", "toggle-case", "indent", "dedent", "replace"];
|
|
26
|
+
type EditorOperator = (typeof EDITOR_OPERATORS)[number];
|
|
27
|
+
declare function isEditorMotion(value: string): value is EditorMotion;
|
|
28
|
+
declare function isEditorOperator(value: string): value is EditorOperator;
|
|
29
|
+
/** Fixed indent unit for the `indent`/`dedent` operators (two spaces). */
|
|
30
|
+
declare const INDENT_UNIT = " ";
|
|
19
31
|
/** New caret offset after applying `motion` `count` times. `line`/`selection` are range-only — caret is unchanged. */
|
|
20
32
|
declare function applyMotion(text: string, caret: number, motion: EditorMotion, count: number): number;
|
|
21
33
|
/** The `[start, end)` range an operator acts on for `motion`. */
|
|
22
34
|
declare function motionRange(text: string, caret: number, motion: EditorMotion, count: number, selection?: [number, number]): [number, number];
|
|
23
|
-
|
|
24
|
-
declare function applyOperator(text: string, range: [number, number], operator: EditorOperator, register: string): {
|
|
35
|
+
interface ApplyOperatorInput {
|
|
25
36
|
text: string;
|
|
37
|
+
/** `textarea.selectionStart` at the time the operator fired — the anchor for caret-based operators (put/put-before/join) that don't act over `range`. */
|
|
26
38
|
caret: number;
|
|
39
|
+
/** The `[start, end)` range from `motionRange` — the anchor for range-based operators (delete/yank/change/toggle-case/indent/dedent/replace). */
|
|
40
|
+
range: [number, number];
|
|
41
|
+
operator: EditorOperator;
|
|
42
|
+
/** The motion paired with this operator. `change` special-cases `line`; delete/yank/change use it to set the returned `registerLinewise`. */
|
|
43
|
+
motion: EditorMotion;
|
|
44
|
+
count: number;
|
|
27
45
|
register: string;
|
|
28
|
-
|
|
46
|
+
registerLinewise: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface ApplyOperatorResult {
|
|
49
|
+
text: string;
|
|
50
|
+
caret: number;
|
|
51
|
+
register: string;
|
|
52
|
+
registerLinewise: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** Apply `operator`. `undo`/`redo` never reach here — they're history-stack operations handled by `useEditorCapabilities`. */
|
|
55
|
+
declare function applyOperator(input: ApplyOperatorInput): ApplyOperatorResult;
|
|
29
56
|
|
|
30
57
|
/**
|
|
31
58
|
* Content Segment Parsing Utilities
|
|
@@ -400,4 +427,4 @@ declare function clearVerification(): void;
|
|
|
400
427
|
*/
|
|
401
428
|
declare function cn(...inputs: ClassValue[]): string;
|
|
402
429
|
|
|
403
|
-
export {
|
|
430
|
+
export { renderStateMachineToSvg as $, type ApplyOperatorInput as A, getEffectSummary as B, type ContentSegment as C, DEFAULT_CONFIG as D, EDITOR_MOTIONS as E, getSnapshot as F, getSummary as G, getTraitSnapshots as H, INDENT_UNIT as I, getTransitions as J, getTransitionsForTrait as K, type LessonSegment as L, isEditorMotion as M, isEditorOperator as N, motionRange as O, parseContentSegments as P, parseLessonSegments as Q, type RenderOptions as R, type StateDefinition as S, type TraitSnapshotGetter as T, parseMarkdownWithCodeBlocks$1 as U, type VisualizerConfig as V, recordServerResponse as W, recordTransition as X, registerCheck as Y, registerTraitSnapshot as Z, renderStateMachineToDomData as _, type ApplyOperatorResult as a, subscribeToVerification as a0, updateAssetStatus as a1, updateBridgeHealth as a2, updateCheck as a3, waitForTransition as a4, type InteractiveOrbitalType as a5, type BloomLevel as a6, BloomQuizBlock as a7, type BloomQuizBlockProps as a8, type MixedSegment as a9, parseMarkdownWithCodeBlocks as aa, type DomEntityBox as b, type DomLayoutData as c, type DomOutputsBox as d, type DomStateNode as e, type DomTransitionLabel as f, type DomTransitionPath as g, EDITOR_OPERATORS as h, type EditorMotion as i, type EditorOperator as j, type EntityDefinition as k, type StateMachineDefinition as l, type TransitionDefinition as m, applyMotion as n, applyOperator as o, bindCanvasCapture as p, bindEventBus as q, bindLastDrawables as r, bindTraitStateGetter as s, clearVerification as t, cn as u, extractOutputsFromTransitions as v, extractStateMachine as w, formatGuard as x, getAllChecks as y, getBridgeHealth as z };
|