@combos-fun/plugin-development-tool 0.0.26 → 0.0.27

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.
@@ -22,11 +22,14 @@ const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED = 'combos-development-tool:g
22
22
  const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY = 'combos-development-tool:apply-property';
23
23
  /** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */
24
24
  const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready';
25
- /** Parent → iframe: pause or resume the game loop. Payload: `{ paused: boolean }`. */
26
- const COMBOS_DEVELOPMENT_TOOL_SET_PAUSED = 'combos-development-tool:set-paused';
27
- /** Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`. */
25
+ /**
26
+ * Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`.
27
+ *
28
+ * Note: play / pause / resume are owned by the engine core lifecycle protocol
29
+ * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
30
+ */
28
31
  const COMBOS_DEVELOPMENT_TOOL_SET_MUTED = 'combos-development-tool:set-muted';
29
- /** iframe → parent (and `game.emit`): current pause/mute snapshot after a successful change. */
32
+ /** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */
30
33
  const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED = 'combos-development-tool:state-changed';
31
34
 
32
35
  /**
@@ -378,12 +381,14 @@ const OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';
378
381
  * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)
379
382
  * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`
380
383
  *
381
- * Pause / mute (independent of pick mode; parent toolbar or in-game debug UI):
382
- * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, paused: true })`
384
+ * Mute (independent of pick mode; parent toolbar or in-game debug UI):
383
385
  * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`
384
- * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, { paused: true })` or `.setPaused(true)`
386
+ * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, { muted: true })` or `.setMuted(true)`
385
387
  * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.
386
- * Both emit / post `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ paused, muted }`.
388
+ * Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.
389
+ *
390
+ * Play / pause / resume are handled by the engine core lifecycle protocol
391
+ * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
387
392
  *
388
393
  * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,
389
394
  * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.
@@ -412,12 +417,6 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
412
417
  this.setEnabled(d.enabled);
413
418
  }
414
419
  };
415
- this.onWindowSetPaused = (e) => {
416
- const d = e.detail;
417
- if (d && typeof d.paused === 'boolean') {
418
- this.setPaused(d.paused);
419
- }
420
- };
421
420
  this.onWindowSetMuted = (e) => {
422
421
  const d = e.detail;
423
422
  if (d && typeof d.muted === 'boolean') {
@@ -434,9 +433,6 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
434
433
  if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {
435
434
  this.setEnabled(d.enabled);
436
435
  }
437
- else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_PAUSED && typeof d.paused === 'boolean') {
438
- this.setPaused(d.paused);
439
- }
440
436
  else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {
441
437
  this.setMuted(d.muted);
442
438
  }
@@ -458,11 +454,6 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
458
454
  this.onGameRefresh = () => {
459
455
  this.requestSceneRescan();
460
456
  };
461
- this.onGameSetPaused = (payload) => {
462
- if (payload && typeof payload.paused === 'boolean') {
463
- this.setPaused(payload.paused);
464
- }
465
- };
466
457
  this.onGameSetMuted = (payload) => {
467
458
  if (payload && typeof payload.muted === 'boolean') {
468
459
  this.setMuted(payload.muted);
@@ -478,13 +469,11 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
478
469
  this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);
479
470
  if (typeof window !== 'undefined') {
480
471
  window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);
481
- window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);
482
472
  window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);
483
473
  window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);
484
474
  window.addEventListener('message', this.onWindowMessage);
485
475
  }
486
476
  this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);
487
- this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);
488
477
  this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);
489
478
  this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);
490
479
  if (this.enabled) {
@@ -494,13 +483,11 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
494
483
  onDestroy() {
495
484
  if (typeof window !== 'undefined') {
496
485
  window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);
497
- window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);
498
486
  window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);
499
487
  window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);
500
488
  window.removeEventListener('message', this.onWindowMessage);
501
489
  }
502
490
  this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);
503
- this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);
504
491
  this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);
505
492
  this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);
506
493
  this.detachAllPicks();
@@ -525,10 +512,6 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
525
512
  get isEnabled() {
526
513
  return this.enabled;
527
514
  }
528
- /** Whether the game loop is paused (`!game.playing`). */
529
- get isPaused() {
530
- return !this.game.playing;
531
- }
532
515
  /** Master mute when `SoundSystem` exists; otherwise the last requested value. */
533
516
  get isMuted() {
534
517
  const sound = this.getSoundSystem();
@@ -537,18 +520,6 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
537
520
  }
538
521
  return this.mutedWithoutSoundSystem;
539
522
  }
540
- /** Pause or resume the game loop (same as `game.pause()` / `game.resume()`). */
541
- setPaused(paused) {
542
- if (paused) {
543
- if (this.game.playing) {
544
- this.game.pause();
545
- }
546
- }
547
- else if (!this.game.playing) {
548
- this.game.resume();
549
- }
550
- this.postStateChanged();
551
- }
552
523
  /**
553
524
  * Mute or unmute audio via `SoundSystem` when registered.
554
525
  * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.
@@ -833,7 +804,6 @@ let CombosDevelopmentToolSystem$1 = class CombosDevelopmentToolSystem extends en
833
804
  }
834
805
  postStateChanged() {
835
806
  const state = {
836
- paused: this.isPaused,
837
807
  muted: this.isMuted,
838
808
  };
839
809
  const payload = {
@@ -1031,7 +1001,7 @@ var CombosDevelopmentToolSystem = CombosDevelopmentToolSystem$1;
1031
1001
  /** Auto-generated by scripts/build-package.mjs — do not edit. */
1032
1002
  Object.assign(CombosDevelopmentToolSystem, {
1033
1003
  packageName: "@combos-fun/plugin-development-tool",
1034
- packageVersion: "0.0.26",
1004
+ packageVersion: "0.0.27",
1035
1005
  });
1036
1006
 
1037
1007
  exports.COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY = COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY;
@@ -1042,7 +1012,6 @@ exports.COMBOS_DEVELOPMENT_TOOL_READY = COMBOS_DEVELOPMENT_TOOL_READY;
1042
1012
  exports.COMBOS_DEVELOPMENT_TOOL_REFRESH = COMBOS_DEVELOPMENT_TOOL_REFRESH;
1043
1013
  exports.COMBOS_DEVELOPMENT_TOOL_SET = COMBOS_DEVELOPMENT_TOOL_SET;
1044
1014
  exports.COMBOS_DEVELOPMENT_TOOL_SET_MUTED = COMBOS_DEVELOPMENT_TOOL_SET_MUTED;
1045
- exports.COMBOS_DEVELOPMENT_TOOL_SET_PAUSED = COMBOS_DEVELOPMENT_TOOL_SET_PAUSED;
1046
1015
  exports.COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS = COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS;
1047
1016
  exports.COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED = COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED;
