@jay-framework/runtime 0.8.0 → 0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +10 -4
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -65,14 +65,20 @@ type JayEventHandlerWrapper<EventType, ViewState, Returns> = (orig: JayEventHand
65
65
  interface ContextMarker<ContextType> {
66
66
  }
67
67
  declare const _jayContractBrand: unique symbol;
68
- type JayContract<ViewState extends object, Refs extends object> = {
68
+ type JayContract<ViewState extends object, Refs extends object, SlowViewState extends object = never, FastViewState extends object = never, InteractiveViewState extends object = never> = {
69
69
  readonly [_jayContractBrand]: {
70
70
  viewState: ViewState;
71
71
  refs: Refs;
72
+ slowViewState: SlowViewState;
73
+ fastViewState: FastViewState;
74
+ interactiveViewState: InteractiveViewState;
72
75
  };
73
76
  };
74
- type ExtractViewState<A> = A extends JayContract<infer ViewState, any> ? ViewState : never;
75
- type ExtractRefs<A> = A extends JayContract<any, infer Refs> ? Refs : never;
77
+ type ExtractViewState<A> = A extends JayContract<infer ViewState, any, any, any, any> ? ViewState : never;
78
+ type ExtractRefs<A> = A extends JayContract<any, infer Refs, any, any, any> ? Refs : never;
79
+ type ExtractSlowViewState<A> = A extends JayContract<any, any, infer SlowViewState, any, any> ? SlowViewState : never;
80
+ type ExtractFastViewState<A> = A extends JayContract<any, any, any, infer FastViewState, any> ? FastViewState : never;
81
+ type ExtractInteractiveViewState<A> = A extends JayContract<any, any, any, any, infer InteractiveViewState> ? InteractiveViewState : never;
76
82
  declare enum LogType {
77
83
  ASYNC_ERROR = 0,
78
84
  CONTEXT_NOT_FOUND = 1
@@ -515,4 +521,4 @@ declare class ConstructContext<ViewState> {
515
521
  static withRootContext<ViewState, Refs>(viewState: ViewState, refManager: ReferencesManager, elementConstructor: () => BaseJayElement<ViewState>): JayElement<ViewState, Refs>;
516
522
  }
517
523
 
518
- export { type Attribute, type Attributes, type BaseJayElement, BaseReferencesManager, type ComponentCollectionProxy, ComponentCollectionRefImpl, type ComponentProxy, ComponentRefImpl, ComponentRefsImpl, type Conditional, ConstructContext, type ContextMarker, type Coordinate, type DynamicAttributeOrProperty, EVENT_TRAP, type ElementFrom, type EventEmitter, type EventTypeFrom, type ExtractRefs, type ExtractViewState, type ForEach, GetTrapProxy, type GlobalJayEvents, type HTMLElementCollectionProxy, type HTMLElementCollectionProxyTarget, type HTMLElementProxy, type HTMLElementProxyTarget, type HTMLNativeExec, type HeadLink, type JayComponent, type JayComponentConstructor, type JayContract, type JayElement, type JayEvent, type JayEventHandler, type JayEventHandlerWrapper, type JayLog, type JayNativeEventBuilder, type JayNativeFunction, LogType, type ManagedRefConstructor, ManagedRefType, type ManagedRefs, type MapEventEmitterViewState, type MountFunc, type OnlyEventEmitters, type PreRenderElement, type PrivateRef, type PrivateRefConstructor, PrivateRefs, type PropsFrom, ReferencesManager, type RenderElement, type RenderElementOptions, type TextElement, type ViewStateFrom, type When, WhenRole, type WithData, booleanAttribute, childComp, conditional, createJayContext, currentConstructionContext, defaultEventWrapper, dynamicAttribute, dynamicElement, dynamicElementNS, dynamicProperty, dynamicText, element, findContext, forEach, injectHeadLinks, isCondition, isForEach, isWhen, isWithData, jayLog, mathMLDynamicElement, mathMLElement, mkUpdateCollection, noop, noopMount, noopUpdate, normalizeMount, normalizeUpdates, pending, rejected, resolved, restoreContext, saveContext, svgDynamicElement, svgElement, type updateFunc, useContext, withContext, withData };
524
+ export { type Attribute, type Attributes, type BaseJayElement, BaseReferencesManager, type ComponentCollectionProxy, ComponentCollectionRefImpl, type ComponentProxy, ComponentRefImpl, ComponentRefsImpl, type Conditional, ConstructContext, type ContextMarker, type Coordinate, type DynamicAttributeOrProperty, EVENT_TRAP, type ElementFrom, type EventEmitter, type EventTypeFrom, type ExtractFastViewState, type ExtractInteractiveViewState, type ExtractRefs, type ExtractSlowViewState, type ExtractViewState, type ForEach, GetTrapProxy, type GlobalJayEvents, type HTMLElementCollectionProxy, type HTMLElementCollectionProxyTarget, type HTMLElementProxy, type HTMLElementProxyTarget, type HTMLNativeExec, type HeadLink, type JayComponent, type JayComponentConstructor, type JayContract, type JayElement, type JayEvent, type JayEventHandler, type JayEventHandlerWrapper, type JayLog, type JayNativeEventBuilder, type JayNativeFunction, LogType, type ManagedRefConstructor, ManagedRefType, type ManagedRefs, type MapEventEmitterViewState, type MountFunc, type OnlyEventEmitters, type PreRenderElement, type PrivateRef, type PrivateRefConstructor, PrivateRefs, type PropsFrom, ReferencesManager, type RenderElement, type RenderElementOptions, type TextElement, type ViewStateFrom, type When, WhenRole, type WithData, booleanAttribute, childComp, conditional, createJayContext, currentConstructionContext, defaultEventWrapper, dynamicAttribute, dynamicElement, dynamicElementNS, dynamicProperty, dynamicText, element, findContext, forEach, injectHeadLinks, isCondition, isForEach, isWhen, isWithData, jayLog, mathMLDynamicElement, mathMLElement, mkUpdateCollection, noop, noopMount, noopUpdate, normalizeMount, normalizeUpdates, pending, rejected, resolved, restoreContext, saveContext, svgDynamicElement, svgElement, type updateFunc, useContext, withContext, withData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/runtime",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -23,11 +23,11 @@
23
23
  "test:watch": "vitest"
24
24
  },
25
25
  "dependencies": {
26
- "@jay-framework/list-compare": "^0.8.0",
27
- "@jay-framework/reactive": "^0.8.0"
26
+ "@jay-framework/list-compare": "^0.9.0",
27
+ "@jay-framework/reactive": "^0.9.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@jay-framework/dev-environment": "^0.8.0",
30
+ "@jay-framework/dev-environment": "^0.9.0",
31
31
  "@testing-library/jest-dom": "^6.2.0",
32
32
  "@types/jsdom": "^21.1.6",
33
33
  "@types/node": "^20.11.5",