@combos-fun/plugin-development-tool 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-skill.md +1 -3
- package/dist/plugin-development-tool.cjs.js +10 -47
- package/dist/plugin-development-tool.cjs.js.map +1 -1
- package/dist/plugin-development-tool.cjs.prod.js +1 -1
- package/dist/plugin-development-tool.d.ts +7 -14
- package/dist/plugin-development-tool.esm.js +10 -47
- package/dist/plugin-development-tool.esm.js.map +1 -1
- package/package.json +6 -6
|
@@ -17,10 +17,8 @@ declare const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY: "combos-development-tool:a
|
|
|
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
19
|
/**
|
|
20
|
-
* Parent → iframe: mute or unmute
|
|
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.
|
|
20
|
+
* Parent → iframe: mute or unmute. Handled by `@combos-fun/plugin-sound`.
|
|
21
|
+
* Payload: `{ muted: boolean }`.
|
|
24
22
|
*/
|
|
25
23
|
declare const COMBOS_DEVELOPMENT_TOOL_SET_MUTED: "combos-development-tool:set-muted";
|
|
26
24
|
/** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */
|
|
@@ -140,11 +138,9 @@ interface CombosDevelopmentToolSystemParams {
|
|
|
140
138
|
* - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, enabled: true }, targetOrigin)` (e.g. from parent iframe)
|
|
141
139
|
* - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`
|
|
142
140
|
*
|
|
143
|
-
* Mute
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.
|
|
147
|
-
* Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.
|
|
141
|
+
* Mute is owned by `@combos-fun/plugin-sound` (`combos-development-tool:set-muted` /
|
|
142
|
+
* `SoundSystem.setMuted`). This system still forwards `.setMuted()` to
|
|
143
|
+
* `SoundSystem` so older in-game callers keep working.
|
|
148
144
|
*
|
|
149
145
|
* Play / pause / resume are handled by the engine core lifecycle protocol
|
|
150
146
|
* (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
|
|
@@ -182,13 +178,11 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
|
|
|
182
178
|
/** ownerGoId → its marker GO (icon child, Graphics only). */
|
|
183
179
|
private readonly markerGoByOwner;
|
|
184
180
|
private readonly onWindowSetPickMode;
|
|
185
|
-
private readonly onWindowSetMuted;
|
|
186
181
|
private readonly onWindowSetMarkerOverlay;
|
|
187
182
|
private readonly onGameSetMarkerOverlay;
|
|
188
183
|
private readonly onWindowMessage;
|
|
189
184
|
private readonly onGameSetPickMode;
|
|
190
185
|
private readonly onGameRefresh;
|
|
191
|
-
private readonly onGameSetMuted;
|
|
192
186
|
private readonly onWindowRefresh;
|
|
193
187
|
init(params?: CombosDevelopmentToolSystemParams): void;
|
|
194
188
|
onDestroy(): void;
|
|
@@ -209,8 +203,8 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
|
|
|
209
203
|
/** Master mute when `SoundSystem` exists; otherwise the last requested value. */
|
|
210
204
|
get isMuted(): boolean;
|
|
211
205
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
206
|
+
* @deprecated Host mute is handled by `@combos-fun/plugin-sound`.
|
|
207
|
+
* Forwards to `SoundSystem.muted` when that system is registered.
|
|
214
208
|
*/
|
|
215
209
|
setMuted(muted: boolean): void;
|
|
216
210
|
update(e: UpdateParams): void;
|
|
@@ -236,7 +230,6 @@ declare class CombosDevelopmentToolSystem extends System<CombosDevelopmentToolSy
|
|
|
236
230
|
private getRendererContainer;
|
|
237
231
|
private releasePick;
|
|
238
232
|
private postSetSuccess;
|
|
239
|
-
private postStateChanged;
|
|
240
233
|
/** (Re)build markers for every object owning a registered marker component. */
|
|
241
234
|
private attachMarkers;
|
|
242
235
|
private createMarker;
|
|
@@ -22,10 +22,8 @@ const COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY = 'combos-development-tool:apply-pr
|
|
|
22
22
|
/** iframe → parent: game scene bootstrap finished; parent may enable pick mode. */
|
|
23
23
|
const COMBOS_DEVELOPMENT_TOOL_READY = 'combos-development-tool:ready';
|
|
24
24
|
/**
|
|
25
|
-
* Parent → iframe: mute or unmute
|
|
26
|
-
*
|
|
27
|
-
* Note: play / pause / resume are owned by the engine core lifecycle protocol
|
|
28
|
-
* (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
|
|
25
|
+
* Parent → iframe: mute or unmute. Handled by `@combos-fun/plugin-sound`.
|
|
26
|
+
* Payload: `{ muted: boolean }`.
|
|
29
27
|
*/
|
|
30
28
|
const COMBOS_DEVELOPMENT_TOOL_SET_MUTED = 'combos-development-tool:set-muted';
|
|
31
29
|
/** iframe → parent (and `game.emit`): current mute snapshot after a successful change. */
|
|
@@ -599,11 +597,9 @@ const MARKER_GO_NAME_PREFIX = '__combosDevelopmentToolMarker:';
|
|
|
599
597
|
* - `window.postMessage({ type: COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, enabled: true }, targetOrigin)` (e.g. from parent iframe)
|
|
600
598
|
* - `game.emit(COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, { enabled: true })` or `getSystem(CombosDevelopmentToolSystem).setEnabled(true)`
|
|
601
599
|
*
|
|
602
|
-
* Mute
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
* Mute applies when `SoundSystem` is registered; otherwise the desired value is remembered until it appears.
|
|
606
|
-
* Emits / posts `COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED` with `{ muted }`.
|
|
600
|
+
* Mute is owned by `@combos-fun/plugin-sound` (`combos-development-tool:set-muted` /
|
|
601
|
+
* `SoundSystem.setMuted`). This system still forwards `.setMuted()` to
|
|
602
|
+
* `SoundSystem` so older in-game callers keep working.
|
|
607
603
|
*
|
|
608
604
|
* Play / pause / resume are handled by the engine core lifecycle protocol
|
|
609
605
|
* (`combos-game:set-playing` / `combos-game:state-changed`), not this tool.
|
|
@@ -647,12 +643,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
647
643
|
this.setEnabled(d.enabled);
|
|
648
644
|
}
|
|
649
645
|
};
|
|
650
|
-
this.onWindowSetMuted = (e) => {
|
|
651
|
-
const d = e.detail;
|
|
652
|
-
if (d && typeof d.muted === 'boolean') {
|
|
653
|
-
this.setMuted(d.muted);
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
646
|
this.onWindowSetMarkerOverlay = (e) => {
|
|
657
647
|
const d = e.detail;
|
|
658
648
|
if (d && typeof d.enabled === 'boolean') {
|
|
@@ -674,9 +664,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
674
664
|
if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE && typeof d.enabled === 'boolean') {
|
|
675
665
|
this.setEnabled(d.enabled);
|
|
676
666
|
}
|
|
677
|
-
else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MUTED && typeof d.muted === 'boolean') {
|
|
678
|
-
this.setMuted(d.muted);
|
|
679
|
-
}
|
|
680
667
|
else if (d.type === COMBOS_DEVELOPMENT_TOOL_SET_MARKER_OVERLAY &&
|
|
681
668
|
typeof d.enabled === 'boolean') {
|
|
682
669
|
this.setMarkerOverlay(d.enabled);
|
|
@@ -699,11 +686,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
699
686
|
this.onGameRefresh = () => {
|
|
700
687
|
this.requestSceneRescan();
|
|
701
688
|
};
|
|
702
|
-
this.onGameSetMuted = (payload) => {
|
|
703
|
-
if (payload && typeof payload.muted === 'boolean') {
|
|
704
|
-
this.setMuted(payload.muted);
|
|
705
|
-
}
|
|
706
|
-
};
|
|
707
689
|
this.onWindowRefresh = () => {
|
|
708
690
|
this.requestSceneRescan();
|
|
709
691
|
};
|
|
@@ -714,13 +696,11 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
714
696
|
this.allowedMessageOrigins = mergeAllowedMessageOrigins(params?.allowedMessageOrigins);
|
|
715
697
|
if (typeof window !== 'undefined') {
|
|
716
698
|
window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, this.onWindowSetPickMode);
|
|
717
|
-
window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);
|
|
718
699
|
window.addEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MARKER_OVERLAY, this.onWindowSetMarkerOverlay);
|
|
719
700
|
window.addEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);
|
|
720
701
|
window.addEventListener('message', this.onWindowMessage);
|
|
721
702
|
}
|
|
722
703
|
this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, this.onGameSetPickMode);
|
|
723
|
-
this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);
|
|
724
704
|
this.game.on(COMBOS_DEVELOPMENT_TOOL_SET_MARKER_OVERLAY, this.onGameSetMarkerOverlay);
|
|
725
705
|
this.game.on(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);
|
|
726
706
|
if (this.enabled) {
|
|
@@ -730,13 +710,11 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
730
710
|
onDestroy() {
|
|
731
711
|
if (typeof window !== 'undefined') {
|
|
732
712
|
window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, this.onWindowSetPickMode);
|
|
733
|
-
window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onWindowSetMuted);
|
|
734
713
|
window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_SET_MARKER_OVERLAY, this.onWindowSetMarkerOverlay);
|
|
735
714
|
window.removeEventListener(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onWindowRefresh);
|
|
736
715
|
window.removeEventListener('message', this.onWindowMessage);
|
|
737
716
|
}
|
|
738
717
|
this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, this.onGameSetPickMode);
|
|
739
|
-
this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MUTED, this.onGameSetMuted);
|
|
740
718
|
this.game.off(COMBOS_DEVELOPMENT_TOOL_SET_MARKER_OVERLAY, this.onGameSetMarkerOverlay);
|
|
741
719
|
this.game.off(COMBOS_DEVELOPMENT_TOOL_REFRESH, this.onGameRefresh);
|
|
742
720
|
this.detachAllPicks();
|
|
@@ -800,18 +778,16 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
800
778
|
return this.mutedWithoutSoundSystem;
|
|
801
779
|
}
|
|
802
780
|
/**
|
|
803
|
-
*
|
|
804
|
-
*
|
|
781
|
+
* @deprecated Host mute is handled by `@combos-fun/plugin-sound`.
|
|
782
|
+
* Forwards to `SoundSystem.muted` when that system is registered.
|
|
805
783
|
*/
|
|
806
784
|
setMuted(muted) {
|
|
807
785
|
const sound = this.getSoundSystem();
|
|
808
786
|
if (sound) {
|
|
809
787
|
sound.muted = muted;
|
|
788
|
+
return;
|
|
810
789
|
}
|
|
811
|
-
|
|
812
|
-
this.mutedWithoutSoundSystem = muted;
|
|
813
|
-
}
|
|
814
|
-
this.postStateChanged();
|
|
790
|
+
this.mutedWithoutSoundSystem = muted;
|
|
815
791
|
}
|
|
816
792
|
update(e) {
|
|
817
793
|
if (this.enabled && this.needsRescan) {
|
|
@@ -1102,19 +1078,6 @@ let CombosDevelopmentToolSystem = class CombosDevelopmentToolSystem extends Syst
|
|
|
1102
1078
|
}
|
|
1103
1079
|
this.game.emit(COMBOS_DEVELOPMENT_TOOL_PICK_MODE_SUCCESS, { enabled });
|
|
1104
1080
|
}
|
|
1105
|
-
postStateChanged() {
|
|
1106
|
-
const state = {
|
|
1107
|
-
muted: this.isMuted,
|
|
1108
|
-
};
|
|
1109
|
-
const payload = {
|
|
1110
|
-
type: COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED,
|
|
1111
|
-
...state,
|
|
1112
|
-
};
|
|
1113
|
-
if (typeof window !== 'undefined' && window.parent && window.parent !== window) {
|
|
1114
|
-
window.parent.postMessage(payload, this.postMessageOrigin);
|
|
1115
|
-
}
|
|
1116
|
-
this.game.emit(COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, state);
|
|
1117
|
-
}
|
|
1118
1081
|
/** (Re)build markers for every object owning a registered marker component. */
|
|
1119
1082
|
attachMarkers() {
|
|
1120
1083
|
this.detachAllMarkers();
|
|
@@ -1373,7 +1336,7 @@ var CombosDevelopmentToolSystem$1 = CombosDevelopmentToolSystem;
|
|
|
1373
1336
|
/** Auto-generated by scripts/build-package.mjs — do not edit. */
|
|
1374
1337
|
Object.assign(CombosDevelopmentToolSystem$1, {
|
|
1375
1338
|
packageName: "@combos-fun/plugin-development-tool",
|
|
1376
|
-
packageVersion: "0.0.
|
|
1339
|
+
packageVersion: "0.0.48",
|
|
1377
1340
|
});
|
|
1378
1341
|
|
|
1379
1342
|
export { COMBOS_DEVELOPMENT_TOOL_APPLY_PROPERTY, COMBOS_DEVELOPMENT_TOOL_CLEAR_SELECTION, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_DESELECTED, COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED, COMBOS_DEVELOPMENT_TOOL_MARKER_OVERLAY_SUCCESS, COMBOS_DEVELOPMENT_TOOL_PICK_MODE_SUCCESS, COMBOS_DEVELOPMENT_TOOL_READY, COMBOS_DEVELOPMENT_TOOL_REFRESH, COMBOS_DEVELOPMENT_TOOL_SET_MARKER_OVERLAY, COMBOS_DEVELOPMENT_TOOL_SET_MUTED, COMBOS_DEVELOPMENT_TOOL_SET_PICK_MODE, COMBOS_DEVELOPMENT_TOOL_STATE_CHANGED, CombosDevelopmentToolSystem$1 as CombosDevelopmentToolSystem, CombosDevelopmentToolTarget, DEFAULT_ALLOWED_MESSAGE_HOST_SUFFIXES, MARKER_COMPONENTS, MARKER_ICON_SIZE, applyPropertyValue, applyPropertyWithHooks, buildGameObjectDeselectedPayload, buildGameObjectSnapshot, drawMarkerIcon, isAllowedMessageOrigin, isClearSelectionMessage, mergeAllowedMessageOrigins, readPropertyValue, readSourceAnchor, resolveMarkerDef, shouldNotifyGameObjectDeselected };
|