@number10/jsx-core 5.0.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/LICENSE +667 -0
- package/README.md +38 -0
- package/dist/animation/animated-signal.cjs +19 -0
- package/dist/animation/animated-signal.cjs.map +1 -0
- package/dist/animation/animated-signal.d.ts +35 -0
- package/dist/animation/animated-signal.d.ts.map +1 -0
- package/dist/animation/animated-signal.js +19 -0
- package/dist/animation/animated-signal.js.map +1 -0
- package/dist/animation/create-spring.cjs +80 -0
- package/dist/animation/create-spring.cjs.map +1 -0
- package/dist/animation/create-spring.d.ts +56 -0
- package/dist/animation/create-spring.d.ts.map +1 -0
- package/dist/animation/create-spring.js +80 -0
- package/dist/animation/create-spring.js.map +1 -0
- package/dist/animation/easing.cjs +76 -0
- package/dist/animation/easing.cjs.map +1 -0
- package/dist/animation/easing.d.ts +45 -0
- package/dist/animation/easing.d.ts.map +1 -0
- package/dist/animation/easing.js +76 -0
- package/dist/animation/easing.js.map +1 -0
- package/dist/animation/effect-definitions.cjs +441 -0
- package/dist/animation/effect-definitions.cjs.map +1 -0
- package/dist/animation/effect-definitions.d.ts +60 -0
- package/dist/animation/effect-definitions.d.ts.map +1 -0
- package/dist/animation/effect-definitions.js +441 -0
- package/dist/animation/effect-definitions.js.map +1 -0
- package/dist/animation/effect-engine.cjs +189 -0
- package/dist/animation/effect-engine.cjs.map +1 -0
- package/dist/animation/effect-engine.d.ts +70 -0
- package/dist/animation/effect-engine.d.ts.map +1 -0
- package/dist/animation/effect-engine.js +189 -0
- package/dist/animation/effect-engine.js.map +1 -0
- package/dist/animation/index.d.ts +24 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/spring-physics.cjs +94 -0
- package/dist/animation/spring-physics.cjs.map +1 -0
- package/dist/animation/spring-physics.d.ts +145 -0
- package/dist/animation/spring-physics.d.ts.map +1 -0
- package/dist/animation/spring-physics.js +94 -0
- package/dist/animation/spring-physics.js.map +1 -0
- package/dist/animation/tween.cjs +67 -0
- package/dist/animation/tween.cjs.map +1 -0
- package/dist/animation/tween.d.ts +60 -0
- package/dist/animation/tween.d.ts.map +1 -0
- package/dist/animation/tween.js +67 -0
- package/dist/animation/tween.js.map +1 -0
- package/dist/animation/types.d.ts +31 -0
- package/dist/animation/types.d.ts.map +1 -0
- package/dist/animation/useSpring.cjs +152 -0
- package/dist/animation/useSpring.cjs.map +1 -0
- package/dist/animation/useSpring.d.ts +55 -0
- package/dist/animation/useSpring.d.ts.map +1 -0
- package/dist/animation/useSpring.js +149 -0
- package/dist/animation/useSpring.js.map +1 -0
- package/dist/animation/useTween.cjs +208 -0
- package/dist/animation/useTween.cjs.map +1 -0
- package/dist/animation/useTween.d.ts +116 -0
- package/dist/animation/useTween.d.ts.map +1 -0
- package/dist/animation/useTween.js +208 -0
- package/dist/animation/useTween.js.map +1 -0
- package/dist/border-geometry.cjs +447 -0
- package/dist/border-geometry.cjs.map +1 -0
- package/dist/border-geometry.d.ts +114 -0
- package/dist/border-geometry.d.ts.map +1 -0
- package/dist/border-geometry.js +447 -0
- package/dist/border-geometry.js.map +1 -0
- package/dist/colors/color-presets.cjs +236 -0
- package/dist/colors/color-presets.cjs.map +1 -0
- package/dist/colors/color-presets.d.ts +89 -0
- package/dist/colors/color-presets.d.ts.map +1 -0
- package/dist/colors/color-presets.js +236 -0
- package/dist/colors/color-presets.js.map +1 -0
- package/dist/colors/color-theme-helpers.cjs +32 -0
- package/dist/colors/color-theme-helpers.cjs.map +1 -0
- package/dist/colors/color-theme-helpers.d.ts +65 -0
- package/dist/colors/color-theme-helpers.d.ts.map +1 -0
- package/dist/colors/color-theme-helpers.js +32 -0
- package/dist/colors/color-theme-helpers.js.map +1 -0
- package/dist/colors/color-types.cjs +38 -0
- package/dist/colors/color-types.cjs.map +1 -0
- package/dist/colors/color-types.d.ts +112 -0
- package/dist/colors/color-types.d.ts.map +1 -0
- package/dist/colors/color-types.js +38 -0
- package/dist/colors/color-types.js.map +1 -0
- package/dist/colors/color-utils.cjs +197 -0
- package/dist/colors/color-utils.cjs.map +1 -0
- package/dist/colors/color-utils.d.ts +216 -0
- package/dist/colors/color-utils.d.ts.map +1 -0
- package/dist/colors/color-utils.js +197 -0
- package/dist/colors/color-utils.js.map +1 -0
- package/dist/colors/contrast-contracts.cjs +265 -0
- package/dist/colors/contrast-contracts.cjs.map +1 -0
- package/dist/colors/contrast-contracts.d.ts +289 -0
- package/dist/colors/contrast-contracts.d.ts.map +1 -0
- package/dist/colors/contrast-contracts.js +265 -0
- package/dist/colors/contrast-contracts.js.map +1 -0
- package/dist/colors/index.cjs +55 -0
- package/dist/colors/index.cjs.map +1 -0
- package/dist/colors/index.d.ts +16 -0
- package/dist/colors/index.d.ts.map +1 -0
- package/dist/colors/index.js +55 -0
- package/dist/colors/index.js.map +1 -0
- package/dist/core-props.cjs +66 -0
- package/dist/core-props.cjs.map +1 -0
- package/dist/core-props.d.ts +395 -0
- package/dist/core-props.d.ts.map +1 -0
- package/dist/core-props.js +66 -0
- package/dist/core-props.js.map +1 -0
- package/dist/design-tokens/design-token-presets.cjs +91 -0
- package/dist/design-tokens/design-token-presets.cjs.map +1 -0
- package/dist/design-tokens/design-token-presets.d.ts +34 -0
- package/dist/design-tokens/design-token-presets.d.ts.map +1 -0
- package/dist/design-tokens/design-token-presets.js +91 -0
- package/dist/design-tokens/design-token-presets.js.map +1 -0
- package/dist/design-tokens/design-token-types.d.ts +97 -0
- package/dist/design-tokens/design-token-types.d.ts.map +1 -0
- package/dist/design-tokens/index.cjs +10 -0
- package/dist/design-tokens/index.cjs.map +1 -0
- package/dist/design-tokens/index.d.ts +9 -0
- package/dist/design-tokens/index.d.ts.map +1 -0
- package/dist/design-tokens/index.js +10 -0
- package/dist/design-tokens/index.js.map +1 -0
- package/dist/dev-config.cjs +296 -0
- package/dist/dev-config.cjs.map +1 -0
- package/dist/dev-config.d.ts +238 -0
- package/dist/dev-config.d.ts.map +1 -0
- package/dist/dev-config.js +296 -0
- package/dist/dev-config.js.map +1 -0
- package/dist/effects.cjs +69 -0
- package/dist/effects.cjs.map +1 -0
- package/dist/effects.d.ts +152 -0
- package/dist/effects.d.ts.map +1 -0
- package/dist/effects.js +69 -0
- package/dist/effects.js.map +1 -0
- package/dist/global-registry.cjs +25 -0
- package/dist/global-registry.cjs.map +1 -0
- package/dist/global-registry.d.ts +19 -0
- package/dist/global-registry.d.ts.map +1 -0
- package/dist/global-registry.js +25 -0
- package/dist/global-registry.js.map +1 -0
- package/dist/hooks.cjs +378 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.ts +322 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +378 -0
- package/dist/hooks.js.map +1 -0
- package/dist/host-adapter.d.ts +414 -0
- package/dist/host-adapter.d.ts.map +1 -0
- package/dist/index.cjs +229 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +226 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-dev-runtime.cjs +10 -0
- package/dist/jsx-dev-runtime.cjs.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +5 -0
- package/dist/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx-dev-runtime.js +11 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.cjs +44 -0
- package/dist/jsx-runtime.cjs.map +1 -0
- package/dist/jsx-runtime.d.ts +24 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +44 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-types.d.ts +25 -0
- package/dist/jsx-types.d.ts.map +1 -0
- package/dist/layout/appliers/container-applier.cjs +20 -0
- package/dist/layout/appliers/container-applier.cjs.map +1 -0
- package/dist/layout/appliers/container-applier.d.ts +9 -0
- package/dist/layout/appliers/container-applier.d.ts.map +1 -0
- package/dist/layout/appliers/container-applier.js +20 -0
- package/dist/layout/appliers/container-applier.js.map +1 -0
- package/dist/layout/appliers/position-applier.cjs +31 -0
- package/dist/layout/appliers/position-applier.cjs.map +1 -0
- package/dist/layout/appliers/position-applier.d.ts +8 -0
- package/dist/layout/appliers/position-applier.d.ts.map +1 -0
- package/dist/layout/appliers/position-applier.js +31 -0
- package/dist/layout/appliers/position-applier.js.map +1 -0
- package/dist/layout/layout-engine-test-utils.d.ts +26 -0
- package/dist/layout/layout-engine-test-utils.d.ts.map +1 -0
- package/dist/layout/layout-engine.cjs +628 -0
- package/dist/layout/layout-engine.cjs.map +1 -0
- package/dist/layout/layout-engine.d.ts +140 -0
- package/dist/layout/layout-engine.d.ts.map +1 -0
- package/dist/layout/layout-engine.js +628 -0
- package/dist/layout/layout-engine.js.map +1 -0
- package/dist/layout/strategies/base-strategy.cjs +31 -0
- package/dist/layout/strategies/base-strategy.cjs.map +1 -0
- package/dist/layout/strategies/base-strategy.d.ts +59 -0
- package/dist/layout/strategies/base-strategy.d.ts.map +1 -0
- package/dist/layout/strategies/base-strategy.js +31 -0
- package/dist/layout/strategies/base-strategy.js.map +1 -0
- package/dist/layout/strategies/column-layout.cjs +145 -0
- package/dist/layout/strategies/column-layout.cjs.map +1 -0
- package/dist/layout/strategies/column-layout.d.ts +38 -0
- package/dist/layout/strategies/column-layout.d.ts.map +1 -0
- package/dist/layout/strategies/column-layout.js +145 -0
- package/dist/layout/strategies/column-layout.js.map +1 -0
- package/dist/layout/strategies/row-layout.cjs +145 -0
- package/dist/layout/strategies/row-layout.cjs.map +1 -0
- package/dist/layout/strategies/row-layout.d.ts +38 -0
- package/dist/layout/strategies/row-layout.d.ts.map +1 -0
- package/dist/layout/strategies/row-layout.js +145 -0
- package/dist/layout/strategies/row-layout.js.map +1 -0
- package/dist/layout/strategies/stack-layout.cjs +94 -0
- package/dist/layout/strategies/stack-layout.cjs.map +1 -0
- package/dist/layout/strategies/stack-layout.d.ts +30 -0
- package/dist/layout/strategies/stack-layout.d.ts.map +1 -0
- package/dist/layout/strategies/stack-layout.js +94 -0
- package/dist/layout/strategies/stack-layout.js.map +1 -0
- package/dist/layout/types.d.ts +134 -0
- package/dist/layout/types.d.ts.map +1 -0
- package/dist/layout/utils/child-utils.cjs +129 -0
- package/dist/layout/utils/child-utils.cjs.map +1 -0
- package/dist/layout/utils/child-utils.d.ts +54 -0
- package/dist/layout/utils/child-utils.d.ts.map +1 -0
- package/dist/layout/utils/child-utils.js +129 -0
- package/dist/layout/utils/child-utils.js.map +1 -0
- package/dist/layout/utils/dimension-calculator.cjs +109 -0
- package/dist/layout/utils/dimension-calculator.cjs.map +1 -0
- package/dist/layout/utils/dimension-calculator.d.ts +59 -0
- package/dist/layout/utils/dimension-calculator.d.ts.map +1 -0
- package/dist/layout/utils/dimension-calculator.js +109 -0
- package/dist/layout/utils/dimension-calculator.js.map +1 -0
- package/dist/layout/utils/flex-distributor.cjs +173 -0
- package/dist/layout/utils/flex-distributor.cjs.map +1 -0
- package/dist/layout/utils/flex-distributor.d.ts +18 -0
- package/dist/layout/utils/flex-distributor.d.ts.map +1 -0
- package/dist/layout/utils/flex-distributor.js +173 -0
- package/dist/layout/utils/flex-distributor.js.map +1 -0
- package/dist/layout/utils/size-resolver.cjs +280 -0
- package/dist/layout/utils/size-resolver.cjs.map +1 -0
- package/dist/layout/utils/size-resolver.d.ts +84 -0
- package/dist/layout/utils/size-resolver.d.ts.map +1 -0
- package/dist/layout/utils/size-resolver.js +280 -0
- package/dist/layout/utils/size-resolver.js.map +1 -0
- package/dist/layout/utils/spacing-calculator.cjs +50 -0
- package/dist/layout/utils/spacing-calculator.cjs.map +1 -0
- package/dist/layout/utils/spacing-calculator.d.ts +27 -0
- package/dist/layout/utils/spacing-calculator.d.ts.map +1 -0
- package/dist/layout/utils/spacing-calculator.js +50 -0
- package/dist/layout/utils/spacing-calculator.js.map +1 -0
- package/dist/memo.cjs +18 -0
- package/dist/memo.cjs.map +1 -0
- package/dist/memo.d.ts +29 -0
- package/dist/memo.d.ts.map +1 -0
- package/dist/memo.js +18 -0
- package/dist/memo.js.map +1 -0
- package/dist/nineslice-contract.cjs +60 -0
- package/dist/nineslice-contract.cjs.map +1 -0
- package/dist/nineslice-contract.d.ts +107 -0
- package/dist/nineslice-contract.d.ts.map +1 -0
- package/dist/nineslice-contract.js +60 -0
- package/dist/nineslice-contract.js.map +1 -0
- package/dist/placeholder.cjs +12 -0
- package/dist/placeholder.cjs.map +1 -0
- package/dist/placeholder.d.ts +44 -0
- package/dist/placeholder.d.ts.map +1 -0
- package/dist/placeholder.js +12 -0
- package/dist/placeholder.js.map +1 -0
- package/dist/portal.cjs +89 -0
- package/dist/portal.cjs.map +1 -0
- package/dist/portal.d.ts +62 -0
- package/dist/portal.d.ts.map +1 -0
- package/dist/portal.js +89 -0
- package/dist/portal.js.map +1 -0
- package/dist/primitive-contracts.cjs +12 -0
- package/dist/primitive-contracts.cjs.map +1 -0
- package/dist/primitive-contracts.d.ts +186 -0
- package/dist/primitive-contracts.d.ts.map +1 -0
- package/dist/primitive-contracts.js +12 -0
- package/dist/primitive-contracts.js.map +1 -0
- package/dist/theme.cjs +332 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.ts +204 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +332 -0
- package/dist/theme.js.map +1 -0
- package/dist/types.d.ts +86 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/vdom/create-runtime.cjs +79 -0
- package/dist/vdom/create-runtime.cjs.map +1 -0
- package/dist/vdom/create-runtime.d.ts +7 -0
- package/dist/vdom/create-runtime.d.ts.map +1 -0
- package/dist/vdom/create-runtime.js +79 -0
- package/dist/vdom/create-runtime.js.map +1 -0
- package/dist/vdom/index.cjs +8 -0
- package/dist/vdom/index.cjs.map +1 -0
- package/dist/vdom/index.d.ts +4 -0
- package/dist/vdom/index.d.ts.map +1 -0
- package/dist/vdom/index.js +8 -0
- package/dist/vdom/index.js.map +1 -0
- package/dist/vdom/mount.cjs +161 -0
- package/dist/vdom/mount.cjs.map +1 -0
- package/dist/vdom/mount.d.ts +6 -0
- package/dist/vdom/mount.d.ts.map +1 -0
- package/dist/vdom/mount.js +161 -0
- package/dist/vdom/mount.js.map +1 -0
- package/dist/vdom/patch.cjs +163 -0
- package/dist/vdom/patch.cjs.map +1 -0
- package/dist/vdom/patch.d.ts +3 -0
- package/dist/vdom/patch.d.ts.map +1 -0
- package/dist/vdom/patch.js +163 -0
- package/dist/vdom/patch.js.map +1 -0
- package/dist/vdom/registry.cjs +85 -0
- package/dist/vdom/registry.cjs.map +1 -0
- package/dist/vdom/registry.d.ts +28 -0
- package/dist/vdom/registry.d.ts.map +1 -0
- package/dist/vdom/registry.js +85 -0
- package/dist/vdom/registry.js.map +1 -0
- package/dist/vdom/runtime-helpers.cjs +23 -0
- package/dist/vdom/runtime-helpers.cjs.map +1 -0
- package/dist/vdom/runtime-helpers.d.ts +8 -0
- package/dist/vdom/runtime-helpers.d.ts.map +1 -0
- package/dist/vdom/runtime-helpers.js +23 -0
- package/dist/vdom/runtime-helpers.js.map +1 -0
- package/dist/vdom/surface.cjs +107 -0
- package/dist/vdom/surface.cjs.map +1 -0
- package/dist/vdom/surface.d.ts +9 -0
- package/dist/vdom/surface.d.ts.map +1 -0
- package/dist/vdom/surface.js +107 -0
- package/dist/vdom/surface.js.map +1 -0
- package/dist/vdom/types.d.ts +104 -0
- package/dist/vdom/types.d.ts.map +1 -0
- package/dist/vdom/utils.cjs +146 -0
- package/dist/vdom/utils.cjs.map +1 -0
- package/dist/vdom/utils.d.ts +24 -0
- package/dist/vdom/utils.d.ts.map +1 -0
- package/dist/vdom/utils.js +146 -0
- package/dist/vdom/utils.js.map +1 -0
- package/dist/vdom.d.ts +4 -0
- package/dist/vdom.d.ts.map +1 -0
- package/dist/vector-draw-context.d.ts +63 -0
- package/dist/vector-draw-context.d.ts.map +1 -0
- package/package.json +161 -0
- package/vdom/index.cjs +1 -0
- package/vdom/index.d.ts +1 -0
- package/vdom/index.js +1 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type { ChildrenType, PropsContainerExtension, PropsDefaultExtension, Ref, RefCallback, RefObject, VNode, VNodeChild, VNodeLike, } from './types';
|
|
2
|
+
export type { AtlasFrameInfo, CreateRootSurfaceOptions, FrameRect, HostAdapter, HostCancelHandle, HostContext, HostDescriptor, HostNode, HostParent, HostScheduler, NodeType, Props, RootSurface, RootSurfaceKind, Size, SurfaceAdapter, SurfaceContext, SurfaceTarget, SurfaceViewport, TextureLoader, TextureResolver, UpdateRootSurfaceOptions, VDOMOperations, } from './host-adapter';
|
|
3
|
+
export { jsxDEV } from './jsx-dev-runtime';
|
|
4
|
+
export { Fragment, jsx, jsxs } from './jsx-runtime';
|
|
5
|
+
export { memo, noMemo } from './memo';
|
|
6
|
+
export { DebugLogger, DevConfig, DevPresets } from './dev-config';
|
|
7
|
+
export { clampToViewport, getOverlayPosition, normalizeCornerRadius, normalizeEdgeInsets, normalizeGap, type Animatable, type BackgroundProps, type BorderLineStyle, type BorderPropsV2, type BorderSideInsets, type CornerRadiusInsets, type Display, type EdgeInsets, type FlexBasisValue, type GapInsets, type GestureEventData, type GestureProps, type LayoutProps, type SizeValue, type TooltipAnimation, type TooltipCallback, type TooltipConfig, type TooltipPosition, type TouchMoveState, type TransformProps, type ViewportSize, type WheelEventData, } from './core-props';
|
|
8
|
+
export { drawBorderGeometry, hasAnyCornerRadius, isUniformBorder, resolveBorderSides, resolveCornerRadii, shouldUseCoreBorderGeometry, type BorderGeometryInput, type RendererIssue, } from './border-geometry';
|
|
9
|
+
export type { CalcExpression, CalcOperand, ContentArea, ContentMetrics, LayoutChild, LayoutContainer, LayoutContext, LayoutLine, LayoutNode, LayoutSize, LayoutSizeProvider, PaddingValues, ParsedSize, Position, } from './layout/types';
|
|
10
|
+
export { logNotYetImplemented } from './placeholder';
|
|
11
|
+
export { usePortalSurface, type UsePortalSurfaceOptions, type UsePortalSurfaceResult, } from './portal';
|
|
12
|
+
export { calculateLayout, DeferredLayoutQueue, LayoutBatchQueue, registerApplyOverflowClip, setAfterLayout, setApplyOverflowClip, type AfterLayoutCallback, type ApplyOverflowClip, } from './layout/layout-engine';
|
|
13
|
+
export { getChildSize, getMargin, isLayoutChild, processNestedContainer, } from './layout/utils/child-utils';
|
|
14
|
+
export { calculateContainerSize, calculateContentDimensions, normalizePadding, } from './layout/utils/dimension-calculator';
|
|
15
|
+
export { distributeFlexSpace, hasFlexChildren } from './layout/utils/flex-distributor';
|
|
16
|
+
export { clampSize, clearSizeCaches, isExplicit, parseSize, requiresParent, resolveSize, } from './layout/utils/size-resolver';
|
|
17
|
+
export { calculateAlignItems, calculateJustifyContent, type JustifyResult, } from './layout/utils/spacing-calculator';
|
|
18
|
+
export { BaseLayoutStrategy, type LayoutStrategy } from './layout/strategies/base-strategy';
|
|
19
|
+
export { ColumnLayoutStrategy } from './layout/strategies/column-layout';
|
|
20
|
+
export { RowLayoutStrategy } from './layout/strategies/row-layout';
|
|
21
|
+
export { StackLayoutStrategy } from './layout/strategies/stack-layout';
|
|
22
|
+
export * from './colors';
|
|
23
|
+
export * from './design-tokens';
|
|
24
|
+
export { createDefaultTheme, createTheme, deepMergeDefined, defaultTheme, extractNestedThemes, getAvailablePresets, getCurrentPreset, getGlobalThemeDefaults, getThemedProps, KNOWN_COMPONENTS, mergeThemes, normalizeThemeComponentName, registerComponentDefaults, registerComponentDefaultsIfMissing, registerComponentThemeDefaults, resolveComponentTheme, setColorMode, setColorPreset, setThemeRemountHandler, themeRegistry, type ComponentThemeDefaultsInput, type ComponentThemeDefaultsProvider, type CustomComponentThemes, type NestedComponentThemes, type PartialTheme, type ResolveComponentThemeOptions, type Theme, } from './theme';
|
|
25
|
+
export { applyEffect, applyEffectByName, DEFAULT_EFFECT, registerEffect, registerEffectRunner, registerEffectStopRunner, resolveEffect, resolveEffectTransformOrigin, stopEffect, type BuiltInEffectName, type EffectConfig, type EffectDefinition, type EffectName, type EffectNameExtensions, type EffectRunner, type EffectStopRunner, type EffectTransformOrigin, } from './effects';
|
|
26
|
+
export { depsChanged, disposeCtx, getCurrentCtx, getCurrentOrThrow, setCurrentCtx, setUpdateHandler, shallowEqual, shouldComponentUpdate, useAtlas, useCallback, useDebugSnapshot, useEffect, useForceRedraw, useLayoutEffect, useMemo, useRedraw, useRef, useState, useSurface, useSVGTexture, useTexture, useTheme, useThemeTokens, useViewportSize, withHooks, type HookContext, type SVGTextureConfig, type UpdateHandler, type UseAtlasResult, } from './hooks';
|
|
27
|
+
export { stopEffect as stopAnimationEffect } from './animation/effect-engine';
|
|
28
|
+
export * from './animation/index';
|
|
29
|
+
export { computeSourceSlices, computeTargetXs, computeTargetYs, deriveTargetRects, PRIMITIVE_NODES, type ImagePrimitiveProps, type ImagePrimitivePropsComplete, type NineSlicePrimitiveProps, type NineSlicePrimitivePropsComplete, type PortableTextStyle, type PrimitiveNodeType, type SliceRect, type SpritePrimitiveProps, type SpritePrimitivePropsComplete, type TextPrimitiveProps, type TextPrimitivePropsComplete, type VectorDrawContentPrimitivePropsComplete, type ViewPrimitiveProps, type ViewPrimitivePropsComplete, } from './primitive-contracts';
|
|
30
|
+
export { type VectorDrawContentPrimitiveProps, type VectorDrawContext } from './vector-draw-context';
|
|
31
|
+
export { createElement, createVDOMRuntime, normalizeVNodeLike, type MountComponentProps, type MountHandle, type MountProps, type MountRegistryEntry, type ResolveNodePropsResult, type VDOMRuntime, type VDOMRuntimeBridge, } from './vdom';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,aAAa,CAAA;AAGpB,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,GAAG,EACH,WAAW,EACX,SAAS,EACT,KAAK,EACL,UAAU,EACV,SAAS,GACV,MAAM,SAAS,CAAA;AAGhB,YAAY,EACV,cAAc,EACd,wBAAwB,EACxB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,UAAU,EACV,aAAa,EACb,QAAQ,EACR,KAAK,EACL,WAAW,EACX,eAAe,EACf,IAAI,EACJ,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,cAAc,GACf,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAGnD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAGrC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGjE,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAA;AAGrB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACnB,MAAM,mBAAmB,CAAA;AAG1B,YAAY,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,QAAQ,GACT,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAGpD,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,UAAU,CAAA;AAGjB,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,sBAAsB,GACvB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtF,OAAO,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,SAAS,EACT,cAAc,EACd,WAAW,GACZ,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,aAAa,GACnB,MAAM,mCAAmC,CAAA;AAG1C,OAAO,EAAE,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAGtE,cAAc,UAAU,CAAA;AAGxB,cAAc,iBAAiB,CAAA;AAG/B,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,2BAA2B,EAC3B,yBAAyB,EACzB,kCAAkC,EAClC,8BAA8B,EAC9B,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,KAAK,KAAK,GACX,MAAM,SAAS,CAAA;AAGhB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,4BAA4B,EAC5B,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,WAAW,CAAA;AAGlB,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,eAAe,EACf,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC7E,cAAc,mBAAmB,CAAA;AAGjC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,EAC5C,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,KAAK,+BAA+B,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAGpG,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,QAAQ,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { jsxDEV } from "./jsx-dev-runtime.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "./jsx-runtime.js";
|
|
3
|
+
import { memo, noMemo } from "./memo.js";
|
|
4
|
+
import { DebugLogger, DevConfig, DevPresets } from "./dev-config.js";
|
|
5
|
+
import { clampToViewport, getOverlayPosition, normalizeCornerRadius, normalizeEdgeInsets, normalizeGap } from "./core-props.js";
|
|
6
|
+
import { drawBorderGeometry, hasAnyCornerRadius, isUniformBorder, resolveBorderSides, resolveCornerRadii, shouldUseCoreBorderGeometry } from "./border-geometry.js";
|
|
7
|
+
import { logNotYetImplemented } from "./placeholder.js";
|
|
8
|
+
import { usePortalSurface } from "./portal.js";
|
|
9
|
+
import { DeferredLayoutQueue, LayoutBatchQueue, calculateLayout, registerApplyOverflowClip, setAfterLayout, setApplyOverflowClip } from "./layout/layout-engine.js";
|
|
10
|
+
import { getChildSize, getMargin, isLayoutChild, processNestedContainer } from "./layout/utils/child-utils.js";
|
|
11
|
+
import { calculateContainerSize, calculateContentDimensions, normalizePadding } from "./layout/utils/dimension-calculator.js";
|
|
12
|
+
import { distributeFlexSpace, hasFlexChildren } from "./layout/utils/flex-distributor.js";
|
|
13
|
+
import { clampSize, clearSizeCaches, isExplicit, parseSize, requiresParent, resolveSize } from "./layout/utils/size-resolver.js";
|
|
14
|
+
import { calculateAlignItems, calculateJustifyContent } from "./layout/utils/spacing-calculator.js";
|
|
15
|
+
import { BaseLayoutStrategy } from "./layout/strategies/base-strategy.js";
|
|
16
|
+
import { ColumnLayoutStrategy } from "./layout/strategies/column-layout.js";
|
|
17
|
+
import { RowLayoutStrategy } from "./layout/strategies/row-layout.js";
|
|
18
|
+
import { StackLayoutStrategy } from "./layout/strategies/stack-layout.js";
|
|
19
|
+
import { HexColor } from "./colors/color-types.js";
|
|
20
|
+
import { alpha, createTextStyle, darken, darkenHex, ensureContrast, getContrastRatio, hexToNumber, hslToNumber, hslToRgb, lighten, lightenHex, normalizeColorNumber, normalizeTextColor, numberToHex, numberToHsl, numberToRgb, rgbToHsl, rgbToNumber } from "./colors/color-utils.js";
|
|
21
|
+
import { contrastBackgroundRoles, contrastForegroundRoles, defaultContrastContracts, formatResolvedContrastContract, getContrastContract, getFailingContrastContracts, resolveContrastBackgroundRole, resolveContrastColorRef, resolveContrastContract, resolveContrastContractById, resolveContrastForegroundRole, resolveContrastTextColor, resolveContrastTintColor, validateContrastContracts } from "./colors/contrast-contracts.js";
|
|
22
|
+
import { applyDarkMode, applyLightMode, forestGreenPreset, generateColorScale, getPreset, getPresetWithMode, midnightPreset, oceanBluePreset, presets } from "./colors/color-presets.js";
|
|
23
|
+
import { colorsToTheme, getBackgroundColor, getBorderColor, getSurfaceColor, getTextColor } from "./colors/color-theme-helpers.js";
|
|
24
|
+
import { createDesignTokens, createTextStyleTokens, defaultRadiusTokens, defaultSizeTokens, defaultSpacingTokens, defaultTextStyleTokens } from "./design-tokens/design-token-presets.js";
|
|
25
|
+
import { KNOWN_COMPONENTS, createDefaultTheme, createTheme, deepMergeDefined, defaultTheme, extractNestedThemes, getAvailablePresets, getCurrentPreset, getGlobalThemeDefaults, getThemedProps, mergeThemes, normalizeThemeComponentName, registerComponentDefaults, registerComponentDefaultsIfMissing, registerComponentThemeDefaults, resolveComponentTheme, setColorMode, setColorPreset, setThemeRemountHandler, themeRegistry } from "./theme.js";
|
|
26
|
+
import { DEFAULT_EFFECT, applyEffect, applyEffectByName, registerEffect, registerEffectRunner, registerEffectStopRunner, resolveEffect, resolveEffectTransformOrigin, stopEffect } from "./effects.js";
|
|
27
|
+
import { depsChanged, disposeCtx, getCurrentCtx, getCurrentOrThrow, setCurrentCtx, setUpdateHandler, shallowEqual, shouldComponentUpdate, useAtlas, useCallback, useDebugSnapshot, useEffect, useForceRedraw, useLayoutEffect, useMemo, useRedraw, useRef, useSVGTexture, useState, useSurface, useTexture, useTheme, useThemeTokens, useViewportSize, withHooks } from "./hooks.js";
|
|
28
|
+
import { runEffect, stopEffect as stopEffect2 } from "./animation/effect-engine.js";
|
|
29
|
+
import { animatedSignal, isAnimatedSignal, unwrapSignal } from "./animation/animated-signal.js";
|
|
30
|
+
import { createSpring } from "./animation/create-spring.js";
|
|
31
|
+
import { Easing } from "./animation/easing.js";
|
|
32
|
+
import { EFFECT_DEFINITIONS } from "./animation/effect-definitions.js";
|
|
33
|
+
import { DEFAULT_SPRING_CONFIG, SPRING_PRESETS, SpringPhysics } from "./animation/spring-physics.js";
|
|
34
|
+
import { createTween } from "./animation/tween.js";
|
|
35
|
+
import { useSpring, useSprings } from "./animation/useSpring.js";
|
|
36
|
+
import { TWEEN_PRESETS, useTween, useTweens } from "./animation/useTween.js";
|
|
37
|
+
import { PRIMITIVE_NODES } from "./primitive-contracts.js";
|
|
38
|
+
import { createVDOMRuntime } from "./vdom/create-runtime.js";
|
|
39
|
+
import { createElement, normalizeVNodeLike } from "./vdom/utils.js";
|
|
40
|
+
import { computeSourceSlices, computeTargetXs, computeTargetYs, deriveTargetRects } from "./nineslice-contract.js";
|
|
41
|
+
import { computed } from "@preact/signals-core";
|
|
42
|
+
export {
|
|
43
|
+
BaseLayoutStrategy,
|
|
44
|
+
ColumnLayoutStrategy,
|
|
45
|
+
DEFAULT_EFFECT,
|
|
46
|
+
DEFAULT_SPRING_CONFIG,
|
|
47
|
+
DebugLogger,
|
|
48
|
+
DeferredLayoutQueue,
|
|
49
|
+
DevConfig,
|
|
50
|
+
DevPresets,
|
|
51
|
+
EFFECT_DEFINITIONS,
|
|
52
|
+
Easing,
|
|
53
|
+
Fragment,
|
|
54
|
+
HexColor,
|
|
55
|
+
KNOWN_COMPONENTS,
|
|
56
|
+
LayoutBatchQueue,
|
|
57
|
+
PRIMITIVE_NODES,
|
|
58
|
+
RowLayoutStrategy,
|
|
59
|
+
SPRING_PRESETS,
|
|
60
|
+
SpringPhysics,
|
|
61
|
+
StackLayoutStrategy,
|
|
62
|
+
TWEEN_PRESETS,
|
|
63
|
+
alpha,
|
|
64
|
+
animatedSignal,
|
|
65
|
+
applyDarkMode,
|
|
66
|
+
applyEffect,
|
|
67
|
+
applyEffectByName,
|
|
68
|
+
applyLightMode,
|
|
69
|
+
calculateAlignItems,
|
|
70
|
+
calculateContainerSize,
|
|
71
|
+
calculateContentDimensions,
|
|
72
|
+
calculateJustifyContent,
|
|
73
|
+
calculateLayout,
|
|
74
|
+
clampSize,
|
|
75
|
+
clampToViewport,
|
|
76
|
+
clearSizeCaches,
|
|
77
|
+
colorsToTheme,
|
|
78
|
+
computeSourceSlices,
|
|
79
|
+
computeTargetXs,
|
|
80
|
+
computeTargetYs,
|
|
81
|
+
computed,
|
|
82
|
+
contrastBackgroundRoles,
|
|
83
|
+
contrastForegroundRoles,
|
|
84
|
+
createDefaultTheme,
|
|
85
|
+
createDesignTokens,
|
|
86
|
+
createElement,
|
|
87
|
+
createSpring,
|
|
88
|
+
createTextStyle,
|
|
89
|
+
createTextStyleTokens,
|
|
90
|
+
createTheme,
|
|
91
|
+
createTween,
|
|
92
|
+
createVDOMRuntime,
|
|
93
|
+
darken,
|
|
94
|
+
darkenHex,
|
|
95
|
+
deepMergeDefined,
|
|
96
|
+
defaultContrastContracts,
|
|
97
|
+
defaultRadiusTokens,
|
|
98
|
+
defaultSizeTokens,
|
|
99
|
+
defaultSpacingTokens,
|
|
100
|
+
defaultTextStyleTokens,
|
|
101
|
+
defaultTheme,
|
|
102
|
+
depsChanged,
|
|
103
|
+
deriveTargetRects,
|
|
104
|
+
disposeCtx,
|
|
105
|
+
distributeFlexSpace,
|
|
106
|
+
drawBorderGeometry,
|
|
107
|
+
ensureContrast,
|
|
108
|
+
extractNestedThemes,
|
|
109
|
+
forestGreenPreset,
|
|
110
|
+
formatResolvedContrastContract,
|
|
111
|
+
generateColorScale,
|
|
112
|
+
getAvailablePresets,
|
|
113
|
+
getBackgroundColor,
|
|
114
|
+
getBorderColor,
|
|
115
|
+
getChildSize,
|
|
116
|
+
getContrastContract,
|
|
117
|
+
getContrastRatio,
|
|
118
|
+
getCurrentCtx,
|
|
119
|
+
getCurrentOrThrow,
|
|
120
|
+
getCurrentPreset,
|
|
121
|
+
getFailingContrastContracts,
|
|
122
|
+
getGlobalThemeDefaults,
|
|
123
|
+
getMargin,
|
|
124
|
+
getOverlayPosition,
|
|
125
|
+
getPreset,
|
|
126
|
+
getPresetWithMode,
|
|
127
|
+
getSurfaceColor,
|
|
128
|
+
getTextColor,
|
|
129
|
+
getThemedProps,
|
|
130
|
+
hasAnyCornerRadius,
|
|
131
|
+
hasFlexChildren,
|
|
132
|
+
hexToNumber,
|
|
133
|
+
hslToNumber,
|
|
134
|
+
hslToRgb,
|
|
135
|
+
isAnimatedSignal,
|
|
136
|
+
isExplicit,
|
|
137
|
+
isLayoutChild,
|
|
138
|
+
isUniformBorder,
|
|
139
|
+
jsx,
|
|
140
|
+
jsxDEV,
|
|
141
|
+
jsxs,
|
|
142
|
+
lighten,
|
|
143
|
+
lightenHex,
|
|
144
|
+
logNotYetImplemented,
|
|
145
|
+
memo,
|
|
146
|
+
mergeThemes,
|
|
147
|
+
midnightPreset,
|
|
148
|
+
noMemo,
|
|
149
|
+
normalizeColorNumber,
|
|
150
|
+
normalizeCornerRadius,
|
|
151
|
+
normalizeEdgeInsets,
|
|
152
|
+
normalizeGap,
|
|
153
|
+
normalizePadding,
|
|
154
|
+
normalizeTextColor,
|
|
155
|
+
normalizeThemeComponentName,
|
|
156
|
+
normalizeVNodeLike,
|
|
157
|
+
numberToHex,
|
|
158
|
+
numberToHsl,
|
|
159
|
+
numberToRgb,
|
|
160
|
+
oceanBluePreset,
|
|
161
|
+
parseSize,
|
|
162
|
+
presets,
|
|
163
|
+
processNestedContainer,
|
|
164
|
+
registerApplyOverflowClip,
|
|
165
|
+
registerComponentDefaults,
|
|
166
|
+
registerComponentDefaultsIfMissing,
|
|
167
|
+
registerComponentThemeDefaults,
|
|
168
|
+
registerEffect,
|
|
169
|
+
registerEffectRunner,
|
|
170
|
+
registerEffectStopRunner,
|
|
171
|
+
requiresParent,
|
|
172
|
+
resolveBorderSides,
|
|
173
|
+
resolveComponentTheme,
|
|
174
|
+
resolveContrastBackgroundRole,
|
|
175
|
+
resolveContrastColorRef,
|
|
176
|
+
resolveContrastContract,
|
|
177
|
+
resolveContrastContractById,
|
|
178
|
+
resolveContrastForegroundRole,
|
|
179
|
+
resolveContrastTextColor,
|
|
180
|
+
resolveContrastTintColor,
|
|
181
|
+
resolveCornerRadii,
|
|
182
|
+
resolveEffect,
|
|
183
|
+
resolveEffectTransformOrigin,
|
|
184
|
+
resolveSize,
|
|
185
|
+
rgbToHsl,
|
|
186
|
+
rgbToNumber,
|
|
187
|
+
runEffect,
|
|
188
|
+
setAfterLayout,
|
|
189
|
+
setApplyOverflowClip,
|
|
190
|
+
setColorMode,
|
|
191
|
+
setColorPreset,
|
|
192
|
+
setCurrentCtx,
|
|
193
|
+
setThemeRemountHandler,
|
|
194
|
+
setUpdateHandler,
|
|
195
|
+
shallowEqual,
|
|
196
|
+
shouldComponentUpdate,
|
|
197
|
+
shouldUseCoreBorderGeometry,
|
|
198
|
+
stopEffect2 as stopAnimationEffect,
|
|
199
|
+
stopEffect,
|
|
200
|
+
themeRegistry,
|
|
201
|
+
unwrapSignal,
|
|
202
|
+
useAtlas,
|
|
203
|
+
useCallback,
|
|
204
|
+
useDebugSnapshot,
|
|
205
|
+
useEffect,
|
|
206
|
+
useForceRedraw,
|
|
207
|
+
useLayoutEffect,
|
|
208
|
+
useMemo,
|
|
209
|
+
usePortalSurface,
|
|
210
|
+
useRedraw,
|
|
211
|
+
useRef,
|
|
212
|
+
useSVGTexture,
|
|
213
|
+
useSpring,
|
|
214
|
+
useSprings,
|
|
215
|
+
useState,
|
|
216
|
+
useSurface,
|
|
217
|
+
useTexture,
|
|
218
|
+
useTheme,
|
|
219
|
+
useThemeTokens,
|
|
220
|
+
useTween,
|
|
221
|
+
useTweens,
|
|
222
|
+
useViewportSize,
|
|
223
|
+
validateContrastContracts,
|
|
224
|
+
withHooks
|
|
225
|
+
};
|
|
226
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("./jsx-runtime.cjs");
|
|
4
|
+
const jsx = jsxRuntime.jsx;
|
|
5
|
+
const jsxDEV = jsxRuntime.jsx;
|
|
6
|
+
exports.Fragment = jsxRuntime.Fragment;
|
|
7
|
+
exports.jsxs = jsxRuntime.jsxs;
|
|
8
|
+
exports.jsx = jsx;
|
|
9
|
+
exports.jsxDEV = jsxDEV;
|
|
10
|
+
//# sourceMappingURL=jsx-dev-runtime.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.cjs","sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * JSX dev runtime (re-exports jsx-runtime for development mode)\n */\nimport { jsx as jsxProd } from './jsx-runtime'\n\nexport { Fragment, jsxs } from './jsx-runtime'\nexport const jsx = jsxProd\nexport const jsxDEV = jsxProd\n"],"names":["jsxProd"],"mappings":";;;AAMO,MAAM,MAAMA,WAAAA;AACZ,MAAM,SAASA,WAAAA;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.d.ts","sourceRoot":"","sources":["../src/jsx-dev-runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC9C,eAAO,MAAM,GAAG,gBAAU,CAAA;AAC1B,eAAO,MAAM,MAAM,gBAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.js","sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * JSX dev runtime (re-exports jsx-runtime for development mode)\n */\nimport { jsx as jsxProd } from './jsx-runtime'\n\nexport { Fragment, jsxs } from './jsx-runtime'\nexport const jsx = jsxProd\nexport const jsxDEV = jsxProd\n"],"names":["jsxProd"],"mappings":";;AAMO,MAAM,MAAMA;AACZ,MAAM,SAASA;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Fragment = (props) => props?.children ?? null;
|
|
4
|
+
function setVNodeProp(vnode, key, value) {
|
|
5
|
+
if (Object.isExtensible(vnode)) {
|
|
6
|
+
vnode[key] = value;
|
|
7
|
+
return vnode;
|
|
8
|
+
}
|
|
9
|
+
return { ...vnode, [key]: value };
|
|
10
|
+
}
|
|
11
|
+
function jsx(type, props, key) {
|
|
12
|
+
const { children, expand, proportion, theme, ...rest } = props ?? {};
|
|
13
|
+
const vnodeProps = typeof type === "function" && theme !== void 0 ? { ...rest, theme } : rest;
|
|
14
|
+
const kids = children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children];
|
|
15
|
+
let vnode = { type, props: vnodeProps, children: kids };
|
|
16
|
+
if (key !== void 0 && key !== null) {
|
|
17
|
+
vnode = setVNodeProp(
|
|
18
|
+
vnode,
|
|
19
|
+
"__key",
|
|
20
|
+
typeof key === "string" || typeof key === "number" ? key : String(key)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
if (theme !== void 0) {
|
|
24
|
+
vnode = setVNodeProp(vnode, "__theme", theme);
|
|
25
|
+
}
|
|
26
|
+
if (expand !== void 0 || proportion !== void 0) {
|
|
27
|
+
const addConfig = {};
|
|
28
|
+
if (expand !== void 0) addConfig.expand = expand;
|
|
29
|
+
if (proportion !== void 0) addConfig.proportion = proportion;
|
|
30
|
+
vnode = setVNodeProp(vnode, "__addConfig", addConfig);
|
|
31
|
+
}
|
|
32
|
+
return vnode;
|
|
33
|
+
}
|
|
34
|
+
function jsxs(type, props, key) {
|
|
35
|
+
let vnode = jsx(type, props, key);
|
|
36
|
+
if (vnode && typeof vnode === "object" && "type" in vnode) {
|
|
37
|
+
vnode = setVNodeProp(vnode, "__staticChildren", true);
|
|
38
|
+
}
|
|
39
|
+
return vnode;
|
|
40
|
+
}
|
|
41
|
+
exports.Fragment = Fragment;
|
|
42
|
+
exports.jsx = jsx;
|
|
43
|
+
exports.jsxs = jsxs;
|
|
44
|
+
//# sourceMappingURL=jsx-runtime.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.cjs","sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Minimal JSX runtime for the TS \"react-jsx\" automatic runtime.\n * This builds plain VNode objects consumed by our custom mount/patch.\n */\nimport type { VNode, VNodeLike } from './types'\n\nexport const Fragment = (props: { children?: VNodeLike }): VNodeLike => props?.children ?? null\n\n/**\n * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers\n * @param vnode - VNode to set property on\n * @param key - Property key\n * @param value - Value to set\n * @returns Original VNode if extensible, or shallow copy with property\n */\nfunction setVNodeProp<T extends VNode, K extends keyof VNode>(\n vnode: T,\n key: K,\n value: VNode[K]\n): T {\n if (Object.isExtensible(vnode)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(vnode as any)[key] = value\n return vnode\n }\n // VNode is frozen - create shallow copy\n return { ...vnode, [key]: value } as T\n}\n\n/**\n * JSX factory for automatic runtime (dynamic children)\n * Used by TypeScript for expressions like {items.map(...)}\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n const { children, expand, proportion, theme, ...rest } = props ?? {}\n const vnodeProps = typeof type === 'function' && theme !== undefined ? { ...rest, theme } : rest\n // Flatten children arrays deeply to support {arrayVariable} in JSX\n const kids =\n children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]\n let vnode: VNode = { type, props: vnodeProps, children: kids }\n\n // Extract key\n if (key !== undefined && key !== null) {\n vnode = setVNodeProp(\n vnode,\n '__key',\n typeof key === 'string' || typeof key === 'number' ? key : String(key)\n )\n }\n\n // Extract theme and store separately (removed from props)\n if (theme !== undefined) {\n vnode = setVNodeProp(vnode, '__theme', theme as NonNullable<VNode['__theme']>)\n }\n\n // Extract UI add() config and store separately (removed from props)\n if (expand !== undefined || proportion !== undefined) {\n const addConfig: NonNullable<VNode['__addConfig']> = {}\n if (expand !== undefined) addConfig.expand = expand as boolean\n if (proportion !== undefined) addConfig.proportion = proportion as number\n vnode = setVNodeProp(vnode, '__addConfig', addConfig)\n }\n\n return vnode\n}\n\n/**\n * JSX factory for static children arrays\n * Used by TypeScript when children are directly listed in JSX (not via .map())\n * Marks children as static so VDOM doesn't warn about missing keys\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n let vnode = jsx(type, props, key) as VNode\n // Mark as static children - no key warnings needed\n if (vnode && typeof vnode === 'object' && 'type' in vnode) {\n vnode = setVNodeProp(vnode, '__staticChildren', true)\n }\n return vnode\n}\n"],"names":[],"mappings":";;AAMO,MAAM,WAAW,CAAC,UAA+C,OAAO,YAAY;AAS3F,SAAS,aACP,OACA,KACA,OACG;AACH,MAAI,OAAO,aAAa,KAAK,GAAG;AAE5B,UAAc,GAAG,IAAI;AACvB,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,MAAA;AAC5B;AAUO,SAAS,IACd,MACA,OACA,KACW;AACX,QAAM,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,KAAA,IAAS,SAAS,CAAA;AAClE,QAAM,aAAa,OAAO,SAAS,cAAc,UAAU,SAAY,EAAE,GAAG,MAAM,MAAA,IAAU;AAE5F,QAAM,OACJ,YAAY,OAAO,CAAA,IAAK,MAAM,QAAQ,QAAQ,IAAI,SAAS,KAAK,QAAQ,IAAI,CAAC,QAAQ;AACvF,MAAI,QAAe,EAAE,MAAM,OAAO,YAAY,UAAU,KAAA;AAGxD,MAAI,QAAQ,UAAa,QAAQ,MAAM;AACrC,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO,QAAQ,YAAY,OAAO,QAAQ,WAAW,MAAM,OAAO,GAAG;AAAA,IAAA;AAAA,EAEzE;AAGA,MAAI,UAAU,QAAW;AACvB,YAAQ,aAAa,OAAO,WAAW,KAAsC;AAAA,EAC/E;AAGA,MAAI,WAAW,UAAa,eAAe,QAAW;AACpD,UAAM,YAA+C,CAAA;AACrD,QAAI,WAAW,OAAW,WAAU,SAAS;AAC7C,QAAI,eAAe,OAAW,WAAU,aAAa;AACrD,YAAQ,aAAa,OAAO,eAAe,SAAS;AAAA,EACtD;AAEA,SAAO;AACT;AAWO,SAAS,KACd,MACA,OACA,KACW;AACX,MAAI,QAAQ,IAAI,MAAM,OAAO,GAAG;AAEhC,MAAI,SAAS,OAAO,UAAU,YAAY,UAAU,OAAO;AACzD,YAAQ,aAAa,OAAO,oBAAoB,IAAI;AAAA,EACtD;AACA,SAAO;AACT;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VNodeLike } from './types';
|
|
2
|
+
export declare const Fragment: (props: {
|
|
3
|
+
children?: VNodeLike;
|
|
4
|
+
}) => VNodeLike;
|
|
5
|
+
/**
|
|
6
|
+
* JSX factory for automatic runtime (dynamic children)
|
|
7
|
+
* Used by TypeScript for expressions like {items.map(...)}
|
|
8
|
+
* @param type - Element type (string or component function)
|
|
9
|
+
* @param props - Props including children
|
|
10
|
+
* @param key - Optional key for identity tracking
|
|
11
|
+
* @returns VNode object
|
|
12
|
+
*/
|
|
13
|
+
export declare function jsx(type: unknown, props: Record<string, unknown> | null, key?: unknown): VNodeLike;
|
|
14
|
+
/**
|
|
15
|
+
* JSX factory for static children arrays
|
|
16
|
+
* Used by TypeScript when children are directly listed in JSX (not via .map())
|
|
17
|
+
* Marks children as static so VDOM doesn't warn about missing keys
|
|
18
|
+
* @param type - Element type (string or component function)
|
|
19
|
+
* @param props - Props including children
|
|
20
|
+
* @param key - Optional key for identity tracking
|
|
21
|
+
* @returns VNode object
|
|
22
|
+
*/
|
|
23
|
+
export declare function jsxs(type: unknown, props: Record<string, unknown> | null, key?: unknown): VNodeLike;
|
|
24
|
+
//# sourceMappingURL=jsx-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAS,SAAS,EAAE,MAAM,SAAS,CAAA;AAE/C,eAAO,MAAM,QAAQ,GAAI,OAAO;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,KAAG,SAAoC,CAAA;AAuB/F;;;;;;;GAOG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,GAAG,CAAC,EAAE,OAAO,GACZ,SAAS,CA+BX;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAClB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,GAAG,CAAC,EAAE,OAAO,GACZ,SAAS,CAOX"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const Fragment = (props) => props?.children ?? null;
|
|
2
|
+
function setVNodeProp(vnode, key, value) {
|
|
3
|
+
if (Object.isExtensible(vnode)) {
|
|
4
|
+
vnode[key] = value;
|
|
5
|
+
return vnode;
|
|
6
|
+
}
|
|
7
|
+
return { ...vnode, [key]: value };
|
|
8
|
+
}
|
|
9
|
+
function jsx(type, props, key) {
|
|
10
|
+
const { children, expand, proportion, theme, ...rest } = props ?? {};
|
|
11
|
+
const vnodeProps = typeof type === "function" && theme !== void 0 ? { ...rest, theme } : rest;
|
|
12
|
+
const kids = children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children];
|
|
13
|
+
let vnode = { type, props: vnodeProps, children: kids };
|
|
14
|
+
if (key !== void 0 && key !== null) {
|
|
15
|
+
vnode = setVNodeProp(
|
|
16
|
+
vnode,
|
|
17
|
+
"__key",
|
|
18
|
+
typeof key === "string" || typeof key === "number" ? key : String(key)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
if (theme !== void 0) {
|
|
22
|
+
vnode = setVNodeProp(vnode, "__theme", theme);
|
|
23
|
+
}
|
|
24
|
+
if (expand !== void 0 || proportion !== void 0) {
|
|
25
|
+
const addConfig = {};
|
|
26
|
+
if (expand !== void 0) addConfig.expand = expand;
|
|
27
|
+
if (proportion !== void 0) addConfig.proportion = proportion;
|
|
28
|
+
vnode = setVNodeProp(vnode, "__addConfig", addConfig);
|
|
29
|
+
}
|
|
30
|
+
return vnode;
|
|
31
|
+
}
|
|
32
|
+
function jsxs(type, props, key) {
|
|
33
|
+
let vnode = jsx(type, props, key);
|
|
34
|
+
if (vnode && typeof vnode === "object" && "type" in vnode) {
|
|
35
|
+
vnode = setVNodeProp(vnode, "__staticChildren", true);
|
|
36
|
+
}
|
|
37
|
+
return vnode;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
Fragment,
|
|
41
|
+
jsx,
|
|
42
|
+
jsxs
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=jsx-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Minimal JSX runtime for the TS \"react-jsx\" automatic runtime.\n * This builds plain VNode objects consumed by our custom mount/patch.\n */\nimport type { VNode, VNodeLike } from './types'\n\nexport const Fragment = (props: { children?: VNodeLike }): VNodeLike => props?.children ?? null\n\n/**\n * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers\n * @param vnode - VNode to set property on\n * @param key - Property key\n * @param value - Value to set\n * @returns Original VNode if extensible, or shallow copy with property\n */\nfunction setVNodeProp<T extends VNode, K extends keyof VNode>(\n vnode: T,\n key: K,\n value: VNode[K]\n): T {\n if (Object.isExtensible(vnode)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(vnode as any)[key] = value\n return vnode\n }\n // VNode is frozen - create shallow copy\n return { ...vnode, [key]: value } as T\n}\n\n/**\n * JSX factory for automatic runtime (dynamic children)\n * Used by TypeScript for expressions like {items.map(...)}\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n const { children, expand, proportion, theme, ...rest } = props ?? {}\n const vnodeProps = typeof type === 'function' && theme !== undefined ? { ...rest, theme } : rest\n // Flatten children arrays deeply to support {arrayVariable} in JSX\n const kids =\n children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]\n let vnode: VNode = { type, props: vnodeProps, children: kids }\n\n // Extract key\n if (key !== undefined && key !== null) {\n vnode = setVNodeProp(\n vnode,\n '__key',\n typeof key === 'string' || typeof key === 'number' ? key : String(key)\n )\n }\n\n // Extract theme and store separately (removed from props)\n if (theme !== undefined) {\n vnode = setVNodeProp(vnode, '__theme', theme as NonNullable<VNode['__theme']>)\n }\n\n // Extract UI add() config and store separately (removed from props)\n if (expand !== undefined || proportion !== undefined) {\n const addConfig: NonNullable<VNode['__addConfig']> = {}\n if (expand !== undefined) addConfig.expand = expand as boolean\n if (proportion !== undefined) addConfig.proportion = proportion as number\n vnode = setVNodeProp(vnode, '__addConfig', addConfig)\n }\n\n return vnode\n}\n\n/**\n * JSX factory for static children arrays\n * Used by TypeScript when children are directly listed in JSX (not via .map())\n * Marks children as static so VDOM doesn't warn about missing keys\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n let vnode = jsx(type, props, key) as VNode\n // Mark as static children - no key warnings needed\n if (vnode && typeof vnode === 'object' && 'type' in vnode) {\n vnode = setVNodeProp(vnode, '__staticChildren', true)\n }\n return vnode\n}\n"],"names":[],"mappings":"AAMO,MAAM,WAAW,CAAC,UAA+C,OAAO,YAAY;AAS3F,SAAS,aACP,OACA,KACA,OACG;AACH,MAAI,OAAO,aAAa,KAAK,GAAG;AAE5B,UAAc,GAAG,IAAI;AACvB,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,MAAA;AAC5B;AAUO,SAAS,IACd,MACA,OACA,KACW;AACX,QAAM,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,KAAA,IAAS,SAAS,CAAA;AAClE,QAAM,aAAa,OAAO,SAAS,cAAc,UAAU,SAAY,EAAE,GAAG,MAAM,MAAA,IAAU;AAE5F,QAAM,OACJ,YAAY,OAAO,CAAA,IAAK,MAAM,QAAQ,QAAQ,IAAI,SAAS,KAAK,QAAQ,IAAI,CAAC,QAAQ;AACvF,MAAI,QAAe,EAAE,MAAM,OAAO,YAAY,UAAU,KAAA;AAGxD,MAAI,QAAQ,UAAa,QAAQ,MAAM;AACrC,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO,QAAQ,YAAY,OAAO,QAAQ,WAAW,MAAM,OAAO,GAAG;AAAA,IAAA;AAAA,EAEzE;AAGA,MAAI,UAAU,QAAW;AACvB,YAAQ,aAAa,OAAO,WAAW,KAAsC;AAAA,EAC/E;AAGA,MAAI,WAAW,UAAa,eAAe,QAAW;AACpD,UAAM,YAA+C,CAAA;AACrD,QAAI,WAAW,OAAW,WAAU,SAAS;AAC7C,QAAI,eAAe,OAAW,WAAU,aAAa;AACrD,YAAQ,aAAa,OAAO,eAAe,SAAS;AAAA,EACtD;AAEA,SAAO;AACT;AAWO,SAAS,KACd,MACA,OACA,KACW;AACX,MAAI,QAAQ,IAAI,MAAM,OAAO,GAAG;AAEhC,MAAI,SAAS,OAAO,UAAU,YAAY,UAAU,OAAO;AACzD,YAAQ,aAAa,OAAO,oBAAoB,IAAI;AAAA,EACtD;AACA,SAAO;AACT;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ImagePrimitivePropsComplete, NineSlicePrimitivePropsComplete, SpritePrimitivePropsComplete, TextPrimitivePropsComplete, VectorDrawContentPrimitivePropsComplete, ViewPrimitivePropsComplete } from './primitive-contracts';
|
|
2
|
+
import { VNodeLike } from './types';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace JSX {
|
|
5
|
+
type Element = VNodeLike;
|
|
6
|
+
interface ElementChildrenAttribute {
|
|
7
|
+
children: Record<string, never>;
|
|
8
|
+
}
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
/** Portable layout container */
|
|
11
|
+
view: ViewPrimitivePropsComplete;
|
|
12
|
+
/** Portable text display */
|
|
13
|
+
text: TextPrimitivePropsComplete;
|
|
14
|
+
/** Portable image/sprite */
|
|
15
|
+
image: ImagePrimitivePropsComplete;
|
|
16
|
+
/** Portable animated sprite */
|
|
17
|
+
sprite: SpritePrimitivePropsComplete;
|
|
18
|
+
/** Portable 9-slice panel (native, single-node) — requires `nineslice` capability */
|
|
19
|
+
nineslice: NineSlicePrimitivePropsComplete;
|
|
20
|
+
/** Portable imperative vector drawing content */
|
|
21
|
+
vectorDraw: VectorDrawContentPrimitivePropsComplete;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=jsx-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-types.d.ts","sourceRoot":"","sources":["../src/jsx-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACV,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4B,EAC5B,0BAA0B,EAC1B,uCAAuC,EACvC,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGxC,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,GAAG,CAAC;QACZ,KAAK,OAAO,GAAG,SAAS,CAAA;QACxB,UAAU,wBAAwB;YAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;SAChC;QACD,UAAU,iBAAiB;YACzB,gCAAgC;YAChC,IAAI,EAAE,0BAA0B,CAAA;YAChC,4BAA4B;YAC5B,IAAI,EAAE,0BAA0B,CAAA;YAChC,4BAA4B;YAC5B,KAAK,EAAE,2BAA2B,CAAA;YAClC,+BAA+B;YAC/B,MAAM,EAAE,4BAA4B,CAAA;YACpC,qFAAqF;YACrF,SAAS,EAAE,+BAA+B,CAAA;YAC1C,iDAAiD;YACjD,UAAU,EAAE,uCAAuC,CAAA;SACpD;KACF;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const devConfig = require("../../dev-config.cjs");
|
|
4
|
+
function applyContainerDimensions(container, width, height) {
|
|
5
|
+
const gameObject = container;
|
|
6
|
+
if (typeof gameObject.setSize === "function") {
|
|
7
|
+
gameObject.setSize(width, height);
|
|
8
|
+
} else {
|
|
9
|
+
gameObject.width = width;
|
|
10
|
+
gameObject.height = height;
|
|
11
|
+
}
|
|
12
|
+
gameObject.__cachedLayoutSize = { width, height };
|
|
13
|
+
if (gameObject.__getLayoutSize && !gameObject.__originalGetLayoutSize) {
|
|
14
|
+
gameObject.__originalGetLayoutSize = gameObject.__getLayoutSize;
|
|
15
|
+
gameObject.__getLayoutSize = () => gameObject.__cachedLayoutSize ?? (gameObject.__originalGetLayoutSize?.() || { width: 0, height: 0 });
|
|
16
|
+
}
|
|
17
|
+
devConfig.DebugLogger.log("layout", "Container dimensions set to:", { width, height });
|
|
18
|
+
}
|
|
19
|
+
exports.applyContainerDimensions = applyContainerDimensions;
|
|
20
|
+
//# sourceMappingURL=container-applier.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-applier.cjs","sources":["../../../src/layout/appliers/container-applier.ts"],"sourcesContent":["/**\n * Container applier — applies dimensions to a layout container.\n * Renderer-neutral — operates on LayoutContainer duck-typing.\n */\nimport { DebugLogger } from '../../dev-config'\nimport type { LayoutContainer, LayoutSize } from '../types'\n\n/**\n * Apply dimensions to container and cache them for child percentage resolution\n * @param container - Layout container\n * @param width - Container width\n * @param height - Container height\n */\nexport function applyContainerDimensions(\n container: LayoutContainer,\n width: number,\n height: number\n): void {\n const gameObject = container as LayoutContainer & {\n __cachedLayoutSize?: LayoutSize\n __originalGetLayoutSize?: () => LayoutSize\n setSize?: (width: number, height: number) => unknown\n }\n\n if (typeof gameObject.setSize === 'function') {\n gameObject.setSize(width, height)\n } else {\n gameObject.width = width\n gameObject.height = height\n }\n\n // Cache the final layout size - this allows children to query parent size\n // for percentage-based constraints even when layout is recalculated\n gameObject.__cachedLayoutSize = { width, height }\n\n // Override __getLayoutSize to return cached value if available\n // Store original implementation on first call, then always use cache\n if (gameObject.__getLayoutSize && !gameObject.__originalGetLayoutSize) {\n gameObject.__originalGetLayoutSize = gameObject.__getLayoutSize\n gameObject.__getLayoutSize = () =>\n gameObject.__cachedLayoutSize ??\n (gameObject.__originalGetLayoutSize?.() || { width: 0, height: 0 })\n }\n\n DebugLogger.log('layout', 'Container dimensions set to:', { width, height })\n}\n"],"names":["DebugLogger"],"mappings":";;;AAaO,SAAS,yBACd,WACA,OACA,QACM;AACN,QAAM,aAAa;AAMnB,MAAI,OAAO,WAAW,YAAY,YAAY;AAC5C,eAAW,QAAQ,OAAO,MAAM;AAAA,EAClC,OAAO;AACL,eAAW,QAAQ;AACnB,eAAW,SAAS;AAAA,EACtB;AAIA,aAAW,qBAAqB,EAAE,OAAO,OAAA;AAIzC,MAAI,WAAW,mBAAmB,CAAC,WAAW,yBAAyB;AACrE,eAAW,0BAA0B,WAAW;AAChD,eAAW,kBAAkB,MAC3B,WAAW,uBACV,WAAW,0BAAA,KAA+B,EAAE,OAAO,GAAG,QAAQ,EAAA;AAAA,EACnE;AAEAA,YAAAA,YAAY,IAAI,UAAU,gCAAgC,EAAE,OAAO,QAAQ;AAC7E;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LayoutContainer } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Apply dimensions to container and cache them for child percentage resolution
|
|
4
|
+
* @param container - Layout container
|
|
5
|
+
* @param width - Container width
|
|
6
|
+
* @param height - Container height
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyContainerDimensions(container: LayoutContainer, width: number, height: number): void;
|
|
9
|
+
//# sourceMappingURL=container-applier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-applier.d.ts","sourceRoot":"","sources":["../../../src/layout/appliers/container-applier.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,UAAU,CAAA;AAE3D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CA4BN"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DebugLogger } from "../../dev-config.js";
|
|
2
|
+
function applyContainerDimensions(container, width, height) {
|
|
3
|
+
const gameObject = container;
|
|
4
|
+
if (typeof gameObject.setSize === "function") {
|
|
5
|
+
gameObject.setSize(width, height);
|
|
6
|
+
} else {
|
|
7
|
+
gameObject.width = width;
|
|
8
|
+
gameObject.height = height;
|
|
9
|
+
}
|
|
10
|
+
gameObject.__cachedLayoutSize = { width, height };
|
|
11
|
+
if (gameObject.__getLayoutSize && !gameObject.__originalGetLayoutSize) {
|
|
12
|
+
gameObject.__originalGetLayoutSize = gameObject.__getLayoutSize;
|
|
13
|
+
gameObject.__getLayoutSize = () => gameObject.__cachedLayoutSize ?? (gameObject.__originalGetLayoutSize?.() || { width: 0, height: 0 });
|
|
14
|
+
}
|
|
15
|
+
DebugLogger.log("layout", "Container dimensions set to:", { width, height });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
applyContainerDimensions
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=container-applier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-applier.js","sources":["../../../src/layout/appliers/container-applier.ts"],"sourcesContent":["/**\n * Container applier — applies dimensions to a layout container.\n * Renderer-neutral — operates on LayoutContainer duck-typing.\n */\nimport { DebugLogger } from '../../dev-config'\nimport type { LayoutContainer, LayoutSize } from '../types'\n\n/**\n * Apply dimensions to container and cache them for child percentage resolution\n * @param container - Layout container\n * @param width - Container width\n * @param height - Container height\n */\nexport function applyContainerDimensions(\n container: LayoutContainer,\n width: number,\n height: number\n): void {\n const gameObject = container as LayoutContainer & {\n __cachedLayoutSize?: LayoutSize\n __originalGetLayoutSize?: () => LayoutSize\n setSize?: (width: number, height: number) => unknown\n }\n\n if (typeof gameObject.setSize === 'function') {\n gameObject.setSize(width, height)\n } else {\n gameObject.width = width\n gameObject.height = height\n }\n\n // Cache the final layout size - this allows children to query parent size\n // for percentage-based constraints even when layout is recalculated\n gameObject.__cachedLayoutSize = { width, height }\n\n // Override __getLayoutSize to return cached value if available\n // Store original implementation on first call, then always use cache\n if (gameObject.__getLayoutSize && !gameObject.__originalGetLayoutSize) {\n gameObject.__originalGetLayoutSize = gameObject.__getLayoutSize\n gameObject.__getLayoutSize = () =>\n gameObject.__cachedLayoutSize ??\n (gameObject.__originalGetLayoutSize?.() || { width: 0, height: 0 })\n }\n\n DebugLogger.log('layout', 'Container dimensions set to:', { width, height })\n}\n"],"names":[],"mappings":";AAaO,SAAS,yBACd,WACA,OACA,QACM;AACN,QAAM,aAAa;AAMnB,MAAI,OAAO,WAAW,YAAY,YAAY;AAC5C,eAAW,QAAQ,OAAO,MAAM;AAAA,EAClC,OAAO;AACL,eAAW,QAAQ;AACnB,eAAW,SAAS;AAAA,EACtB;AAIA,aAAW,qBAAqB,EAAE,OAAO,OAAA;AAIzC,MAAI,WAAW,mBAAmB,CAAC,WAAW,yBAAyB;AACrE,eAAW,0BAA0B,WAAW;AAChD,eAAW,kBAAkB,MAC3B,WAAW,uBACV,WAAW,0BAAA,KAA+B,EAAE,OAAO,GAAG,QAAQ,EAAA;AAAA,EACnE;AAEA,cAAY,IAAI,UAAU,gCAAgC,EAAE,OAAO,QAAQ;AAC7E;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const devConfig = require("../../dev-config.cjs");
|
|
4
|
+
function applyChildPositions(children, positions) {
|
|
5
|
+
for (let i = 0; i < children.length; i++) {
|
|
6
|
+
const childData = children[i];
|
|
7
|
+
const position = positions[i];
|
|
8
|
+
if (!childData || !position) continue;
|
|
9
|
+
const { child, size } = childData;
|
|
10
|
+
const { x, y } = position;
|
|
11
|
+
if ("setSize" in child && typeof child.setSize === "function") {
|
|
12
|
+
if (size.width !== child.width || size.height !== child.height) {
|
|
13
|
+
devConfig.DebugLogger.log("positioning", "Setting child", `${i} size: ${size.width}x${size.height}`);
|
|
14
|
+
child.setSize(size.width, size.height);
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
child.width = size.width;
|
|
18
|
+
child.height = size.height;
|
|
19
|
+
if ("displayWidth" in child) child.displayWidth = size.width;
|
|
20
|
+
if ("displayHeight" in child) child.displayHeight = size.height;
|
|
21
|
+
}
|
|
22
|
+
if (child.setPosition) {
|
|
23
|
+
child.__layoutPosition = { x, y };
|
|
24
|
+
child.__layoutPositionRevision = (child.__layoutPositionRevision ?? 0) + 1;
|
|
25
|
+
devConfig.DebugLogger.log("positioning", "Setting child", ` ${i} position: (${x}, ${y})`);
|
|
26
|
+
child.setPosition(x, y);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.applyChildPositions = applyChildPositions;
|
|
31
|
+
//# sourceMappingURL=position-applier.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-applier.cjs","sources":["../../../src/layout/appliers/position-applier.ts"],"sourcesContent":["/**\n * Position applier - applies calculated positions to game objects\n */\nimport { DebugLogger } from '../../dev-config'\nimport type { LayoutChild, Position } from '../types'\n\n/**\n * Apply positions to children\n * @param children - Array of layout children\n * @param positions - Calculated positions for each child\n */\nexport function applyChildPositions(children: LayoutChild[], positions: Position[]): void {\n for (let i = 0; i < children.length; i++) {\n const childData = children[i]\n const position = positions[i]\n\n if (!childData || !position) continue\n\n const { child, size } = childData\n const { x, y } = position\n\n // Apply size (resolved from layout props, including percentages)\n if ('setSize' in child && typeof child.setSize === 'function') {\n if (size.width !== child.width || size.height !== child.height) {\n DebugLogger.log('positioning', 'Setting child', `${i} size: ${size.width}x${size.height}`)\n ;(child as { setSize: (w: number, h: number) => unknown }).setSize(size.width, size.height)\n }\n } else {\n // Fallback: directly set width/height\n child.width = size.width\n child.height = size.height\n if ('displayWidth' in child) (child as { displayWidth: number }).displayWidth = size.width\n if ('displayHeight' in child) (child as { displayHeight: number }).displayHeight = size.height\n }\n\n // Apply position\n if (child.setPosition) {\n child.__layoutPosition = { x, y }\n child.__layoutPositionRevision = (child.__layoutPositionRevision ?? 0) + 1\n DebugLogger.log('positioning', 'Setting child', ` ${i} position: (${x}, ${y})`)\n child.setPosition(x, y)\n }\n }\n}\n"],"names":["DebugLogger"],"mappings":";;;AAWO,SAAS,oBAAoB,UAAyB,WAA6B;AACxF,WAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,UAAM,YAAY,SAAS,CAAC;AAC5B,UAAM,WAAW,UAAU,CAAC;AAE5B,QAAI,CAAC,aAAa,CAAC,SAAU;AAE7B,UAAM,EAAE,OAAO,KAAA,IAAS;AACxB,UAAM,EAAE,GAAG,EAAA,IAAM;AAGjB,QAAI,aAAa,SAAS,OAAO,MAAM,YAAY,YAAY;AAC7D,UAAI,KAAK,UAAU,MAAM,SAAS,KAAK,WAAW,MAAM,QAAQ;AAC9DA,kBAAAA,YAAY,IAAI,eAAe,iBAAiB,GAAG,CAAC,UAAU,KAAK,KAAK,IAAI,KAAK,MAAM,EAAE;AACvF,cAAyD,QAAQ,KAAK,OAAO,KAAK,MAAM;AAAA,MAC5F;AAAA,IACF,OAAO;AAEL,YAAM,QAAQ,KAAK;AACnB,YAAM,SAAS,KAAK;AACpB,UAAI,kBAAkB,MAAQ,OAAmC,eAAe,KAAK;AACrF,UAAI,mBAAmB,MAAQ,OAAoC,gBAAgB,KAAK;AAAA,IAC1F;AAGA,QAAI,MAAM,aAAa;AACrB,YAAM,mBAAmB,EAAE,GAAG,EAAA;AAC9B,YAAM,4BAA4B,MAAM,4BAA4B,KAAK;AACzEA,gBAAAA,YAAY,IAAI,eAAe,iBAAiB,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG;AAC9E,YAAM,YAAY,GAAG,CAAC;AAAA,IACxB;AAAA,EACF;AACF;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LayoutChild, Position } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Apply positions to children
|
|
4
|
+
* @param children - Array of layout children
|
|
5
|
+
* @param positions - Calculated positions for each child
|
|
6
|
+
*/
|
|
7
|
+
export declare function applyChildPositions(children: LayoutChild[], positions: Position[]): void;
|
|
8
|
+
//# sourceMappingURL=position-applier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-applier.d.ts","sourceRoot":"","sources":["../../../src/layout/appliers/position-applier.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAErD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,CAgCxF"}
|