foldkit 0.158.2 → 0.159.0-canary.63fa8e97d24a
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 +2 -2
- package/dist/calendar/calendarDate.js +1 -1
- package/dist/command/index.d.ts +10 -8
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +8 -6
- package/dist/customElement/index.d.ts +15 -8
- package/dist/customElement/index.d.ts.map +1 -1
- package/dist/customElement/index.js +28 -5
- package/dist/customElement/public.d.ts +1 -1
- package/dist/customElement/public.d.ts.map +1 -1
- package/dist/dom/dom.d.ts +7 -4
- package/dist/dom/dom.d.ts.map +1 -1
- package/dist/dom/dom.js +8 -5
- package/dist/experimental/server/fetch.d.ts +42 -0
- package/dist/experimental/server/fetch.d.ts.map +1 -0
- package/dist/experimental/server/fetch.js +75 -0
- package/dist/experimental/server/index.d.ts +1 -0
- package/dist/experimental/server/index.d.ts.map +1 -1
- package/dist/experimental/server/index.js +1 -0
- package/dist/experimental/server/public.d.ts +2 -2
- package/dist/experimental/server/public.d.ts.map +1 -1
- package/dist/experimental/server/public.js +1 -1
- package/dist/experimental/server/server.d.ts +3 -2
- package/dist/experimental/server/server.d.ts.map +1 -1
- package/dist/experimental/server/template.js +4 -4
- package/dist/html/index.d.ts +42 -3
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +147 -10
- package/dist/hydrationMarker.d.ts +2 -2
- package/dist/hydrationMarker.d.ts.map +1 -1
- package/dist/hydrationMarker.js +2 -2
- package/dist/runtime/devToolsConfig.d.ts +3 -3
- package/dist/runtime/devToolsConfig.d.ts.map +1 -1
- package/dist/runtime/devToolsConfig.js +3 -3
- package/dist/runtime/hydrationHandoff.d.ts +5 -4
- package/dist/runtime/hydrationHandoff.d.ts.map +1 -1
- package/dist/runtime/hydrationHandoff.js +14 -13
- package/dist/runtime/{hmrProtocol.d.ts → modelPreservation.d.ts} +3 -3
- package/dist/runtime/modelPreservation.d.ts.map +1 -0
- package/dist/runtime/{hmrProtocol.js → modelPreservation.js} +2 -2
- package/dist/runtime/modelPreservationBridge.d.ts +4 -0
- package/dist/runtime/modelPreservationBridge.d.ts.map +1 -0
- package/dist/runtime/{hmrModelBridge.js → modelPreservationBridge.js} +7 -7
- package/dist/runtime/modelPreservationPublic.d.ts +2 -0
- package/dist/runtime/modelPreservationPublic.d.ts.map +1 -0
- package/dist/runtime/{hmrProtocolPublic.js → modelPreservationPublic.js} +1 -1
- package/dist/runtime/preserveScheduler.d.ts +1 -1
- package/dist/runtime/runtime.d.ts +8 -7
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +16 -16
- package/dist/runtime/{hmrScroll.d.ts → scrollPreservation.d.ts} +1 -1
- package/dist/runtime/scrollPreservation.d.ts.map +1 -0
- package/dist/runtime/{hmrScroll.js → scrollPreservation.js} +3 -3
- package/dist/runtime/slowPhase.d.ts +2 -1
- package/dist/runtime/slowPhase.d.ts.map +1 -1
- package/dist/runtime/start.d.ts +10 -7
- package/dist/runtime/start.d.ts.map +1 -1
- package/dist/runtime/start.js +21 -9
- package/dist/runtime/visibility.d.ts +2 -2
- package/dist/runtime/visibility.d.ts.map +1 -1
- package/dist/runtime/visibility.js +2 -2
- package/dist/schema/index.d.ts +42 -12
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +33 -26
- package/dist/test/apps/contentEditableEditor.d.ts +32 -0
- package/dist/test/apps/contentEditableEditor.d.ts.map +1 -0
- package/dist/test/apps/contentEditableEditor.js +39 -0
- package/dist/test/apps/fileUpload.d.ts.map +1 -1
- package/dist/test/apps/fileUpload.js +2 -1
- package/dist/test/apps/formChild.js +1 -1
- package/dist/test/apps/keypressSelf.d.ts +26 -0
- package/dist/test/apps/keypressSelf.d.ts.map +1 -0
- package/dist/test/apps/keypressSelf.js +30 -0
- package/dist/test/apps/pointer.d.ts.map +1 -1
- package/dist/test/apps/pointer.js +10 -11
- package/dist/test/scene.d.ts +28 -6
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +38 -13
- package/dist/test/vitest.d.ts +2 -2
- package/dist/test/vitest.d.ts.map +1 -1
- package/dist/test/vitest.js +1 -1
- package/dist/url/index.js +1 -1
- package/dist/vdom.js +5 -5
- package/package.json +9 -9
- package/dist/runtime/hmrModelBridge.d.ts +0 -4
- package/dist/runtime/hmrModelBridge.d.ts.map +0 -1
- package/dist/runtime/hmrProtocol.d.ts.map +0 -1
- package/dist/runtime/hmrProtocolPublic.d.ts +0 -2
- package/dist/runtime/hmrProtocolPublic.d.ts.map +0 -1
- package/dist/runtime/hmrScroll.d.ts.map +0 -1
package/dist/html/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Array, Context, Data, Effect, Fiber, Function, Option, Schema, Stream, } from 'effect';
|
|
1
|
+
import { Array, Context, Data, Effect, Fiber, Function, Option, Predicate, Schema, Stream, } from 'effect';
|
|
2
2
|
import { restoreUncontrolledContent, synchronizeControlledDefault, } from '../controlledDomState.js';
|
|
3
3
|
import { FOREIGN_REPRESENTABLE_PROPERTIES, assertStyleIsRepresentable, htmlAttributeValue, isHtmlPropertyRepresentable, normalizedStyleProperties, reflectedAttributeName, } from '../domReflection.js';
|
|
4
4
|
import { MountRuntime, MountTracker, liveViewStateChanges, } from '../mount/index.js';
|
|
@@ -60,6 +60,22 @@ const keyboardModifiers = (event) => ({
|
|
|
60
60
|
altKey: event.altKey,
|
|
61
61
|
metaKey: event.metaKey,
|
|
62
62
|
});
|
|
63
|
+
const inputEventValue = (target) => {
|
|
64
|
+
if (Predicate.hasProperty(target, 'value') &&
|
|
65
|
+
Predicate.isString(target.value)) {
|
|
66
|
+
return target.value;
|
|
67
|
+
}
|
|
68
|
+
if (Predicate.hasProperty(target, 'innerText') &&
|
|
69
|
+
Predicate.isString(target.innerText)) {
|
|
70
|
+
return target.innerText;
|
|
71
|
+
}
|
|
72
|
+
if (Predicate.hasProperty(target, 'textContent') &&
|
|
73
|
+
Predicate.isString(target.textContent)) {
|
|
74
|
+
return target.textContent;
|
|
75
|
+
}
|
|
76
|
+
return '';
|
|
77
|
+
};
|
|
78
|
+
const isEventTargetCurrentTarget = (event) => event.target === event.currentTarget;
|
|
63
79
|
const isDevToolsFocusTarget = (target) => target instanceof Element && target.id === DEVTOOLS_HOST_ID;
|
|
64
80
|
const isFocusInsideCurrentTarget = (event) => event.currentTarget instanceof Element &&
|
|
65
81
|
event.relatedTarget instanceof Node &&
|
|
@@ -118,7 +134,7 @@ export const __flushReplayUnmountsAfterPatchFailure = flushReplayUnmountsAfterPa
|
|
|
118
134
|
* rendering them to the DOM, so the marker is invisible at runtime but
|
|
119
135
|
* observable by VNode walkers (Scene tests). */
|
|
120
136
|
export const FOLDKIT_MOUNT_KEY = 'foldkitMount';
|
|
121
|
-
const { Key, Class, Id, Title, Lang, Dir, Tabindex, Hidden, Contenteditable, Draggable, Accesskey, Translate, Inert, Popover, Popovertarget, Popovertargetaction, OnClick, OnDoubleClick, OnMouseDown, OnMouseUp, OnMouseEnter, OnMouseLeave, OnMouseOver, OnMouseOut, OnMouseMove, OnPointerMove, OnPointerLeave, OnPointerDown, OnPointerUp, OnKeyDown, OnKeyDownPreventDefault, OnKeyDownFocus, OnKeyUp, OnKeyUpPreventDefault, OnKeyPress, OnFocus, OnBlur, OnFocusEnter, OnFocusLeave, OnInput, OnChange, OnFileChange, OnSubmit, OnReset, OnScroll, OnWheel, OnCopy, OnCut, OnPaste, OnPastePreventDefault, OnCopyText, OnCutText, OnCancel, OnToggle, OnContextMenu, OnDragStart, OnDrag, OnDragEnd, OnDragEnter, OnDragLeave, OnDragOver, AllowDrop, OnDrop, OnDropFiles, OnTouchStart, OnTouchEnd, OnTouchMove, OnTouchCancel, OnAnimationStart, OnAnimationEnd, OnAnimationIteration, OnTransitionEnd, OnLoad, OnError, OnPlay, OnPause, OnEnded, OnTimeUpdate, OnVolumeChange, OnSelect, Value, Checked, Selected, Open, Placeholder, Name, Disabled, Readonly, Required, Autofocus, Spellcheck, Autocorrect, Autocapitalize, InputMode, EnterKeyHint, Multiple, Type, Accept, Autocomplete, Pattern, Maxlength, Minlength, Size, Cols, Rows, Max, Min, Step, For, Href, Src, Alt, Target, Rel, Download, Action, Method, Enctype, Novalidate, Formaction, Formmethod, Formnovalidate, Formtarget, Formenctype, Colspan, Rowspan, Scope, Headers, Span, Start, Reversed, CiteAttr, Datetime, Wrap, List, FormAttr, LabelAttr, ContentAttr, Charset, HttpEquiv, Srcset, Sizes, Loading, Decoding, Fetchpriority, Crossorigin, Referrerpolicy, Integrity, Hreflang, Ping, Sandbox, Allow, Srcdoc, Autoplay, Controls, Loop, Muted, Poster, Preload, Playsinline, High, Low, Optimum, Usemap, Ismap, Role, AriaLabel, AriaLabelledBy, AriaDescribedBy, AriaHidden, AriaExpanded, AriaSelected, AriaChecked, AriaDisabled, AriaRequired, AriaInvalid, AriaLive, AriaControls, AriaCurrent, AriaOrientation, AriaPressed, AriaHasPopup, AriaActiveDescendant, AriaSort, AriaMultiSelectable, AriaModal, AriaBusy, AriaErrorMessage, AriaRoleDescription, AriaAtomic, AriaAutocomplete, AriaColcount, AriaColindex, AriaColspan, AriaDescription, AriaDetails, AriaFlowto, AriaKeyshortcuts, AriaLevel, AriaOwns, AriaPlaceholder, AriaPosinset, AriaReadonly, AriaRelevant, AriaRowcount, AriaRowindex, AriaRowspan, AriaSetsize, AriaValuemax, AriaValuemin, AriaValuenow, AriaValuetext, Attribute, DataAttribute, Style, InnerHTML, ViewBox, Xmlns, Fill, FillRule, ClipRule, Stroke, StrokeWidth, StrokeLinecap, StrokeLinejoin, D, Cx, Cy, R, X, Y, Width, Height, X1, Y1, X2, Y2, Points, Transform, Opacity, StrokeDasharray, StrokeDashoffset, Dx, Dy, Rotate, TextAnchor, DominantBaseline, AlignmentBaseline, BaselineShift, TextLength, LengthAdjust, FontFamily, FontSize, FontWeight, FontStyle, LetterSpacing, WordSpacing, TextDecoration, WritingMode, Rx, Ry, PathLength, FillOpacity, StrokeOpacity, StrokeMiterlimit, PaintOrder, VectorEffect, Color, Visibility, Display, Overflow, PointerEvents, Cursor, ShapeRendering, TextRendering, ImageRendering, ClipPath, Mask, Filter, ClipPathUnits, MaskUnits, MaskContentUnits, FilterUnits, PrimitiveUnits, Offset, StopColor, StopOpacity, GradientUnits, GradientTransform, SpreadMethod, Fx, Fy, Fr, PatternUnits, PatternContentUnits, PatternTransform, MarkerStart, MarkerMid, MarkerEnd, MarkerWidth, MarkerHeight, MarkerUnits, RefX, RefY, Orient, PreserveAspectRatio, Prop, OnCustomEvent, OnMount, OnUnmount, } = Data.taggedEnum();
|
|
137
|
+
const { Key, Class, Id, Title, Lang, Dir, Tabindex, Hidden, Contenteditable, Draggable, Accesskey, Translate, Inert, Popover, Popovertarget, Popovertargetaction, OnClick, OnDoubleClick, OnMouseDown, OnMouseUp, OnMouseEnter, OnMouseLeave, OnMouseOver, OnMouseOut, OnMouseMove, OnPointerMove, OnPointerLeave, OnPointerDown, OnPointerUp, OnKeyDown, OnKeyDownPreventDefault, OnKeyDownSelf, OnKeyDownSelfPreventDefault, OnKeyDownFocus, OnKeyUp, OnKeyUpPreventDefault, OnKeyPress, OnFocus, OnBlur, OnFocusEnter, OnFocusLeave, OnInput, OnChange, OnBeforeInput, OnBeforeInputPreventDefault, OnFileChange, OnSubmit, OnReset, OnScroll, OnWheel, OnCopy, OnCut, OnPaste, OnPastePreventDefault, OnCopyText, OnCutText, OnCancel, OnCancelPreventDefault, OnToggle, OnContextMenu, OnDragStart, OnDrag, OnDragEnd, OnDragEnter, OnDragLeave, OnDragOver, AllowDrop, OnDrop, OnDropFiles, OnTouchStart, OnTouchEnd, OnTouchMove, OnTouchCancel, OnAnimationStart, OnAnimationEnd, OnAnimationIteration, OnTransitionEnd, OnLoad, OnError, OnPlay, OnPause, OnEnded, OnTimeUpdate, OnVolumeChange, OnSelect, Value, Checked, Selected, Open, Placeholder, Name, Disabled, Readonly, Required, Autofocus, Spellcheck, Autocorrect, Autocapitalize, InputMode, EnterKeyHint, Multiple, Type, Accept, Autocomplete, Pattern, Maxlength, Minlength, Size, Cols, Rows, Max, Min, Step, For, Href, Src, Alt, Target, Rel, Download, Action, Method, Enctype, Novalidate, Formaction, Formmethod, Formnovalidate, Formtarget, Formenctype, Colspan, Rowspan, Scope, Headers, Span, Start, Reversed, CiteAttr, Datetime, Wrap, List, FormAttr, LabelAttr, ContentAttr, Charset, HttpEquiv, Srcset, Sizes, Loading, Decoding, Fetchpriority, Crossorigin, Referrerpolicy, Integrity, Hreflang, Ping, Sandbox, Allow, Srcdoc, Autoplay, Controls, Loop, Muted, Poster, Preload, Playsinline, High, Low, Optimum, Usemap, Ismap, Role, AriaLabel, AriaLabelledBy, AriaDescribedBy, AriaHidden, AriaExpanded, AriaSelected, AriaChecked, AriaDisabled, AriaRequired, AriaInvalid, AriaLive, AriaControls, AriaCurrent, AriaOrientation, AriaPressed, AriaHasPopup, AriaActiveDescendant, AriaSort, AriaMultiSelectable, AriaModal, AriaBusy, AriaErrorMessage, AriaRoleDescription, AriaAtomic, AriaAutocomplete, AriaColcount, AriaColindex, AriaColspan, AriaDescription, AriaDetails, AriaFlowto, AriaKeyshortcuts, AriaLevel, AriaOwns, AriaPlaceholder, AriaPosinset, AriaReadonly, AriaRelevant, AriaRowcount, AriaRowindex, AriaRowspan, AriaSetsize, AriaValuemax, AriaValuemin, AriaValuenow, AriaValuetext, Attribute, DataAttribute, Style, InnerHTML, ViewBox, Xmlns, Fill, FillRule, ClipRule, Stroke, StrokeWidth, StrokeLinecap, StrokeLinejoin, D, Cx, Cy, R, X, Y, Width, Height, X1, Y1, X2, Y2, Points, Transform, Opacity, StrokeDasharray, StrokeDashoffset, Dx, Dy, Rotate, TextAnchor, DominantBaseline, AlignmentBaseline, BaselineShift, TextLength, LengthAdjust, FontFamily, FontSize, FontWeight, FontStyle, LetterSpacing, WordSpacing, TextDecoration, WritingMode, Rx, Ry, PathLength, FillOpacity, StrokeOpacity, StrokeMiterlimit, PaintOrder, VectorEffect, Color, Visibility, Display, Overflow, PointerEvents, Cursor, ShapeRendering, TextRendering, ImageRendering, ClipPath, Mask, Filter, ClipPathUnits, MaskUnits, MaskContentUnits, FilterUnits, PrimitiveUnits, Offset, StopColor, StopOpacity, GradientUnits, GradientTransform, SpreadMethod, Fx, Fy, Fr, PatternUnits, PatternContentUnits, PatternTransform, MarkerStart, MarkerMid, MarkerEnd, MarkerWidth, MarkerHeight, MarkerUnits, RefX, RefY, Orient, PreserveAspectRatio, Prop, OnCustomEvent, OnMount, OnUnmount, } = Data.taggedEnum();
|
|
122
138
|
export { Prop, OnCustomEvent };
|
|
123
139
|
const setData = (ctx, key, value) => {
|
|
124
140
|
ctx.data[key] = value;
|
|
@@ -434,6 +450,25 @@ const attributeHandlers = {
|
|
|
434
450
|
}
|
|
435
451
|
},
|
|
436
452
|
}),
|
|
453
|
+
OnKeyDownSelf: ({ f: toMessage }, ctx) => updateDataOn(ctx, {
|
|
454
|
+
keydown: (event) => {
|
|
455
|
+
if (isEventTargetCurrentTarget(event)) {
|
|
456
|
+
ctx.dispatch(toMessage(event.key, keyboardModifiers(event)));
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
}),
|
|
460
|
+
OnKeyDownSelfPreventDefault: ({ f: toMaybeMessage }, ctx) => updateDataOn(ctx, {
|
|
461
|
+
keydown: (event) => {
|
|
462
|
+
if (!isEventTargetCurrentTarget(event)) {
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
const maybeMessage = toMaybeMessage(event.key, keyboardModifiers(event));
|
|
466
|
+
if (Option.isSome(maybeMessage)) {
|
|
467
|
+
event.preventDefault();
|
|
468
|
+
ctx.dispatch(maybeMessage.value);
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
}),
|
|
437
472
|
OnKeyDownFocus: ({ f: toMaybeFocusAndMessage }, ctx) => updateDataOn(ctx, {
|
|
438
473
|
keydown: (event) => {
|
|
439
474
|
const maybeResult = toMaybeFocusAndMessage(event.key, keyboardModifiers(event));
|
|
@@ -487,14 +522,25 @@ const attributeHandlers = {
|
|
|
487
522
|
},
|
|
488
523
|
}),
|
|
489
524
|
OnInput: ({ f: toMessage }, ctx) => updateDataOn(ctx, {
|
|
490
|
-
input: (event) =>
|
|
491
|
-
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
492
|
-
ctx.dispatch(toMessage(event.target.value)),
|
|
525
|
+
input: (event) => ctx.dispatch(toMessage(inputEventValue(event.target))),
|
|
493
526
|
}),
|
|
494
527
|
OnChange: ({ f: toMessage }, ctx) => updateDataOn(ctx, {
|
|
495
|
-
change: (event) =>
|
|
496
|
-
|
|
497
|
-
|
|
528
|
+
change: (event) => ctx.dispatch(toMessage(inputEventValue(event.target))),
|
|
529
|
+
}),
|
|
530
|
+
OnBeforeInput: ({ f: toMessage }, ctx) => updateDataOn(ctx, {
|
|
531
|
+
beforeinput: (event) => ctx.dispatch(toMessage(event.inputType, Option.fromNullishOr(event.data))),
|
|
532
|
+
}),
|
|
533
|
+
OnBeforeInputPreventDefault: ({ f: toMaybeMessage }, ctx) => updateDataOn(ctx, {
|
|
534
|
+
beforeinput: (event) => {
|
|
535
|
+
if (!event.cancelable) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
const maybeMessage = toMaybeMessage(event.inputType, Option.fromNullishOr(event.data));
|
|
539
|
+
if (Option.isSome(maybeMessage)) {
|
|
540
|
+
event.preventDefault();
|
|
541
|
+
ctx.dispatch(maybeMessage.value);
|
|
542
|
+
}
|
|
543
|
+
},
|
|
498
544
|
}),
|
|
499
545
|
OnFileChange: ({ f: toMessage }, ctx) => updateDataOn(ctx, {
|
|
500
546
|
change: tagAsFileHandler((event) => {
|
|
@@ -556,6 +602,15 @@ const attributeHandlers = {
|
|
|
556
602
|
ctx.dispatch(message);
|
|
557
603
|
},
|
|
558
604
|
}),
|
|
605
|
+
OnCancelPreventDefault: ({ maybeCustomEventMessage }, ctx) => updateDataOn(ctx, {
|
|
606
|
+
cancel: (event) => {
|
|
607
|
+
event.preventDefault();
|
|
608
|
+
if (event instanceof CustomEvent &&
|
|
609
|
+
Option.isSome(maybeCustomEventMessage)) {
|
|
610
|
+
ctx.dispatch(maybeCustomEventMessage.value);
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
}),
|
|
559
614
|
OnToggle: ({ f: toMessage }, ctx) => updateDataOn(ctx, {
|
|
560
615
|
toggle: event =>
|
|
561
616
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
@@ -880,10 +935,13 @@ const attributeHandlers = {
|
|
|
880
935
|
Orient: ({ value }, ctx) => setDataAttr(ctx, 'orient', value),
|
|
881
936
|
PreserveAspectRatio: ({ value }, ctx) => setDataAttr(ctx, 'preserveAspectRatio', value),
|
|
882
937
|
Prop: ({ key, value }, ctx) => setClientOnlyDataProp(ctx, key, value),
|
|
883
|
-
OnCustomEvent: ({ name, f:
|
|
938
|
+
OnCustomEvent: ({ name, f: toMaybeMessage }, ctx) => updateDataOn(ctx, {
|
|
884
939
|
[name]: (event) => {
|
|
885
940
|
if (event instanceof CustomEvent) {
|
|
886
|
-
|
|
941
|
+
const maybeMessage = toMaybeMessage(event);
|
|
942
|
+
if (Option.isSome(maybeMessage)) {
|
|
943
|
+
ctx.dispatch(maybeMessage.value);
|
|
944
|
+
}
|
|
887
945
|
}
|
|
888
946
|
},
|
|
889
947
|
}),
|
|
@@ -1727,6 +1785,35 @@ const htmlAttributes = () => ({
|
|
|
1727
1785
|
OnPointerUp: (toMaybeMessage) => OnPointerUp({ f: toMaybeMessage }),
|
|
1728
1786
|
OnKeyDown: (toMessage) => OnKeyDown({ f: toMessage }),
|
|
1729
1787
|
OnKeyDownPreventDefault: (toMaybeMessage) => OnKeyDownPreventDefault({ f: toMaybeMessage }),
|
|
1788
|
+
/**
|
|
1789
|
+
* Like `OnKeyDown`, but dispatches only when the keydown targets this
|
|
1790
|
+
* element itself rather than bubbling from a descendant.
|
|
1791
|
+
*
|
|
1792
|
+
* Use this on a composite widget that owns keyboard input for its host but
|
|
1793
|
+
* contains interactive children whose keydowns should remain independent.
|
|
1794
|
+
*
|
|
1795
|
+
* @example
|
|
1796
|
+
* ```typescript
|
|
1797
|
+
* h.OnKeyDownSelf((key, modifiers) => Message.PressedHostKey({ key }))
|
|
1798
|
+
* ```
|
|
1799
|
+
*/
|
|
1800
|
+
OnKeyDownSelf: (toMessage) => OnKeyDownSelf({ f: toMessage }),
|
|
1801
|
+
/**
|
|
1802
|
+
* Like `OnKeyDownPreventDefault`, but handles only keydowns that target this
|
|
1803
|
+
* element itself rather than bubbling from a descendant. Returning `Some`
|
|
1804
|
+
* prevents the browser's default action and dispatches the Message;
|
|
1805
|
+
* returning `None` leaves the key to the browser.
|
|
1806
|
+
*
|
|
1807
|
+
* @example
|
|
1808
|
+
* ```typescript
|
|
1809
|
+
* h.OnKeyDownSelfPreventDefault(key =>
|
|
1810
|
+
* key === 'Enter'
|
|
1811
|
+
* ? Option.some(Message.SubmittedEditor())
|
|
1812
|
+
* : Option.none(),
|
|
1813
|
+
* )
|
|
1814
|
+
* ```
|
|
1815
|
+
*/
|
|
1816
|
+
OnKeyDownSelfPreventDefault: (toMaybeMessage) => OnKeyDownSelfPreventDefault({ f: toMaybeMessage }),
|
|
1730
1817
|
/**
|
|
1731
1818
|
* Keydown handler that, for a handled key, synchronously focuses the element
|
|
1732
1819
|
* matching `focusSelector` and dispatches `message`, both inside the
|
|
@@ -1757,8 +1844,41 @@ const htmlAttributes = () => ({
|
|
|
1757
1844
|
OnBlur: (message) => OnBlur({ message }),
|
|
1758
1845
|
OnFocusEnter: (message) => OnFocusEnter({ message }),
|
|
1759
1846
|
OnFocusLeave: (message) => OnFocusLeave({ message }),
|
|
1847
|
+
/**
|
|
1848
|
+
* Dispatches the target's textual value on every `input` event. Form
|
|
1849
|
+
* controls report their `value`; a `Contenteditable` host reports its
|
|
1850
|
+
* rendered text.
|
|
1851
|
+
*/
|
|
1760
1852
|
OnInput: (toMessage) => OnInput({ f: toMessage }),
|
|
1853
|
+
/**
|
|
1854
|
+
* Dispatches the target's textual value on every `change` event, using the
|
|
1855
|
+
* same form-control and `Contenteditable` value semantics as `OnInput`.
|
|
1856
|
+
*/
|
|
1761
1857
|
OnChange: (toMessage) => OnChange({ f: toMessage }),
|
|
1858
|
+
/**
|
|
1859
|
+
* Observes `beforeinput` events. The translator receives the edit's
|
|
1860
|
+
* `inputType` and its `data` as an `Option`; edits such as deletion usually
|
|
1861
|
+
* carry no text and therefore provide `None`.
|
|
1862
|
+
*/
|
|
1863
|
+
OnBeforeInput: (toMessage) => OnBeforeInput({ f: toMessage }),
|
|
1864
|
+
/**
|
|
1865
|
+
* Handles cancelable `beforeinput` events before the browser mutates the
|
|
1866
|
+
* DOM. Returning `Some` prevents the native edit and dispatches the Message;
|
|
1867
|
+
* returning `None` lets the edit proceed.
|
|
1868
|
+
*
|
|
1869
|
+
* A non-cancelable edit, including some IME composition input, proceeds
|
|
1870
|
+
* without dispatching. Use `OnInput` to reconcile the resulting content.
|
|
1871
|
+
*
|
|
1872
|
+
* @example
|
|
1873
|
+
* ```typescript
|
|
1874
|
+
* h.OnBeforeInputPreventDefault((inputType, data) =>
|
|
1875
|
+
* inputType === 'insertText'
|
|
1876
|
+
* ? Option.map(data, value => Message.InsertedText({ value }))
|
|
1877
|
+
* : Option.none(),
|
|
1878
|
+
* )
|
|
1879
|
+
* ```
|
|
1880
|
+
*/
|
|
1881
|
+
OnBeforeInputPreventDefault: (toMaybeMessage) => OnBeforeInputPreventDefault({ f: toMaybeMessage }),
|
|
1762
1882
|
OnFileChange: (toMessage) => OnFileChange({ f: toMessage }),
|
|
1763
1883
|
OnSubmit: (message) => OnSubmit({ message }),
|
|
1764
1884
|
OnReset: (message) => OnReset({ message }),
|
|
@@ -1813,6 +1933,23 @@ const htmlAttributes = () => ({
|
|
|
1813
1933
|
*/
|
|
1814
1934
|
OnCutText: (text, message) => OnCutText({ text, message }),
|
|
1815
1935
|
OnCancel: (message) => OnCancel({ message }),
|
|
1936
|
+
/**
|
|
1937
|
+
* Cancel handler that always calls `preventDefault`. A native cancel event
|
|
1938
|
+
* does not dispatch a Message. When the event is a `CustomEvent`, the
|
|
1939
|
+
* optional `customEventMessage` is dispatched instead.
|
|
1940
|
+
*
|
|
1941
|
+
* Use this when native cancellation and an application-owned cancel signal
|
|
1942
|
+
* share an event name but need different behavior. Without a Message, the
|
|
1943
|
+
* attribute only suppresses the native default action.
|
|
1944
|
+
*
|
|
1945
|
+
* @example
|
|
1946
|
+
* ```typescript
|
|
1947
|
+
* h.OnCancelPreventDefault(Message.RequestedClose())
|
|
1948
|
+
* ```
|
|
1949
|
+
*/
|
|
1950
|
+
OnCancelPreventDefault: (customEventMessage) => OnCancelPreventDefault({
|
|
1951
|
+
maybeCustomEventMessage: Option.fromNullishOr(customEventMessage),
|
|
1952
|
+
}),
|
|
1816
1953
|
OnToggle: (toMessage) => OnToggle({ f: toMessage }),
|
|
1817
1954
|
OnContextMenu: (message) => OnContextMenu({ message }),
|
|
1818
1955
|
OnDragStart: (message) => OnDragStart({ message }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Attribute stamped on a hydratable server-rendered application root. Its
|
|
2
2
|
* nonempty value is the runtime id used to pair the root with its Flags
|
|
3
|
-
* payload and scope
|
|
4
|
-
* `Runtime.hydrate` adopts it. */
|
|
3
|
+
* payload and scope Model and scroll preservation. `makeApplication` locates
|
|
4
|
+
* the root; `Runtime.hydrate` adopts it. */
|
|
5
5
|
export declare const FOLDKIT_APP_ATTRIBUTE = "data-foldkit-app";
|
|
6
6
|
/** Attribute on the JSON script tag carrying the Schema-encoded flags the
|
|
7
7
|
* server rendered with. A hydrating runtime decodes this payload instead of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrationMarker.d.ts","sourceRoot":"","sources":["../src/hydrationMarker.ts"],"names":[],"mappings":"AAAA;;;
|
|
1
|
+
{"version":3,"file":"hydrationMarker.d.ts","sourceRoot":"","sources":["../src/hydrationMarker.ts"],"names":[],"mappings":"AAAA;;;6CAG6C;AAC7C,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AAEvD;;;kBAGkB;AAClB,eAAO,MAAM,uBAAuB,uBAAuB,CAAA"}
|
package/dist/hydrationMarker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Attribute stamped on a hydratable server-rendered application root. Its
|
|
2
2
|
* nonempty value is the runtime id used to pair the root with its Flags
|
|
3
|
-
* payload and scope
|
|
4
|
-
* `Runtime.hydrate` adopts it. */
|
|
3
|
+
* payload and scope Model and scroll preservation. `makeApplication` locates
|
|
4
|
+
* the root; `Runtime.hydrate` adopts it. */
|
|
5
5
|
export const FOLDKIT_APP_ATTRIBUTE = 'data-foldkit-app';
|
|
6
6
|
/** Attribute on the JSON script tag carrying the Schema-encoded flags the
|
|
7
7
|
* server rendered with. A hydrating runtime decodes this payload instead of
|
|
@@ -72,9 +72,9 @@ export type ResolvedDevToolsConfig = Readonly<{
|
|
|
72
72
|
maybeOverlay: Option.Option<DevToolsOverlay>;
|
|
73
73
|
}>;
|
|
74
74
|
/** Resolves the DevTools config for this boot, or `Option.none()` when
|
|
75
|
-
* DevTools is disabled or hidden. `'Development'` visibility requires Vite
|
|
76
|
-
*
|
|
77
|
-
* stack a second panel over its host's. */
|
|
75
|
+
* DevTools is disabled or hidden. `'Development'` visibility requires Vite's
|
|
76
|
+
* dev server and a top-level window, so an app previewed inside an iframe does
|
|
77
|
+
* not stack a second panel over its host's. */
|
|
78
78
|
export declare const resolveDevToolsConfig: (devTools: DevToolsConfig | undefined) => Option.Option<ResolvedDevToolsConfig>;
|
|
79
79
|
/** The Message tags `excludeFromHistory` keeps out of the DevTools history. */
|
|
80
80
|
export declare const resolveExcludeFromHistoryTags: (devTools: DevToolsConfig | undefined) => ReadonlySet<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devToolsConfig.d.ts","sourceRoot":"","sources":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,GAAG,SAAS,KACnC,MAAM,GAAG,SAaT,CAAA;AAEH,6EAA6E;AAC7E,eAAO,MAAM,+BAA+B,aAChC,cAAc,GAAG,SAAS,KACnC,MAAM,GAAG,SAUT,CAAA"}
|
|
@@ -20,9 +20,9 @@ const DEV_TOOLS_MAX_ENTRIES_MIN = 20;
|
|
|
20
20
|
const DEV_TOOLS_MAX_ENTRIES_MAX = 500;
|
|
21
21
|
const DEV_TOOLS_KEYFRAME_INTERVAL_MIN = 1;
|
|
22
22
|
/** Resolves the DevTools config for this boot, or `Option.none()` when
|
|
23
|
-
* DevTools is disabled or hidden. `'Development'` visibility requires Vite
|
|
24
|
-
*
|
|
25
|
-
* stack a second panel over its host's. */
|
|
23
|
+
* DevTools is disabled or hidden. `'Development'` visibility requires Vite's
|
|
24
|
+
* dev server and a top-level window, so an app previewed inside an iframe does
|
|
25
|
+
* not stack a second panel over its host's. */
|
|
26
26
|
export const resolveDevToolsConfig = (devTools) => {
|
|
27
27
|
const isInIframe = window.self !== window.top;
|
|
28
28
|
return pipe(devTools ?? {}, Option.liftPredicate(config => config !== false), Option.filter(config => isVisible(config.show ?? DEFAULT_DEV_TOOLS_SHOW, !!import.meta.hot && !isInIframe)), Option.map(config => ({
|
|
@@ -26,17 +26,18 @@ export type ResolvedHydrationHandoff<Flags> = Readonly<{
|
|
|
26
26
|
* another deployment, or a missing, duplicated, or undecodable Flags
|
|
27
27
|
* payload contains the served page and stops startup. The build id is
|
|
28
28
|
* compared before the payload text is read and before `init` runs, so
|
|
29
|
-
* nothing acts on another deployment's data.
|
|
30
|
-
* adoption and gets a fresh patch against the
|
|
29
|
+
* nothing acts on another deployment's data. A Model restored after a
|
|
30
|
+
* development reload skips adoption and gets a fresh patch against the
|
|
31
|
+
* stamped root.
|
|
31
32
|
*/
|
|
32
|
-
export declare const resolveHydrationHandoff: <Flags, Resources>({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec,
|
|
33
|
+
export declare const resolveHydrationHandoff: <Flags, Resources>({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec, preservedModel, container, buildId, provideResources, }: Readonly<{
|
|
33
34
|
bootMode: BootMode;
|
|
34
35
|
hydration: HydrationConfig | undefined;
|
|
35
36
|
bootFlags: Effect.Effect<Flags, never, Resources> | undefined;
|
|
36
37
|
configuredFlags: Option.Option<Effect.Effect<Flags, never, Resources>>;
|
|
37
38
|
isFlagsRequired: boolean;
|
|
38
39
|
FlagsCodec: Schema.Codec<Flags, any, unknown, unknown>;
|
|
39
|
-
|
|
40
|
+
preservedModel: unknown;
|
|
40
41
|
container: HTMLElement;
|
|
41
42
|
buildId: string | undefined;
|
|
42
43
|
provideResources: <A>(effect: Effect.Effect<A, never, Resources>) => Effect.Effect<A>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrationHandoff.d.ts","sourceRoot":"","sources":["../../src/runtime/hydrationHandoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,EAAa,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAQvE;wCACwC;AACxC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAK1C,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC9C,eAAe,EAAE,OAAO,CAAA;CACzB,CAAC,CAAA;AAsGF,eAAO,MAAM,SAAS,SACd,WAAW,WACR,OAAO,aACL,MAAM,KAChB,KAAK,GAAG,SAwBV,CAAA;AAmJD,eAAO,MAAM,kBAAkB,kBAAmB,QAAQ,KAAG,IAO5D,CAAA;AAOD,eAAO,MAAM,uBAAuB,kBAAmB,QAAQ,KAAG,OAItD,CAAA;AAEZ,eAAO,MAAM,qBAAqB,cACrB,WAAW,GAAG,IAAI,mBACZ,OAAO,KACvB,eA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G;AACH,eAAO,MAAM,uBAAuB,GAAI,KAAK,EAAE,SAAS,2IAWrD,QAAQ,CAAC;IACV,QAAQ,EAAE,QAAQ,CAAA;IAClB,SAAS,EAAE,eAAe,GAAG,SAAS,CAAA;IACtC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG,SAAS,CAAA;IAC7D,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAA;IACtE,eAAe,EAAE,OAAO,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IACtD,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,WAAW,CAAA;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gBAAgB,EAAE,CAAC,CAAC,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KACvC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CACtB,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAuK9C,CAAA"}
|
|
@@ -18,8 +18,8 @@ const hydrationForRoot = (root, isFlagsRequired) => {
|
|
|
18
18
|
// replace-parity case, where the server root took the placeholder's place and
|
|
19
19
|
// `getElementById` no longer finds it, so the stamp is the only handle.
|
|
20
20
|
// A runtime id names one application for the whole page: it pairs a root with
|
|
21
|
-
// its Flags payload, and it keys the Model and scroll position
|
|
22
|
-
//
|
|
21
|
+
// its Flags payload, and it keys the preserved Model and scroll position. Two
|
|
22
|
+
// roots sharing one are not two applications but one claimed
|
|
23
23
|
// twice, so whichever boots second would read the other's handoff and restore
|
|
24
24
|
// the other's Model. `injectIntoTemplate` refuses to build such a page; this is
|
|
25
25
|
// the check for a page assembled some other way.
|
|
@@ -35,8 +35,8 @@ const assertRuntimeIdsAreUnique = (stampedRoots) => {
|
|
|
35
35
|
containRefusedPage(root.ownerDocument);
|
|
36
36
|
throw new Error('[foldkit] Found a server-rendered root with an empty ' +
|
|
37
37
|
`\`${FOLDKIT_APP_ATTRIBUTE}\` stamp. A hydratable root must carry ` +
|
|
38
|
-
'a nonempty runtime id so the runtime can
|
|
39
|
-
'
|
|
38
|
+
'a nonempty runtime id so the runtime can scope its Flags, Model, ' +
|
|
39
|
+
'and scroll preservation.');
|
|
40
40
|
}
|
|
41
41
|
if (!root.ownerDocument.body?.contains(root)) {
|
|
42
42
|
containRefusedPage(root.ownerDocument);
|
|
@@ -49,8 +49,8 @@ const assertRuntimeIdsAreUnique = (stampedRoots) => {
|
|
|
49
49
|
containRefusedPage(root.ownerDocument);
|
|
50
50
|
throw new Error(`[foldkit] Found more than one server-rendered root stamped ` +
|
|
51
51
|
`"${runtimeId}". A runtime id names one application for the whole ` +
|
|
52
|
-
'page: it pairs a root with its Flags payload and keys the
|
|
53
|
-
'scroll position
|
|
52
|
+
'page: it pairs a root with its Flags payload and keys the preserved ' +
|
|
53
|
+
'Model and scroll position, so two roots sharing one ' +
|
|
54
54
|
"would take each other's state. Remove the duplicate root. Foldkit " +
|
|
55
55
|
'hydrates one page-owning application per document.');
|
|
56
56
|
}
|
|
@@ -303,10 +303,11 @@ export const findDocumentHydration = (container, isFlagsRequired) => {
|
|
|
303
303
|
* another deployment, or a missing, duplicated, or undecodable Flags
|
|
304
304
|
* payload contains the served page and stops startup. The build id is
|
|
305
305
|
* compared before the payload text is read and before `init` runs, so
|
|
306
|
-
* nothing acts on another deployment's data.
|
|
307
|
-
* adoption and gets a fresh patch against the
|
|
306
|
+
* nothing acts on another deployment's data. A Model restored after a
|
|
307
|
+
* development reload skips adoption and gets a fresh patch against the
|
|
308
|
+
* stamped root.
|
|
308
309
|
*/
|
|
309
|
-
export const resolveHydrationHandoff = ({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec,
|
|
310
|
+
export const resolveHydrationHandoff = ({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec, preservedModel, container, buildId, provideResources, }) => Effect.gen(function* () {
|
|
310
311
|
const maybeResolveFreshFlags = Option.orElse(Option.fromNullishOr(bootFlags), () => configuredFlags);
|
|
311
312
|
const resolveFreshFlags = Option.match(maybeResolveFreshFlags, {
|
|
312
313
|
onNone: () => isFlagsRequired
|
|
@@ -364,11 +365,11 @@ export const resolveHydrationHandoff = ({ bootMode, hydration, bootFlags, config
|
|
|
364
365
|
return yield* Effect.die(skew);
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
|
-
// NOTE:
|
|
368
|
-
// server DOM reflects older code. The hydration handoff is
|
|
369
|
-
// required, but the restored Model gets a fresh patch against its
|
|
368
|
+
// NOTE: a Model restored after a development reload wins over DOM adoption
|
|
369
|
+
// because the server DOM reflects older code. The hydration handoff is
|
|
370
|
+
// still required, but the restored Model gets a fresh patch against its
|
|
370
371
|
// stamped root.
|
|
371
|
-
const maybeHydrationRoot = Predicate.isUndefined(
|
|
372
|
+
const maybeHydrationRoot = Predicate.isUndefined(preservedModel)
|
|
372
373
|
? Option.map(maybeRequestedHydration, requestedHydration => requestedHydration.root)
|
|
373
374
|
: Option.none();
|
|
374
375
|
const maybeHydrationFlags = yield* Option.match(maybeRequestedHydration, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
/** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `
|
|
2
|
+
/** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `isReloadFlush` is set by the runtime when flushing on `vite:beforeFullReload` to mark the entry as eligible for restoration; absent or `false` for ordinary debounced preserves. */
|
|
3
3
|
export declare const PreserveModelMessage: Schema.Struct<{
|
|
4
4
|
readonly id: Schema.String;
|
|
5
5
|
readonly model: Schema.Unknown;
|
|
6
|
-
readonly
|
|
6
|
+
readonly isReloadFlush: Schema.optional<Schema.Boolean>;
|
|
7
7
|
}>;
|
|
8
8
|
/** Browser → plugin: the runtime preserves its current Model under a stable id. */
|
|
9
9
|
export type PreserveModelMessage = typeof PreserveModelMessage.Type;
|
|
@@ -20,4 +20,4 @@ export declare const RestoreModelMessage: Schema.Struct<{
|
|
|
20
20
|
}>;
|
|
21
21
|
/** Plugin → browser: the plugin returns the preserved Model for a given runtime id. */
|
|
22
22
|
export type RestoreModelMessage = typeof RestoreModelMessage.Type;
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=modelPreservation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelPreservation.d.ts","sourceRoot":"","sources":["../../src/runtime/modelPreservation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,+SAA+S;AAC/S,eAAO,MAAM,oBAAoB;;;;EAI/B,CAAA;AACF,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAA;AAEnE,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;;EAE9B,CAAA;AACF,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAEjE,kKAAkK;AAClK,eAAO,MAAM,mBAAmB;;;EAG9B,CAAA;AACF,uFAAuF;AACvF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
/** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `
|
|
2
|
+
/** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `isReloadFlush` is set by the runtime when flushing on `vite:beforeFullReload` to mark the entry as eligible for restoration; absent or `false` for ordinary debounced preserves. */
|
|
3
3
|
export const PreserveModelMessage = Schema.Struct({
|
|
4
4
|
id: Schema.String,
|
|
5
5
|
model: Schema.Unknown,
|
|
6
|
-
|
|
6
|
+
isReloadFlush: Schema.optional(Schema.Boolean),
|
|
7
7
|
});
|
|
8
8
|
/** Browser → plugin: the runtime requests its previously-preserved Model on startup, scoped by id. */
|
|
9
9
|
export const RequestModelMessage = Schema.Struct({
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
export declare const preserveModel: (id: string, encodedModel: unknown, isReloadFlush: boolean) => void;
|
|
3
|
+
export declare const resolvePreservedModel: (runtimeId: string) => Effect.Effect<unknown>;
|
|
4
|
+
//# sourceMappingURL=modelPreservationBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelPreservationBridge.d.ts","sourceRoot":"","sources":["../../src/runtime/modelPreservationBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgC,MAAM,QAAQ,CAAA;AAa7D,eAAO,MAAM,aAAa,OACpB,MAAM,gBACI,OAAO,iBACN,OAAO,KACrB,IASF,CAAA;AAQD,eAAO,MAAM,qBAAqB,cACrB,MAAM,KAChB,MAAM,CAAC,MAAM,CAAC,OAAO,CAqCvB,CAAA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Effect, Exit, Function, Schema, pipe } from 'effect';
|
|
2
|
-
import { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './
|
|
2
|
+
import { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './modelPreservation.js';
|
|
3
3
|
const encodePreserveModelMessage = Schema.encodeUnknownSync(PreserveModelMessage);
|
|
4
4
|
const encodeRequestModelMessage = Schema.encodeUnknownSync(RequestModelMessage);
|
|
5
5
|
const decodeRestoreModelMessage = Schema.decodeUnknownExit(RestoreModelMessage);
|
|
6
|
-
export const preserveModel = (id, encodedModel,
|
|
6
|
+
export const preserveModel = (id, encodedModel, isReloadFlush) => {
|
|
7
7
|
if (import.meta.hot) {
|
|
8
|
-
import.meta.hot.send('foldkit:preserve-model', encodePreserveModelMessage(PreserveModelMessage.make({ id, model: encodedModel,
|
|
8
|
+
import.meta.hot.send('foldkit:preserve-model', encodePreserveModelMessage(PreserveModelMessage.make({ id, model: encodedModel, isReloadFlush })));
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
const PLUGIN_RESPONSE_TIMEOUT_MS = 500;
|
|
12
|
-
// NOTE: asks @foldkit/vite-plugin for a model preserved across the last
|
|
12
|
+
// NOTE: asks @foldkit/vite-plugin for a model preserved across the last
|
|
13
13
|
// reload. The plugin only serves a model whose preservation was flushed by a
|
|
14
14
|
// reload, so a host-driven dispose-then-embed remount initializes fresh while
|
|
15
15
|
// a code reload restores state.
|
|
16
|
-
export const
|
|
16
|
+
export const resolvePreservedModel = (runtimeId) => {
|
|
17
17
|
const hot = import.meta.hot;
|
|
18
18
|
if (!hot) {
|
|
19
19
|
return Effect.succeed(undefined);
|
|
@@ -34,10 +34,10 @@ export const resolveHmrModel = (runtimeId) => {
|
|
|
34
34
|
hot.send('foldkit:request-model', encodeRequestModelMessage(RequestModelMessage.make({ id: runtimeId })));
|
|
35
35
|
return Effect.sync(() => hot.off('foldkit:restore-model', handler));
|
|
36
36
|
}), Effect.timeout(PLUGIN_RESPONSE_TIMEOUT_MS), Effect.catchTag('TimeoutError', () => {
|
|
37
|
-
console.warn('[foldkit] No response from @foldkit/vite-plugin. Add it to your vite.config.ts for
|
|
37
|
+
console.warn('[foldkit] No response from @foldkit/vite-plugin. Add it to your vite.config.ts for Model preservation across reloads:\n\n' +
|
|
38
38
|
" import { foldkit } from '@foldkit/vite-plugin'\n\n" +
|
|
39
39
|
' export default defineConfig({ plugins: [foldkit()] })\n\n' +
|
|
40
|
-
'Starting without
|
|
40
|
+
'Starting without Model preservation.');
|
|
41
41
|
return Effect.succeed(undefined);
|
|
42
42
|
}));
|
|
43
43
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelPreservationPublic.d.ts","sourceRoot":"","sources":["../../src/runtime/modelPreservationPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './
|
|
1
|
+
export { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './modelPreservation.js';
|
|
@@ -10,7 +10,7 @@ import { type Duration, Effect, type Scope } from 'effect';
|
|
|
10
10
|
* as a no-op. Synchronous semantics let the runtime call this from
|
|
11
11
|
* `vite:beforeFullReload` via `Effect.runSync`, with no race against Vite's
|
|
12
12
|
* `location.reload()`. The two-callback split lets the flush path send
|
|
13
|
-
* `
|
|
13
|
+
* `isReloadFlush: true` while debounced calls send `false`.
|
|
14
14
|
*
|
|
15
15
|
* `cancel` drops the pending model and interrupts the in-flight fiber.
|
|
16
16
|
* Forked fibers are tied to the construction scope via `forkIn`, so scope
|
|
@@ -40,8 +40,9 @@ export type RuntimeConfig<Model, Message, Flags, Resources = never, ManagedResou
|
|
|
40
40
|
* instead of replacing it, and when the config declares Flags, `init` is
|
|
41
41
|
* fed the Schema-decoded Flags payload the server embedded, so both sides
|
|
42
42
|
* compute the same Model. Missing or undecodable handoff data is fatal.
|
|
43
|
-
*
|
|
44
|
-
* because the restored code may no longer match the
|
|
43
|
+
* A Model restored after a development reload gets a fresh replace boot
|
|
44
|
+
* against the stamped root because the restored code may no longer match the
|
|
45
|
+
* served DOM.
|
|
45
46
|
*/
|
|
46
47
|
hydration?: HydrationConfig;
|
|
47
48
|
routing?: RoutingConfig<Message>;
|
|
@@ -73,7 +74,7 @@ export type RuntimeConfig<Model, Message, Flags, Resources = never, ManagedResou
|
|
|
73
74
|
* write site with a stack trace, rather than silently corrupting state or
|
|
74
75
|
* breaking reference-equality change detection.
|
|
75
76
|
*
|
|
76
|
-
* Defaults to `true`. Activates only
|
|
77
|
+
* Defaults to `true`. Activates only under Vite's dev server, so production
|
|
77
78
|
* builds pay nothing. Pass `false` to disable.
|
|
78
79
|
*
|
|
79
80
|
* Scope: only the Model is frozen. Messages are short-lived and are not
|
|
@@ -81,13 +82,13 @@ export type RuntimeConfig<Model, Message, Flags, Resources = never, ManagedResou
|
|
|
81
82
|
*/
|
|
82
83
|
freezeModel?: boolean;
|
|
83
84
|
/**
|
|
84
|
-
* Restores the window scroll position across Vite
|
|
85
|
+
* Restores the window scroll position across Vite dev reloads. Every edit
|
|
85
86
|
* triggers a full page reload, which resets scroll to the top; this captures
|
|
86
87
|
* `window.scrollX`/`scrollY` just before the reload and reapplies it once the
|
|
87
88
|
* restored view has rendered, so editing a page you've scrolled deep into
|
|
88
89
|
* doesn't bounce you back to the top on every save.
|
|
89
90
|
*
|
|
90
|
-
* Defaults to `true`. Activates only
|
|
91
|
+
* Defaults to `true`. Activates only under Vite's dev server and the
|
|
91
92
|
* runtime owns the document, so production builds and embedded `makeElement`
|
|
92
93
|
* apps (which do not own the page's scroll) pay nothing. Pass `false` to
|
|
93
94
|
* disable, for an app that drives its own scroll restoration.
|
|
@@ -152,7 +153,7 @@ export type FlagsSchemaConfig<Flags> = Readonly<{
|
|
|
152
153
|
*/
|
|
153
154
|
export type MakeRuntimeReturn<P extends Ports | undefined = undefined, Flags = void, Resources = never, Kind extends 'Application' | 'Element' = 'Application' | 'Element'> = Readonly<{
|
|
154
155
|
runtimeId: string;
|
|
155
|
-
start: (
|
|
156
|
+
start: (preservedModel?: unknown) => Effect.Effect<void>;
|
|
156
157
|
ports: P;
|
|
157
158
|
'~foldkit/RuntimeBoot'?: Readonly<{
|
|
158
159
|
Flags: (flags: Flags) => Flags;
|
|
@@ -161,7 +162,7 @@ export type MakeRuntimeReturn<P extends Ports | undefined = undefined, Flags = v
|
|
|
161
162
|
}>;
|
|
162
163
|
}>;
|
|
163
164
|
type RuntimeInternals = {
|
|
164
|
-
startWith: (maybeConnector: Option.Option<HostConnector>,
|
|
165
|
+
startWith: (maybeConnector: Option.Option<HostConnector>, preservedModel?: unknown, bootMode?: BootMode, flags?: Effect.Effect<any, never, any>, buildId?: string) => Effect.Effect<void>;
|
|
165
166
|
kind: 'Application' | 'Element';
|
|
166
167
|
isEmbedActive: boolean;
|
|
167
168
|
maybeActiveFiber: Option.Option<Fiber.Fiber<void>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAEN,KAAK,EACL,KAAK,EACL,MAAM,EAGN,MAAM,EAEP,MAAM,QAAQ,CAAA;AAEf,OAAO,EACL,QAAQ,EACR,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,GAAG,EAA+B,MAAM,iBAAiB,CAAA;AAClE,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAEN,KAAK,EACL,KAAK,EACL,MAAM,EAGN,MAAM,EAEP,MAAM,QAAQ,CAAA;AAEf,OAAO,EACL,QAAQ,EACR,KAAK,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