canvasengine 2.0.0-beta.42 → 2.0.0-beta.44
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/{DebugRenderer-BosXI2Pd.js → DebugRenderer-P5sZ-0Tq.js} +2 -2
- package/dist/{DebugRenderer-BosXI2Pd.js.map → DebugRenderer-P5sZ-0Tq.js.map} +1 -1
- package/dist/components/Button.d.ts +3 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Canvas.d.ts +0 -1
- package/dist/components/DOMElement.d.ts +0 -1
- package/dist/components/DOMElement.d.ts.map +1 -1
- package/dist/components/Graphic.d.ts +1 -2
- package/dist/components/Graphic.d.ts.map +1 -1
- package/dist/components/NineSliceSprite.d.ts +0 -1
- package/dist/components/ParticleEmitter.d.ts +0 -1
- package/dist/components/Text.d.ts +0 -1
- package/dist/components/TilingSprite.d.ts +0 -1
- package/dist/components/Video.d.ts +0 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/types/DisplayObject.d.ts +12 -16
- package/dist/components/types/DisplayObject.d.ts.map +1 -1
- package/dist/components/types/index.d.ts +0 -1
- package/dist/directives/Controls.d.ts +0 -1
- package/dist/directives/Drag.d.ts +0 -1
- package/dist/directives/Flash.d.ts +0 -1
- package/dist/directives/FocusNavigation.d.ts +70 -0
- package/dist/directives/FocusNavigation.d.ts.map +1 -0
- package/dist/directives/GamepadControls.d.ts +0 -1
- package/dist/directives/JoystickControls.d.ts +0 -1
- package/dist/directives/KeyboardControls.d.ts +0 -1
- package/dist/directives/KeyboardControls.d.ts.map +1 -1
- package/dist/directives/Scheduler.d.ts +0 -1
- package/dist/directives/Shake.d.ts +0 -1
- package/dist/directives/Sound.d.ts +0 -1
- package/dist/directives/Transition.d.ts +0 -1
- package/dist/directives/ViewportCull.d.ts +0 -1
- package/dist/directives/ViewportFollow.d.ts +0 -1
- package/dist/directives/ViewportFollow.d.ts.map +1 -1
- package/dist/engine/FocusManager.d.ts +173 -0
- package/dist/engine/FocusManager.d.ts.map +1 -0
- package/dist/engine/animation.d.ts +0 -1
- package/dist/engine/bootstrap.d.ts +0 -1
- package/dist/engine/directive.d.ts +0 -1
- package/dist/engine/reactive.d.ts +0 -1
- package/dist/engine/reactive.d.ts.map +1 -1
- package/dist/engine/signal.d.ts +0 -1
- package/dist/engine/utils.d.ts +0 -1
- package/dist/hooks/useFocus.d.ts +60 -0
- package/dist/hooks/useFocus.d.ts.map +1 -0
- package/dist/hooks/useRef.d.ts +0 -1
- package/dist/{index-DNwqVzaq.js → index-VPoz4ufu.js} +6792 -6117
- package/dist/index-VPoz4ufu.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.global.js +4 -28
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +67 -61
- package/dist/utils/RadialGradient.d.ts +0 -1
- package/package.json +4 -4
- package/src/components/Button.ts +7 -4
- package/src/components/Canvas.ts +1 -1
- package/src/components/DOMContainer.ts +27 -2
- package/src/components/DOMElement.ts +37 -29
- package/src/components/DisplayObject.ts +15 -3
- package/src/components/FocusContainer.ts +372 -0
- package/src/components/Graphic.ts +43 -48
- package/src/components/Sprite.ts +4 -2
- package/src/components/Viewport.ts +65 -26
- package/src/components/index.ts +2 -1
- package/src/components/types/DisplayObject.ts +7 -4
- package/src/directives/Controls.ts +1 -1
- package/src/directives/ControlsBase.ts +1 -1
- package/src/directives/FocusNavigation.ts +251 -0
- package/src/directives/KeyboardControls.ts +12 -8
- package/src/directives/ViewportFollow.ts +8 -5
- package/src/engine/FocusManager.ts +495 -0
- package/src/engine/reactive.ts +20 -19
- package/src/hooks/useFocus.ts +94 -0
- package/src/index.ts +2 -0
- package/dist/index-DNwqVzaq.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bounds as F, Rectangle as C, Container as M, Graphics as x, BigPool as b } from "pixi.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as p, F as _ } from "./index-VPoz4ufu.js";
|
|
3
3
|
var l = /* @__PURE__ */ ((e) => (e.Margin = "margin", e.Padding = "padding", e.Border = "border", e.Flex = "flex", e.Content = "content", e))(l || {});
|
|
4
4
|
function w(e, t) {
|
|
5
5
|
const r = `getComputed${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
@@ -169,4 +169,4 @@ class y {
|
|
|
169
169
|
export {
|
|
170
170
|
y as DebugRenderer
|
|
171
171
|
};
|
|
172
|
-
//# sourceMappingURL=DebugRenderer-
|
|
172
|
+
//# sourceMappingURL=DebugRenderer-P5sZ-0Tq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebugRenderer-BosXI2Pd.js","sources":["../../../node_modules/.pnpm/@pixi+layout@3.0.2_@types+react@19.1.3_pixi.js@8.9.2_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/core/debug/calculateDebugRegions.mjs","../../../node_modules/.pnpm/@pixi+layout@3.0.2_@types+react@19.1.3_pixi.js@8.9.2_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/core/debug/DebugNode.mjs","../../../node_modules/.pnpm/@pixi+layout@3.0.2_@types+react@19.1.3_pixi.js@8.9.2_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/core/debug/DebugRenderer.mjs"],"sourcesContent":["import { Bounds, Rectangle } from \"pixi.js\";\nimport { Edge, FlexDirection } from \"yoga-layout/load\";\nvar DebugRegionType = /* @__PURE__ */ ((DebugRegionType2) => {\n DebugRegionType2[\"Margin\"] = \"margin\";\n DebugRegionType2[\"Padding\"] = \"padding\";\n DebugRegionType2[\"Border\"] = \"border\";\n DebugRegionType2[\"Flex\"] = \"flex\";\n DebugRegionType2[\"Content\"] = \"content\";\n return DebugRegionType2;\n})(DebugRegionType || {});\nfunction getEdgeValues(layout, type) {\n const method = `getComputed${type.charAt(0).toUpperCase() + type.slice(1)}`;\n return {\n top: layout.yoga[method](Edge.Top),\n right: layout.yoga[method](Edge.Right),\n bottom: layout.yoga[method](Edge.Bottom),\n left: layout.yoga[method](Edge.Left)\n };\n}\nfunction calculateRegions(layout, regions) {\n const { width, height } = layout.computedLayout;\n const margin = getEdgeValues(layout, \"margin\");\n const border = getEdgeValues(layout, \"border\");\n const padding = getEdgeValues(layout, \"padding\");\n const marginRegion = regions.get(\n \"margin\"\n /* Margin */\n );\n marginRegion.outer.x = -margin.left;\n marginRegion.outer.y = -margin.top;\n marginRegion.outer.width = width + margin.left + margin.right;\n marginRegion.outer.height = height + margin.top + margin.bottom;\n marginRegion.inner.x = 0;\n marginRegion.inner.y = 0;\n marginRegion.inner.width = width;\n marginRegion.inner.height = height;\n const borderRegion = regions.get(\n \"border\"\n /* Border */\n );\n borderRegion.outer.x = 0;\n borderRegion.outer.y = 0;\n borderRegion.outer.width = width;\n borderRegion.outer.height = height;\n borderRegion.inner.x = border.left;\n borderRegion.inner.y = border.top;\n borderRegion.inner.width = width - border.left - border.right;\n borderRegion.inner.height = height - border.top - border.bottom;\n const paddingRegion = regions.get(\n \"padding\"\n /* Padding */\n );\n paddingRegion.outer.copyFrom(borderRegion.inner);\n paddingRegion.inner.x = padding.left + border.left;\n paddingRegion.inner.y = padding.top + border.top;\n paddingRegion.inner.width = width - padding.left - padding.right - border.left - border.right;\n paddingRegion.inner.height = height - padding.top - padding.bottom - border.top - border.bottom;\n calculateFlexRegion(layout, regions);\n}\nfunction calculateFlexRegion(layout, regions) {\n var _a;\n const flexRegion = regions.get(\n \"flex\"\n /* Flex */\n );\n const paddingRegion = regions.get(\n \"padding\"\n /* Padding */\n );\n flexRegion.outer.copyFrom(paddingRegion.inner);\n const bounds = new Bounds();\n const children = layout.yoga.getChildCount();\n for (let i = 0; i < children; i++) {\n const child = layout.yoga.getChild(i);\n const computedBounds = child.getComputedLayout();\n bounds.addRect(\n new Rectangle(computedBounds.left, computedBounds.top, computedBounds.width, computedBounds.height)\n );\n }\n const flexDir = layout.yoga.getFlexDirection();\n if (flexDir === FlexDirection.Column || flexDir === FlexDirection.ColumnReverse) {\n bounds.width = flexRegion.outer.width;\n bounds.x = flexRegion.outer.x;\n } else {\n bounds.height = flexRegion.outer.height;\n bounds.y = flexRegion.outer.y;\n }\n (_a = flexRegion.inner) == null ? void 0 : _a.copyFrom(bounds.rectangle);\n regions.get(\n \"content\"\n /* Content */\n ).outer.copyFrom(bounds.rectangle);\n}\nexport {\n DebugRegionType,\n calculateRegions\n};\n//# sourceMappingURL=calculateDebugRegions.mjs.map\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nimport { Container, Graphics as Graphics$1 } from \"pixi.js\";\nimport { DebugRegionType } from \"./calculateDebugRegions.mjs\";\nfunction lerpColor(start, end, t) {\n const r = Math.round(start[0] + (end[0] - start[0]) * t);\n const g = Math.round(start[1] + (end[1] - start[1]) * t);\n const b = Math.round(start[2] + (end[2] - start[2]) * t);\n return `rgb(${r},${g},${b})`;\n}\nclass DebugNode extends Container {\n constructor() {\n super();\n /** Graphics objects for each region type */\n __publicField(this, \"graphics\");\n __publicField(this, \"heatGraphics\");\n this.graphics = /* @__PURE__ */ new Map();\n Object.values(DebugRegionType).forEach((type) => {\n const graphics = new Graphics$1();\n this.graphics.set(type, graphics);\n this.addChild(graphics);\n });\n this.heatGraphics = new Graphics$1();\n this.addChild(this.heatGraphics);\n }\n /**\n * Initialize the debug object with region data\n */\n init(regions) {\n const { target, alpha, heat } = regions;\n if (!regions.heatOnly) {\n Object.entries(regions).forEach(([type, region]) => {\n if (type === \"target\" || type === \"alpha\" || type === \"heat\" || type === \"heatOnly\") return;\n region = region;\n const graphics = this.graphics.get(type);\n if (!graphics || !region.draw) return;\n if (region.inner) {\n this.drawCutBox(graphics, region.outer, region.inner, region.color, alpha);\n } else {\n const { x, y, width, height } = region.outer;\n graphics.rect(x, y, width, Math.max(height, 1));\n graphics.fill({ color: region.color, alpha });\n }\n });\n }\n const { invalidationCount, draw } = heat;\n if (invalidationCount > 0 && draw) {\n const MAX_INVALIDATE_COUNT = 20;\n const normalizedAlpha = Math.min(invalidationCount / MAX_INVALIDATE_COUNT, 1);\n const marginRegion = regions[DebugRegionType.Margin];\n const startColor = [255, 255, 0];\n const endColor = [255, 0, 0];\n const color = lerpColor(startColor, endColor, normalizedAlpha);\n this.heatGraphics.rect(\n marginRegion.outer.x,\n marginRegion.outer.y,\n marginRegion.outer.width,\n marginRegion.outer.height\n );\n this.heatGraphics.fill({ color, alpha: Math.min(0.3, normalizedAlpha) });\n this.heatGraphics.stroke({ color, alpha: Math.max(0.3, normalizedAlpha), pixelLine: true });\n }\n this.position.set(target.x, target.y);\n }\n /**\n * Reset the debug object's state\n */\n reset() {\n this.graphics.forEach((graphics) => graphics.clear());\n this.heatGraphics.clear();\n this.removeFromParent();\n }\n /**\n * Draw a box with a cut-out center\n */\n drawCutBox(graphics, outer, inner, color, alpha) {\n const { x, y, width, height } = outer;\n const { x: innerX, y: innerY, width: innerWidth, height: innerHeight } = inner;\n graphics.rect(x, y, width, height);\n graphics.fill({ color, alpha });\n graphics.rect(innerX, innerY, innerWidth, innerHeight);\n graphics.cut();\n }\n}\nexport {\n DebugNode\n};\n//# sourceMappingURL=DebugNode.mjs.map\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nimport { Container, Rectangle, BigPool } from \"pixi.js\";\nimport { DebugRegionType, calculateRegions } from \"./calculateDebugRegions.mjs\";\nimport { DebugNode } from \"./DebugNode.mjs\";\nclass DebugRenderer {\n constructor() {\n /** Container for all debug visuals */\n __publicField(this, \"holder\", new Container());\n /** Region data for each debug type */\n __publicField(this, \"regions\", /* @__PURE__ */ new Map());\n /** Color configuration for each region type */\n __publicField(this, \"colors\", {\n [DebugRegionType.Margin]: \"#B68655\",\n [DebugRegionType.Padding]: \"#BAC57F\",\n [DebugRegionType.Border]: \"#E7C583\",\n [DebugRegionType.Content]: \"#89B1BE\",\n [DebugRegionType.Flex]: \"#6E28D9\"\n });\n /** Global alpha value for all regions */\n __publicField(this, \"alpha\", 0.75);\n Object.values(DebugRegionType).forEach((type) => {\n this.regions.set(type, {\n outer: new Rectangle(),\n inner: new Rectangle()\n });\n });\n this.holder.__devtoolIgnore = true;\n this.holder.__devtoolIgnoreChildren = true;\n this.holder.eventMode = \"none\";\n this.holder.interactiveChildren = false;\n }\n /**\n * Clean up previous render state\n */\n reset() {\n for (let i = this.holder.children.length - 1; i >= 0; i--) {\n const child = this.holder.children[i];\n BigPool.return(child);\n }\n }\n /**\n * Render debug visuals for the given layout\n */\n render(layout) {\n calculateRegions(layout, this.regions);\n const regionData = Object.values(DebugRegionType).reduce(\n (acc, type) => {\n const region = this.regions.get(type);\n if (!region) return acc;\n const drawString = `debugDraw${type.charAt(0).toUpperCase()}${type.slice(1)}`;\n acc[type] = {\n ...region,\n color: this.colors[type],\n draw: layout._styles.custom[drawString] ?? true\n };\n return acc;\n },\n {}\n );\n const { left, top } = layout.computedLayout;\n const pos = layout.target.getGlobalPosition();\n const debugObject = BigPool.get(DebugNode, {\n ...regionData,\n target: { x: pos.x + left, y: pos.y + top },\n alpha: this.alpha,\n heat: {\n invalidationCount: layout._modificationCount,\n draw: layout._styles.custom.debugHeat !== false\n },\n heatOnly: !layout._styles.custom.debug\n });\n this.holder.addChildAt(debugObject, 0);\n }\n /**\n * Clean up the debug renderer\n */\n destroy() {\n this.reset();\n this.holder.destroy();\n this.regions.clear();\n }\n}\nexport {\n DebugRenderer\n};\n//# sourceMappingURL=DebugRenderer.mjs.map\n"],"names":["DebugRegionType","DebugRegionType2","getEdgeValues","layout","type","method","Edge","calculateRegions","regions","width","height","margin","border","padding","marginRegion","borderRegion","paddingRegion","calculateFlexRegion","_a","flexRegion","bounds","Bounds","children","i","computedBounds","Rectangle","flexDir","FlexDirection","__defProp","__defNormalProp","obj","key","value","__publicField","lerpColor","start","end","t","r","g","b","DebugNode","Container","graphics","Graphics$1","target","alpha","heat","region","x","y","invalidationCount","draw","normalizedAlpha","color","outer","inner","innerX","innerY","innerWidth","innerHeight","DebugRenderer","child","BigPool","regionData","acc","drawString","left","top","pos","debugObject"],"mappings":";;AAEA,IAAIA,IAAmC,kBAACC,OACtCA,EAAiB,SAAY,UAC7BA,EAAiB,UAAa,WAC9BA,EAAiB,SAAY,UAC7BA,EAAiB,OAAU,QAC3BA,EAAiB,UAAa,WACvBA,IACND,KAAmB,CAAA,CAAE;AACxB,SAASE,EAAcC,GAAQC,GAAM;AACnC,QAAMC,IAAS,cAAcD,EAAK,OAAO,CAAC,EAAE,YAAa,IAAGA,EAAK,MAAM,CAAC,CAAC;AACzE,SAAO;AAAA,IACL,KAAKD,EAAO,KAAKE,CAAM,EAAEC,EAAK,GAAG;AAAA,IACjC,OAAOH,EAAO,KAAKE,CAAM,EAAEC,EAAK,KAAK;AAAA,IACrC,QAAQH,EAAO,KAAKE,CAAM,EAAEC,EAAK,MAAM;AAAA,IACvC,MAAMH,EAAO,KAAKE,CAAM,EAAEC,EAAK,IAAI;AAAA,EACpC;AACH;AACA,SAASC,EAAiBJ,GAAQK,GAAS;AACzC,QAAM,EAAE,OAAAC,GAAO,QAAAC,EAAQ,IAAGP,EAAO,gBAC3BQ,IAAST,EAAcC,GAAQ,QAAQ,GACvCS,IAASV,EAAcC,GAAQ,QAAQ,GACvCU,IAAUX,EAAcC,GAAQ,SAAS,GACzCW,IAAeN,EAAQ;AAAA,IAC3B;AAAA;AAAA,EAED;AACD,EAAAM,EAAa,MAAM,IAAI,CAACH,EAAO,MAC/BG,EAAa,MAAM,IAAI,CAACH,EAAO,KAC/BG,EAAa,MAAM,QAAQL,IAAQE,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D,MAAS;AACb,cAAM4C,IAAS,KAAK,QAAQ,IAAI5C,CAAI;AACpC,YAAI,CAAC4C,EAAQ,QAAOiB;AACpB,cAAMC,IAAa,YAAY9D,EAAK,OAAO,CAAC,EAAE,YAAW,CAAE,GAAGA,EAAK,MAAM,CAAC,CAAC;AAC3E,eAAA6D,EAAI7D,CAAI,IAAI;AAAA,UACV,GAAG4C;AAAA,UACH,OAAO,KAAK,OAAO5C,CAAI;AAAA,UACvB,MAAMD,EAAO,QAAQ,OAAO+D,CAAU,KAAK;AAAA,QAC5C,GACMD;AAAA,MACR;AAAA,MACD,CAAA;AAAA,IACD,GACK,EAAE,MAAAE,GAAM,KAAAC,EAAK,IAAGjE,EAAO,gBACvBkE,IAAMlE,EAAO,OAAO,kBAAmB,GACvCmE,IAAcP,EAAQ,IAAItB,GAAW;AAAA,MACzC,GAAGuB;AAAA,MACH,QAAQ,EAAE,GAAGK,EAAI,IAAIF,GAAM,GAAGE,EAAI,IAAID,EAAK;AAAA,MAC3C,OAAO,KAAK;AAAA,MACZ,MAAM;AAAA,QACJ,mBAAmBjE,EAAO;AAAA,QAC1B,MAAMA,EAAO,QAAQ,OAAO,cAAc;AAAA,MAC3C;AAAA,MACD,UAAU,CAACA,EAAO,QAAQ,OAAO;AAAA,IACvC,CAAK;AACD,SAAK,OAAO,WAAWmE,GAAa,CAAC;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAIE,UAAU;AACR,SAAK,MAAO,GACZ,KAAK,OAAO,QAAS,GACrB,KAAK,QAAQ,MAAO;AAAA,EACxB;AACA;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"DebugRenderer-P5sZ-0Tq.js","sources":["../../../node_modules/.pnpm/@pixi+layout@3.2.0_@types+react@19.1.3_pixi.js@8.9.2_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/core/debug/calculateDebugRegions.mjs","../../../node_modules/.pnpm/@pixi+layout@3.2.0_@types+react@19.1.3_pixi.js@8.9.2_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/core/debug/DebugNode.mjs","../../../node_modules/.pnpm/@pixi+layout@3.2.0_@types+react@19.1.3_pixi.js@8.9.2_react@19.1.0_yoga-layout@3.2.1/node_modules/@pixi/layout/dist/core/debug/DebugRenderer.mjs"],"sourcesContent":["import { Bounds, Rectangle } from \"pixi.js\";\nimport { Edge, FlexDirection } from \"yoga-layout/load\";\nvar DebugRegionType = /* @__PURE__ */ ((DebugRegionType2) => {\n DebugRegionType2[\"Margin\"] = \"margin\";\n DebugRegionType2[\"Padding\"] = \"padding\";\n DebugRegionType2[\"Border\"] = \"border\";\n DebugRegionType2[\"Flex\"] = \"flex\";\n DebugRegionType2[\"Content\"] = \"content\";\n return DebugRegionType2;\n})(DebugRegionType || {});\nfunction getEdgeValues(layout, type) {\n const method = `getComputed${type.charAt(0).toUpperCase() + type.slice(1)}`;\n return {\n top: layout.yoga[method](Edge.Top),\n right: layout.yoga[method](Edge.Right),\n bottom: layout.yoga[method](Edge.Bottom),\n left: layout.yoga[method](Edge.Left)\n };\n}\nfunction calculateRegions(layout, regions) {\n const { width, height } = layout.computedLayout;\n const margin = getEdgeValues(layout, \"margin\");\n const border = getEdgeValues(layout, \"border\");\n const padding = getEdgeValues(layout, \"padding\");\n const marginRegion = regions.get(\n \"margin\"\n /* Margin */\n );\n marginRegion.outer.x = -margin.left;\n marginRegion.outer.y = -margin.top;\n marginRegion.outer.width = width + margin.left + margin.right;\n marginRegion.outer.height = height + margin.top + margin.bottom;\n marginRegion.inner.x = 0;\n marginRegion.inner.y = 0;\n marginRegion.inner.width = width;\n marginRegion.inner.height = height;\n const borderRegion = regions.get(\n \"border\"\n /* Border */\n );\n borderRegion.outer.x = 0;\n borderRegion.outer.y = 0;\n borderRegion.outer.width = width;\n borderRegion.outer.height = height;\n borderRegion.inner.x = border.left;\n borderRegion.inner.y = border.top;\n borderRegion.inner.width = width - border.left - border.right;\n borderRegion.inner.height = height - border.top - border.bottom;\n const paddingRegion = regions.get(\n \"padding\"\n /* Padding */\n );\n paddingRegion.outer.copyFrom(borderRegion.inner);\n paddingRegion.inner.x = padding.left + border.left;\n paddingRegion.inner.y = padding.top + border.top;\n paddingRegion.inner.width = width - padding.left - padding.right - border.left - border.right;\n paddingRegion.inner.height = height - padding.top - padding.bottom - border.top - border.bottom;\n calculateFlexRegion(layout, regions);\n}\nfunction calculateFlexRegion(layout, regions) {\n var _a;\n const flexRegion = regions.get(\n \"flex\"\n /* Flex */\n );\n const paddingRegion = regions.get(\n \"padding\"\n /* Padding */\n );\n flexRegion.outer.copyFrom(paddingRegion.inner);\n const bounds = new Bounds();\n const children = layout.yoga.getChildCount();\n for (let i = 0; i < children; i++) {\n const child = layout.yoga.getChild(i);\n const computedBounds = child.getComputedLayout();\n bounds.addRect(\n new Rectangle(computedBounds.left, computedBounds.top, computedBounds.width, computedBounds.height)\n );\n }\n const flexDir = layout.yoga.getFlexDirection();\n if (flexDir === FlexDirection.Column || flexDir === FlexDirection.ColumnReverse) {\n bounds.width = flexRegion.outer.width;\n bounds.x = flexRegion.outer.x;\n } else {\n bounds.height = flexRegion.outer.height;\n bounds.y = flexRegion.outer.y;\n }\n (_a = flexRegion.inner) == null ? void 0 : _a.copyFrom(bounds.rectangle);\n regions.get(\n \"content\"\n /* Content */\n ).outer.copyFrom(bounds.rectangle);\n}\nexport {\n DebugRegionType,\n calculateRegions\n};\n//# sourceMappingURL=calculateDebugRegions.mjs.map\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nimport { Container, Graphics as Graphics$1 } from \"pixi.js\";\nimport { DebugRegionType } from \"./calculateDebugRegions.mjs\";\nfunction lerpColor(start, end, t) {\n const r = Math.round(start[0] + (end[0] - start[0]) * t);\n const g = Math.round(start[1] + (end[1] - start[1]) * t);\n const b = Math.round(start[2] + (end[2] - start[2]) * t);\n return `rgb(${r},${g},${b})`;\n}\nclass DebugNode extends Container {\n constructor() {\n super();\n /** Graphics objects for each region type */\n __publicField(this, \"graphics\");\n __publicField(this, \"heatGraphics\");\n this.graphics = /* @__PURE__ */ new Map();\n Object.values(DebugRegionType).forEach((type) => {\n const graphics = new Graphics$1();\n this.graphics.set(type, graphics);\n this.addChild(graphics);\n });\n this.heatGraphics = new Graphics$1();\n this.addChild(this.heatGraphics);\n }\n /**\n * Initialize the debug object with region data\n */\n init(regions) {\n const { target, alpha, heat } = regions;\n if (!regions.heatOnly) {\n Object.entries(regions).forEach(([type, region]) => {\n if (type === \"target\" || type === \"alpha\" || type === \"heat\" || type === \"heatOnly\") return;\n region = region;\n const graphics = this.graphics.get(type);\n if (!graphics || !region.draw) return;\n if (region.inner) {\n this.drawCutBox(graphics, region.outer, region.inner, region.color, alpha);\n } else {\n const { x, y, width, height } = region.outer;\n graphics.rect(x, y, width, Math.max(height, 1));\n graphics.fill({ color: region.color, alpha });\n }\n });\n }\n const { invalidationCount, draw } = heat;\n if (invalidationCount > 0 && draw) {\n const MAX_INVALIDATE_COUNT = 20;\n const normalizedAlpha = Math.min(invalidationCount / MAX_INVALIDATE_COUNT, 1);\n const marginRegion = regions[DebugRegionType.Margin];\n const startColor = [255, 255, 0];\n const endColor = [255, 0, 0];\n const color = lerpColor(startColor, endColor, normalizedAlpha);\n this.heatGraphics.rect(\n marginRegion.outer.x,\n marginRegion.outer.y,\n marginRegion.outer.width,\n marginRegion.outer.height\n );\n this.heatGraphics.fill({ color, alpha: Math.min(0.3, normalizedAlpha) });\n this.heatGraphics.stroke({ color, alpha: Math.max(0.3, normalizedAlpha), pixelLine: true });\n }\n this.position.set(target.x, target.y);\n }\n /**\n * Reset the debug object's state\n */\n reset() {\n this.graphics.forEach((graphics) => graphics.clear());\n this.heatGraphics.clear();\n this.removeFromParent();\n }\n /**\n * Draw a box with a cut-out center\n */\n drawCutBox(graphics, outer, inner, color, alpha) {\n const { x, y, width, height } = outer;\n const { x: innerX, y: innerY, width: innerWidth, height: innerHeight } = inner;\n graphics.rect(x, y, width, height);\n graphics.fill({ color, alpha });\n graphics.rect(innerX, innerY, innerWidth, innerHeight);\n graphics.cut();\n }\n}\nexport {\n DebugNode\n};\n//# sourceMappingURL=DebugNode.mjs.map\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nimport { Container, Rectangle, BigPool } from \"pixi.js\";\nimport { DebugRegionType, calculateRegions } from \"./calculateDebugRegions.mjs\";\nimport { DebugNode } from \"./DebugNode.mjs\";\nclass DebugRenderer {\n constructor() {\n /** Container for all debug visuals */\n __publicField(this, \"holder\", new Container());\n /** Region data for each debug type */\n __publicField(this, \"regions\", /* @__PURE__ */ new Map());\n /** Color configuration for each region type */\n __publicField(this, \"colors\", {\n [DebugRegionType.Margin]: \"#B68655\",\n [DebugRegionType.Padding]: \"#BAC57F\",\n [DebugRegionType.Border]: \"#E7C583\",\n [DebugRegionType.Content]: \"#89B1BE\",\n [DebugRegionType.Flex]: \"#6E28D9\"\n });\n /** Global alpha value for all regions */\n __publicField(this, \"alpha\", 0.75);\n Object.values(DebugRegionType).forEach((type) => {\n this.regions.set(type, {\n outer: new Rectangle(),\n inner: new Rectangle()\n });\n });\n this.holder.__devtoolIgnore = true;\n this.holder.__devtoolIgnoreChildren = true;\n this.holder.eventMode = \"none\";\n this.holder.interactiveChildren = false;\n }\n /**\n * Clean up previous render state\n */\n reset() {\n for (let i = this.holder.children.length - 1; i >= 0; i--) {\n const child = this.holder.children[i];\n BigPool.return(child);\n }\n }\n /**\n * Render debug visuals for the given layout\n */\n render(layout) {\n calculateRegions(layout, this.regions);\n const regionData = Object.values(DebugRegionType).reduce(\n (acc, type) => {\n const region = this.regions.get(type);\n if (!region) return acc;\n const drawString = `debugDraw${type.charAt(0).toUpperCase()}${type.slice(1)}`;\n acc[type] = {\n ...region,\n color: this.colors[type],\n draw: layout._styles.custom[drawString] ?? true\n };\n return acc;\n },\n {}\n );\n const { left, top } = layout.computedLayout;\n const pos = layout.target.getGlobalPosition();\n const debugObject = BigPool.get(DebugNode, {\n ...regionData,\n target: { x: pos.x + left, y: pos.y + top },\n alpha: this.alpha,\n heat: {\n invalidationCount: layout._modificationCount,\n draw: layout._styles.custom.debugHeat !== false\n },\n heatOnly: !layout._styles.custom.debug\n });\n this.holder.addChildAt(debugObject, 0);\n }\n /**\n * Clean up the debug renderer\n */\n destroy() {\n this.reset();\n this.holder.destroy();\n this.regions.clear();\n }\n}\nexport {\n DebugRenderer\n};\n//# sourceMappingURL=DebugRenderer.mjs.map\n"],"names":["DebugRegionType","DebugRegionType2","getEdgeValues","layout","type","method","Edge","calculateRegions","regions","width","height","margin","border","padding","marginRegion","borderRegion","paddingRegion","calculateFlexRegion","_a","flexRegion","bounds","Bounds","children","i","computedBounds","Rectangle","flexDir","FlexDirection","__defProp","__defNormalProp","obj","key","value","__publicField","lerpColor","start","end","t","r","g","b","DebugNode","Container","graphics","Graphics$1","target","alpha","heat","region","x","y","invalidationCount","draw","normalizedAlpha","color","outer","inner","innerX","innerY","innerWidth","innerHeight","DebugRenderer","child","BigPool","regionData","acc","drawString","left","top","pos","debugObject"],"mappings":";;AAEA,IAAIA,IAAmC,kBAACC,OACtCA,EAAiB,SAAY,UAC7BA,EAAiB,UAAa,WAC9BA,EAAiB,SAAY,UAC7BA,EAAiB,OAAU,QAC3BA,EAAiB,UAAa,WACvBA,IACND,KAAmB,CAAA,CAAE;AACxB,SAASE,EAAcC,GAAQC,GAAM;AACnC,QAAMC,IAAS,cAAcD,EAAK,OAAO,CAAC,EAAE,YAAa,IAAGA,EAAK,MAAM,CAAC,CAAC;AACzE,SAAO;AAAA,IACL,KAAKD,EAAO,KAAK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Z,MAAM;AAAA,QACJ,mBAAmBjE,EAAO;AAAA,QAC1B,MAAMA,EAAO,QAAQ,OAAO,cAAc;AAAA,MAC3C;AAAA,MACD,UAAU,CAACA,EAAO,QAAQ,OAAO;AAAA,IACvC,CAAK;AACD,SAAK,OAAO,WAAWmE,GAAa,CAAC;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAIE,UAAU;AACR,SAAK,MAAO,GACZ,KAAK,OAAO,QAAS,GACrB,KAAK,QAAQ,MAAO;AAAA,EACxB;AACA;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Signal } from '@signe/reactive';
|
|
1
2
|
import { FederatedPointerEvent } from 'pixi.js';
|
|
2
3
|
import { ControlsDirective } from '../directives/Controls';
|
|
3
4
|
import { JoystickControls } from '../directives/JoystickControls';
|
|
4
5
|
import { Element } from '../engine/reactive';
|
|
5
|
-
|
|
6
6
|
/**
|
|
7
7
|
* Button states for visual feedback
|
|
8
8
|
*/
|
|
@@ -87,6 +87,8 @@ export interface ButtonProps {
|
|
|
87
87
|
background?: Element | any;
|
|
88
88
|
/** Custom children components for button content (takes priority over text if provided) */
|
|
89
89
|
children?: Element[];
|
|
90
|
+
/** Focus index for the button */
|
|
91
|
+
tabindex?: number | Signal<number>;
|
|
90
92
|
}
|
|
91
93
|
/**
|
|
92
94
|
* Creates a Button component with interactive states and customizable styling.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gB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AAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,wHA8MxC"}
|
|
@@ -2,7 +2,6 @@ import { Props } from '../engine/reactive';
|
|
|
2
2
|
import { ComponentFunction } from '../engine/signal';
|
|
3
3
|
import { SignalOrPrimitive } from './types';
|
|
4
4
|
import { Size } from './types/DisplayObject';
|
|
5
|
-
|
|
6
5
|
export interface CanvasProps extends Props {
|
|
7
6
|
cursorStyles?: () => any;
|
|
8
7
|
width?: SignalOrPrimitive<Size>;
|
|
@@ -2,7 +2,6 @@ import { Element } from '../engine/reactive';
|
|
|
2
2
|
import { OnHook } from './DisplayObject';
|
|
3
3
|
import { ComponentFunction } from '../engine/signal';
|
|
4
4
|
import { DisplayObjectProps } from './types/DisplayObject';
|
|
5
|
-
|
|
6
5
|
interface DOMContainerProps extends DisplayObjectProps {
|
|
7
6
|
element: string | {
|
|
8
7
|
value: HTMLElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DOMElement.d.ts","sourceRoot":"","sources":["../../src/components/DOMElement.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EAER,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3D,UAAU,iBAAkB,SAAQ,kBAAkB;IACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"DOMElement.d.ts","sourceRoot":"","sources":["../../src/components/DOMElement.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EAER,MAAM,oBAAoB,CAAC;AA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IAmF3B,SAAS,CACb,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,EACjC,YAAY,EAAE,MAAM,IAAI,GACvB,OAAO,CAAC,IAAI,CAAC;CAqBjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;CAAI;AAIhE,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,iBAAiB,CAE3D,CAAC"}
|
|
@@ -3,9 +3,8 @@ import { Element } from '../engine/reactive';
|
|
|
3
3
|
import { ComponentInstance } from './DisplayObject';
|
|
4
4
|
import { DisplayObjectProps } from './types/DisplayObject';
|
|
5
5
|
import { SignalOrPrimitive } from './types';
|
|
6
|
-
|
|
7
6
|
interface GraphicsProps extends DisplayObjectProps {
|
|
8
|
-
draw?: (graphics: PixiGraphics, width: number, height: number) => void;
|
|
7
|
+
draw?: (graphics: PixiGraphics, width: number, height: number, anchor?: [number, number]) => void;
|
|
9
8
|
}
|
|
10
9
|
interface RectProps extends DisplayObjectProps {
|
|
11
10
|
color: SignalOrPrimitive<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../src/components/Graphic.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../src/components/Graphic.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAmB,OAAO,EAAqB,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAI5C,UAAU,aAAc,SAAQ,kBAAkB;IAChD,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM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|
import { DisplayObjectProps } from './types/DisplayObject';
|
|
5
|
-
|
|
6
5
|
export interface TextProps extends DisplayObjectProps {
|
|
7
6
|
text?: string;
|
|
8
7
|
style?: Partial<TextStyle>;
|
|
@@ -14,5 +14,6 @@ export { type ComponentInstance } from './DisplayObject';
|
|
|
14
14
|
export { DOMContainer } from './DOMContainer';
|
|
15
15
|
export { DOMElement } from './DOMElement';
|
|
16
16
|
export { Button, ButtonState, type ButtonProps, type ButtonStyle } from './Button';
|
|
17
|
-
export { Joystick, type JoystickSettings
|
|
17
|
+
export { Joystick, type JoystickSettings } from './Joystick';
|
|
18
|
+
export { FocusContainer, type FocusContainerProps } from './FocusContainer';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,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AM,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAClF,OAAO,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -13,6 +13,13 @@ export type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
|
13
13
|
export type ObjectPosition = string;
|
|
14
14
|
export type TransformOrigin = string;
|
|
15
15
|
export type PositionType = 'relative' | 'absolute' | 'static';
|
|
16
|
+
export type ObservablePointSignal = [number, number] | SignalOrPrimitive<[number, number]> | {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
} | SignalOrPrimitive<{
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}>;
|
|
16
23
|
export interface DisplayObjectProps {
|
|
17
24
|
attach?: any;
|
|
18
25
|
ref?: string;
|
|
@@ -46,18 +53,9 @@ export interface DisplayObjectProps {
|
|
|
46
53
|
padding?: EdgeSize;
|
|
47
54
|
border?: EdgeSize;
|
|
48
55
|
absolute?: SignalOrPrimitive<boolean>;
|
|
49
|
-
scale?:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} | number>;
|
|
53
|
-
anchor?: SignalOrPrimitive<{
|
|
54
|
-
x: number;
|
|
55
|
-
y: number;
|
|
56
|
-
}>;
|
|
57
|
-
skew?: SignalOrPrimitive<{
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
}>;
|
|
56
|
+
scale?: ObservablePointSignal | number;
|
|
57
|
+
anchor?: ObservablePointSignal;
|
|
58
|
+
skew?: ObservablePointSignal;
|
|
61
59
|
tint?: SignalOrPrimitive<number>;
|
|
62
60
|
rotation?: SignalOrPrimitive<number>;
|
|
63
61
|
angle?: SignalOrPrimitive<number>;
|
|
@@ -65,10 +63,7 @@ export interface DisplayObjectProps {
|
|
|
65
63
|
roundPixels?: SignalOrPrimitive<boolean>;
|
|
66
64
|
cursor?: SignalOrPrimitive<string>;
|
|
67
65
|
visible?: SignalOrPrimitive<boolean>;
|
|
68
|
-
pivot?:
|
|
69
|
-
x: number;
|
|
70
|
-
y: number;
|
|
71
|
-
}>;
|
|
66
|
+
pivot?: ObservablePointSignal;
|
|
72
67
|
filters?: any[];
|
|
73
68
|
blendMode?: SignalOrPrimitive<PIXI.BLEND_MODES>;
|
|
74
69
|
blur?: SignalOrPrimitive<number>;
|
|
@@ -106,5 +101,6 @@ export interface DisplayObjectProps {
|
|
|
106
101
|
touchmove?: PIXI.FederatedEventHandler;
|
|
107
102
|
touchstart?: PIXI.FederatedEventHandler;
|
|
108
103
|
wheel?: PIXI.FederatedEventHandler<PIXI.FederatedWheelEvent>;
|
|
104
|
+
tabindex?: SignalOrPrimitive<number>;
|
|
109
105
|
}
|
|
110
106
|
//# sourceMappingURL=DisplayObject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayObject.d.ts","sourceRoot":"","sources":["../../../src/components/types/DisplayObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAChF,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;AACrG,MAAM,MAAM,YAAY,GAAG,YA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AAqB,CAAC;IACtC,eAAe,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC7C,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IACvC,UAAU,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IACxC,KAAK,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC7D,QAAQ,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CACxC"}
|
|
@@ -4,7 +4,6 @@ import { Controls } from './ControlsBase';
|
|
|
4
4
|
import { KeyboardControls } from './KeyboardControls';
|
|
5
5
|
import { GamepadControls } from './GamepadControls';
|
|
6
6
|
import { JoystickControls } from './JoystickControls';
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Controls directive that coordinates keyboard, gamepad, and joystick input systems
|
|
10
9
|
*
|
|
@@ -2,7 +2,6 @@ import { Container, FederatedPointerEvent } from 'pixi.js';
|
|
|
2
2
|
import { Directive } from '../engine/directive';
|
|
3
3
|
import { Element } from '../engine/reactive';
|
|
4
4
|
import { SignalOrPrimitive } from '../components/types';
|
|
5
|
-
|
|
6
5
|
export type DragProps = {
|
|
7
6
|
move?: (event: FederatedPointerEvent) => void;
|
|
8
7
|
start?: () => void;
|
|
@@ -3,7 +3,6 @@ import { Directive } from '../engine/directive';
|
|
|
3
3
|
import { Element } from '../engine/reactive';
|
|
4
4
|
import { Trigger } from '../engine/trigger';
|
|
5
5
|
import { SignalOrPrimitive } from '../components/types';
|
|
6
|
-
|
|
7
6
|
export type FlashType = 'alpha' | 'tint' | 'both';
|
|
8
7
|
export type FlashProps = {
|
|
9
8
|
/**
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Directive } from '../engine/directive';
|
|
2
|
+
import { Element } from '../engine/reactive';
|
|
3
|
+
import { CanvasFocusContainer } from '../components/FocusContainer';
|
|
4
|
+
/**
|
|
5
|
+
* FocusNavigation directive for automatic focus navigation via Controls
|
|
6
|
+
*
|
|
7
|
+
* This directive integrates with the Controls system to automatically navigate
|
|
8
|
+
* between focusable elements using keyboard arrows or gamepad input.
|
|
9
|
+
*
|
|
10
|
+
* The directive is automatically applied when a FocusContainer has a `controls` prop.
|
|
11
|
+
* It wraps the existing Controls configuration to add focus navigation behavior.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* // Automatic navigation with Controls
|
|
16
|
+
* <FocusContainer tabindex={0} controls={controlsConfig}>
|
|
17
|
+
* <Button tabindex={0} text="Button 1" />
|
|
18
|
+
* <Button tabindex={1} text="Button 2" />
|
|
19
|
+
* </FocusContainer>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class FocusNavigationDirective extends Directive {
|
|
23
|
+
private element;
|
|
24
|
+
private controlsDirective;
|
|
25
|
+
private containerId;
|
|
26
|
+
private controlsSubscription;
|
|
27
|
+
private originalControls;
|
|
28
|
+
/**
|
|
29
|
+
* Initialize the focus navigation directive
|
|
30
|
+
*
|
|
31
|
+
* @param element - FocusContainer element
|
|
32
|
+
*/
|
|
33
|
+
onInit(element: Element<CanvasFocusContainer>): void;
|
|
34
|
+
/**
|
|
35
|
+
* Set up navigation controls
|
|
36
|
+
*
|
|
37
|
+
* @param controls - Controls configuration
|
|
38
|
+
*/
|
|
39
|
+
private setupNavigationControls;
|
|
40
|
+
/**
|
|
41
|
+
* Navigate to next or previous focusable element
|
|
42
|
+
*
|
|
43
|
+
* @param direction - Navigation direction
|
|
44
|
+
*/
|
|
45
|
+
private navigate;
|
|
46
|
+
/**
|
|
47
|
+
* Trigger action on currently focused element
|
|
48
|
+
*/
|
|
49
|
+
private triggerAction;
|
|
50
|
+
/**
|
|
51
|
+
* Mount hook
|
|
52
|
+
*
|
|
53
|
+
* @param element - FocusContainer element
|
|
54
|
+
*/
|
|
55
|
+
onMount(element: Element<CanvasFocusContainer>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Update hook
|
|
58
|
+
*
|
|
59
|
+
* @param props - Updated properties
|
|
60
|
+
* @param element - FocusContainer element
|
|
61
|
+
*/
|
|
62
|
+
onUpdate(props: any, element: Element<CanvasFocusContainer>): void;
|
|
63
|
+
/**
|
|
64
|
+
* Destroy hook
|
|
65
|
+
*
|
|
66
|
+
* @param element - FocusContainer element
|
|
67
|
+
*/
|
|
68
|
+
onDestroy(element: Element<CanvasFocusContainer>): void;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=FocusNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusNavigation.d.ts","sourceRoot":"","sources":["../../src/directives/FocusNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqC,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,OAAO,CAAC,OAAO,CAA8C;IAC7D,OAAO,CAAC,iBAAiB,CAAkC;IAC3D,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,oBAAoB,CAAa;IACzC,OAAO,CAAC,gBAAgB,CAAyB;IAEjD;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAuB7C;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAsE/B;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAKhB;;OAEG;IACH,OAAO,CAAC,aAAa;IAiBrB;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;IA2C9C;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAW3D;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;CAWjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardControls.d.ts","sourceRoot":"","sources":["../../src/directives/KeyboardControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAElF,oBAAY,KAAK;IACb,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,gBAAgB;IACrB,QAAQ,cAAc;IACtB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,aAAa,mBAAmB;IAChC,KAAK,UAAU;IACf,MAAM,YAAY;IAClB,QAAQ,cAAc;IACtB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,IAAI;IACR,EAAE,IAAI;IACN,KAAK,IAAI;IACT,IAAI,IAAI;IACR,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,MAAM;IACV,GAAG,MAAM;IACT,GAAG,MAAM;IACT,KAAK,MAAM;IACX,IAAI,MAAM;IACV,IAAI,MAAM;IACV,GAAG,MAAM;IACT,KAAK,MAAM;IACX,MAAM,MAAM;IACZ,IAAI,MAAM;IACV,KAAK,MAAM;IACX,SAAS,gCAAgC;IACzC,QAAQ,MAAM;IACd,MAAM,qBAAqB;IAC3B,IAAI,WAAM;IACV,EAAE,MAAM;IACR,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;IAC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AS;IACb,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,KAAK,WAAW;IAChB,SAAS,wBAAmB;IAC5B,SAAS,eAAe;IACxB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,WAAW,2BAAsB;IACjC,WAAW,mCAAyB;IACpC,WAAW,iBAAiB;IAC5B,SAAS,eAAe;IACxB,YAAY,2BAAsB;IAClC,WAAW,0BAAqB;IAChC,SAAS,MAAM;IACf,KAAK,UAAU;CAClB;AAGD,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAmLnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAC9C,OAAO,CAAC,QAAQ,CAKV;IACN,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"KeyboardControls.d.ts","sourceRoot":"","sources":["../../src/directives/KeyboardControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAElF,oBAAY,KAAK;IACb,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,gBAAgB;IACrB,QAAQ,cAAc;IACtB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,aAAa,mBAAmB;IAChC,KAAK,UAAU;IACf,MAAM,YAAY;IAClB,QAAQ,cAAc;IACtB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,IAAI;IACR,EAAE,IAAI;IACN,KAAK,IAAI;IACT,IAAI,IAAI;IACR,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAA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,CAAC,UAAU;IAOlB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,YAAY;IAepB;;;;;;;;;;;;;;;;;;OAkBG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7F;;;OAGG;IACH,YAAY;CAKf"}
|
|
@@ -3,7 +3,6 @@ import { Directive } from '../engine/directive';
|
|
|
3
3
|
import { Element } from '../engine/reactive';
|
|
4
4
|
import { Trigger } from '../engine/trigger';
|
|
5
5
|
import { SignalOrPrimitive } from '../components/types';
|
|
6
|
-
|
|
7
6
|
export type ShakeProps = {
|
|
8
7
|
/**
|
|
9
8
|
* Trigger that activates the shake animation
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Container } from 'pixi.js';
|
|
2
2
|
import { Directive } from '../engine/directive';
|
|
3
3
|
import { Element } from '../engine/reactive';
|
|
4
|
-
|
|
5
4
|
export declare class Transition extends Directive {
|
|
6
5
|
onInit(element: Element<Container>): void;
|
|
7
6
|
onMount(element: Element<Container>): void;
|
|
@@ -2,7 +2,6 @@ import { ComponentInstance } from '../components/DisplayObject';
|
|
|
2
2
|
import { SignalOrPrimitive } from '../components/types';
|
|
3
3
|
import { Directive } from '../engine/directive';
|
|
4
4
|
import { Element } from '../engine/reactive';
|
|
5
|
-
|
|
6
5
|
export type ViewportFollowProps = {
|
|
7
6
|
viewportFollow?: boolean | {
|
|
8
7
|
speed?: SignalOrPrimitive<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewportFollow.d.ts","sourceRoot":"","sources":["../../src/directives/ViewportFollow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,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