@wonderlandlabs-pixi-ux/box 1.2.3 → 1.2.5
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/Box.stories.js +1 -1
- package/dist/BoxLeafStore.js +1 -1
- package/dist/BoxListStore.js +1 -1
- package/dist/BoxStore.js +2 -2
- package/dist/BoxTextStore.js +1 -1
- package/dist/BoxTree.d.ts +3 -3
- package/dist/BoxTree.js +6 -6
- package/dist/BoxTreeRenderer.js +5 -5
- package/dist/BoxUx.d.ts +9 -9
- package/dist/BoxUx.js +9 -9
- package/dist/BoxUxBase.d.ts +1 -1
- package/dist/ProductCatalog.stories.js +4 -4
- package/dist/_deprecated/Box.stories.js +1 -1
- package/dist/_deprecated/BoxLeafStore.js +1 -1
- package/dist/_deprecated/BoxListStore.js +1 -1
- package/dist/_deprecated/BoxStore.js +3 -3
- package/dist/_deprecated/BoxTextStore.js +1 -1
- package/dist/_deprecated/ProductCatalog.stories.js +5 -5
- package/dist/_deprecated/types.js +2 -2
- package/dist/boxTreeRenderers.d.ts +1 -1
- package/dist/pixiEnvironment.d.ts +1 -0
- package/dist/pixiEnvironment.js +1 -1
- package/dist/sizeUtils.d.ts +2 -2
- package/dist/types.boxtree.d.ts +1 -1
- package/dist/types.boxtree.js +3 -3
- package/dist/types.d.ts +1 -1
- package/dist/types.js +2 -2
- package/dist/utils.ux.d.ts +1 -1
- package/package.json +3 -2
- package/src/BoxTree.ts +7 -7
- package/src/BoxUx.ts +12 -12
- package/src/BoxUxBase.ts +1 -1
- package/src/boxTreeRenderers.ts +1 -1
- package/src/sizeUtils.ts +2 -2
- package/src/types.boxtree.ts +3 -3
- package/src/types.ts +2 -2
- package/src/utils.ux.ts +1 -1
- package/tsconfig.json +14 -6
package/dist/Box.stories.js
CHANGED
package/dist/BoxLeafStore.js
CHANGED
package/dist/BoxListStore.js
CHANGED
package/dist/BoxStore.js
CHANGED
|
@@ -13,8 +13,8 @@ var _BoxStore_instances, _a, _BoxStore_leafContent, _BoxStore_textDisplay, _BoxS
|
|
|
13
13
|
import { TickerForest } from '@wonderlandlabs-pixi-ux/ticker-forest';
|
|
14
14
|
import { Container, Graphics, Text, TextStyle, } from 'pixi.js';
|
|
15
15
|
import { distinctUntilChanged, map } from 'rxjs';
|
|
16
|
-
import { createBoxState } from './types';
|
|
17
|
-
import { pathToString } from './pathUtils';
|
|
16
|
+
import { createBoxState } from './types.js';
|
|
17
|
+
import { pathToString } from './pathUtils.js';
|
|
18
18
|
export class BoxStore extends TickerForest {
|
|
19
19
|
constructor(configOrParams, app, boxProps, rootProps) {
|
|
20
20
|
const params = __classPrivateFieldGet(_a, _a, "m", _BoxStore_isStoreParams).call(_a, configOrParams)
|
package/dist/BoxTextStore.js
CHANGED
package/dist/BoxTree.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Forest, type StoreParams } from '@wonderlandlabs/forestry4';
|
|
2
2
|
import type { Application } from 'pixi.js';
|
|
3
|
-
import type { BoxTreeUxStyleManagerLike } from './types.ux';
|
|
4
|
-
import { type BoxContent, type BoxTreeConfig, type BoxTreeState, type Direction, type ResolvedArea, type ResolvedRect, type StyleName } from './types.boxtree';
|
|
5
|
-
export * from './types.boxtree';
|
|
3
|
+
import type { BoxTreeUxStyleManagerLike } from './types.ux.js';
|
|
4
|
+
import { type BoxContent, type BoxTreeConfig, type BoxTreeState, type Direction, type ResolvedArea, type ResolvedRect, type StyleName } from './types.boxtree.js';
|
|
5
|
+
export * from './types.boxtree.js';
|
|
6
6
|
type StyleQueryLike = {
|
|
7
7
|
nouns: string[];
|
|
8
8
|
states: string[];
|
package/dist/BoxTree.js
CHANGED
|
@@ -13,12 +13,12 @@ var _BoxTree_instances, _BoxTree_uxMapFn, _BoxTree_uxApplyToChildren, _BoxTree_u
|
|
|
13
13
|
import { Forest } from '@wonderlandlabs/forestry4';
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
import { distinctUntilChanged, map, skip } from 'rxjs';
|
|
16
|
-
import { AxisConstraintSchema, PxValueSchema } from './types';
|
|
17
|
-
import { applyAxisConstraints, resolveConstraintValuePx, resolveMeasurement } from './sizeUtils';
|
|
18
|
-
import { pathToString } from './pathUtils';
|
|
19
|
-
import { BoxUxPixi } from './BoxUx';
|
|
20
|
-
import { AlignInputSchema, AreaPivotInputSchema, BoxContentSchema, BoxAlignSchema, BoxAreaSchema, BoxTreeNodeConfigSchema, BoxTreeNodeStateSchema, BoxTreeStateSchema, } from './types.boxtree';
|
|
21
|
-
export * from './types.boxtree';
|
|
16
|
+
import { AxisConstraintSchema, PxValueSchema } from './types.js';
|
|
17
|
+
import { applyAxisConstraints, resolveConstraintValuePx, resolveMeasurement } from './sizeUtils.js';
|
|
18
|
+
import { pathToString } from './pathUtils.js';
|
|
19
|
+
import { BoxUxPixi } from './BoxUx.js';
|
|
20
|
+
import { AlignInputSchema, AreaPivotInputSchema, BoxContentSchema, BoxAlignSchema, BoxAreaSchema, BoxTreeNodeConfigSchema, BoxTreeNodeStateSchema, BoxTreeStateSchema, } from './types.boxtree.js';
|
|
21
|
+
export * from './types.boxtree.js';
|
|
22
22
|
const DEFAULT_BOX_UX_MAP_FN = (box) => new BoxUxPixi(box);
|
|
23
23
|
function zodMessage(error) {
|
|
24
24
|
if (error instanceof z.ZodError) {
|
package/dist/BoxTreeRenderer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import './pixiEnvironment';
|
|
1
|
+
import './pixiEnvironment.js';
|
|
2
2
|
import { Container, Graphics } from 'pixi.js';
|
|
3
3
|
import { distinctUntilChanged, map } from 'rxjs';
|
|
4
|
-
import { BOX_RENDER_CONTENT_ORDER, BoxRenderContentMap } from './BoxRenderContentMap';
|
|
5
|
-
import { BACKGROUND_CONTAINER, CHILD_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './boxTreeUx.constants';
|
|
6
|
-
import { asColorNumber, asNonNegativeNumber, isBoxTreeUxConfig, styleMapEquals, } from './boxTreeUx.utils';
|
|
4
|
+
import { BOX_RENDER_CONTENT_ORDER, BoxRenderContentMap } from './BoxRenderContentMap.js';
|
|
5
|
+
import { BACKGROUND_CONTAINER, CHILD_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './boxTreeUx.constants.js';
|
|
6
|
+
import { asColorNumber, asNonNegativeNumber, isBoxTreeUxConfig, styleMapEquals, } from './boxTreeUx.utils.js';
|
|
7
7
|
export { BOX_RENDER_CONTENT_ORDER };
|
|
8
|
-
export { BACKGROUND_CONTAINER, CHILD_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './boxTreeUx.constants';
|
|
8
|
+
export { BACKGROUND_CONTAINER, CHILD_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './boxTreeUx.constants.js';
|
|
9
9
|
function isBoxTreeUx(value) {
|
|
10
10
|
if (!value || typeof value !== 'object') {
|
|
11
11
|
return false;
|
package/dist/BoxUx.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import './pixiEnvironment';
|
|
1
|
+
import './pixiEnvironment.js';
|
|
2
2
|
import type { Application } from 'pixi.js';
|
|
3
3
|
import { Container, Graphics } from 'pixi.js';
|
|
4
|
-
import type { BoxRenderer, BoxTree } from './BoxTree';
|
|
5
|
-
import { BoxUxBase } from './BoxUxBase';
|
|
6
|
-
import { MapEnhanced } from './BoxUxContextMap';
|
|
7
|
-
import type { BoxTreeStyleMap, BoxTreeUxStyleManagerLike } from './types.ux';
|
|
8
|
-
export { BOX_UX_CONTENT_ORDER, BOX_UX_ORDER, BOX_UX_LAYER, BOX_RENDER_CONTENT_ORDER, getUxOrder, setUxOrder, } from './constants';
|
|
9
|
-
export { BACKGROUND_CONTAINER, BOX_UX_ENV, CHILD_CONTAINER, CONTENT_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './constants.ux';
|
|
10
|
-
export type { BoxTreeFillStyle, BoxTreeStrokeStyle, BoxTreeStyleMap, BoxTreeUxStyleManagerLike, } from './types.ux';
|
|
11
|
-
export { BoxUxBase } from './BoxUxBase';
|
|
4
|
+
import type { BoxRenderer, BoxTree } from './BoxTree.js';
|
|
5
|
+
import { BoxUxBase } from './BoxUxBase.js';
|
|
6
|
+
import { MapEnhanced } from './BoxUxContextMap.js';
|
|
7
|
+
import type { BoxTreeStyleMap, BoxTreeUxStyleManagerLike } from './types.ux.js';
|
|
8
|
+
export { BOX_UX_CONTENT_ORDER, BOX_UX_ORDER, BOX_UX_LAYER, BOX_RENDER_CONTENT_ORDER, getUxOrder, setUxOrder, } from './constants.js';
|
|
9
|
+
export { BACKGROUND_CONTAINER, BOX_UX_ENV, CHILD_CONTAINER, CONTENT_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './constants.ux.js';
|
|
10
|
+
export type { BoxTreeFillStyle, BoxTreeStrokeStyle, BoxTreeStyleMap, BoxTreeUxStyleManagerLike, } from './types.ux.js';
|
|
11
|
+
export { BoxUxBase } from './BoxUxBase.js';
|
|
12
12
|
/**
|
|
13
13
|
* Default BoxTree UX implementation for Pixi containers.
|
|
14
14
|
*
|
package/dist/BoxUx.js
CHANGED
|
@@ -10,16 +10,16 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
12
|
var _BoxUxPixi_instances, _BoxUxPixi_managedContentNode, _BoxUxPixi_managedContentKey, _BoxUxPixi_strokeGraphic, _BoxUxPixi_requireGraphicsLayer, _BoxUxPixi_requireContainerLayer, _BoxUxPixi_syncChildren, _BoxUxPixi_isRenderableContent, _BoxUxPixi_isContentEmpty, _BoxUxPixi_renderContentMap, _BoxUxPixi_clearManagedContent, _BoxUxPixi_syncNodeContent, _BoxUxPixi_renderBackground, _BoxUxPixi_destroyContent;
|
|
13
|
-
import './pixiEnvironment';
|
|
13
|
+
import './pixiEnvironment.js';
|
|
14
14
|
import { Container, Graphics, Sprite, Text, TextStyle } from 'pixi.js';
|
|
15
|
-
import { BoxUxBase } from './BoxUxBase';
|
|
16
|
-
import { MapEnhanced } from './BoxUxContextMap';
|
|
17
|
-
import { BOX_RENDER_CONTENT_ORDER, BOX_UX_LAYER, } from './constants';
|
|
18
|
-
import { BACKGROUND_CONTAINER, BOX_UX_ENV, CHILD_CONTAINER, CONTENT_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './constants.ux';
|
|
19
|
-
import { asColorNumber, asNonNegativeNumber, resolveStyleProp } from './utils.ux';
|
|
20
|
-
export { BOX_UX_CONTENT_ORDER, BOX_UX_ORDER, BOX_UX_LAYER, BOX_RENDER_CONTENT_ORDER, getUxOrder, setUxOrder, } from './constants';
|
|
21
|
-
export { BACKGROUND_CONTAINER, BOX_UX_ENV, CHILD_CONTAINER, CONTENT_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './constants.ux';
|
|
22
|
-
export { BoxUxBase } from './BoxUxBase';
|
|
15
|
+
import { BoxUxBase } from './BoxUxBase.js';
|
|
16
|
+
import { MapEnhanced } from './BoxUxContextMap.js';
|
|
17
|
+
import { BOX_RENDER_CONTENT_ORDER, BOX_UX_LAYER, } from './constants.js';
|
|
18
|
+
import { BACKGROUND_CONTAINER, BOX_UX_ENV, CHILD_CONTAINER, CONTENT_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './constants.ux.js';
|
|
19
|
+
import { asColorNumber, asNonNegativeNumber, resolveStyleProp } from './utils.ux.js';
|
|
20
|
+
export { BOX_UX_CONTENT_ORDER, BOX_UX_ORDER, BOX_UX_LAYER, BOX_RENDER_CONTENT_ORDER, getUxOrder, setUxOrder, } from './constants.js';
|
|
21
|
+
export { BACKGROUND_CONTAINER, BOX_UX_ENV, CHILD_CONTAINER, CONTENT_CONTAINER, OVERLAY_CONTAINER, ROOT_CONTAINER, STROKE_CONTAINER, } from './constants.ux.js';
|
|
22
|
+
export { BoxUxBase } from './BoxUxBase.js';
|
|
23
23
|
function isBoxUxPixi(value) {
|
|
24
24
|
if (!value || typeof value !== 'object') {
|
|
25
25
|
return false;
|
package/dist/BoxUxBase.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Application, Assets, Graphics, Sprite } from 'pixi.js';
|
|
2
|
-
import { BoxListStore } from './BoxListStore';
|
|
3
|
-
import { BoxLeafStore } from './BoxLeafStore';
|
|
4
|
-
import { BoxTextStore } from './BoxTextStore';
|
|
5
|
-
import { uniformPadding } from './types';
|
|
2
|
+
import { BoxListStore } from './BoxListStore.js';
|
|
3
|
+
import { BoxLeafStore } from './BoxLeafStore.js';
|
|
4
|
+
import { BoxTextStore } from './BoxTextStore.js';
|
|
5
|
+
import { uniformPadding } from './types.js';
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Box/ProductCatalog',
|
|
8
8
|
argTypes: {
|
|
@@ -13,9 +13,9 @@ var _BoxStore_instances, _a, _BoxStore_leafContent, _BoxStore_textDisplay, _BoxS
|
|
|
13
13
|
import { TickerForest } from '@wonderlandlabs-pixi-ux/ticker-forest/dist/TickerForest';
|
|
14
14
|
import { Container, Graphics, Text, TextStyle, } from 'pixi.js';
|
|
15
15
|
import { distinctUntilChanged, map } from 'rxjs';
|
|
16
|
-
import { createBoxState } from './types';
|
|
17
|
-
import { SIZE_MODE } from '../constants';
|
|
18
|
-
import { pathToString } from '../pathUtils';
|
|
16
|
+
import { createBoxState } from './types.js';
|
|
17
|
+
import { SIZE_MODE } from '../constants.js';
|
|
18
|
+
import { pathToString } from '../pathUtils.js';
|
|
19
19
|
export class BoxStore extends TickerForest {
|
|
20
20
|
constructor(configOrParams, app, boxProps, rootProps) {
|
|
21
21
|
const params = __classPrivateFieldGet(_a, _a, "m", _BoxStore_isStoreParams).call(_a, configOrParams)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Application, Assets, Graphics, Sprite } from 'pixi.js';
|
|
2
|
-
import { BoxListStore } from './BoxListStore';
|
|
3
|
-
import { BoxLeafStore } from './BoxLeafStore';
|
|
4
|
-
import { BoxTextStore } from './BoxTextStore';
|
|
5
|
-
import { uniformPadding } from './types';
|
|
6
|
-
import { SIZE_MODE_INPUT } from '../constants';
|
|
2
|
+
import { BoxListStore } from './BoxListStore.js';
|
|
3
|
+
import { BoxLeafStore } from './BoxLeafStore.js';
|
|
4
|
+
import { BoxTextStore } from './BoxTextStore.js';
|
|
5
|
+
import { uniformPadding } from './types.js';
|
|
6
|
+
import { SIZE_MODE_INPUT } from '../constants.js';
|
|
7
7
|
const meta = {
|
|
8
8
|
title: 'Box/ProductCatalog',
|
|
9
9
|
argTypes: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SIZE_MODE, SIZE_MODE_INPUT } from '../constants';
|
|
3
|
-
import { dictToStringArray } from '../enumUtils';
|
|
2
|
+
import { SIZE_MODE, SIZE_MODE_INPUT } from '../constants.js';
|
|
3
|
+
import { dictToStringArray } from '../enumUtils.js';
|
|
4
4
|
// ==================== Size Mode ====================
|
|
5
5
|
export const SizeModeInputSchema = z.enum(dictToStringArray(SIZE_MODE_INPUT));
|
|
6
6
|
export const SizeModeSchema = z.enum(dictToStringArray(SIZE_MODE));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/pixiEnvironment.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Pixi touches `navigator` at module init time; provide a minimal shim in non-browser runtimes.
|
|
3
2
|
if (typeof globalThis.navigator === 'undefined') {
|
|
4
3
|
Object.defineProperty(globalThis, 'navigator', {
|
|
@@ -7,3 +6,4 @@ if (typeof globalThis.navigator === 'undefined') {
|
|
|
7
6
|
writable: true,
|
|
8
7
|
});
|
|
9
8
|
}
|
|
9
|
+
export {};
|
package/dist/sizeUtils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AXIS } from './constants';
|
|
2
|
-
import type { AxisConstraintLike, Measurement } from './types';
|
|
1
|
+
import { AXIS } from './constants.js';
|
|
2
|
+
import type { AxisConstraintLike, Measurement } from './types.js';
|
|
3
3
|
type AxisValue = (typeof AXIS)[keyof typeof AXIS];
|
|
4
4
|
export type ResolveMeasurementOptions = {
|
|
5
5
|
axis?: AxisValue;
|
package/dist/types.boxtree.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type AxisConstraintLike, type Measurement } from './types';
|
|
2
|
+
import { type AxisConstraintLike, type Measurement } from './types.js';
|
|
3
3
|
export type BoxStyle = Record<string, unknown>;
|
|
4
4
|
export declare const AxisSchema: z.ZodEnum<{
|
|
5
5
|
x: "x";
|
package/dist/types.boxtree.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ALIGN_ENUM_ALIASES, ALIGN_ENUM_KEYWORDS, AXIS } from './constants';
|
|
3
|
-
import { dictToStringArray } from './enumUtils';
|
|
4
|
-
import { AxisConstraintSchema, MeasurementSchema, } from './types';
|
|
2
|
+
import { ALIGN_ENUM_ALIASES, ALIGN_ENUM_KEYWORDS, AXIS } from './constants.js';
|
|
3
|
+
import { dictToStringArray } from './enumUtils.js';
|
|
4
|
+
import { AxisConstraintSchema, MeasurementSchema, } from './types.js';
|
|
5
5
|
export const AxisSchema = z.enum(dictToStringArray(AXIS));
|
|
6
6
|
export const DirectionSchema = z.enum(['row', 'column']);
|
|
7
7
|
export const BoxContentTypeSchema = z.enum(['text', 'url', 'image']);
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ALIGN, UNIT_BASIS } from './constants';
|
|
2
|
+
import { ALIGN, UNIT_BASIS } from './constants.js';
|
|
3
3
|
export type AlignLabel = keyof typeof ALIGN;
|
|
4
4
|
export type MeasurementModeLabel = keyof typeof UNIT_BASIS;
|
|
5
5
|
export declare const SizeModeSchema: z.ZodEnum<{
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { MEASUREMENT_ENUM_CANONICAL, MEASUREMENT_ENUM_INPUT, UNIT_BASIS, } from './constants';
|
|
3
|
-
import { dictToStringArray } from './enumUtils';
|
|
2
|
+
import { MEASUREMENT_ENUM_CANONICAL, MEASUREMENT_ENUM_INPUT, UNIT_BASIS, } from './constants.js';
|
|
3
|
+
import { dictToStringArray } from './enumUtils.js';
|
|
4
4
|
export const SizeModeSchema = z.enum(dictToStringArray(MEASUREMENT_ENUM_CANONICAL));
|
|
5
5
|
export const FractionalMeasurementModeSchema = z.literal(MEASUREMENT_ENUM_INPUT.FRACTION);
|
|
6
6
|
export const MeasurementInputModeSchema = z.enum(dictToStringArray(MEASUREMENT_ENUM_INPUT));
|
package/dist/utils.ux.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BoxTreeStyleMap, BoxTreeUxStyleManagerLike } from './types.ux';
|
|
1
|
+
import type { BoxTreeStyleMap, BoxTreeUxStyleManagerLike } from './types.ux.js';
|
|
2
2
|
export declare function asColorNumber(value: unknown): number | undefined;
|
|
3
3
|
export declare function asNonNegativeNumber(value: unknown): number | undefined;
|
|
4
4
|
export declare function styleMapEquals(a: BoxTreeStyleMap, b: BoxTreeStyleMap): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderlandlabs-pixi-ux/box",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Box component with size, padding, anchor, and content alignment for wonderlandlabs-pixi-ux",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,5 +33,6 @@
|
|
|
33
33
|
"type": "git",
|
|
34
34
|
"url": "git+https://github.com/wonderlandlabs-pixi-ux/wonderlandlabs-pixi-ux.git",
|
|
35
35
|
"directory": "packages/box"
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"type": "module"
|
|
37
38
|
}
|
package/src/BoxTree.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { Forest, type StoreParams } from '@wonderlandlabs/forestry4';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import type { Application, Ticker } from 'pixi.js';
|
|
4
4
|
import { distinctUntilChanged, map, skip, type Subscription } from 'rxjs';
|
|
5
|
-
import { AxisConstraintSchema, PxValueSchema, type PxValue } from './types';
|
|
6
|
-
import { applyAxisConstraints, resolveConstraintValuePx, resolveMeasurement } from './sizeUtils';
|
|
7
|
-
import { pathToString } from './pathUtils';
|
|
8
|
-
import { BoxUxPixi } from './BoxUx';
|
|
9
|
-
import type { BoxTreeUxStyleManagerLike } from './types.ux';
|
|
5
|
+
import { AxisConstraintSchema, PxValueSchema, type PxValue } from './types.js';
|
|
6
|
+
import { applyAxisConstraints, resolveConstraintValuePx, resolveMeasurement } from './sizeUtils.js';
|
|
7
|
+
import { pathToString } from './pathUtils.js';
|
|
8
|
+
import { BoxUxPixi } from './BoxUx.js';
|
|
9
|
+
import type { BoxTreeUxStyleManagerLike } from './types.ux.js';
|
|
10
10
|
import {
|
|
11
11
|
AlignInputSchema,
|
|
12
12
|
AreaPivotInputSchema,
|
|
@@ -29,9 +29,9 @@ import {
|
|
|
29
29
|
type ResolvedArea,
|
|
30
30
|
type ResolvedRect,
|
|
31
31
|
type StyleName,
|
|
32
|
-
} from './types.boxtree';
|
|
32
|
+
} from './types.boxtree.js';
|
|
33
33
|
|
|
34
|
-
export * from './types.boxtree';
|
|
34
|
+
export * from './types.boxtree.js';
|
|
35
35
|
|
|
36
36
|
type StyleQueryLike = {
|
|
37
37
|
nouns: string[];
|
package/src/BoxUx.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import './pixiEnvironment';
|
|
1
|
+
import './pixiEnvironment.js';
|
|
2
2
|
import type { Application } from 'pixi.js';
|
|
3
3
|
import { Container, Graphics, Sprite, Text, TextStyle } from 'pixi.js';
|
|
4
|
-
import type { BoxRenderer, BoxTree } from './BoxTree';
|
|
5
|
-
import { BoxUxBase } from './BoxUxBase';
|
|
6
|
-
import { MapEnhanced } from './BoxUxContextMap';
|
|
4
|
+
import type { BoxRenderer, BoxTree } from './BoxTree.js';
|
|
5
|
+
import { BoxUxBase } from './BoxUxBase.js';
|
|
6
|
+
import { MapEnhanced } from './BoxUxContextMap.js';
|
|
7
7
|
import {
|
|
8
8
|
BOX_RENDER_CONTENT_ORDER,
|
|
9
9
|
BOX_UX_CONTENT_ORDER,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
BOX_UX_ORDER,
|
|
12
12
|
getUxOrder,
|
|
13
13
|
setUxOrder,
|
|
14
|
-
} from './constants';
|
|
14
|
+
} from './constants.js';
|
|
15
15
|
import {
|
|
16
16
|
BACKGROUND_CONTAINER,
|
|
17
17
|
BOX_UX_ENV,
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
OVERLAY_CONTAINER,
|
|
21
21
|
ROOT_CONTAINER,
|
|
22
22
|
STROKE_CONTAINER,
|
|
23
|
-
} from './constants.ux';
|
|
24
|
-
import { asColorNumber, asNonNegativeNumber, resolveStyleProp } from './utils.ux';
|
|
23
|
+
} from './constants.ux.js';
|
|
24
|
+
import { asColorNumber, asNonNegativeNumber, resolveStyleProp } from './utils.ux.js';
|
|
25
25
|
import type {
|
|
26
26
|
BoxTreeStyleMap,
|
|
27
27
|
BoxTreeUxStyleManagerLike,
|
|
28
|
-
} from './types.ux';
|
|
28
|
+
} from './types.ux.js';
|
|
29
29
|
|
|
30
30
|
export {
|
|
31
31
|
BOX_UX_CONTENT_ORDER,
|
|
@@ -34,7 +34,7 @@ export {
|
|
|
34
34
|
BOX_RENDER_CONTENT_ORDER,
|
|
35
35
|
getUxOrder,
|
|
36
36
|
setUxOrder,
|
|
37
|
-
} from './constants';
|
|
37
|
+
} from './constants.js';
|
|
38
38
|
export {
|
|
39
39
|
BACKGROUND_CONTAINER,
|
|
40
40
|
BOX_UX_ENV,
|
|
@@ -43,14 +43,14 @@ export {
|
|
|
43
43
|
OVERLAY_CONTAINER,
|
|
44
44
|
ROOT_CONTAINER,
|
|
45
45
|
STROKE_CONTAINER,
|
|
46
|
-
} from './constants.ux';
|
|
46
|
+
} from './constants.ux.js';
|
|
47
47
|
export type {
|
|
48
48
|
BoxTreeFillStyle,
|
|
49
49
|
BoxTreeStrokeStyle,
|
|
50
50
|
BoxTreeStyleMap,
|
|
51
51
|
BoxTreeUxStyleManagerLike,
|
|
52
|
-
} from './types.ux';
|
|
53
|
-
export { BoxUxBase } from './BoxUxBase';
|
|
52
|
+
} from './types.ux.js';
|
|
53
|
+
export { BoxUxBase } from './BoxUxBase.js';
|
|
54
54
|
|
|
55
55
|
function isBoxUxPixi(value: unknown): value is BoxUxPixi {
|
|
56
56
|
if (!value || typeof value !== 'object') {
|
package/src/BoxUxBase.ts
CHANGED
package/src/boxTreeRenderers.ts
CHANGED
package/src/sizeUtils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AXIS } from './constants';
|
|
2
|
-
import type { AxisConstraintLike, Measurement } from './types';
|
|
1
|
+
import { AXIS } from './constants.js';
|
|
2
|
+
import type { AxisConstraintLike, Measurement } from './types.js';
|
|
3
3
|
|
|
4
4
|
type AxisValue = (typeof AXIS)[keyof typeof AXIS];
|
|
5
5
|
|
package/src/types.boxtree.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ALIGN_ENUM_ALIASES, ALIGN_ENUM_KEYWORDS, AXIS } from './constants';
|
|
3
|
-
import { dictToStringArray } from './enumUtils';
|
|
2
|
+
import { ALIGN_ENUM_ALIASES, ALIGN_ENUM_KEYWORDS, AXIS } from './constants.js';
|
|
3
|
+
import { dictToStringArray } from './enumUtils.js';
|
|
4
4
|
import {
|
|
5
5
|
AxisConstraintSchema,
|
|
6
6
|
MeasurementSchema,
|
|
7
7
|
type AxisConstraintLike,
|
|
8
8
|
type Measurement,
|
|
9
|
-
} from './types';
|
|
9
|
+
} from './types.js';
|
|
10
10
|
|
|
11
11
|
export type BoxStyle = Record<string, unknown>;
|
|
12
12
|
|
package/src/types.ts
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
MEASUREMENT_ENUM_CANONICAL,
|
|
5
5
|
MEASUREMENT_ENUM_INPUT,
|
|
6
6
|
UNIT_BASIS,
|
|
7
|
-
} from './constants';
|
|
8
|
-
import { dictToStringArray } from './enumUtils';
|
|
7
|
+
} from './constants.js';
|
|
8
|
+
import { dictToStringArray } from './enumUtils.js';
|
|
9
9
|
|
|
10
10
|
export type AlignLabel = keyof typeof ALIGN;
|
|
11
11
|
export type MeasurementModeLabel = keyof typeof UNIT_BASIS;
|
package/src/utils.ux.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ES2020",
|
|
4
|
-
"module": "
|
|
5
|
-
"lib": [
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2020",
|
|
7
|
+
"DOM",
|
|
8
|
+
"DOM.Iterable"
|
|
9
|
+
],
|
|
6
10
|
"declaration": true,
|
|
7
11
|
"outDir": "./dist",
|
|
8
12
|
"rootDir": "./src",
|
|
9
13
|
"strict": true,
|
|
10
|
-
"moduleResolution": "
|
|
14
|
+
"moduleResolution": "NodeNext",
|
|
11
15
|
"esModuleInterop": true,
|
|
12
16
|
"skipLibCheck": true,
|
|
13
17
|
"forceConsistentCasingInFileNames": true,
|
|
14
18
|
"resolveJsonModule": true
|
|
15
19
|
},
|
|
16
|
-
"include": [
|
|
17
|
-
|
|
20
|
+
"include": [
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"exclude": [
|
|
24
|
+
"node_modules",
|
|
25
|
+
"dist"
|
|
26
|
+
]
|
|
18
27
|
}
|
|
19
|
-
|