1048
1017
  exports.CombosDevelopmentToolSystem = CombosDevelopmentToolSystem;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-development-tool.cjs.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/messageOrigin.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/selectionNotify.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** iframe → parent: `setEnabled` finished (pick attach after enable, or restore after disable). Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS =\n 'combos-development-tool:set-success' as const;\n\n/** Re-scan the scene tree while the development tool is enabled. */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: clear the current in-canvas selection outline. */\nexport const COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION =\n 'combos-development-tool:clear-selection' as const;\n\n/** Emitted to `window.parent` when the current selection is cleared. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED =\n 'combos-development-tool:gameobject-deselected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n\n/** Parent → iframe: pause or resume the game loop. Payload: `{ paused: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_PAUSED =\n 'combos-development-tool:set-paused' as const;\n\n/** Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_MUTED =\n 'combos-development-tool:set-muted' as const;\n\n/** iframe → parent (and `game.emit`): current pause/mute snapshot after a successful change. */\nexport const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED =\n 'combos-development-tool:state-changed' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Marks a `GameObject` as selectable in editor pick mode. While the development tool is enabled,\n * only nodes carrying this component receive a pick `Event`; all other game `Event` components\n * are removed and cached until disable.\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Default inbound postMessage host suffixes (host + all subdomains). */\nexport const DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES = [\n 'knoffice.tech',\n 'converge.ai',\n] as const;\n\n/**\n * Returns whether `origin` is allowed by `allowed`.\n *\n * Each entry in `allowed` is either:\n * - a **host suffix** (e.g. `knoffice.tech`) — matches that host and `*.knoffice.tech`;\n * - a **full origin** (e.g. `https://creator.knoffice.tech`) — exact match;\n * - `'*'` — accept any origin (escape hatch).\n */\nexport function isAllowedMessageOrigin(\n origin: string,\n allowed: readonly string[],\n): boolean {\n if (allowed.includes('*')) {\n return true;\n }\n if (allowed.length === 0) {\n return false;\n }\n\n let parsed: URL;\n try {\n parsed = new URL(origin);\n } catch {\n return false;\n }\n\n const originLower = origin.toLowerCase();\n const hostLower = parsed.hostname.toLowerCase();\n\n for (const entry of allowed) {\n const trimmed = entry.trim();\n if (!trimmed) {\n continue;\n }\n\n if (trimmed.includes('://')) {\n if (originLower === trimmed.toLowerCase()) {\n return true;\n }\n continue;\n }\n\n const suffix = trimmed.toLowerCase().replace(/^\\./, '');\n if (hostLower === suffix || hostLower.endsWith(`.${suffix}`)) {\n return true;\n }\n }\n\n return false;\n}\n\n/** Defaults plus any extra entries (deduped). `['*']` alone accepts any origin. */\nexport function mergeAllowedMessageOrigins(extra?: string[]): string[] {\n if (!extra?.length) {\n return [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES];\n }\n if (extra.includes('*')) {\n return ['*'];\n }\n\n const seen = new Set<string>();\n const result: string[] = [];\n for (const entry of [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, ...extra]) {\n const trimmed = entry.trim();\n if (!trimmed || seen.has(trimmed)) {\n continue;\n }\n seen.add(trimmed);\n result.push(trimmed);\n }\n return result;\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Graphics: new Set(['graphics']),\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n} from './constants';\n\nexport type DevelopmentToolDeselectReason = 'parent-request' | 'pick-disabled' | 'target-removed';\n\nexport function buildGameObjectDeselectedPayload(reason: DevelopmentToolDeselectReason) {\n return {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n reason,\n } as const;\n}\n\nexport function shouldNotifyGameObjectDeselected(hadSelection: boolean): boolean {\n return hadSelection;\n}\n\nexport function isClearSelectionMessage(data: unknown): boolean {\n if (!data || typeof data !== 'object') {\n return false;\n }\n return (data as { type?: string }).type === COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION;\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n COMBOS_DEVELOPMENT_TOOL_SET_MUTED,\n COMBOS_DEVELOPMENT_TOOL_SET_PAUSED,\n COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isAllowedMessageOrigin,\n mergeAllowedMessageOrigins,\n} from './messageOrigin';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\nimport {\n buildGameObjectDeselectedPayload,\n isClearSelectionMessage,\n shouldNotifyGameObjectDeselected,\n type DevelopmentToolDeselectReason,\n} from './selectionNotify';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n stopPropagation?: () => void;\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype TapListener = (payload?: TapEventPayload) => void;\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * Extra inbound `postMessage` origins merged with {@link DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES}.\n * Each entry is a host suffix (e.g. `localhost`) or full origin. Pass `['*']` to accept any origin.\n */\n allowedMessageOrigins?: string[];\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\ntype SetPausedPayload = { paused?: boolean };\ntype SetMutedPayload = { muted?: boolean };\n\ntype SoundSystemLike = {\n muted: boolean;\n};\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Off** at start. While enabled:\n * - soft-disables game `Event` hit targets (`container.interactive = false`, restored on disable);\n * - attaches pick `Event` + outline only on nodes with {@link CombosDevelopmentToolTarget}.\n *\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * Pause / mute (independent of pick mode; parent toolbar or in-game debug UI):\n * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, paused: true })`\n * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, { paused: true })` or `.setPaused(true)`\n * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.\n * Both emit / post `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ paused, muted }`.\n *\n * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,\n * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private allowedMessageOrigins = mergeAllowedMessageOrigins();\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, TapListener>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** Game `Event` hit targets soft-disabled while enabled (`container.interactive = false`). */\n private readonly disabledGameEventGoIds = new Set<number>();\n /** Pick `Event` injected for {@link CombosDevelopmentToolTarget} nodes. */\n private readonly pickEvents = new Set<number>();\n private needsRescan = false;\n private lastOutlineBounds: PickBounds | null = null;\n /** Remembered mute when `SoundSystem` is not registered yet. */\n private mutedWithoutSoundSystem = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowSetPaused = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPausedPayload>).detail;\n if (d && typeof d.paused === 'boolean') {\n this.setPaused(d.paused);\n }\n };\n\n private readonly onWindowSetMuted = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetMutedPayload>).detail;\n if (d && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n if (!isAllowedMessageOrigin(e.origin, this.allowedMessageOrigins)) {\n return;\n }\n\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_PAUSED && typeof d.paused === 'boolean') {\n this.setPaused(d.paused);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (isClearSelectionMessage(d)) {\n this.clearSelectionAndNotify('parent-request');\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onGameSetPaused = (payload: SetPausedPayload) => {\n if (payload && typeof payload.paused === 'boolean') {\n this.setPaused(payload.paused);\n }\n };\n\n private readonly onGameSetMuted = (payload: SetMutedPayload) => {\n if (payload && typeof payload.muted === 'boolean') {\n this.setMuted(payload.muted);\n }\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled) {\n this.needsRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.clearSelectionAndNotify('pick-disabled');\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelectionAndNotify('pick-disabled');\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.postSetSuccess(false);\n } else {\n this.needsRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n /** Whether the game loop is paused (`!game.playing`). */\n get isPaused(): boolean {\n return !this.game.playing;\n }\n\n /** Master mute when `SoundSystem` exists; otherwise the last requested value. */\n get isMuted(): boolean {\n const sound = this.getSoundSystem();\n if (sound) {\n return sound.muted;\n }\n return this.mutedWithoutSoundSystem;\n }\n\n /** Pause or resume the game loop (same as `game.pause()` / `game.resume()`). */\n setPaused(paused: boolean) {\n if (paused) {\n if (this.game.playing) {\n this.game.pause();\n }\n } else if (!this.game.playing) {\n this.game.resume();\n }\n this.postStateChanged();\n }\n\n /**\n * Mute or unmute audio via `SoundSystem` when registered.\n * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.\n */\n setMuted(muted: boolean) {\n const sound = this.getSoundSystem();\n if (sound) {\n sound.muted = muted;\n } else {\n this.mutedWithoutSoundSystem = muted;\n }\n this.postStateChanged();\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsRescan) {\n this.needsRescan = false;\n this.attachEditMode();\n this.postSetSuccess(true);\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releasePick(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n this.updateSelectionOutline();\n }\n\n componentChanged(changed: ComponentChanged) {\n if (!this.enabled) return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.stripGameEvent(gameObject);\n this.ensurePick(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releasePick(gameObject);\n if (this.selected === gameObject) {\n this.clearSelectionAndNotify('target-removed');\n }\n }\n }\n\n /** Re-bind pick targets after dynamic scene changes while enabled. */\n requestSceneRescan() {\n if (!this.enabled) return;\n this.needsRescan = true;\n }\n\n private attachEditMode() {\n this.detachAllPicks();\n\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n this.stripGameEvent(go);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensurePick(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private isIgnoredPickGo(go: GameObject): boolean {\n return go.name === OUTLINE_GO_NAME || go === this.outlineGo;\n }\n\n private stripGameEvent(go: GameObject) {\n if (this.disabledGameEventGoIds.has(go.id)) return;\n\n const ev = go.getComponent(Event);\n if (!ev) return;\n\n const container = this.getRendererContainer(go);\n if (!container) return;\n\n try {\n container.interactive = false;\n this.disabledGameEventGoIds.add(go.id);\n } catch {\n /* ignore */\n }\n }\n\n private restoreDisabledGameEvents() {\n for (const id of [...this.disabledGameEventGoIds]) {\n const go = this.findGameObjectById(id);\n if (!go || go.destroyed) {\n this.disabledGameEventGoIds.delete(id);\n continue;\n }\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n this.disabledGameEventGoIds.delete(id);\n }\n }\n\n private detachAllPicks() {\n for (const go of [...this.tapOwners.values()]) {\n this.releasePick(go);\n }\n }\n\n private ensurePick(go: GameObject) {\n if (this.tapHandlers.has(go.id)) return;\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createPickEvent(go));\n this.pickEvents.add(go.id);\n }\n\n const handler: TapListener = payload => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createPickEvent(go: GameObject): Event {\n const bounds = this.resolvePickBounds(go);\n if (bounds.width > 0 && bounds.height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n if (this.shouldPreferRenderedBounds(go)) {\n const fromOwnGraphics = this.resolveOwnGraphicsLocalBounds(go);\n if (fromOwnGraphics) {\n return fromOwnGraphics;\n }\n\n const fromGraphics = this.resolveContainerLocalBounds(go);\n if (fromGraphics) {\n return fromGraphics;\n }\n }\n\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private shouldPreferRenderedBounds(go: GameObject): boolean {\n return go.getComponent(Graphics) != null;\n }\n\n /** Bounds of this GO's own Graphics only — excludes child GOs such as the selection outline. */\n private resolveOwnGraphicsLocalBounds(go: GameObject): PickBounds | null {\n const gfx = go.getComponent(Graphics);\n if (!gfx?.graphics) return null;\n\n try {\n const bounds = gfx.graphics.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n const outlineContainer = this.getOutlineContainerIfChildOf(go);\n let outlineDetached = false;\n if (outlineContainer?.parent === container) {\n container.removeChild(outlineContainer);\n outlineDetached = true;\n }\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n } finally {\n if (outlineDetached && outlineContainer) {\n container.addChild(outlineContainer);\n }\n }\n\n return null;\n }\n\n /** Outline is parented under the selected GO; exclude it when measuring content bounds. */\n private getOutlineContainerIfChildOf(go: GameObject) {\n if (!this.outlineGo || this.outlineGo.parent !== go) {\n return null;\n }\n return this.getRendererContainer(this.outlineGo);\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releasePick(go: GameObject) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n\n if (this.pickEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.pickEvents.delete(go.id);\n }\n }\n\n private postSetSuccess(enabled: boolean) {\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n enabled,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, { enabled });\n }\n\n private postStateChanged() {\n const state = {\n paused: this.isPaused,\n muted: this.isMuted,\n };\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n ...state,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, state);\n }\n\n private getSoundSystem(): SoundSystemLike | null {\n const system = this.game.getSystem('SoundSystem') as unknown;\n if (\n !system ||\n typeof system !== 'object' ||\n !('muted' in system) ||\n typeof (system as SoundSystemLike).muted !== 'boolean'\n ) {\n return null;\n }\n return system as SoundSystemLike;\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n tap?.stopPropagation?.();\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelectionAndNotify(reason: DevelopmentToolDeselectReason) {\n const hadSelection = this.selected != null;\n this.clearSelection();\n if (!shouldNotifyGameObjectDeselected(hadSelection)) {\n return;\n }\n this.postGameObjectDeselected(reason);\n }\n\n private postGameObjectDeselected(reason: DevelopmentToolDeselectReason) {\n const payload = buildGameObjectDeselectedPayload(reason);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(payload.type, { reason });\n }\n\n private clearSelection() {\n this.selected = null;\n this.invalidateOutlineBounds();\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n\n /** Redraw the green outline only when content bounds change (movement follows via child transform). */\n private updateSelectionOutline() {\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n if (this.lastOutlineBounds && this.pickBoundsEqual(this.lastOutlineBounds, bounds)) {\n return;\n }\n\n this.lastOutlineBounds = bounds;\n const g = gfxComp.graphics;\n g.clear();\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: 1 });\n }\n\n private invalidateOutlineBounds() {\n this.lastOutlineBounds = null;\n }\n\n private pickBoundsEqual(a: PickBounds, b: PickBounds): boolean {\n const eps = 0.01;\n return (\n Math.abs(a.x - b.x) < eps &&\n Math.abs(a.y - b.y) < eps &&\n Math.abs(a.width - b.width) < eps &&\n Math.abs(a.height - b.height) < eps\n );\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.26\",\n});\n"],"names":["Component","CombosDevelopmentToolSystem","System","OBSERVER_TYPE","Event","HIT_AREA_TYPE","Graphics","RendererSystem","GameObject","__decorate","decorators"],"mappings":";;;;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,mCAAmC,GAC9C;AAEF;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,uCAAuC,GAClD;AAEF;AACO,MAAM,6CAA6C,GACxD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;AAE7C;AACO,MAAM,kCAAkC,GAC7C;AAEF;AACO,MAAM,iCAAiC,GAC5C;AAEF;AACO,MAAM,qCAAqC,GAChD;;AChCF;;;;AAIG;AACW,MAAO,2BAA4B,SAAQA,gBAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;IAKvC;aAPS,IAAA,CAAA,aAA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AE,EAAE;KAChC;AACoB,CAAA,EAAAT,6BAA2B,CA0rB/C;kCA1rBoBA,6BAA2B;;ACnGhD;AAIA,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE;AACzC,IAAA,WAAW,EAAE,qCAAqC;AAClD,IAAA,cAAc,EAAE,QAAQ;AACzB,CAAA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin-development-tool.cjs.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/messageOrigin.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/selectionNotify.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** iframe → parent: `setEnabled` finished (pick attach after enable, or restore after disable). Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS =\n 'combos-development-tool:set-success' as const;\n\n/** Re-scan the scene tree while the development tool is enabled. */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: clear the current in-canvas selection outline. */\nexport const COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION =\n 'combos-development-tool:clear-selection' as const;\n\n/** Emitted to `window.parent` when the current selection is cleared. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED =\n 'combos-development-tool:gameobject-deselected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n\n/**\n * Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`.\n *\n * Note: play / pause / resume are owned by the engine core lifecycle protocol\n * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.\n */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_MUTED =\n 'combos-development-tool:set-muted' as const;\n\n/** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */\nexport const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED =\n 'combos-development-tool:state-changed' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Marks a `GameObject` as selectable in editor pick mode. While the development tool is enabled,\n * only nodes carrying this component receive a pick `Event`; all other game `Event` components\n * are removed and cached until disable.\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Default inbound postMessage host suffixes (host + all subdomains). */\nexport const DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES = [\n 'knoffice.tech',\n 'converge.ai',\n] as const;\n\n/**\n * Returns whether `origin` is allowed by `allowed`.\n *\n * Each entry in `allowed` is either:\n * - a **host suffix** (e.g. `knoffice.tech`) — matches that host and `*.knoffice.tech`;\n * - a **full origin** (e.g. `https://creator.knoffice.tech`) — exact match;\n * - `'*'` — accept any origin (escape hatch).\n */\nexport function isAllowedMessageOrigin(\n origin: string,\n allowed: readonly string[],\n): boolean {\n if (allowed.includes('*')) {\n return true;\n }\n if (allowed.length === 0) {\n return false;\n }\n\n let parsed: URL;\n try {\n parsed = new URL(origin);\n } catch {\n return false;\n }\n\n const originLower = origin.toLowerCase();\n const hostLower = parsed.hostname.toLowerCase();\n\n for (const entry of allowed) {\n const trimmed = entry.trim();\n if (!trimmed) {\n continue;\n }\n\n if (trimmed.includes('://')) {\n if (originLower === trimmed.toLowerCase()) {\n return true;\n }\n continue;\n }\n\n const suffix = trimmed.toLowerCase().replace(/^\\./, '');\n if (hostLower === suffix || hostLower.endsWith(`.${suffix}`)) {\n return true;\n }\n }\n\n return false;\n}\n\n/** Defaults plus any extra entries (deduped). `['*']` alone accepts any origin. */\nexport function mergeAllowedMessageOrigins(extra?: string[]): string[] {\n if (!extra?.length) {\n return [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES];\n }\n if (extra.includes('*')) {\n return ['*'];\n }\n\n const seen = new Set<string>();\n const result: string[] = [];\n for (const entry of [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, ...extra]) {\n const trimmed = entry.trim();\n if (!trimmed || seen.has(trimmed)) {\n continue;\n }\n seen.add(trimmed);\n result.push(trimmed);\n }\n return result;\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Graphics: new Set(['graphics']),\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n} from './constants';\n\nexport type DevelopmentToolDeselectReason = 'parent-request' | 'pick-disabled' | 'target-removed';\n\nexport function buildGameObjectDeselectedPayload(reason: DevelopmentToolDeselectReason) {\n return {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n reason,\n } as const;\n}\n\nexport function shouldNotifyGameObjectDeselected(hadSelection: boolean): boolean {\n return hadSelection;\n}\n\nexport function isClearSelectionMessage(data: unknown): boolean {\n if (!data || typeof data !== 'object') {\n return false;\n }\n return (data as { type?: string }).type === COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION;\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n COMBOS_DEVELOPMENT_TOOL_SET_MUTED,\n COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isAllowedMessageOrigin,\n mergeAllowedMessageOrigins,\n} from './messageOrigin';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\nimport {\n buildGameObjectDeselectedPayload,\n isClearSelectionMessage,\n shouldNotifyGameObjectDeselected,\n type DevelopmentToolDeselectReason,\n} from './selectionNotify';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n stopPropagation?: () => void;\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype TapListener = (payload?: TapEventPayload) => void;\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * Extra inbound `postMessage` origins merged with {@link DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES}.\n * Each entry is a host suffix (e.g. `localhost`) or full origin. Pass `['*']` to accept any origin.\n */\n allowedMessageOrigins?: string[];\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\ntype SetMutedPayload = { muted?: boolean };\n\ntype SoundSystemLike = {\n muted: boolean;\n};\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Off** at start. While enabled:\n * - soft-disables game `Event` hit targets (`container.interactive = false`, restored on disable);\n * - attaches pick `Event` + outline only on nodes with {@link CombosDevelopmentToolTarget}.\n *\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * Mute (independent of pick mode; parent toolbar or in-game debug UI):\n * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, { muted: true })` or `.setMuted(true)`\n * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.\n * Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.\n *\n * Play / pause / resume are handled by the engine core lifecycle protocol\n * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.\n *\n * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,\n * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private allowedMessageOrigins = mergeAllowedMessageOrigins();\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, TapListener>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** Game `Event` hit targets soft-disabled while enabled (`container.interactive = false`). */\n private readonly disabledGameEventGoIds = new Set<number>();\n /** Pick `Event` injected for {@link CombosDevelopmentToolTarget} nodes. */\n private readonly pickEvents = new Set<number>();\n private needsRescan = false;\n private lastOutlineBounds: PickBounds | null = null;\n /** Remembered mute when `SoundSystem` is not registered yet. */\n private mutedWithoutSoundSystem = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowSetMuted = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetMutedPayload>).detail;\n if (d && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n if (!isAllowedMessageOrigin(e.origin, this.allowedMessageOrigins)) {\n return;\n }\n\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (isClearSelectionMessage(d)) {\n this.clearSelectionAndNotify('parent-request');\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onGameSetMuted = (payload: SetMutedPayload) => {\n if (payload && typeof payload.muted === 'boolean') {\n this.setMuted(payload.muted);\n }\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled) {\n this.needsRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.clearSelectionAndNotify('pick-disabled');\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelectionAndNotify('pick-disabled');\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.postSetSuccess(false);\n } else {\n this.needsRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n /** Master mute when `SoundSystem` exists; otherwise the last requested value. */\n get isMuted(): boolean {\n const sound = this.getSoundSystem();\n if (sound) {\n return sound.muted;\n }\n return this.mutedWithoutSoundSystem;\n }\n\n /**\n * Mute or unmute audio via `SoundSystem` when registered.\n * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.\n */\n setMuted(muted: boolean) {\n const sound = this.getSoundSystem();\n if (sound) {\n sound.muted = muted;\n } else {\n this.mutedWithoutSoundSystem = muted;\n }\n this.postStateChanged();\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsRescan) {\n this.needsRescan = false;\n this.attachEditMode();\n this.postSetSuccess(true);\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releasePick(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n this.updateSelectionOutline();\n }\n\n componentChanged(changed: ComponentChanged) {\n if (!this.enabled) return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.stripGameEvent(gameObject);\n this.ensurePick(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releasePick(gameObject);\n if (this.selected === gameObject) {\n this.clearSelectionAndNotify('target-removed');\n }\n }\n }\n\n /** Re-bind pick targets after dynamic scene changes while enabled. */\n requestSceneRescan() {\n if (!this.enabled) return;\n this.needsRescan = true;\n }\n\n private attachEditMode() {\n this.detachAllPicks();\n\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n this.stripGameEvent(go);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensurePick(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private isIgnoredPickGo(go: GameObject): boolean {\n return go.name === OUTLINE_GO_NAME || go === this.outlineGo;\n }\n\n private stripGameEvent(go: GameObject) {\n if (this.disabledGameEventGoIds.has(go.id)) return;\n\n const ev = go.getComponent(Event);\n if (!ev) return;\n\n const container = this.getRendererContainer(go);\n if (!container) return;\n\n try {\n container.interactive = false;\n this.disabledGameEventGoIds.add(go.id);\n } catch {\n /* ignore */\n }\n }\n\n private restoreDisabledGameEvents() {\n for (const id of [...this.disabledGameEventGoIds]) {\n const go = this.findGameObjectById(id);\n if (!go || go.destroyed) {\n this.disabledGameEventGoIds.delete(id);\n continue;\n }\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n this.disabledGameEventGoIds.delete(id);\n }\n }\n\n private detachAllPicks() {\n for (const go of [...this.tapOwners.values()]) {\n this.releasePick(go);\n }\n }\n\n private ensurePick(go: GameObject) {\n if (this.tapHandlers.has(go.id)) return;\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createPickEvent(go));\n this.pickEvents.add(go.id);\n }\n\n const handler: TapListener = payload => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createPickEvent(go: GameObject): Event {\n const bounds = this.resolvePickBounds(go);\n if (bounds.width > 0 && bounds.height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n if (this.shouldPreferRenderedBounds(go)) {\n const fromOwnGraphics = this.resolveOwnGraphicsLocalBounds(go);\n if (fromOwnGraphics) {\n return fromOwnGraphics;\n }\n\n const fromGraphics = this.resolveContainerLocalBounds(go);\n if (fromGraphics) {\n return fromGraphics;\n }\n }\n\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private shouldPreferRenderedBounds(go: GameObject): boolean {\n return go.getComponent(Graphics) != null;\n }\n\n /** Bounds of this GO's own Graphics only — excludes child GOs such as the selection outline. */\n private resolveOwnGraphicsLocalBounds(go: GameObject): PickBounds | null {\n const gfx = go.getComponent(Graphics);\n if (!gfx?.graphics) return null;\n\n try {\n const bounds = gfx.graphics.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n const outlineContainer = this.getOutlineContainerIfChildOf(go);\n let outlineDetached = false;\n if (outlineContainer?.parent === container) {\n container.removeChild(outlineContainer);\n outlineDetached = true;\n }\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n } finally {\n if (outlineDetached && outlineContainer) {\n container.addChild(outlineContainer);\n }\n }\n\n return null;\n }\n\n /** Outline is parented under the selected GO; exclude it when measuring content bounds. */\n private getOutlineContainerIfChildOf(go: GameObject) {\n if (!this.outlineGo || this.outlineGo.parent !== go) {\n return null;\n }\n return this.getRendererContainer(this.outlineGo);\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releasePick(go: GameObject) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n\n if (this.pickEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.pickEvents.delete(go.id);\n }\n }\n\n private postSetSuccess(enabled: boolean) {\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n enabled,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, { enabled });\n }\n\n private postStateChanged() {\n const state = {\n muted: this.isMuted,\n };\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n ...state,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, state);\n }\n\n private getSoundSystem(): SoundSystemLike | null {\n const system = this.game.getSystem('SoundSystem') as unknown;\n if (\n !system ||\n typeof system !== 'object' ||\n !('muted' in system) ||\n typeof (system as SoundSystemLike).muted !== 'boolean'\n ) {\n return null;\n }\n return system as SoundSystemLike;\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n tap?.stopPropagation?.();\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelectionAndNotify(reason: DevelopmentToolDeselectReason) {\n const hadSelection = this.selected != null;\n this.clearSelection();\n if (!shouldNotifyGameObjectDeselected(hadSelection)) {\n return;\n }\n this.postGameObjectDeselected(reason);\n }\n\n private postGameObjectDeselected(reason: DevelopmentToolDeselectReason) {\n const payload = buildGameObjectDeselectedPayload(reason);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(payload.type, { reason });\n }\n\n private clearSelection() {\n this.selected = null;\n this.invalidateOutlineBounds();\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n\n /** Redraw the green outline only when content bounds change (movement follows via child transform). */\n private updateSelectionOutline() {\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n if (this.lastOutlineBounds && this.pickBoundsEqual(this.lastOutlineBounds, bounds)) {\n return;\n }\n\n this.lastOutlineBounds = bounds;\n const g = gfxComp.graphics;\n g.clear();\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: 1 });\n }\n\n private invalidateOutlineBounds() {\n this.lastOutlineBounds = null;\n }\n\n private pickBoundsEqual(a: PickBounds, b: PickBounds): boolean {\n const eps = 0.01;\n return (\n Math.abs(a.x - b.x) < eps &&\n Math.abs(a.y - b.y) < eps &&\n Math.abs(a.width - b.width) < eps &&\n Math.abs(a.height - b.height) < eps\n );\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.27\",\n});\n"],"names":["Component","CombosDevelopmentToolSystem","System","OBSERVER_TYPE","Event","HIT_AREA_TYPE","Graphics","RendererSystem","GameObject","__decorate","decorators"],"mappings":";;;;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,mCAAmC,GAC9C;AAEF;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,uCAAuC,GAClD;AAEF;AACO,MAAM,6CAA6C,GACxD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;AAE7C;;;;;AAKG;AACI,MAAM,iCAAiC,GAC5C;AAEF;AACO,MAAM,qCAAqC,GAChD;;ACjCF;;;;AAIG;AACW,MAAO,2BAA4B,SAAQA,gBAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;IAKvC;aAPS,IAAA,CAAA,aAAa,GAAG,6BAAH,CAAiC;AAIrD,IAAA,IAAI,CAAC,MAA0C,EAAA;AAC7C,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;IAC7D;;;ACnBF;AACO,MAAM,qCAAqC,GAAG;IACnD,eAAe;IACf,aAAa;;AAGf;;;;;;;AAOG;AACG,SAAU,sBAAsB,CACpC,MAAc,EACd,OAA0B,EAAA;AAE1B,IAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACzB,QAAA,OAAO,IAAI;IACb;AACA,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC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,QAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI;IAC/B;IAEQ,eAAe,CAAC,CAAa,EAAE,CAAa,EAAA;QAClD,MAAM,GAAG,GAAG,IAAI;AAChB,QAAA,QACE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;AACzB,YAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;AACzB,YAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,GAAG;AACjC,YAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG;IAEvC;;AAppBmBL,6BAA2B,GAAAQ,gBAAA,CAAA;IAH/CC,iBAAU,CAAC,iBAAiB,CAAC;AAC5B,QAAA,2BAA2B,EAAE,EAAE;KAChC;AACoB,CAAA,EAAAT,6BAA2B,CAqpB/C;kCArpBoBA,6BAA2B;;ACnGhD;AAIA,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE;AACzC,IAAA,WAAW,EAAE,qCAAqC;AAClD,IAAA,cAAc,EAAE,QAAQ;AACzB,CAAA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- "use strict";var e=require("tslib"),t=require("@combos-fun/engine"),n=require("@combos-fun/plugin-renderer"),o=require("@combos-fun/plugin-renderer-graphics"),s=require("@combos-fun/plugin-renderer-event");const i="combos-development-tool:set",r="combos-development-tool:set-success",a="combos-development-tool:refresh",d="combos-development-tool:gameobject-selected",c="combos-development-tool:clear-selection",l="combos-development-tool:gameobject-deselected",h="combos-development-tool:apply-property",u="combos-development-tool:set-paused",p="combos-development-tool:set-muted",m="combos-development-tool:state-changed";class f extends t.Component{constructor(){super(...arguments),this.payload={}}static{this.componentName="CombosDevelopmentToolTarget"}init(e){this.payload=e?.payload?{...e.payload}:{}}}const g=["knoffice.tech","converge.ai"];function y(e,t){if(t.includes("*"))return!0;if(0===t.length)return!1;let n;try{n=new URL(e)}catch{return!1}const o=e.toLowerCase(),s=n.hostname.toLowerCase();for(const e of t){const t=e.trim();if(!t)continue;if(t.includes("://")){if(o===t.toLowerCase())return!0;continue}const n=t.toLowerCase().replace(/^\./,"");if(s===n||s.endsWith(`.${n}`))return!0}return!1}function w(e){if(!e?.length)return[...g];if(e.includes("*"))return["*"];const t=new Set,n=[];for(const o of[...g,...e]){const e=o.trim();e&&!t.has(e)&&(t.add(e),n.push(e))}return n}const O=new Set(["gameObject","name","started","__componentDefaultParams","destroyed","inScene","worldTransform","children","_parent"]),b={Graphics:new Set(["graphics"]),Physics:new Set(["body","Body","PhysicsEngine","World","Constraint","mouseConstraint","bodyParams"]),Event:new Set(["hitArea"])};function E(e,t=0){if(null==e)return e;if("number"==typeof e||"string"==typeof e||"boolean"==typeof e)return e;if(!(t>6)){if(Array.isArray(e))return e.map(e=>E(e,t+1));if("object"==typeof e){const n={};for(const[o,s]of Object.entries(e)){if("function"==typeof s)continue;const e=E(s,t+1);void 0!==e&&(n[o]=e)}return n}}}function S(e){const t={},n=b[e.name];for(const o of Object.keys(e)){if(O.has(o)||o.startsWith("_"))continue;if(n?.has(o))continue;const s=e[o];if("function"==typeof s)continue;const i=E(s);void 0!==i&&(t[o]=i)}return t}function v(e){const t=e.getComponent(f),n=t?.payload?.source;var o;if((o=n)&&"object"==typeof o&&"string"==typeof o.file)return{file:n.file,anchor:n.anchor??e.name}}function G(e){const t=e.components.filter(e=>"CombosDevelopmentToolTarget"!==e.name).map(e=>({componentName:e.name,fields:S(e)}));return{id:e.id,name:e.name,components:t,source:v(e)}}function C(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;let i=s;for(let e=0;e<n.length-1;e++){const t=n[e];void 0!==i[t]&&null!==i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=o,!0}const M=new Set(["position","size","origin","anchor","scale","skew"]);function P(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}const T={Transform:function(e,t,n,o){const s=e.transform??t,i=s;if(1===n.length&&"rotation"===n[0]){const e=P(o);return void 0!==e&&(s.rotation=e,!0)}if(2===n.length&&M.has(n[0])){const t=n[0],s=n[1],r=P(o);if(void 0===r)return!1;const a=i[t];return!(!a||"object"!=typeof a)&&(a[s]=r,"position"===t&&(function(e){const t=e.getComponent("Physics");if(!t?.body)return;const{x:n,y:o}=e.transform.position;t.Body?.setPosition?t.Body.setPosition(t.body,{x:n,y:o}):(t.body.position.x=n,t.body.position.y=o)}(e),function(e){const t=e.getComponent("PlatformerMover");t&&(t.originX=e.transform.position.x,t.originY=e.transform.position.y)}(e)),!0)}return!1},Text:function(e,t,n,o){const s=t;if(1===n.length&&"text"===n[0])return s.text=String(o??""),!0;if(2===n.length&&"style"===n[0]){const e=n[1],t={...s.style??{},[e]:o};return s.style=t,!0}return!1},Sound:function(e,t,n,o){const s=t;if(1===n.length&&"volume"===n[0]||2===n.length&&"config"===n[0]&&"volume"===n[1]){const e=P(o);return void 0!==e&&(s.volume=e,!0)}return!1}};function _(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;const i=T[t];return!!i?.(e,s,n,o)||C(e,t,n,o)}function L(e){return{type:l,reason:e}}function B(e){return e}function x(e){return!(!e||"object"!=typeof e)&&e.type===c}const D="__combosDevelopmentToolOutline";let R=class extends t.System{constructor(){super(...arguments),this.postMessageOrigin="*",this.allowedMessageOrigins=w(),this.enabled=!1,this.outlineGo=null,this.selected=null,this.tapHandlers=new Map,this.tapOwners=new Map,this.disabledGameEventGoIds=new Set,this.pickEvents=new Set,this.needsRescan=!1,this.lastOutlineBounds=null,this.mutedWithoutSoundSystem=!1,this.onWindowSet=e=>{const t=e.detail;t&&"boolean"==typeof t.enabled&&this.setEnabled(t.enabled)},this.onWindowSetPaused=e=>{const t=e.detail;t&&"boolean"==typeof t.paused&&this.setPaused(t.paused)},this.onWindowSetMuted=e=>{const t=e.detail;t&&"boolean"==typeof t.muted&&this.setMuted(t.muted)},this.onWindowMessage=e=>{if(!y(e.origin,this.allowedMessageOrigins))return;const t=e.data;t&&"object"==typeof t&&(t.type===i&&"boolean"==typeof t.enabled?this.setEnabled(t.enabled):t.type===u&&"boolean"==typeof t.paused?this.setPaused(t.paused):t.type===p&&"boolean"==typeof t.muted?this.setMuted(t.muted):t.type===a?this.requestSceneRescan():x(t)?this.clearSelectionAndNotify("parent-request"):t.type===h&&this.handleApplyProperty(t))},this.onGameSet=e=>{e&&"boolean"==typeof e.enabled&&this.setEnabled(e.enabled)},this.onGameRefresh=()=>{this.requestSceneRescan()},this.onGameSetPaused=e=>{e&&"boolean"==typeof e.paused&&this.setPaused(e.paused)},this.onGameSetMuted=e=>{e&&"boolean"==typeof e.muted&&this.setMuted(e.muted)},this.onWindowRefresh=()=>{this.requestSceneRescan()}}static{this.systemName="CombosDevelopmentToolSystem"}init(e){this.postMessageOrigin=e?.postMessageOrigin??"*",this.allowedMessageOrigins=w(e?.allowedMessageOrigins),"undefined"!=typeof window&&(window.addEventListener(i,this.onWindowSet),window.addEventListener(u,this.onWindowSetPaused),window.addEventListener(p,this.onWindowSetMuted),window.addEventListener(a,this.onWindowRefresh),window.addEventListener("message",this.onWindowMessage)),this.game.on(i,this.onGameSet),this.game.on(u,this.onGameSetPaused),this.game.on(p,this.onGameSetMuted),this.game.on(a,this.onGameRefresh),this.enabled&&(this.needsRescan=!0)}onDestroy(){"undefined"!=typeof window&&(window.removeEventListener(i,this.onWindowSet),window.removeEventListener(u,this.onWindowSetPaused),window.removeEventListener(p,this.onWindowSetMuted),window.removeEventListener(a,this.onWindowRefresh),window.removeEventListener("message",this.onWindowMessage)),this.game.off(i,this.onGameSet),this.game.off(u,this.onGameSetPaused),this.game.off(p,this.onGameSetMuted),this.game.off(a,this.onGameRefresh),this.detachAllPicks(),this.restoreDisabledGameEvents(),this.clearSelectionAndNotify("pick-disabled")}setEnabled(e){this.enabled!==e&&(this.enabled=e,e?this.needsRescan=!0:(this.clearSelectionAndNotify("pick-disabled"),this.detachAllPicks(),this.restoreDisabledGameEvents(),this.postSetSuccess(!1)))}get isEnabled(){return this.enabled}get isPaused(){return!this.game.playing}get isMuted(){const e=this.getSoundSystem();return e?e.muted:this.mutedWithoutSoundSystem}setPaused(e){e?this.game.playing&&this.game.pause():this.game.playing||this.game.resume(),this.postStateChanged()}setMuted(e){const t=this.getSoundSystem();t?t.muted=e:this.mutedWithoutSoundSystem=e,this.postStateChanged()}update(e){this.enabled&&this.needsRescan&&(this.needsRescan=!1,this.attachEditMode(),this.postSetSuccess(!0));for(const e of[...this.tapOwners.values()])e.destroyed&&this.releasePick(e);this.enabled&&this.selected&&this.outlineGo&&this.updateSelectionOutline()}componentChanged(e){if(!this.enabled)return;const{type:n,gameObject:o,componentName:s}=e;o&&"CombosDevelopmentToolTarget"===s&&(n===t.OBSERVER_TYPE.ADD?(this.stripGameEvent(o),this.ensurePick(o)):n===t.OBSERVER_TYPE.REMOVE&&(this.releasePick(o),this.selected===o&&this.clearSelectionAndNotify("target-removed")))}requestSceneRescan(){this.enabled&&(this.needsRescan=!0)}attachEditMode(){this.detachAllPicks();const e=[];for(const t of this.game.scene.transform.children)this.collectGameObjects(t.gameObject,e);for(const t of e)this.isIgnoredPickGo(t)||this.stripGameEvent(t);for(const t of e)this.isIgnoredPickGo(t)||t.getComponent(f)&&this.ensurePick(t)}collectGameObjects(e,t){t.push(e);for(const n of e.transform.children)this.collectGameObjects(n.gameObject,t)}isIgnoredPickGo(e){return e.name===D||e===this.outlineGo}stripGameEvent(e){if(this.disabledGameEventGoIds.has(e.id))return;if(!e.getComponent(s.Event))return;const t=this.getRendererContainer(e);if(t)try{t.interactive=!1,this.disabledGameEventGoIds.add(e.id)}catch{}}restoreDisabledGameEvents(){for(const e of[...this.disabledGameEventGoIds]){const t=this.findGameObjectById(e);if(!t||t.destroyed){this.disabledGameEventGoIds.delete(e);continue}const n=this.getRendererContainer(t);if(n)try{n.interactive=!0}catch{}this.disabledGameEventGoIds.delete(e)}}detachAllPicks(){for(const e of[...this.tapOwners.values()])this.releasePick(e)}ensurePick(e){if(this.tapHandlers.has(e.id))return;const t=this.getRendererContainer(e);if(t)try{t.interactive=!0}catch{}let n=e.getComponent(s.Event);n||(n=e.addComponent(this.createPickEvent(e)),this.pickEvents.add(e.id));const o=t=>this.onSelect(e,t);this.tapHandlers.set(e.id,o),this.tapOwners.set(e.id,e),n.on("tap",o)}createPickEvent(e){const t=this.resolvePickBounds(e);return t.width>0&&t.height>0?new s.Event({hitArea:{type:s.HIT_AREA_TYPE.Rect,style:{x:t.x,y:t.y,width:t.width,height:t.height}}}):new s.Event}resolvePickBounds(e){if(this.shouldPreferRenderedBounds(e)){const t=this.resolveOwnGraphicsLocalBounds(e);if(t)return t;const n=this.resolveContainerLocalBounds(e);if(n)return n}const{width:t,height:n}=e.transform.size;if(t>0&&n>0)return{x:0,y:0,width:t,height:n};const o=this.resolveContainerLocalBounds(e);return o||{x:0,y:0,width:1,height:1}}shouldPreferRenderedBounds(e){return null!=e.getComponent(o.Graphics)}resolveOwnGraphicsLocalBounds(e){const t=e.getComponent(o.Graphics);if(!t?.graphics)return null;try{const e=t.graphics.getLocalBounds();if(e.width>0&&e.height>0)return{x:e.x,y:e.y,width:e.width,height:e.height}}catch{}return null}resolveContainerLocalBounds(e){const t=this.getRendererContainer(e);if(!t)return null;const n=this.getOutlineContainerIfChildOf(e);let o=!1;n?.parent===t&&(t.removeChild(n),o=!0);try{const e=t.getLocalBounds();if(e.width>0&&e.height>0)return{x:e.x,y:e.y,width:e.width,height:e.height}}catch{}finally{o&&n&&t.addChild(n)}return null}getOutlineContainerIfChildOf(e){return this.outlineGo&&this.outlineGo.parent===e?this.getRendererContainer(this.outlineGo):null}getRendererContainer(e){const t=this.game.getSystem(n.RendererSystem);if(!t?.containerManager)return null;try{return t.containerManager.getContainer(e.id)}catch{return null}}releasePick(e){const t=this.tapHandlers.get(e.id);if(!t)return;const n=e.getComponent(s.Event);if(n?.off("tap",t),this.tapHandlers.delete(e.id),this.tapOwners.delete(e.id),this.pickEvents.has(e.id)){try{e.removeComponent(s.Event)}catch{}this.pickEvents.delete(e.id)}}postSetSuccess(e){const t={type:r,enabled:e};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(t,this.postMessageOrigin),this.game.emit(r,{enabled:e})}postStateChanged(){const e={paused:this.isPaused,muted:this.isMuted},t={type:m,...e};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(t,this.postMessageOrigin),this.game.emit(m,e)}getSoundSystem(){const e=this.game.getSystem("SoundSystem");return e&&"object"==typeof e&&"muted"in e&&"boolean"==typeof e.muted?e:null}ensureOutline(){if(this.outlineGo)return;const e=new t.GameObject(D,{size:{width:1,height:1},position:{x:0,y:0},origin:{x:0,y:0}});e.addComponent(new o.Graphics),this.outlineGo=e}onSelect(e,t){if(!this.enabled)return;if(t?.stopPropagation?.(),this.ensureOutline(),!this.outlineGo)return;this.selected=e,this.outlineGo.parent&&this.outlineGo.remove(),e.addChild(this.outlineGo),this.invalidateOutlineBounds(),this.updateSelectionOutline();const n=G(e),o={type:d,snapshot:n,pointer:t?.data?.position??null};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(o,this.postMessageOrigin)}findGameObjectById(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);return t.find(t=>t.id===e)??null}findGameObjectBySource(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);const n=e.file.trim(),o=(e.anchor??"").trim();if(!o)return null;for(const e of t){const t=v(e);if(!t||t.file!==n)continue;if((t.anchor??e.name)===o)return e}return null}resolveApplyTarget(e){if("number"==typeof e.gameObjectId){const t=this.findGameObjectById(e.gameObjectId);if(t)return t}const t=e.source?.file?.trim(),n=e.source?.anchor?.trim();return t&&n?this.findGameObjectBySource({file:t,anchor:n}):null}handleApplyProperty(e){const t=e.componentName,n=e.path,o="number"==typeof e.gameObjectId,s=Boolean(e.source?.file?.trim())&&Boolean(e.source?.anchor?.trim());if(!o&&!s||"string"!=typeof t||!Array.isArray(n)||0===n.length)return;const i=this.resolveApplyTarget(e);if(!i)return;_(i,t,n,e.value)&&this.selected?.id===i.id&&(this.invalidateOutlineBounds(),this.updateSelectionOutline(),this.postSnapshotUpdate(i))}postSnapshotUpdate(e){const t=G(e);"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage({type:d,snapshot:t,pointer:null,source:"property-applied"},this.postMessageOrigin)}clearSelectionAndNotify(e){const t=null!=this.selected;this.clearSelection(),t&&this.postGameObjectDeselected(e)}postGameObjectDeselected(e){const t=L(e);"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(t,this.postMessageOrigin),this.game.emit(t.type,{reason:e})}clearSelection(){this.selected=null,this.invalidateOutlineBounds(),this.outlineGo?.parent&&this.outlineGo.remove();const e=this.outlineGo?.getComponent(o.Graphics);e?.graphics&&e.graphics.clear()}updateSelectionOutline(){if(!this.enabled||!this.selected||!this.outlineGo)return;const e=this.outlineGo.getComponent(o.Graphics);if(!e?.graphics)return;const t=this.resolvePickBounds(this.selected);if(this.lastOutlineBounds&&this.pickBoundsEqual(this.lastOutlineBounds,t))return;this.lastOutlineBounds=t;const n=e.graphics;n.clear(),n.rect(t.x,t.y,t.width,t.height),n.stroke({width:4,color:5636010,alpha:1})}invalidateOutlineBounds(){this.lastOutlineBounds=null}pickBoundsEqual(e,t){const n=.01;return Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<n&&Math.abs(e.width-t.width)<n&&Math.abs(e.height-t.height)<n}};R=e.__decorate([t.decorators.componentObserver({CombosDevelopmentToolTarget:[]})],R);var j=R;Object.assign(j,{packageName:"@combos-fun/plugin-development-tool",packageVersion:"0.0.26"}),exports.COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY=h,exports.COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION=c,exports.COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED=l,exports.COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED=d,exports.COMBOS_DEVELOPMENT_TOOL_READY="combos-development-tool:ready",exports.COMBOS_DEVELOPMENT_TOOL_REFRESH=a,exports.COMBOS_DEVELOPMENT_TOOL_SET=i,exports.COMBOS_DEVELOPMENT_TOOL_SET_MUTED=p,exports.COMBOS_DEVELOPMENT_TOOL_SET_PAUSED=u,exports.COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS=r,exports.COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED=m,exports.CombosDevelopmentToolSystem=j,exports.CombosDevelopmentToolTarget=f,exports.DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES=g,exports.applyPropertyValue=C,exports.applyPropertyWithHooks=_,exports.buildGameObjectDeselectedPayload=L,exports.buildGameObjectSnapshot=G,exports.isAllowedMessageOrigin=y,exports.isClearSelectionMessage=x,exports.mergeAllowedMessageOrigins=w,exports.readPropertyValue=function(e,t,n){const o=e.getComponent(t);if(!o||!n.length)return;let s=o;for(const e of n){if(null==s||"object"!=typeof s)return;s=s[e]}return s},exports.readSourceAnchor=v,exports.shouldNotifyGameObjectDeselected=B;
1
+ "use strict";var e=require("tslib"),t=require("@combos-fun/engine"),n=require("@combos-fun/plugin-renderer"),o=require("@combos-fun/plugin-renderer-graphics"),s=require("@combos-fun/plugin-renderer-event");const i="combos-development-tool:set",r="combos-development-tool:set-success",a="combos-development-tool:refresh",d="combos-development-tool:gameobject-selected",c="combos-development-tool:clear-selection",l="combos-development-tool:gameobject-deselected",h="combos-development-tool:apply-property",u="combos-development-tool:set-muted",p="combos-development-tool:state-changed";class m extends t.Component{constructor(){super(...arguments),this.payload={}}static{this.componentName="CombosDevelopmentToolTarget"}init(e){this.payload=e?.payload?{...e.payload}:{}}}const f=["knoffice.tech","converge.ai"];function g(e,t){if(t.includes("*"))return!0;if(0===t.length)return!1;let n;try{n=new URL(e)}catch{return!1}const o=e.toLowerCase(),s=n.hostname.toLowerCase();for(const e of t){const t=e.trim();if(!t)continue;if(t.includes("://")){if(o===t.toLowerCase())return!0;continue}const n=t.toLowerCase().replace(/^\./,"");if(s===n||s.endsWith(`.${n}`))return!0}return!1}function y(e){if(!e?.length)return[...f];if(e.includes("*"))return["*"];const t=new Set,n=[];for(const o of[...f,...e]){const e=o.trim();e&&!t.has(e)&&(t.add(e),n.push(e))}return n}const w=new Set(["gameObject","name","started","__componentDefaultParams","destroyed","inScene","worldTransform","children","_parent"]),O={Graphics:new Set(["graphics"]),Physics:new Set(["body","Body","PhysicsEngine","World","Constraint","mouseConstraint","bodyParams"]),Event:new Set(["hitArea"])};function b(e,t=0){if(null==e)return e;if("number"==typeof e||"string"==typeof e||"boolean"==typeof e)return e;if(!(t>6)){if(Array.isArray(e))return e.map(e=>b(e,t+1));if("object"==typeof e){const n={};for(const[o,s]of Object.entries(e)){if("function"==typeof s)continue;const e=b(s,t+1);void 0!==e&&(n[o]=e)}return n}}}function E(e){const t={},n=O[e.name];for(const o of Object.keys(e)){if(w.has(o)||o.startsWith("_"))continue;if(n?.has(o))continue;const s=e[o];if("function"==typeof s)continue;const i=b(s);void 0!==i&&(t[o]=i)}return t}function S(e){const t=e.getComponent(m),n=t?.payload?.source;var o;if((o=n)&&"object"==typeof o&&"string"==typeof o.file)return{file:n.file,anchor:n.anchor??e.name}}function v(e){const t=e.components.filter(e=>"CombosDevelopmentToolTarget"!==e.name).map(e=>({componentName:e.name,fields:E(e)}));return{id:e.id,name:e.name,components:t,source:S(e)}}function G(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;let i=s;for(let e=0;e<n.length-1;e++){const t=n[e];void 0!==i[t]&&null!==i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=o,!0}const C=new Set(["position","size","origin","anchor","scale","skew"]);function M(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}const T={Transform:function(e,t,n,o){const s=e.transform??t,i=s;if(1===n.length&&"rotation"===n[0]){const e=M(o);return void 0!==e&&(s.rotation=e,!0)}if(2===n.length&&C.has(n[0])){const t=n[0],s=n[1],r=M(o);if(void 0===r)return!1;const a=i[t];return!(!a||"object"!=typeof a)&&(a[s]=r,"position"===t&&(function(e){const t=e.getComponent("Physics");if(!t?.body)return;const{x:n,y:o}=e.transform.position;t.Body?.setPosition?t.Body.setPosition(t.body,{x:n,y:o}):(t.body.position.x=n,t.body.position.y=o)}(e),function(e){const t=e.getComponent("PlatformerMover");t&&(t.originX=e.transform.position.x,t.originY=e.transform.position.y)}(e)),!0)}return!1},Text:function(e,t,n,o){const s=t;if(1===n.length&&"text"===n[0])return s.text=String(o??""),!0;if(2===n.length&&"style"===n[0]){const e=n[1],t={...s.style??{},[e]:o};return s.style=t,!0}return!1},Sound:function(e,t,n,o){const s=t;if(1===n.length&&"volume"===n[0]||2===n.length&&"config"===n[0]&&"volume"===n[1]){const e=M(o);return void 0!==e&&(s.volume=e,!0)}return!1}};function P(e,t,n,o){const s=e.getComponent(t);if(!s||!n.length)return!1;const i=T[t];return!!i?.(e,s,n,o)||G(e,t,n,o)}function _(e){return{type:l,reason:e}}function L(e){return e}function B(e){return!(!e||"object"!=typeof e)&&e.type===c}const x="__combosDevelopmentToolOutline";let R=class extends t.System{constructor(){super(...arguments),this.postMessageOrigin="*",this.allowedMessageOrigins=y(),this.enabled=!1,this.outlineGo=null,this.selected=null,this.tapHandlers=new Map,this.tapOwners=new Map,this.disabledGameEventGoIds=new Set,this.pickEvents=new Set,this.needsRescan=!1,this.lastOutlineBounds=null,this.mutedWithoutSoundSystem=!1,this.onWindowSet=e=>{const t=e.detail;t&&"boolean"==typeof t.enabled&&this.setEnabled(t.enabled)},this.onWindowSetMuted=e=>{const t=e.detail;t&&"boolean"==typeof t.muted&&this.setMuted(t.muted)},this.onWindowMessage=e=>{if(!g(e.origin,this.allowedMessageOrigins))return;const t=e.data;t&&"object"==typeof t&&(t.type===i&&"boolean"==typeof t.enabled?this.setEnabled(t.enabled):t.type===u&&"boolean"==typeof t.muted?this.setMuted(t.muted):t.type===a?this.requestSceneRescan():B(t)?this.clearSelectionAndNotify("parent-request"):t.type===h&&this.handleApplyProperty(t))},this.onGameSet=e=>{e&&"boolean"==typeof e.enabled&&this.setEnabled(e.enabled)},this.onGameRefresh=()=>{this.requestSceneRescan()},this.onGameSetMuted=e=>{e&&"boolean"==typeof e.muted&&this.setMuted(e.muted)},this.onWindowRefresh=()=>{this.requestSceneRescan()}}static{this.systemName="CombosDevelopmentToolSystem"}init(e){this.postMessageOrigin=e?.postMessageOrigin??"*",this.allowedMessageOrigins=y(e?.allowedMessageOrigins),"undefined"!=typeof window&&(window.addEventListener(i,this.onWindowSet),window.addEventListener(u,this.onWindowSetMuted),window.addEventListener(a,this.onWindowRefresh),window.addEventListener("message",this.onWindowMessage)),this.game.on(i,this.onGameSet),this.game.on(u,this.onGameSetMuted),this.game.on(a,this.onGameRefresh),this.enabled&&(this.needsRescan=!0)}onDestroy(){"undefined"!=typeof window&&(window.removeEventListener(i,this.onWindowSet),window.removeEventListener(u,this.onWindowSetMuted),window.removeEventListener(a,this.onWindowRefresh),window.removeEventListener("message",this.onWindowMessage)),this.game.off(i,this.onGameSet),this.game.off(u,this.onGameSetMuted),this.game.off(a,this.onGameRefresh),this.detachAllPicks(),this.restoreDisabledGameEvents(),this.clearSelectionAndNotify("pick-disabled")}setEnabled(e){this.enabled!==e&&(this.enabled=e,e?this.needsRescan=!0:(this.clearSelectionAndNotify("pick-disabled"),this.detachAllPicks(),this.restoreDisabledGameEvents(),this.postSetSuccess(!1)))}get isEnabled(){return this.enabled}get isMuted(){const e=this.getSoundSystem();return e?e.muted:this.mutedWithoutSoundSystem}setMuted(e){const t=this.getSoundSystem();t?t.muted=e:this.mutedWithoutSoundSystem=e,this.postStateChanged()}update(e){this.enabled&&this.needsRescan&&(this.needsRescan=!1,this.attachEditMode(),this.postSetSuccess(!0));for(const e of[...this.tapOwners.values()])e.destroyed&&this.releasePick(e);this.enabled&&this.selected&&this.outlineGo&&this.updateSelectionOutline()}componentChanged(e){if(!this.enabled)return;const{type:n,gameObject:o,componentName:s}=e;o&&"CombosDevelopmentToolTarget"===s&&(n===t.OBSERVER_TYPE.ADD?(this.stripGameEvent(o),this.ensurePick(o)):n===t.OBSERVER_TYPE.REMOVE&&(this.releasePick(o),this.selected===o&&this.clearSelectionAndNotify("target-removed")))}requestSceneRescan(){this.enabled&&(this.needsRescan=!0)}attachEditMode(){this.detachAllPicks();const e=[];for(const t of this.game.scene.transform.children)this.collectGameObjects(t.gameObject,e);for(const t of e)this.isIgnoredPickGo(t)||this.stripGameEvent(t);for(const t of e)this.isIgnoredPickGo(t)||t.getComponent(m)&&this.ensurePick(t)}collectGameObjects(e,t){t.push(e);for(const n of e.transform.children)this.collectGameObjects(n.gameObject,t)}isIgnoredPickGo(e){return e.name===x||e===this.outlineGo}stripGameEvent(e){if(this.disabledGameEventGoIds.has(e.id))return;if(!e.getComponent(s.Event))return;const t=this.getRendererContainer(e);if(t)try{t.interactive=!1,this.disabledGameEventGoIds.add(e.id)}catch{}}restoreDisabledGameEvents(){for(const e of[...this.disabledGameEventGoIds]){const t=this.findGameObjectById(e);if(!t||t.destroyed){this.disabledGameEventGoIds.delete(e);continue}const n=this.getRendererContainer(t);if(n)try{n.interactive=!0}catch{}this.disabledGameEventGoIds.delete(e)}}detachAllPicks(){for(const e of[...this.tapOwners.values()])this.releasePick(e)}ensurePick(e){if(this.tapHandlers.has(e.id))return;const t=this.getRendererContainer(e);if(t)try{t.interactive=!0}catch{}let n=e.getComponent(s.Event);n||(n=e.addComponent(this.createPickEvent(e)),this.pickEvents.add(e.id));const o=t=>this.onSelect(e,t);this.tapHandlers.set(e.id,o),this.tapOwners.set(e.id,e),n.on("tap",o)}createPickEvent(e){const t=this.resolvePickBounds(e);return t.width>0&&t.height>0?new s.Event({hitArea:{type:s.HIT_AREA_TYPE.Rect,style:{x:t.x,y:t.y,width:t.width,height:t.height}}}):new s.Event}resolvePickBounds(e){if(this.shouldPreferRenderedBounds(e)){const t=this.resolveOwnGraphicsLocalBounds(e);if(t)return t;const n=this.resolveContainerLocalBounds(e);if(n)return n}const{width:t,height:n}=e.transform.size;if(t>0&&n>0)return{x:0,y:0,width:t,height:n};const o=this.resolveContainerLocalBounds(e);return o||{x:0,y:0,width:1,height:1}}shouldPreferRenderedBounds(e){return null!=e.getComponent(o.Graphics)}resolveOwnGraphicsLocalBounds(e){const t=e.getComponent(o.Graphics);if(!t?.graphics)return null;try{const e=t.graphics.getLocalBounds();if(e.width>0&&e.height>0)return{x:e.x,y:e.y,width:e.width,height:e.height}}catch{}return null}resolveContainerLocalBounds(e){const t=this.getRendererContainer(e);if(!t)return null;const n=this.getOutlineContainerIfChildOf(e);let o=!1;n?.parent===t&&(t.removeChild(n),o=!0);try{const e=t.getLocalBounds();if(e.width>0&&e.height>0)return{x:e.x,y:e.y,width:e.width,height:e.height}}catch{}finally{o&&n&&t.addChild(n)}return null}getOutlineContainerIfChildOf(e){return this.outlineGo&&this.outlineGo.parent===e?this.getRendererContainer(this.outlineGo):null}getRendererContainer(e){const t=this.game.getSystem(n.RendererSystem);if(!t?.containerManager)return null;try{return t.containerManager.getContainer(e.id)}catch{return null}}releasePick(e){const t=this.tapHandlers.get(e.id);if(!t)return;const n=e.getComponent(s.Event);if(n?.off("tap",t),this.tapHandlers.delete(e.id),this.tapOwners.delete(e.id),this.pickEvents.has(e.id)){try{e.removeComponent(s.Event)}catch{}this.pickEvents.delete(e.id)}}postSetSuccess(e){const t={type:r,enabled:e};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(t,this.postMessageOrigin),this.game.emit(r,{enabled:e})}postStateChanged(){const e={muted:this.isMuted},t={type:p,...e};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(t,this.postMessageOrigin),this.game.emit(p,e)}getSoundSystem(){const e=this.game.getSystem("SoundSystem");return e&&"object"==typeof e&&"muted"in e&&"boolean"==typeof e.muted?e:null}ensureOutline(){if(this.outlineGo)return;const e=new t.GameObject(x,{size:{width:1,height:1},position:{x:0,y:0},origin:{x:0,y:0}});e.addComponent(new o.Graphics),this.outlineGo=e}onSelect(e,t){if(!this.enabled)return;if(t?.stopPropagation?.(),this.ensureOutline(),!this.outlineGo)return;this.selected=e,this.outlineGo.parent&&this.outlineGo.remove(),e.addChild(this.outlineGo),this.invalidateOutlineBounds(),this.updateSelectionOutline();const n=v(e),o={type:d,snapshot:n,pointer:t?.data?.position??null};"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(o,this.postMessageOrigin)}findGameObjectById(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);return t.find(t=>t.id===e)??null}findGameObjectBySource(e){const t=[];for(const e of this.game.scene.transform.children)this.collectGameObjects(e.gameObject,t);const n=e.file.trim(),o=(e.anchor??"").trim();if(!o)return null;for(const e of t){const t=S(e);if(!t||t.file!==n)continue;if((t.anchor??e.name)===o)return e}return null}resolveApplyTarget(e){if("number"==typeof e.gameObjectId){const t=this.findGameObjectById(e.gameObjectId);if(t)return t}const t=e.source?.file?.trim(),n=e.source?.anchor?.trim();return t&&n?this.findGameObjectBySource({file:t,anchor:n}):null}handleApplyProperty(e){const t=e.componentName,n=e.path,o="number"==typeof e.gameObjectId,s=Boolean(e.source?.file?.trim())&&Boolean(e.source?.anchor?.trim());if(!o&&!s||"string"!=typeof t||!Array.isArray(n)||0===n.length)return;const i=this.resolveApplyTarget(e);if(!i)return;P(i,t,n,e.value)&&this.selected?.id===i.id&&(this.invalidateOutlineBounds(),this.updateSelectionOutline(),this.postSnapshotUpdate(i))}postSnapshotUpdate(e){const t=v(e);"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage({type:d,snapshot:t,pointer:null,source:"property-applied"},this.postMessageOrigin)}clearSelectionAndNotify(e){const t=null!=this.selected;this.clearSelection(),t&&this.postGameObjectDeselected(e)}postGameObjectDeselected(e){const t=_(e);"undefined"!=typeof window&&window.parent&&window.parent!==window&&window.parent.postMessage(t,this.postMessageOrigin),this.game.emit(t.type,{reason:e})}clearSelection(){this.selected=null,this.invalidateOutlineBounds(),this.outlineGo?.parent&&this.outlineGo.remove();const e=this.outlineGo?.getComponent(o.Graphics);e?.graphics&&e.graphics.clear()}updateSelectionOutline(){if(!this.enabled||!this.selected||!this.outlineGo)return;const e=this.outlineGo.getComponent(o.Graphics);if(!e?.graphics)return;const t=this.resolvePickBounds(this.selected);if(this.lastOutlineBounds&&this.pickBoundsEqual(this.lastOutlineBounds,t))return;this.lastOutlineBounds=t;const n=e.graphics;n.clear(),n.rect(t.x,t.y,t.width,t.height),n.stroke({width:4,color:5636010,alpha:1})}invalidateOutlineBounds(){this.lastOutlineBounds=null}pickBoundsEqual(e,t){const n=.01;return Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<n&&Math.abs(e.width-t.width)<n&&Math.abs(e.height-t.height)<n}};R=e.__decorate([t.decorators.componentObserver({CombosDevelopmentToolTarget:[]})],R);var j=R;Object.assign(j,{packageName:"@combos-fun/plugin-development-tool",packageVersion:"0.0.27"}),exports.COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY=h,exports.COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION=c,exports.COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED=l,exports.COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED=d,exports.COMBOS_DEVELOPMENT_TOOL_READY="combos-development-tool:ready",exports.COMBOS_DEVELOPMENT_TOOL_REFRESH=a,exports.COMBOS_DEVELOPMENT_TOOL_SET=i,exports.COMBOS_DEVELOPMENT_TOOL_SET_MUTED=u,exports.COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS=r,exports.COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED=p,exports.CombosDevelopmentToolSystem=j,exports.CombosDevelopmentToolTarget=m,exports.DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES=f,exports.applyPropertyValue=G,exports.applyPropertyWithHooks=P,exports.buildGameObjectDeselectedPayload=_,exports.buildGameObjectSnapshot=v,exports.isAllowedMessageOrigin=g,exports.isClearSelectionMessage=B,exports.mergeAllowedMessageOrigins=y,exports.readPropertyValue=function(e,t,n){const o=e.getComponent(t);if(!o||!n.length)return;let s=o;for(const e of n){if(null==s||"object"!=typeof s)return;s=s[e]}return s},exports.readSourceAnchor=S,exports.shouldNotifyGameObjectDeselected=L;
@@ -16,11 +16,14 @@ declare const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED: "combos-development
16
16
  declare const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY: "combos-development-tool:apply-property";
17
17
  /** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */
18
18
  declare const COMBOS_DEVELOPMENT_TOOL_READY: "combos-development-tool:ready";
19
- /** Parent → iframe: pause or resume the game loop. Payload: `{ paused: boolean }`. */
20
- declare const COMBOS_DEVELOPMENT_TOOL_SET_PAUSED: "combos-development-tool:set-paused";
21
- /** Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`. */
19
+ /**
20
+ * Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`.
21
+ *
22
+ * Note: play / pause / resume are owned by the engine core lifecycle protocol
23
+ * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
24
+ */
22
25
  declare const COMBOS_DEVELOPMENT_TOOL_SET_MUTED: "combos-development-tool:set-muted";
23
- /** iframe → parent (and `game.emit`): current pause/mute snapshot after a successful change. */
26
+ /** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */
24
27
  declare const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED: "combos-development-tool:state-changed";
25
28
 
26
29
  /** Default inbound postMessage host suffixes (host + all subdomains). */
@@ -71,12 +74,14 @@ interface CombosDevelopmentToolSystemParams {
71
74
  * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)
72
75
  * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`
73
76
  *
74
- * Pause / mute (independent of pick mode; parent toolbar or in-game debug UI):
75
- * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, paused: true })`
77
+ * Mute (independent of pick mode; parent toolbar or in-game debug UI):
76
78
  * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`
77
- * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, { paused: true })` or `.setPaused(true)`
79
+ * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, { muted: true })` or `.setMuted(true)`
78
80
  * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.
79
- * Both emit / post `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ paused, muted }`.
81
+ * Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.
82
+ *
83
+ * Play / pause / resume are handled by the engine core lifecycle protocol
84
+ * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
80
85
  *
81
86
  * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,
82
87
  * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.
@@ -99,12 +104,10 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
99
104
  /** Remembered mute when `SoundSystem` is not registered yet. */
100
105
  private mutedWithoutSoundSystem;
101
106
  private readonly onWindowSet;
102
- private readonly onWindowSetPaused;
103
107
  private readonly onWindowSetMuted;
104
108
  private readonly onWindowMessage;
105
109
  private readonly onGameSet;
106
110
  private readonly onGameRefresh;
107
- private readonly onGameSetPaused;
108
111
  private readonly onGameSetMuted;
109
112
  private readonly onWindowRefresh;
110
113
  init(params?: CombosDevelopmentToolSystemParams): void;
@@ -112,12 +115,8 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
112
115
  /** Programmatic toggle (same effect as events). */
113
116
  setEnabled(on: boolean): void;
114
117
  get isEnabled(): boolean;
115
- /** Whether the game loop is paused (`!game.playing`). */
116
- get isPaused(): boolean;
117
118
  /** Master mute when `SoundSystem` exists; otherwise the last requested value. */
118
119
  get isMuted(): boolean;
119
- /** Pause or resume the game loop (same as `game.pause()` / `game.resume()`). */
120
- setPaused(paused: boolean): void;
121
120
  /**
122
121
  * Mute or unmute audio via `SoundSystem` when registered.
123
122
  * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.
@@ -202,5 +201,5 @@ declare function buildGameObjectDeselectedPayload(reason: DevelopmentToolDeselec
202
201
  declare function shouldNotifyGameObjectDeselected(hadSelection: boolean): boolean;
203
202
  declare function isClearSelectionMessage(data: unknown): boolean;
204
203
 
205
- export { COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY, COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED, COMBOS_DEVELOPMENT_TOOL_READY, COMBOS_DEVELOPMENT_TOOL_REFRESH, COMBOS_DEVELOPMENT_TOOL_SET, COMBOS_DEVELOPMENT_TOOL_SET_MUTED, COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, CombosDevelopmentToolSystem, CombosDevelopmentToolTarget, DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, applyPropertyValue, applyPropertyWithHooks, buildGameObjectDeselectedPayload, buildGameObjectSnapshot, isAllowedMessageOrigin, isClearSelectionMessage, mergeAllowedMessageOrigins, readPropertyValue, readSourceAnchor, shouldNotifyGameObjectDeselected };
204
+ export { COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY, COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED, COMBOS_DEVELOPMENT_TOOL_READY, COMBOS_DEVELOPMENT_TOOL_REFRESH, COMBOS_DEVELOPMENT_TOOL_SET, COMBOS_DEVELOPMENT_TOOL_SET_MUTED, COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, CombosDevelopmentToolSystem, CombosDevelopmentToolTarget, DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, applyPropertyValue, applyPropertyWithHooks, buildGameObjectDeselectedPayload, buildGameObjectSnapshot, isAllowedMessageOrigin, isClearSelectionMessage, mergeAllowedMessageOrigins, readPropertyValue, readSourceAnchor, shouldNotifyGameObjectDeselected };
206
205
  export type { CombosDevelopmentToolSystemParams, CombosDevelopmentToolTargetParams, DevelopmentToolDeselectReason, SceneEditComponentSnapshot, SceneEditGameObjectSnapshot, SceneEditPropertyRef, SceneSourceAnchor };
@@ -20,11 +20,14 @@ const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED = 'combos-development-tool:g
20
20
  const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY = 'combos-development-tool:apply-property';
21
21
  /** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */
22
22
  const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready';
23
- /** Parent → iframe: pause or resume the game loop. Payload: `{ paused: boolean }`. */
24
- const COMBOS_DEVELOPMENT_TOOL_SET_PAUSED = 'combos-development-tool:set-paused';
25
- /** Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`. */
23
+ /**
24
+ * Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`.
25
+ *
26
+ * Note: play / pause / resume are owned by the engine core lifecycle protocol
27
+ * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
28
+ */
26
29
  const COMBOS_DEVELOPMENT_TOOL_SET_MUTED = 'combos-development-tool:set-muted';
27
- /** iframe → parent (and `game.emit`): current pause/mute snapshot after a successful change. */
30
+ /** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */
28
31
  const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED = 'combos-development-tool:state-changed';
29
32
 
30
33
  /**
@@ -376,12 +379,14 @@ const OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';
376
379
  * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)
377
380
  * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`
378
381
  *
379
- * Pause / mute (independent of pick mode; parent toolbar or in-game debug UI):
380
- * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, paused: true })`
382
+ * Mute (independent of pick mode; parent toolbar or in-game debug UI):
381
383
  * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`
382
- * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, { paused: true })` or `.setPaused(true)`
384
+ * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, { muted: true })` or `.setMuted(true)`
383
385
  * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.
384
- * Both emit / post `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ paused, muted }`.
386
+ * Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.
387
+ *
388
+ * Play / pause / resume are handled by the engine core lifecycle protocol
389
+ * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
385
390
  *
386
391
  * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,
387
392
  * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.
@@ -410,12 +415,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
410
415
  this.setEnabled(d.enabled);
411
416
  }
412
417
  };
413
- this.onWindowSetPaused = (e) => {
414
- const d = e.detail;
415
- if (d && typeof d.paused === 'boolean') {
416
- this.setPaused(d.paused);
417
- }
418
- };
419
418
  this.onWindowSetMuted = (e) => {
420
419
  const d = e.detail;
421
420
  if (d && typeof d.muted === 'boolean') {
@@ -432,9 +431,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
432
431
  if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {
433
432
  this.setEnabled(d.enabled);
434
433
  }
435
- else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_PAUSED && typeof d.paused === 'boolean') {
436
- this.setPaused(d.paused);
437
- }
438
434
  else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {
439
435
  this.setMuted(d.muted);
440
436
  }
@@ -456,11 +452,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
456
452
  this.onGameRefresh = () => {
457
453
  this.requestSceneRescan();
458
454
  };
459
- this.onGameSetPaused = (payload) => {
460
- if (payload && typeof payload.paused === 'boolean') {
461
- this.setPaused(payload.paused);
462
- }
463
- };
464
455
  this.onGameSetMuted = (payload) => {
465
456
  if (payload && typeof payload.muted === 'boolean') {
466
457
  this.setMuted(payload.muted);
@@ -476,13 +467,11 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
476
467
  this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);
477
468
  if (typeof window !== 'undefined') {
478
469
  window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);
479
- window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);
480
470
  window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);
481
471
  window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);
482
472
  window.addEventListener('message', this.onWindowMessage);
483
473
  }
484
474
  this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);
485
- this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);
486
475
  this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);
487
476
  this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);
488
477
  if (this.enabled) {
@@ -492,13 +481,11 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
492
481
  onDestroy() {
493
482
  if (typeof window !== 'undefined') {
494
483
  window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);
495
- window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);
496
484
  window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);
497
485
  window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);
498
486
  window.removeEventListener('message', this.onWindowMessage);
499
487
  }
500
488
  this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);
501
- this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);
502
489
  this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);
503
490
  this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);
504
491
  this.detachAllPicks();
@@ -523,10 +510,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
523
510
  get isEnabled() {
524
511
  return this.enabled;
525
512
  }
526
- /** Whether the game loop is paused (`!game.playing`). */
527
- get isPaused() {
528
- return !this.game.playing;
529
- }
530
513
  /** Master mute when `SoundSystem` exists; otherwise the last requested value. */
531
514
  get isMuted() {
532
515
  const sound = this.getSoundSystem();
@@ -535,18 +518,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
535
518
  }
536
519
  return this.mutedWithoutSoundSystem;
537
520
  }
538
- /** Pause or resume the game loop (same as `game.pause()` / `game.resume()`). */
539
- setPaused(paused) {
540
- if (paused) {
541
- if (this.game.playing) {
542
- this.game.pause();
543
- }
544
- }
545
- else if (!this.game.playing) {
546
- this.game.resume();
547
- }
548
- this.postStateChanged();
549
- }
550
521
  /**
551
522
  * Mute or unmute audio via `SoundSystem` when registered.
552
523
  * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.
@@ -831,7 +802,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
831
802
  }
832
803
  postStateChanged() {
833
804
  const state = {
834
- paused: this.isPaused,
835
805
  muted: this.isMuted,
836
806
  };
837
807
  const payload = {
@@ -1029,8 +999,8 @@ var CombosDevelopmentToolSystem$1 = CombosDevelopmentToolSystem;
1029
999
  /** Auto-generated by scripts/build-package.mjs — do not edit. */
1030
1000
  Object.assign(CombosDevelopmentToolSystem$1, {
1031
1001
  packageName: "@combos-fun/plugin-development-tool",
1032
- packageVersion: "0.0.26",
1002
+ packageVersion: "0.0.27",
1033
1003
  });
1034
1004
 
1035
- export { COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY, COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED, COMBOS_DEVELOPMENT_TOOL_READY, COMBOS_DEVELOPMENT_TOOL_REFRESH, COMBOS_DEVELOPMENT_TOOL_SET, COMBOS_DEVELOPMENT_TOOL_SET_MUTED, COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, CombosDevelopmentToolSystem$1 as CombosDevelopmentToolSystem, CombosDevelopmentToolTarget, DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, applyPropertyValue, applyPropertyWithHooks, buildGameObjectDeselectedPayload, buildGameObjectSnapshot, isAllowedMessageOrigin, isClearSelectionMessage, mergeAllowedMessageOrigins, readPropertyValue, readSourceAnchor, shouldNotifyGameObjectDeselected };
1005
+ export { COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY, COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED, COMBOS_DEVELOPMENT_TOOL_READY, COMBOS_DEVELOPMENT_TOOL_REFRESH, COMBOS_DEVELOPMENT_TOOL_SET, COMBOS_DEVELOPMENT_TOOL_SET_MUTED, COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, CombosDevelopmentToolSystem$1 as CombosDevelopmentToolSystem, CombosDevelopmentToolTarget, DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, applyPropertyValue, applyPropertyWithHooks, buildGameObjectDeselectedPayload, buildGameObjectSnapshot, isAllowedMessageOrigin, isClearSelectionMessage, mergeAllowedMessageOrigins, readPropertyValue, readSourceAnchor, shouldNotifyGameObjectDeselected };
1036
1006
  //# sourceMappingURL=plugin-development-tool.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-development-tool.esm.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/messageOrigin.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/selectionNotify.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** iframe → parent: `setEnabled` finished (pick attach after enable, or restore after disable). Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS =\n 'combos-development-tool:set-success' as const;\n\n/** Re-scan the scene tree while the development tool is enabled. */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: clear the current in-canvas selection outline. */\nexport const COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION =\n 'combos-development-tool:clear-selection' as const;\n\n/** Emitted to `window.parent` when the current selection is cleared. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED =\n 'combos-development-tool:gameobject-deselected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n\n/** Parent → iframe: pause or resume the game loop. Payload: `{ paused: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_PAUSED =\n 'combos-development-tool:set-paused' as const;\n\n/** Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_MUTED =\n 'combos-development-tool:set-muted' as const;\n\n/** iframe → parent (and `game.emit`): current pause/mute snapshot after a successful change. */\nexport const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED =\n 'combos-development-tool:state-changed' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Marks a `GameObject` as selectable in editor pick mode. While the development tool is enabled,\n * only nodes carrying this component receive a pick `Event`; all other game `Event` components\n * are removed and cached until disable.\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Default inbound postMessage host suffixes (host + all subdomains). */\nexport const DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES = [\n 'knoffice.tech',\n 'converge.ai',\n] as const;\n\n/**\n * Returns whether `origin` is allowed by `allowed`.\n *\n * Each entry in `allowed` is either:\n * - a **host suffix** (e.g. `knoffice.tech`) — matches that host and `*.knoffice.tech`;\n * - a **full origin** (e.g. `https://creator.knoffice.tech`) — exact match;\n * - `'*'` — accept any origin (escape hatch).\n */\nexport function isAllowedMessageOrigin(\n origin: string,\n allowed: readonly string[],\n): boolean {\n if (allowed.includes('*')) {\n return true;\n }\n if (allowed.length === 0) {\n return false;\n }\n\n let parsed: URL;\n try {\n parsed = new URL(origin);\n } catch {\n return false;\n }\n\n const originLower = origin.toLowerCase();\n const hostLower = parsed.hostname.toLowerCase();\n\n for (const entry of allowed) {\n const trimmed = entry.trim();\n if (!trimmed) {\n continue;\n }\n\n if (trimmed.includes('://')) {\n if (originLower === trimmed.toLowerCase()) {\n return true;\n }\n continue;\n }\n\n const suffix = trimmed.toLowerCase().replace(/^\\./, '');\n if (hostLower === suffix || hostLower.endsWith(`.${suffix}`)) {\n return true;\n }\n }\n\n return false;\n}\n\n/** Defaults plus any extra entries (deduped). `['*']` alone accepts any origin. */\nexport function mergeAllowedMessageOrigins(extra?: string[]): string[] {\n if (!extra?.length) {\n return [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES];\n }\n if (extra.includes('*')) {\n return ['*'];\n }\n\n const seen = new Set<string>();\n const result: string[] = [];\n for (const entry of [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, ...extra]) {\n const trimmed = entry.trim();\n if (!trimmed || seen.has(trimmed)) {\n continue;\n }\n seen.add(trimmed);\n result.push(trimmed);\n }\n return result;\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Graphics: new Set(['graphics']),\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n} from './constants';\n\nexport type DevelopmentToolDeselectReason = 'parent-request' | 'pick-disabled' | 'target-removed';\n\nexport function buildGameObjectDeselectedPayload(reason: DevelopmentToolDeselectReason) {\n return {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n reason,\n } as const;\n}\n\nexport function shouldNotifyGameObjectDeselected(hadSelection: boolean): boolean {\n return hadSelection;\n}\n\nexport function isClearSelectionMessage(data: unknown): boolean {\n if (!data || typeof data !== 'object') {\n return false;\n }\n return (data as { type?: string }).type === COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION;\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n COMBOS_DEVELOPMENT_TOOL_SET_MUTED,\n COMBOS_DEVELOPMENT_TOOL_SET_PAUSED,\n COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isAllowedMessageOrigin,\n mergeAllowedMessageOrigins,\n} from './messageOrigin';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\nimport {\n buildGameObjectDeselectedPayload,\n isClearSelectionMessage,\n shouldNotifyGameObjectDeselected,\n type DevelopmentToolDeselectReason,\n} from './selectionNotify';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n stopPropagation?: () => void;\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype TapListener = (payload?: TapEventPayload) => void;\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * Extra inbound `postMessage` origins merged with {@link DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES}.\n * Each entry is a host suffix (e.g. `localhost`) or full origin. Pass `['*']` to accept any origin.\n */\n allowedMessageOrigins?: string[];\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\ntype SetPausedPayload = { paused?: boolean };\ntype SetMutedPayload = { muted?: boolean };\n\ntype SoundSystemLike = {\n muted: boolean;\n};\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Off** at start. While enabled:\n * - soft-disables game `Event` hit targets (`container.interactive = false`, restored on disable);\n * - attaches pick `Event` + outline only on nodes with {@link CombosDevelopmentToolTarget}.\n *\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * Pause / mute (independent of pick mode; parent toolbar or in-game debug UI):\n * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, paused: true })`\n * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, { paused: true })` or `.setPaused(true)`\n * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.\n * Both emit / post `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ paused, muted }`.\n *\n * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,\n * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private allowedMessageOrigins = mergeAllowedMessageOrigins();\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, TapListener>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** Game `Event` hit targets soft-disabled while enabled (`container.interactive = false`). */\n private readonly disabledGameEventGoIds = new Set<number>();\n /** Pick `Event` injected for {@link CombosDevelopmentToolTarget} nodes. */\n private readonly pickEvents = new Set<number>();\n private needsRescan = false;\n private lastOutlineBounds: PickBounds | null = null;\n /** Remembered mute when `SoundSystem` is not registered yet. */\n private mutedWithoutSoundSystem = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowSetPaused = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPausedPayload>).detail;\n if (d && typeof d.paused === 'boolean') {\n this.setPaused(d.paused);\n }\n };\n\n private readonly onWindowSetMuted = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetMutedPayload>).detail;\n if (d && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n if (!isAllowedMessageOrigin(e.origin, this.allowedMessageOrigins)) {\n return;\n }\n\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_PAUSED && typeof d.paused === 'boolean') {\n this.setPaused(d.paused);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (isClearSelectionMessage(d)) {\n this.clearSelectionAndNotify('parent-request');\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onGameSetPaused = (payload: SetPausedPayload) => {\n if (payload && typeof payload.paused === 'boolean') {\n this.setPaused(payload.paused);\n }\n };\n\n private readonly onGameSetMuted = (payload: SetMutedPayload) => {\n if (payload && typeof payload.muted === 'boolean') {\n this.setMuted(payload.muted);\n }\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled) {\n this.needsRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onWindowSetPaused);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_PAUSED, this.onGameSetPaused);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.clearSelectionAndNotify('pick-disabled');\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelectionAndNotify('pick-disabled');\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.postSetSuccess(false);\n } else {\n this.needsRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n /** Whether the game loop is paused (`!game.playing`). */\n get isPaused(): boolean {\n return !this.game.playing;\n }\n\n /** Master mute when `SoundSystem` exists; otherwise the last requested value. */\n get isMuted(): boolean {\n const sound = this.getSoundSystem();\n if (sound) {\n return sound.muted;\n }\n return this.mutedWithoutSoundSystem;\n }\n\n /** Pause or resume the game loop (same as `game.pause()` / `game.resume()`). */\n setPaused(paused: boolean) {\n if (paused) {\n if (this.game.playing) {\n this.game.pause();\n }\n } else if (!this.game.playing) {\n this.game.resume();\n }\n this.postStateChanged();\n }\n\n /**\n * Mute or unmute audio via `SoundSystem` when registered.\n * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.\n */\n setMuted(muted: boolean) {\n const sound = this.getSoundSystem();\n if (sound) {\n sound.muted = muted;\n } else {\n this.mutedWithoutSoundSystem = muted;\n }\n this.postStateChanged();\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsRescan) {\n this.needsRescan = false;\n this.attachEditMode();\n this.postSetSuccess(true);\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releasePick(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n this.updateSelectionOutline();\n }\n\n componentChanged(changed: ComponentChanged) {\n if (!this.enabled) return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.stripGameEvent(gameObject);\n this.ensurePick(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releasePick(gameObject);\n if (this.selected === gameObject) {\n this.clearSelectionAndNotify('target-removed');\n }\n }\n }\n\n /** Re-bind pick targets after dynamic scene changes while enabled. */\n requestSceneRescan() {\n if (!this.enabled) return;\n this.needsRescan = true;\n }\n\n private attachEditMode() {\n this.detachAllPicks();\n\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n this.stripGameEvent(go);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensurePick(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private isIgnoredPickGo(go: GameObject): boolean {\n return go.name === OUTLINE_GO_NAME || go === this.outlineGo;\n }\n\n private stripGameEvent(go: GameObject) {\n if (this.disabledGameEventGoIds.has(go.id)) return;\n\n const ev = go.getComponent(Event);\n if (!ev) return;\n\n const container = this.getRendererContainer(go);\n if (!container) return;\n\n try {\n container.interactive = false;\n this.disabledGameEventGoIds.add(go.id);\n } catch {\n /* ignore */\n }\n }\n\n private restoreDisabledGameEvents() {\n for (const id of [...this.disabledGameEventGoIds]) {\n const go = this.findGameObjectById(id);\n if (!go || go.destroyed) {\n this.disabledGameEventGoIds.delete(id);\n continue;\n }\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n this.disabledGameEventGoIds.delete(id);\n }\n }\n\n private detachAllPicks() {\n for (const go of [...this.tapOwners.values()]) {\n this.releasePick(go);\n }\n }\n\n private ensurePick(go: GameObject) {\n if (this.tapHandlers.has(go.id)) return;\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createPickEvent(go));\n this.pickEvents.add(go.id);\n }\n\n const handler: TapListener = payload => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createPickEvent(go: GameObject): Event {\n const bounds = this.resolvePickBounds(go);\n if (bounds.width > 0 && bounds.height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n if (this.shouldPreferRenderedBounds(go)) {\n const fromOwnGraphics = this.resolveOwnGraphicsLocalBounds(go);\n if (fromOwnGraphics) {\n return fromOwnGraphics;\n }\n\n const fromGraphics = this.resolveContainerLocalBounds(go);\n if (fromGraphics) {\n return fromGraphics;\n }\n }\n\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private shouldPreferRenderedBounds(go: GameObject): boolean {\n return go.getComponent(Graphics) != null;\n }\n\n /** Bounds of this GO's own Graphics only — excludes child GOs such as the selection outline. */\n private resolveOwnGraphicsLocalBounds(go: GameObject): PickBounds | null {\n const gfx = go.getComponent(Graphics);\n if (!gfx?.graphics) return null;\n\n try {\n const bounds = gfx.graphics.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n const outlineContainer = this.getOutlineContainerIfChildOf(go);\n let outlineDetached = false;\n if (outlineContainer?.parent === container) {\n container.removeChild(outlineContainer);\n outlineDetached = true;\n }\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n } finally {\n if (outlineDetached && outlineContainer) {\n container.addChild(outlineContainer);\n }\n }\n\n return null;\n }\n\n /** Outline is parented under the selected GO; exclude it when measuring content bounds. */\n private getOutlineContainerIfChildOf(go: GameObject) {\n if (!this.outlineGo || this.outlineGo.parent !== go) {\n return null;\n }\n return this.getRendererContainer(this.outlineGo);\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releasePick(go: GameObject) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n\n if (this.pickEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.pickEvents.delete(go.id);\n }\n }\n\n private postSetSuccess(enabled: boolean) {\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n enabled,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, { enabled });\n }\n\n private postStateChanged() {\n const state = {\n paused: this.isPaused,\n muted: this.isMuted,\n };\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n ...state,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, state);\n }\n\n private getSoundSystem(): SoundSystemLike | null {\n const system = this.game.getSystem('SoundSystem') as unknown;\n if (\n !system ||\n typeof system !== 'object' ||\n !('muted' in system) ||\n typeof (system as SoundSystemLike).muted !== 'boolean'\n ) {\n return null;\n }\n return system as SoundSystemLike;\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n tap?.stopPropagation?.();\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelectionAndNotify(reason: DevelopmentToolDeselectReason) {\n const hadSelection = this.selected != null;\n this.clearSelection();\n if (!shouldNotifyGameObjectDeselected(hadSelection)) {\n return;\n }\n this.postGameObjectDeselected(reason);\n }\n\n private postGameObjectDeselected(reason: DevelopmentToolDeselectReason) {\n const payload = buildGameObjectDeselectedPayload(reason);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(payload.type, { reason });\n }\n\n private clearSelection() {\n this.selected = null;\n this.invalidateOutlineBounds();\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n\n /** Redraw the green outline only when content bounds change (movement follows via child transform). */\n private updateSelectionOutline() {\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n if (this.lastOutlineBounds && this.pickBoundsEqual(this.lastOutlineBounds, bounds)) {\n return;\n }\n\n this.lastOutlineBounds = bounds;\n const g = gfxComp.graphics;\n g.clear();\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: 1 });\n }\n\n private invalidateOutlineBounds() {\n this.lastOutlineBounds = null;\n }\n\n private pickBoundsEqual(a: PickBounds, b: PickBounds): boolean {\n const eps = 0.01;\n return (\n Math.abs(a.x - b.x) < eps &&\n Math.abs(a.y - b.y) < eps &&\n Math.abs(a.width - b.width) < eps &&\n Math.abs(a.height - b.height) < eps\n );\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.26\",\n});\n"],"names":["CombosDevelopmentToolSystem"],"mappings":";;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,mCAAmC,GAC9C;AAEF;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,uCAAuC,GAClD;AAEF;AACO,MAAM,6CAA6C,GACxD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;AAE7C;AACO,MAAM,kCAAkC,GAC7C;AAEF;AACO,MAAM,iCAAiC,GAC5C;AAEF;AACO,MAAM,qCAAqC,GAChD;;AChCF;;;;AAIG;AACW,MAAO,2BAA4B,SAAQ,SAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;I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AE;KAChC;AACoB,CAAA,EAAA,2BAA2B,CA0rB/C;oCA1rBoB,2BAA2B;;ACnGhD;AAIA,MAAM,CAAC,MAAM,CAACA,6BAA2B,EAAE;AACzC,IAAA,WAAW,EAAE,qCAAqC;AAClD,IAAA,cAAc,EAAE,QAAQ;AACzB,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"plugin-development-tool.esm.js","sources":["../lib/constants.ts","../lib/CombosDevelopmentToolTarget.ts","../lib/messageOrigin.ts","../lib/sceneEditTypes.ts","../lib/sceneEditSerialize.ts","../lib/sceneEditApplyHooks.ts","../lib/selectionNotify.ts","../lib/CombosDevelopmentToolSystem.ts","../lib/__combosPackageMeta.gen.ts"],"sourcesContent":["/** Toggle development-tool selection / parent postMessage. Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET = 'combos-development-tool:set' as const;\n\n/** iframe → parent: `setEnabled` finished (pick attach after enable, or restore after disable). Payload: `{ enabled: boolean }`. */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS =\n 'combos-development-tool:set-success' as const;\n\n/** Re-scan the scene tree while the development tool is enabled. */\nexport const COMBOS_DEVELOPMENT_TOOL_REFRESH = 'combos-development-tool:refresh' as const;\n\n/** Emitted to `window.parent` when an object is selected while the tool is on. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED =\n 'combos-development-tool:gameobject-selected' as const;\n\n/** Parent → iframe: clear the current in-canvas selection outline. */\nexport const COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION =\n 'combos-development-tool:clear-selection' as const;\n\n/** Emitted to `window.parent` when the current selection is cleared. */\nexport const COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED =\n 'combos-development-tool:gameobject-deselected' as const;\n\n/** Parent → iframe: apply a value to a component field (live preview). */\nexport const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY =\n 'combos-development-tool:apply-property' as const;\n\n/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */\nexport const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready' as const;\n\n/**\n * Parent → iframe: mute or unmute audio when `SoundSystem` is registered. Payload: `{ muted: boolean }`.\n *\n * Note: play / pause / resume are owned by the engine core lifecycle protocol\n * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.\n */\nexport const COMBOS_DEVELOPMENT_TOOL_SET_MUTED =\n 'combos-development-tool:set-muted' as const;\n\n/** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */\nexport const COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED =\n 'combos-development-tool:state-changed' as const;\n","import { Component, ComponentParams } from '@combos-fun/engine';\n\nexport interface CombosDevelopmentToolTargetParams extends ComponentParams {\n /** Extra JSON-serializable fields included in postMessage to parent. */\n payload?: Record<string, unknown>;\n}\n\n/**\n * Marks a `GameObject` as selectable in editor pick mode. While the development tool is enabled,\n * only nodes carrying this component receive a pick `Event`; all other game `Event` components\n * are removed and cached until disable.\n */\nexport default class CombosDevelopmentToolTarget extends Component<CombosDevelopmentToolTargetParams> {\n static componentName = 'CombosDevelopmentToolTarget';\n\n payload: Record<string, unknown> = {};\n\n init(params?: CombosDevelopmentToolTargetParams) {\n this.payload = params?.payload ? { ...params.payload } : {};\n }\n}\n","/** Default inbound postMessage host suffixes (host + all subdomains). */\nexport const DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES = [\n 'knoffice.tech',\n 'converge.ai',\n] as const;\n\n/**\n * Returns whether `origin` is allowed by `allowed`.\n *\n * Each entry in `allowed` is either:\n * - a **host suffix** (e.g. `knoffice.tech`) — matches that host and `*.knoffice.tech`;\n * - a **full origin** (e.g. `https://creator.knoffice.tech`) — exact match;\n * - `'*'` — accept any origin (escape hatch).\n */\nexport function isAllowedMessageOrigin(\n origin: string,\n allowed: readonly string[],\n): boolean {\n if (allowed.includes('*')) {\n return true;\n }\n if (allowed.length === 0) {\n return false;\n }\n\n let parsed: URL;\n try {\n parsed = new URL(origin);\n } catch {\n return false;\n }\n\n const originLower = origin.toLowerCase();\n const hostLower = parsed.hostname.toLowerCase();\n\n for (const entry of allowed) {\n const trimmed = entry.trim();\n if (!trimmed) {\n continue;\n }\n\n if (trimmed.includes('://')) {\n if (originLower === trimmed.toLowerCase()) {\n return true;\n }\n continue;\n }\n\n const suffix = trimmed.toLowerCase().replace(/^\\./, '');\n if (hostLower === suffix || hostLower.endsWith(`.${suffix}`)) {\n return true;\n }\n }\n\n return false;\n}\n\n/** Defaults plus any extra entries (deduped). `['*']` alone accepts any origin. */\nexport function mergeAllowedMessageOrigins(extra?: string[]): string[] {\n if (!extra?.length) {\n return [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES];\n }\n if (extra.includes('*')) {\n return ['*'];\n }\n\n const seen = new Set<string>();\n const result: string[] = [];\n for (const entry of [...DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, ...extra]) {\n const trimmed = entry.trim();\n if (!trimmed || seen.has(trimmed)) {\n continue;\n }\n seen.add(trimmed);\n result.push(trimmed);\n }\n return result;\n}\n","/** Optional bootstrap anchor stored on {@link CombosDevelopmentToolTarget}.payload.source */\nexport interface SceneSourceAnchor {\n /** Project-relative path, e.g. `src/index.ts` */\n file: string;\n /** Variable name in bootstrap (`const poster = …`) or stable key; defaults to gameObject name */\n anchor?: string;\n}\n\nexport interface SceneEditPropertyRef {\n gameObjectId: number;\n gameObjectName: string;\n componentName: string;\n path: string[];\n}\n\nexport interface SceneEditComponentSnapshot {\n componentName: string;\n fields: Record<string, unknown>;\n}\n\nexport interface SceneEditGameObjectSnapshot {\n id: number;\n name: string;\n components: SceneEditComponentSnapshot[];\n source?: SceneSourceAnchor;\n}\n\nexport function isSceneSourceAnchor(v: unknown): v is SceneSourceAnchor {\n return (\n !!v &&\n typeof v === 'object' &&\n typeof (v as SceneSourceAnchor).file === 'string'\n );\n}\n","import { Component, GameObject } from '@combos-fun/engine';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isSceneSourceAnchor,\n type SceneEditComponentSnapshot,\n type SceneEditGameObjectSnapshot,\n type SceneSourceAnchor,\n} from './sceneEditTypes';\n\nconst SKIP_KEYS = new Set([\n 'gameObject',\n 'name',\n 'started',\n '__componentDefaultParams',\n 'destroyed',\n 'inScene',\n 'worldTransform',\n 'children',\n '_parent',\n]);\n\nconst COMPONENT_SKIP_KEYS: Record<string, ReadonlySet<string>> = {\n Graphics: new Set(['graphics']),\n Physics: new Set([\n 'body',\n 'Body',\n 'PhysicsEngine',\n 'World',\n 'Constraint',\n 'mouseConstraint',\n 'bodyParams',\n ]),\n Event: new Set(['hitArea']),\n};\n\nfunction cloneJsonSafe(value: unknown, depth = 0): unknown {\n if (value === null || value === undefined) return value;\n if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {\n return value;\n }\n if (depth > 6) return undefined;\n if (Array.isArray(value)) {\n return value.map(item => cloneJsonSafe(item, depth + 1));\n }\n if (typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) {\n if (typeof v === 'function') continue;\n const cloned = cloneJsonSafe(v, depth + 1);\n if (cloned !== undefined) out[k] = cloned;\n }\n return out;\n }\n return undefined;\n}\n\nfunction serializeComponent(comp: Component): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const componentSkips = COMPONENT_SKIP_KEYS[comp.name];\n for (const key of Object.keys(comp)) {\n if (SKIP_KEYS.has(key) || key.startsWith('_')) continue;\n if (componentSkips?.has(key)) continue;\n const value = (comp as Record<string, unknown>)[key];\n if (typeof value === 'function') continue;\n const cloned = cloneJsonSafe(value);\n if (cloned !== undefined) out[key] = cloned;\n }\n return out;\n}\n\nexport function readSourceAnchor(go: GameObject): SceneSourceAnchor | undefined {\n const tag = go.getComponent(CombosDevelopmentToolTarget);\n const raw = tag?.payload?.source;\n if (!isSceneSourceAnchor(raw)) return undefined;\n return {\n file: raw.file,\n anchor: raw.anchor ?? go.name,\n };\n}\n\nexport function buildGameObjectSnapshot(go: GameObject): SceneEditGameObjectSnapshot {\n const components: SceneEditComponentSnapshot[] = go.components\n .filter(c => c.name !== 'CombosDevelopmentToolTarget')\n .map(c => ({\n componentName: c.name,\n fields: serializeComponent(c),\n }));\n\n return {\n id: go.id,\n name: go.name,\n components,\n source: readSourceAnchor(go),\n };\n}\n\nexport function applyPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return false;\n\n let target: Record<string, unknown> = comp as unknown as Record<string, unknown>;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (target[key] === undefined || target[key] === null) {\n target[key] = {};\n }\n target = target[key] as Record<string, unknown>;\n }\n\n target[path[path.length - 1]] = value;\n return true;\n}\n\nexport function readPropertyValue(\n go: GameObject,\n componentName: string,\n path: string[],\n): unknown {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) return undefined;\n\n let target: unknown = comp;\n for (const key of path) {\n if (target === null || target === undefined || typeof target !== 'object') {\n return undefined;\n }\n target = (target as Record<string, unknown>)[key];\n }\n return target;\n}\n","import type { Component, GameObject } from '@combos-fun/engine';\nimport { applyPropertyValue } from './sceneEditSerialize';\n\ntype SceneEditApplyHook = (\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n) => boolean;\n\nconst TRANSFORM_VECTOR_KEYS = new Set([\n 'position',\n 'size',\n 'origin',\n 'anchor',\n 'scale',\n 'skew',\n]);\n\ntype PhysicsLike = {\n body?: { position: { x: number; y: number }; angle?: number };\n bodyParams?: { stopRotation?: boolean };\n Body?: { setPosition: (body: unknown, pos: { x: number; y: number }) => void; setAngle?: (body: unknown, angle: number) => void };\n};\n\ntype MoverLike = {\n originX: number;\n originY: number;\n};\n\nfunction asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const next = Number(value);\n return Number.isFinite(next) ? next : undefined;\n }\n return undefined;\n}\n\nfunction syncPhysicsBodyFromTransform(go: GameObject): void {\n const physics = go.getComponent('Physics') as PhysicsLike | undefined;\n if (!physics?.body) {\n return;\n }\n\n const { x, y } = go.transform.position;\n if (physics.Body?.setPosition) {\n physics.Body.setPosition(physics.body, { x, y });\n return;\n }\n\n physics.body.position.x = x;\n physics.body.position.y = y;\n}\n\nfunction syncMoverOriginFromTransform(go: GameObject): void {\n const mover = go.getComponent('PlatformerMover') as MoverLike | undefined;\n if (!mover) {\n return;\n }\n mover.originX = go.transform.position.x;\n mover.originY = go.transform.position.y;\n}\n\nfunction applyTransformProperty(\n go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const transform = go.transform ?? comp;\n const transformRecord = transform as unknown as Record<string, unknown>;\n\n if (path.length === 1 && path[0] === 'rotation') {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n transform.rotation = next;\n return true;\n }\n\n if (path.length === 2 && TRANSFORM_VECTOR_KEYS.has(path[0])) {\n const groupKey = path[0];\n const leafKey = path[1];\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n\n const group = transformRecord[groupKey];\n if (!group || typeof group !== 'object') {\n return false;\n }\n\n (group as Record<string, unknown>)[leafKey] = next;\n\n if (groupKey === 'position') {\n syncPhysicsBodyFromTransform(go);\n syncMoverOriginFromTransform(go);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction applyTextProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const textComp = comp as Component & { text?: string; style?: Record<string, unknown> };\n\n if (path.length === 1 && path[0] === 'text') {\n textComp.text = String(value ?? '');\n return true;\n }\n\n if (path.length === 2 && path[0] === 'style') {\n const styleKey = path[1];\n const nextStyle = { ...(textComp.style ?? {}), [styleKey]: value };\n textComp.style = nextStyle;\n return true;\n }\n\n return false;\n}\n\nfunction applySoundProperty(\n _go: GameObject,\n comp: Component,\n path: string[],\n value: unknown,\n): boolean {\n const soundComp = comp as Component & { volume?: number };\n\n if (\n (path.length === 1 && path[0] === 'volume') ||\n (path.length === 2 && path[0] === 'config' && path[1] === 'volume')\n ) {\n const next = asNumber(value);\n if (next === undefined) {\n return false;\n }\n soundComp.volume = next;\n return true;\n }\n\n return false;\n}\n\nconst APPLY_HOOKS: Record<string, SceneEditApplyHook> = {\n Transform: applyTransformProperty,\n Text: applyTextProperty,\n Sound: applySoundProperty,\n};\n\nexport function applyPropertyWithHooks(\n go: GameObject,\n componentName: string,\n path: string[],\n value: unknown,\n): boolean {\n const comp = go.getComponent(componentName);\n if (!comp || !path.length) {\n return false;\n }\n\n const hook = APPLY_HOOKS[componentName];\n if (hook?.(go, comp, path, value)) {\n return true;\n }\n\n return applyPropertyValue(go, componentName, path, value);\n}\n","import {\n COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n} from './constants';\n\nexport type DevelopmentToolDeselectReason = 'parent-request' | 'pick-disabled' | 'target-removed';\n\nexport function buildGameObjectDeselectedPayload(reason: DevelopmentToolDeselectReason) {\n return {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED,\n reason,\n } as const;\n}\n\nexport function shouldNotifyGameObjectDeselected(hadSelection: boolean): boolean {\n return hadSelection;\n}\n\nexport function isClearSelectionMessage(data: unknown): boolean {\n if (!data || typeof data !== 'object') {\n return false;\n }\n return (data as { type?: string }).type === COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION;\n}\n","import {\n ComponentChanged,\n GameObject,\n OBSERVER_TYPE,\n System,\n UpdateParams,\n decorators,\n} from '@combos-fun/engine';\nimport { RendererSystem } from '@combos-fun/plugin-renderer';\nimport { Graphics } from '@combos-fun/plugin-renderer-graphics';\nimport { Event, HIT_AREA_TYPE } from '@combos-fun/plugin-renderer-event';\nimport {\n COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY,\n COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n COMBOS_DEVELOPMENT_TOOL_REFRESH,\n COMBOS_DEVELOPMENT_TOOL_SET,\n COMBOS_DEVELOPMENT_TOOL_SET_MUTED,\n COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n} from './constants';\nimport CombosDevelopmentToolTarget from './CombosDevelopmentToolTarget';\nimport {\n isAllowedMessageOrigin,\n mergeAllowedMessageOrigins,\n} from './messageOrigin';\nimport { applyPropertyWithHooks } from './sceneEditApplyHooks';\nimport { buildGameObjectSnapshot, readSourceAnchor } from './sceneEditSerialize';\nimport {\n buildGameObjectDeselectedPayload,\n isClearSelectionMessage,\n shouldNotifyGameObjectDeselected,\n type DevelopmentToolDeselectReason,\n} from './selectionNotify';\n\nimport type { SceneSourceAnchor } from './sceneEditTypes';\n\ntype TapEventPayload = {\n stopPropagation?: () => void;\n data?: {\n position?: { x: number; y: number };\n };\n};\n\ntype TapListener = (payload?: TapEventPayload) => void;\n\ntype ApplyPropertyPayload = {\n gameObjectId?: number;\n source?: SceneSourceAnchor;\n componentName?: string;\n path?: string[];\n value?: unknown;\n};\n\nexport interface CombosDevelopmentToolSystemParams {\n /** postMessage `targetOrigin` when notifying parent (default `'*'`). */\n postMessageOrigin?: string;\n /**\n * Extra inbound `postMessage` origins merged with {@link DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES}.\n * Each entry is a host suffix (e.g. `localhost`) or full origin. Pass `['*']` to accept any origin.\n */\n allowedMessageOrigins?: string[];\n}\n\nconst OUTLINE_GO_NAME = '__combosDevelopmentToolOutline';\n\ntype SetPayload = { enabled?: boolean };\ntype SetMutedPayload = { muted?: boolean };\n\ntype SoundSystemLike = {\n muted: boolean;\n};\n\ntype PickBounds = { x: number; y: number; width: number; height: number };\n\n/**\n * **Off** at start. While enabled:\n * - soft-disables game `Event` hit targets (`container.interactive = false`, restored on disable);\n * - attaches pick `Event` + outline only on nodes with {@link CombosDevelopmentToolTarget}.\n *\n * Turn on/off via:\n * - `window.dispatchEvent(new CustomEvent(COMBOS_DEVELOPMENT_TOOL_SET, { detail: { enabled: true } }))`\n * - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET, enabled: true }, targetOrigin)` (e.g. from parent iframe)\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`\n *\n * Mute (independent of pick mode; parent toolbar or in-game debug UI):\n * - `postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_MUTED, muted: true })`\n * - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, { muted: true })` or `.setMuted(true)`\n * Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.\n * Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.\n *\n * Play / pause / resume are handled by the engine core lifecycle protocol\n * (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.\n *\n * While enabled: `game.emit(COMBOS_DEVELOPMENT_TOOL_REFRESH)`, `window` event `combos-development-tool:refresh`,\n * or `postMessage({ type: 'combos-development-tool:refresh' })` to re-bind after adding/removing objects.\n */\n@decorators.componentObserver({\n CombosDevelopmentToolTarget: [],\n})\nexport default class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSystemParams> {\n static systemName = 'CombosDevelopmentToolSystem';\n\n private postMessageOrigin = '*';\n private allowedMessageOrigins = mergeAllowedMessageOrigins();\n private enabled = false;\n private outlineGo: GameObject | null = null;\n private selected: GameObject | null = null;\n private readonly tapHandlers = new Map<number, TapListener>();\n private readonly tapOwners = new Map<number, GameObject>();\n /** Game `Event` hit targets soft-disabled while enabled (`container.interactive = false`). */\n private readonly disabledGameEventGoIds = new Set<number>();\n /** Pick `Event` injected for {@link CombosDevelopmentToolTarget} nodes. */\n private readonly pickEvents = new Set<number>();\n private needsRescan = false;\n private lastOutlineBounds: PickBounds | null = null;\n /** Remembered mute when `SoundSystem` is not registered yet. */\n private mutedWithoutSoundSystem = false;\n\n private readonly onWindowSet = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetPayload>).detail;\n if (d && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n }\n };\n\n private readonly onWindowSetMuted = (e: globalThis.Event) => {\n const d = (e as unknown as CustomEvent<SetMutedPayload>).detail;\n if (d && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n }\n };\n\n private readonly onWindowMessage = (e: MessageEvent) => {\n if (!isAllowedMessageOrigin(e.origin, this.allowedMessageOrigins)) {\n return;\n }\n\n const d = e.data;\n if (!d || typeof d !== 'object') return;\n if (d.type === COMBOS_DEVELOPMENT_TOOL_SET && typeof d.enabled === 'boolean') {\n this.setEnabled(d.enabled);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {\n this.setMuted(d.muted);\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_REFRESH) {\n this.requestSceneRescan();\n } else if (isClearSelectionMessage(d)) {\n this.clearSelectionAndNotify('parent-request');\n } else if (d.type === COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY) {\n this.handleApplyProperty(d as ApplyPropertyPayload);\n }\n };\n\n private readonly onGameSet = (payload: SetPayload) => {\n if (payload && typeof payload.enabled === 'boolean') {\n this.setEnabled(payload.enabled);\n }\n };\n\n private readonly onGameRefresh = () => {\n this.requestSceneRescan();\n };\n\n private readonly onGameSetMuted = (payload: SetMutedPayload) => {\n if (payload && typeof payload.muted === 'boolean') {\n this.setMuted(payload.muted);\n }\n };\n\n private readonly onWindowRefresh = () => {\n this.requestSceneRescan();\n };\n\n init(params?: CombosDevelopmentToolSystemParams) {\n this.postMessageOrigin = params?.postMessageOrigin ?? '*';\n this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);\n\n if (typeof window !== 'undefined') {\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.addEventListener('message', this.onWindowMessage);\n }\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n\n if (this.enabled) {\n this.needsRescan = true;\n }\n }\n\n onDestroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET, this.onWindowSet);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);\n window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);\n window.removeEventListener('message', this.onWindowMessage);\n }\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET, this.onGameSet);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);\n this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.clearSelectionAndNotify('pick-disabled');\n }\n\n /** Programmatic toggle (same effect as events). */\n setEnabled(on: boolean) {\n if (this.enabled === on) return;\n this.enabled = on;\n if (!on) {\n this.clearSelectionAndNotify('pick-disabled');\n this.detachAllPicks();\n this.restoreDisabledGameEvents();\n this.postSetSuccess(false);\n } else {\n this.needsRescan = true;\n }\n }\n\n get isEnabled(): boolean {\n return this.enabled;\n }\n\n /** Master mute when `SoundSystem` exists; otherwise the last requested value. */\n get isMuted(): boolean {\n const sound = this.getSoundSystem();\n if (sound) {\n return sound.muted;\n }\n return this.mutedWithoutSoundSystem;\n }\n\n /**\n * Mute or unmute audio via `SoundSystem` when registered.\n * No-op on the audio graph if `SoundSystem` is missing; value is remembered for `isMuted`.\n */\n setMuted(muted: boolean) {\n const sound = this.getSoundSystem();\n if (sound) {\n sound.muted = muted;\n } else {\n this.mutedWithoutSoundSystem = muted;\n }\n this.postStateChanged();\n }\n\n update(e: UpdateParams) {\n if (this.enabled && this.needsRescan) {\n this.needsRescan = false;\n this.attachEditMode();\n this.postSetSuccess(true);\n }\n\n for (const go of [...this.tapOwners.values()]) {\n if (go.destroyed) {\n this.releasePick(go);\n }\n }\n\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n this.updateSelectionOutline();\n }\n\n componentChanged(changed: ComponentChanged) {\n if (!this.enabled) return;\n\n const { type, gameObject, componentName } = changed;\n if (!gameObject || componentName !== 'CombosDevelopmentToolTarget') return;\n\n if (type === OBSERVER_TYPE.ADD) {\n this.stripGameEvent(gameObject);\n this.ensurePick(gameObject);\n } else if (type === OBSERVER_TYPE.REMOVE) {\n this.releasePick(gameObject);\n if (this.selected === gameObject) {\n this.clearSelectionAndNotify('target-removed');\n }\n }\n }\n\n /** Re-bind pick targets after dynamic scene changes while enabled. */\n requestSceneRescan() {\n if (!this.enabled) return;\n this.needsRescan = true;\n }\n\n private attachEditMode() {\n this.detachAllPicks();\n\n const list: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, list);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n this.stripGameEvent(go);\n }\n\n for (const go of list) {\n if (this.isIgnoredPickGo(go)) continue;\n if (!go.getComponent(CombosDevelopmentToolTarget)) continue;\n this.ensurePick(go);\n }\n }\n\n private collectGameObjects(go: GameObject, out: GameObject[]) {\n out.push(go);\n for (const tr of go.transform.children) {\n this.collectGameObjects(tr.gameObject, out);\n }\n }\n\n private isIgnoredPickGo(go: GameObject): boolean {\n return go.name === OUTLINE_GO_NAME || go === this.outlineGo;\n }\n\n private stripGameEvent(go: GameObject) {\n if (this.disabledGameEventGoIds.has(go.id)) return;\n\n const ev = go.getComponent(Event);\n if (!ev) return;\n\n const container = this.getRendererContainer(go);\n if (!container) return;\n\n try {\n container.interactive = false;\n this.disabledGameEventGoIds.add(go.id);\n } catch {\n /* ignore */\n }\n }\n\n private restoreDisabledGameEvents() {\n for (const id of [...this.disabledGameEventGoIds]) {\n const go = this.findGameObjectById(id);\n if (!go || go.destroyed) {\n this.disabledGameEventGoIds.delete(id);\n continue;\n }\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n this.disabledGameEventGoIds.delete(id);\n }\n }\n\n private detachAllPicks() {\n for (const go of [...this.tapOwners.values()]) {\n this.releasePick(go);\n }\n }\n\n private ensurePick(go: GameObject) {\n if (this.tapHandlers.has(go.id)) return;\n\n const container = this.getRendererContainer(go);\n if (container) {\n try {\n container.interactive = true;\n } catch {\n /* ignore */\n }\n }\n\n let ev = go.getComponent(Event);\n if (!ev) {\n ev = go.addComponent(this.createPickEvent(go));\n this.pickEvents.add(go.id);\n }\n\n const handler: TapListener = payload => this.onSelect(go, payload);\n this.tapHandlers.set(go.id, handler);\n this.tapOwners.set(go.id, go);\n ev.on('tap', handler);\n }\n\n private createPickEvent(go: GameObject): Event {\n const bounds = this.resolvePickBounds(go);\n if (bounds.width > 0 && bounds.height > 0) {\n return new Event({\n hitArea: {\n type: HIT_AREA_TYPE.Rect,\n style: {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n },\n },\n });\n }\n\n return new Event();\n }\n\n private resolvePickBounds(go: GameObject): PickBounds {\n if (this.shouldPreferRenderedBounds(go)) {\n const fromOwnGraphics = this.resolveOwnGraphicsLocalBounds(go);\n if (fromOwnGraphics) {\n return fromOwnGraphics;\n }\n\n const fromGraphics = this.resolveContainerLocalBounds(go);\n if (fromGraphics) {\n return fromGraphics;\n }\n }\n\n const { width, height } = go.transform.size;\n if (width > 0 && height > 0) {\n return { x: 0, y: 0, width, height };\n }\n\n const fromContainer = this.resolveContainerLocalBounds(go);\n if (fromContainer) {\n return fromContainer;\n }\n\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n\n private shouldPreferRenderedBounds(go: GameObject): boolean {\n return go.getComponent(Graphics) != null;\n }\n\n /** Bounds of this GO's own Graphics only — excludes child GOs such as the selection outline. */\n private resolveOwnGraphicsLocalBounds(go: GameObject): PickBounds | null {\n const gfx = go.getComponent(Graphics);\n if (!gfx?.graphics) return null;\n\n try {\n const bounds = gfx.graphics.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n }\n\n return null;\n }\n\n private resolveContainerLocalBounds(go: GameObject): PickBounds | null {\n const container = this.getRendererContainer(go);\n if (!container) return null;\n\n const outlineContainer = this.getOutlineContainerIfChildOf(go);\n let outlineDetached = false;\n if (outlineContainer?.parent === container) {\n container.removeChild(outlineContainer);\n outlineDetached = true;\n }\n\n try {\n const bounds = container.getLocalBounds();\n if (bounds.width > 0 && bounds.height > 0) {\n return {\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n }\n } catch {\n /* ignore */\n } finally {\n if (outlineDetached && outlineContainer) {\n container.addChild(outlineContainer);\n }\n }\n\n return null;\n }\n\n /** Outline is parented under the selected GO; exclude it when measuring content bounds. */\n private getOutlineContainerIfChildOf(go: GameObject) {\n if (!this.outlineGo || this.outlineGo.parent !== go) {\n return null;\n }\n return this.getRendererContainer(this.outlineGo);\n }\n\n private getRendererContainer(go: GameObject) {\n const rendererSystem = this.game.getSystem(RendererSystem) as RendererSystem | undefined;\n if (!rendererSystem?.containerManager) return null;\n\n try {\n return rendererSystem.containerManager.getContainer(go.id);\n } catch {\n return null;\n }\n }\n\n private releasePick(go: GameObject) {\n const handler = this.tapHandlers.get(go.id);\n if (!handler) return;\n\n const ev = go.getComponent(Event);\n ev?.off('tap', handler);\n this.tapHandlers.delete(go.id);\n this.tapOwners.delete(go.id);\n\n if (this.pickEvents.has(go.id)) {\n try {\n go.removeComponent(Event);\n } catch {\n /* ignore */\n }\n this.pickEvents.delete(go.id);\n }\n }\n\n private postSetSuccess(enabled: boolean) {\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS,\n enabled,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_SET_SUCCESS, { enabled });\n }\n\n private postStateChanged() {\n const state = {\n muted: this.isMuted,\n };\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,\n ...state,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, state);\n }\n\n private getSoundSystem(): SoundSystemLike | null {\n const system = this.game.getSystem('SoundSystem') as unknown;\n if (\n !system ||\n typeof system !== 'object' ||\n !('muted' in system) ||\n typeof (system as SoundSystemLike).muted !== 'boolean'\n ) {\n return null;\n }\n return system as SoundSystemLike;\n }\n\n private ensureOutline() {\n if (this.outlineGo) return;\n const go = new GameObject(OUTLINE_GO_NAME, {\n size: { width: 1, height: 1 },\n position: { x: 0, y: 0 },\n origin: { x: 0, y: 0 },\n });\n go.addComponent(new Graphics());\n this.outlineGo = go;\n }\n\n private onSelect(go: GameObject, tap?: TapEventPayload) {\n if (!this.enabled) return;\n tap?.stopPropagation?.();\n\n this.ensureOutline();\n if (!this.outlineGo) return;\n\n this.selected = go;\n\n if (this.outlineGo.parent) {\n this.outlineGo.remove();\n }\n go.addChild(this.outlineGo);\n\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n\n const snapshot = buildGameObjectSnapshot(go);\n const payload = {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: tap?.data?.position ?? null,\n };\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n }\n\n private findGameObjectById(id: number): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n return stack.find(go => go.id === id) ?? null;\n }\n\n private findGameObjectBySource(source: SceneSourceAnchor): GameObject | null {\n const stack: GameObject[] = [];\n for (const tr of this.game.scene.transform.children) {\n this.collectGameObjects(tr.gameObject, stack);\n }\n\n const wantFile = source.file.trim();\n const wantAnchor = (source.anchor ?? '').trim();\n if (!wantAnchor) {\n return null;\n }\n\n for (const go of stack) {\n const anchor = readSourceAnchor(go);\n if (!anchor || anchor.file !== wantFile) {\n continue;\n }\n const resolvedAnchor = anchor.anchor ?? go.name;\n if (resolvedAnchor === wantAnchor) {\n return go;\n }\n }\n\n return null;\n }\n\n private resolveApplyTarget(payload: ApplyPropertyPayload): GameObject | null {\n if (typeof payload.gameObjectId === 'number') {\n const byId = this.findGameObjectById(payload.gameObjectId);\n if (byId) {\n return byId;\n }\n }\n\n const file = payload.source?.file?.trim();\n const anchor = payload.source?.anchor?.trim();\n if (!file || !anchor) {\n return null;\n }\n\n return this.findGameObjectBySource({ file, anchor });\n }\n\n private handleApplyProperty(payload: ApplyPropertyPayload) {\n const componentName = payload.componentName;\n const path = payload.path;\n const hasId = typeof payload.gameObjectId === 'number';\n const hasSource =\n Boolean(payload.source?.file?.trim()) && Boolean(payload.source?.anchor?.trim());\n\n if (\n (!hasId && !hasSource) ||\n typeof componentName !== 'string' ||\n !Array.isArray(path) ||\n path.length === 0\n ) {\n return;\n }\n\n const go = this.resolveApplyTarget(payload);\n if (!go) return;\n\n const applied = applyPropertyWithHooks(go, componentName, path, payload.value);\n if (!applied) return;\n\n if (this.selected?.id === go.id) {\n this.invalidateOutlineBounds();\n this.updateSelectionOutline();\n this.postSnapshotUpdate(go);\n }\n }\n\n private postSnapshotUpdate(go: GameObject) {\n const snapshot = buildGameObjectSnapshot(go);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,\n snapshot,\n pointer: null,\n source: 'property-applied',\n },\n this.postMessageOrigin,\n );\n }\n }\n\n private clearSelectionAndNotify(reason: DevelopmentToolDeselectReason) {\n const hadSelection = this.selected != null;\n this.clearSelection();\n if (!shouldNotifyGameObjectDeselected(hadSelection)) {\n return;\n }\n this.postGameObjectDeselected(reason);\n }\n\n private postGameObjectDeselected(reason: DevelopmentToolDeselectReason) {\n const payload = buildGameObjectDeselectedPayload(reason);\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n window.parent.postMessage(payload, this.postMessageOrigin);\n }\n this.game.emit(payload.type, { reason });\n }\n\n private clearSelection() {\n this.selected = null;\n this.invalidateOutlineBounds();\n if (this.outlineGo?.parent) {\n this.outlineGo.remove();\n }\n const gfx = this.outlineGo?.getComponent(Graphics);\n if (gfx?.graphics) {\n gfx.graphics.clear();\n }\n }\n\n /** Redraw the green outline only when content bounds change (movement follows via child transform). */\n private updateSelectionOutline() {\n if (!this.enabled || !this.selected || !this.outlineGo) return;\n\n const gfxComp = this.outlineGo.getComponent(Graphics);\n if (!gfxComp?.graphics) return;\n\n const bounds = this.resolvePickBounds(this.selected);\n if (this.lastOutlineBounds && this.pickBoundsEqual(this.lastOutlineBounds, bounds)) {\n return;\n }\n\n this.lastOutlineBounds = bounds;\n const g = gfxComp.graphics;\n g.clear();\n g.rect(bounds.x, bounds.y, bounds.width, bounds.height);\n g.stroke({ width: 4, color: 0x55ffaa, alpha: 1 });\n }\n\n private invalidateOutlineBounds() {\n this.lastOutlineBounds = null;\n }\n\n private pickBoundsEqual(a: PickBounds, b: PickBounds): boolean {\n const eps = 0.01;\n return (\n Math.abs(a.x - b.x) < eps &&\n Math.abs(a.y - b.y) < eps &&\n Math.abs(a.width - b.width) < eps &&\n Math.abs(a.height - b.height) < eps\n );\n }\n}\n","/** Auto-generated by scripts/build-package.mjs — do not edit. */\n\nimport CombosDevelopmentToolSystem from './CombosDevelopmentToolSystem';\n\nObject.assign(CombosDevelopmentToolSystem, {\n packageName: \"@combos-fun/plugin-development-tool\",\n packageVersion: \"0.0.27\",\n});\n"],"names":["CombosDevelopmentToolSystem"],"mappings":";;;;;;AAAA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AACO,MAAM,mCAAmC,GAC9C;AAEF;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,2CAA2C,GACtD;AAEF;AACO,MAAM,uCAAuC,GAClD;AAEF;AACO,MAAM,6CAA6C,GACxD;AAEF;AACO,MAAM,sCAAsC,GACjD;AAEF;AACO,MAAM,6BAA6B,GAAG;AAE7C;;;;;AAKG;AACI,MAAM,iCAAiC,GAC5C;AAEF;AACO,MAAM,qCAAqC,GAChD;;ACjCF;;;;AAIG;AACW,MAAO,2BAA4B,SAAQ,SAA4C,CAAA;AAArG,IAAA,WAAA,GAAA;;QAGE,IAAA,CAAA,OAAO,GAA4B,EAAE;IAKvC;aAPS,IAAA,CAAA,aAAa,GAAG,6BAAH,CAAiC;AAIrD,IAAA,IAAI,CAAC,MAA0C,EAAA;AAC7C,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;IAC7D;;;ACnBF;AACO,MAAM,qCAAqC,GAAG;IACnD,eAAe;IACf,aAAa;;AAGf;;;;;;;AAOG;AACG,SAAU,sBAAsB,CACpC,MAAc,EACd,OAA0B,EAAA;AAE1B,IAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACzB,QAAA,OAAO,IAAI;IACb;AACA,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;AACxB,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI,MAAW;AACf,IAAA,IAAI;AACF,QAAA,MAAM,GAAG,IAAI,GAAG,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AAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;AACzB,YAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;AACzB,YAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,GAAG;AACjC,YAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG;IAEvC;;AAppBmB,2BAA2B,GAAA,UAAA,CAAA;IAH/C,UAAU,CAAC,iBAAiB,CAAC;AAC5B,QAAA,2BAA2B,EAAE,EAAE;KAChC;AACoB,CAAA,EAAA,2BAA2B,CAqpB/C;oCArpBoB,2BAA2B;;ACnGhD;AAIA,MAAM,CAAC,MAAM,CAACA,6BAA2B,EAAE;AACzC,IAAA,WAAW,EAAE,qCAAqC;AAClD,IAAA,cAAc,EAAE,QAAQ;AACzB,CAAA,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/plugin-development-tool",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "only useful for combos.fun preview page, no need to understand and modify",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-development-tool.esm.js",
@@ -36,16 +36,16 @@
36
36
  ],
37
37
  "author": "sun668 <q947692259@gmail.com>",
38
38
  "dependencies": {
39
- "@combos-fun/engine": "0.0.24",
40
- "@combos-fun/plugin-renderer": "0.0.24",
41
- "@combos-fun/plugin-renderer-event": "0.0.24",
42
- "@combos-fun/plugin-renderer-graphics": "0.0.24"
39
+ "@combos-fun/engine": "0.0.27",
40
+ "@combos-fun/plugin-renderer-event": "0.0.27",
41
+ "@combos-fun/plugin-renderer": "0.0.27",
42
+ "@combos-fun/plugin-renderer-graphics": "0.0.27"
43
+ },
44
+ "devDependencies": {
45
+ "tsx": "^4.20.3"
43
46
  },
44
47
  "scripts": {
45
48
  "build": "node ../../scripts/build-package.mjs",
46
49
  "test": "node --import tsx --test test/selectionNotify.test.ts"
47
- },
48
- "devDependencies": {
49
- "tsx": "^4.20.3"
50
50
  }
51
- }
51
+ }