octane 0.2.7 → 0.2.8
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/cjs/index.cjs +2 -0
- package/dist/cjs/runtime.cjs +338 -111
- package/dist/cjs/runtime.server.cjs +307 -66
- package/dist/cjs/version.cjs +1 -1
- package/dist/compiler/compile.js +171 -13
- package/dist/compiler/context-use.js +154 -0
- package/dist/compiler/hook-deps.js +17 -1
- package/dist/compiler/native-read-diagnostics.js +11 -32
- package/dist/compiler/slot-hooks.js +6 -0
- package/dist/compiler/strong-mode.js +716 -39
- package/dist/compiler/volar.LICENSES.txt +1 -1
- package/dist/compiler/volar.js +3485 -3476
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/runtime.d.ts +8 -3
- package/dist/runtime.js +337 -111
- package/dist/runtime.server.d.ts +6 -5
- package/dist/runtime.server.js +307 -66
- package/dist/universal-core.d.ts +15 -0
- package/dist/universal-core.js +516 -32
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { initializeHydrationEventCapture } from './hydration/event-capture.js';
|
|
|
5
5
|
export { attachBehaviorRoot } from './behavior-root.js';
|
|
6
6
|
export type * from './behavior-root.js';
|
|
7
7
|
export { createSubSlot, subSlot, type SubSlot, type SlotlessSubSlot, type SubSlotOptions, } from './sub-slot.js';
|
|
8
|
-
export { createRoot, hydrateRoot, flushSync, act, isInActScope, type Root, type RootContainer, type RootOptions, useState, useLinkedState, type LinkedStatePrevious, type LinkedStateOptions, useReducer, useEffect, useLayoutEffect, useInsertionEffect, useMemo, useCallback, useRef, useId, useImperativeHandle, useEffectEvent, useSyncExternalStore, useDeferredValue, useTransition, useActionState, useActionState as useFormState, useFormStatus, useOptimistic, useDebugValue, type FormStatus, startTransition, requestFormReset, memo, lazy, preload, preinit, preloadModule, preinitModule, preconnect, prefetchDNS, createContext, use, useContext, type Context, type ForeignHostContext, Suspense, ErrorBoundary, Hydrate, Activity, Activity as unstable_Activity, ViewTransition, addTransitionType, ViewTransition as unstable_ViewTransition, addTransitionType as unstable_addTransitionType, ViewTransitionPseudoElement, type ViewTransitionProps, type ViewTransitionInstance, Fragment, createPortal, type PortalDescriptor, createElement, cloneElement, isValidElement, isChildrenBlock, descriptorChildren, Children, type ElementDescriptor, type ComponentBody, type OctaneNode, TsrxErrorBoundary, __useStateWithGetter, __useLinkedStateWithGetter, __useReducerWithGetter, __createVoidRoot, bindRendererRegionOwner, EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY, createHostContextRequest, __vtSeen, template, clone, drainFrag, bag0, bag1, bag2, bag3, bag4, bag5, bag6, bag7, bag8, bag9, bag10, bag11, bag12, bag13, bag14, bag15, bag16, bagOf, evt0, evt0u, evt1, evt1u, evt2, evt2u, evtN, evtNu, setEventHandler, devEventListener, devHtmlNesting, htext, htextSwap, child, sibling, setText, setScriptText, setHTML, setDangerouslySetInnerHTML, setDangerouslySetInnerHTMLSources, markDangerouslySetInnerHTMLChildren, setAttribute, setStringData, setBooleanAttribute, setAriaAttribute, setClassName, setClassAttr, normalizeClass, setStyle, setStyleProperty, setSpread, snapshotSpread, setHostPropSources, queueNativeChangeDiagnostic, queueFormAuthoringDiagnostic, markNativeChangeDiagnosticStatic, setFormAction, setValue, setFormControlSources, setChecked, setCheckedCheckable, setSelectValue, setDefaultValue, setDefaultValueUncontrolled, setDefaultChecked, setAutoFocus, attachRef, queueRefAttach, queueRefDetach, replaceRef, queueOwnRefDetach, injectStyle, headBlock, stylesheetResource, styleResource, scriptResource, namespaceHead, namespaceHeadElement, delegateEvents, delegateCaptureEvents, fastForBlock, fastKeyedForBlock, fastMapSlot, forBlock, keyedForBlock, mapSlot, ifBlock, errorBlock, tryBlock, switchBlock, activityBlock, componentSlot, componentSlotVoid, componentSlotLite, compilerCacheArray, compilerCacheImmutableArrayFilter, compilerCacheMappedArray, compilerCacheContext, compilerOwnsContextProvider, markSingleRoot, markWarm, markSingleRoot as __s, markChildrenBlock, createScopedValue, createScopedElement, childSlot, positionalChildren, textSlot, textHole, childTextHole, hostComponent, renderBlock, portal, hookSlots, withSlot, manualHook, invokeManualHook, useBatch, seedOrCreate, warmMemo, warmChild, puMiss, puTake0, puTake1, puTake2, puTake3, puTake4, puPub, provideContext, mountFragmentRef, FragmentInstance, hmr, HMR, hasPendingWork, type Scope, type Block, drainPassiveEffects, setIsOctaneActEnvironment, resetFloatResourceState, setTransitionFallbackTimeout, getTransitionFallbackTimeout, } from './runtime.js';
|
|
8
|
+
export { createRoot, hydrateRoot, flushSync, act, isInActScope, type Root, type RootContainer, type RootOptions, useState, useLinkedState, type LinkedStatePrevious, type LinkedStateOptions, useReducer, useEffect, useLayoutEffect, useInsertionEffect, useMemo, useCallback, useRef, useId, useImperativeHandle, useEffectEvent, useSyncExternalStore, useDeferredValue, useTransition, useActionState, useActionState as useFormState, useFormStatus, useOptimistic, useDebugValue, type FormStatus, startTransition, requestFormReset, memo, lazy, preload, preinit, preloadModule, preinitModule, preconnect, prefetchDNS, createContext, use, useContext, type Context, type ForeignHostContext, Suspense, ErrorBoundary, Hydrate, Activity, Activity as unstable_Activity, ViewTransition, addTransitionType, ViewTransition as unstable_ViewTransition, addTransitionType as unstable_addTransitionType, ViewTransitionPseudoElement, type ViewTransitionProps, type ViewTransitionInstance, Fragment, createPortal, type PortalDescriptor, createElement, cloneElement, isValidElement, isChildrenBlock, descriptorChildren, Children, type ElementDescriptor, type ComponentBody, type OctaneNode, TsrxErrorBoundary, __useStateWithGetter, __useLinkedStateWithGetter, __useReducerWithGetter, __createVoidRoot, bindRendererRegionOwner, EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY, createHostContextRequest, __vtSeen, template, clone, drainFrag, bag0, bag1, bag2, bag3, bag4, bag5, bag6, bag7, bag8, bag9, bag10, bag11, bag12, bag13, bag14, bag15, bag16, bagOf, evt0, evt0u, evt1, evt1u, evt2, evt2u, evtN, evtNu, setEventHandler, devEventListener, devHtmlNesting, htext, htextSwap, child, sibling, setText, setScriptText, setHTML, setDangerouslySetInnerHTML, setDangerouslySetInnerHTMLSources, markDangerouslySetInnerHTMLChildren, setAttribute, setStringData, setBooleanAttribute, setAriaAttribute, setClassName, setClassAttr, normalizeClass, setStyle, setStyleProperty, setSpread, snapshotSpread, setHostPropSources, queueNativeChangeDiagnostic, queueFormAuthoringDiagnostic, markNativeChangeDiagnosticStatic, setFormAction, setValue, setFormControlSources, setChecked, setCheckedCheckable, setSelectValue, setDefaultValue, setDefaultValueUncontrolled, setDefaultChecked, setAutoFocus, attachRef, queueRefAttach, queueRefDetach, replaceRef, queueOwnRefDetach, injectStyle, headBlock, stylesheetResource, styleResource, scriptResource, namespaceHead, namespaceHeadElement, delegateEvents, delegateCaptureEvents, fastForBlock, fastKeyedForBlock, fastMapSlot, forBlock, keyedForBlock, mapSlot, ifBlock, errorBlock, tryBlock, switchBlock, activityBlock, componentSlot, componentSlotVoid, componentSlotLite, compilerCacheArray, compilerCacheImmutableArrayFilter, compilerCacheMappedArray, compilerCacheContext, compilerOwnsContextProvider, markSingleRoot, markWarm, markSingleRoot as __s, markChildrenBlock, createScopedValue, createScopedElement, childSlot, positionalChildren, textSlot, textHole, childTextHole, hostComponent, renderBlock, portal, hookSlots, withSlot, manualHook, invokeManualHook, useBatch, registerWarmPlan, seedOrCreate, warmMemo, warmChild, puMiss, puTake0, puTake1, puTake2, puTake3, puTake4, puPub, provideContext, mountFragmentRef, FragmentInstance, hmr, HMR, hasPendingWork, type Scope, type Block, drainPassiveEffects, setIsOctaneActEnvironment, resetFloatResourceState, setTransitionFallbackTimeout, getTransitionFallbackTimeout, } from './runtime.js';
|
|
9
9
|
export type { HydrateOptions, HydrateProps, HydrateWhen, HydrationInteractionEvent, HydrationInteractionEvents, HydrationPrefetchContext, HydrationPrefetchFunction, HydrationPrefetchStrategy, HydrationPrefetchWaitReason, HydrationStrategy, HydrationWhen, } from './hydration/types.js';
|
|
10
10
|
export { __serverRpc } from './server-rpc-client.js';
|
|
11
11
|
export { __methodDep } from './method-dep.js';
|
package/dist/index.js
CHANGED
|
@@ -192,6 +192,7 @@ import {
|
|
|
192
192
|
manualHook,
|
|
193
193
|
invokeManualHook,
|
|
194
194
|
useBatch,
|
|
195
|
+
registerWarmPlan,
|
|
195
196
|
seedOrCreate,
|
|
196
197
|
warmMemo,
|
|
197
198
|
warmChild,
|
|
@@ -356,6 +357,7 @@ export {
|
|
|
356
357
|
queueOwnRefDetach,
|
|
357
358
|
queueRefAttach,
|
|
358
359
|
queueRefDetach,
|
|
360
|
+
registerWarmPlan,
|
|
359
361
|
renderBlock,
|
|
360
362
|
replaceRef,
|
|
361
363
|
requestFormReset,
|
package/dist/runtime.d.ts
CHANGED
|
@@ -131,10 +131,12 @@ export interface Scope {
|
|
|
131
131
|
* never drops a context it stamped, and a closer provider can't appear above a
|
|
132
132
|
* surviving consumer — so only the provider's VALUE varies, read live from the
|
|
133
133
|
* cached scope. Collapses useContextInternal's O(depth) walk to an O(1) read.
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* The first context and its resolved owner live inline; only a second distinct
|
|
135
|
+
* context allocates a Map. The owner is never the value itself, so Provider
|
|
136
|
+
* updates remain visible on subsequent reads.
|
|
136
137
|
*/
|
|
137
|
-
$$ctxCache: Map<Context<any>,
|
|
138
|
+
$$ctxCache: Context<any> | Map<Context<any>, Scope | typeof DEFAULT_CTX> | null;
|
|
139
|
+
$$ctxCacheOwner: Scope | typeof DEFAULT_CTX | null;
|
|
138
140
|
slots: any[];
|
|
139
141
|
/**
|
|
140
142
|
* DEV ONLY (set by `dev`-compiled bodies; `undefined` in production): a structured
|
|
@@ -1012,6 +1014,7 @@ export declare function useRendererThenable<T>(thenable: PromiseLike<T>): T;
|
|
|
1012
1014
|
* React-19 idiom and remains the primary form.
|
|
1013
1015
|
*/
|
|
1014
1016
|
export declare function useContext<T>(context: Context<T> | ForeignHostContext<T>): T;
|
|
1017
|
+
declare const DEFAULT_CTX: unique symbol;
|
|
1015
1018
|
/**
|
|
1016
1019
|
* Compiler ABI for a DOM component materialized from a reverse renderer region.
|
|
1017
1020
|
* The bridge is deliberately attached only to the owning DOM root; normal DOM
|
|
@@ -1058,6 +1061,8 @@ export declare function seedOrCreate<T>(site: string, factory: () => T): T;
|
|
|
1058
1061
|
* descendants via warmChild/warmMemo. A resolved batch costs no warm work.
|
|
1059
1062
|
*/
|
|
1060
1063
|
export declare function useBatch(items: any[], warm?: () => void): void;
|
|
1064
|
+
/** @internal Compiler-owned registration for a component warm plan. */
|
|
1065
|
+
export declare function registerWarmPlan(fn: (props: any) => void, props: any): void;
|
|
1061
1066
|
interface WarmEntry {
|
|
1062
1067
|
deps: any[];
|
|
1063
1068
|
value: any;
|