@plasius/player-system-interface 0.1.2 → 0.1.3
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/README.md +51 -11
- package/dist/index.cjs +88 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -5
- package/dist/index.d.ts +61 -5
- package/dist/index.js +82 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,20 +43,49 @@ node demo/example.mjs
|
|
|
43
43
|
|
|
44
44
|
```ts
|
|
45
45
|
import {
|
|
46
|
+
createFocusPaneShellDefinition,
|
|
47
|
+
createInterfaceShellDefinition,
|
|
48
|
+
createInterfaceShellSurfaceDefinition,
|
|
49
|
+
createLineOfSightTargetPopupDefinition,
|
|
46
50
|
createPlayerSystemInterfaceContract,
|
|
47
51
|
createPlayerSystemInterfacePortabilityContract,
|
|
48
|
-
createWorldSpacePanelDefinition,
|
|
49
52
|
packageDescriptor,
|
|
50
53
|
} from "@plasius/player-system-interface";
|
|
51
54
|
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const shell = createInterfaceShellDefinition({
|
|
56
|
+
surfaces: [
|
|
57
|
+
createInterfaceShellSurfaceDefinition({
|
|
58
|
+
surfaceId: "mission-focus-surface",
|
|
59
|
+
owner: "player-system",
|
|
60
|
+
kind: "focus-pane",
|
|
61
|
+
anchorId: "focus-pane-anchor",
|
|
62
|
+
interactive: true,
|
|
63
|
+
priority: 10,
|
|
64
|
+
combatBehavior: "reduce",
|
|
65
|
+
}),
|
|
66
|
+
],
|
|
67
|
+
focusPane: createFocusPaneShellDefinition({
|
|
68
|
+
panelId: "mission-focus",
|
|
69
|
+
owner: "player-system",
|
|
70
|
+
pane: "missions",
|
|
71
|
+
anchorId: "focus-pane-anchor",
|
|
72
|
+
heading: "Mission focus",
|
|
73
|
+
interactive: true,
|
|
74
|
+
combatBehavior: "reduce",
|
|
75
|
+
}),
|
|
76
|
+
targetPopups: [
|
|
77
|
+
createLineOfSightTargetPopupDefinition({
|
|
78
|
+
popupId: "nearby-threat",
|
|
79
|
+
owner: "player-system",
|
|
80
|
+
anchorId: "target-anchor",
|
|
81
|
+
targetId: "forest-wolf",
|
|
82
|
+
summary: "Hostile target in range",
|
|
83
|
+
requiresLineOfSight: true,
|
|
84
|
+
}),
|
|
85
|
+
],
|
|
57
86
|
});
|
|
58
87
|
|
|
59
|
-
console.log(packageDescriptor.packageName,
|
|
88
|
+
console.log(packageDescriptor.packageName, shell.focusPane?.pane);
|
|
60
89
|
console.log(createPlayerSystemInterfaceContract().frameBudget.maxFrameMs);
|
|
61
90
|
console.log(
|
|
62
91
|
createPlayerSystemInterfacePortabilityContract().hostAdapters.supportedHosts
|
|
@@ -65,7 +94,7 @@ console.log(
|
|
|
65
94
|
|
|
66
95
|
## Interface NFR Contract
|
|
67
96
|
|
|
68
|
-
The inherited feature flag for this work is `isekai.player-system.
|
|
97
|
+
The inherited feature flag for this work is `isekai.player-system.interface.enabled`.
|
|
69
98
|
|
|
70
99
|
`defaultPlayerSystemInterfaceContract` and `createPlayerSystemInterfaceContract()` make these host expectations explicit:
|
|
71
100
|
|
|
@@ -77,7 +106,7 @@ The inherited feature flag for this work is `isekai.player-system.runtime-nfr.en
|
|
|
77
106
|
|
|
78
107
|
## Interface Portability Contract
|
|
79
108
|
|
|
80
|
-
The inherited feature flag for this work is `isekai.player-system.
|
|
109
|
+
The inherited feature flag for this work is `isekai.player-system.interface.enabled`.
|
|
81
110
|
|
|
82
111
|
`defaultPlayerSystemInterfacePortabilityContract`,
|
|
83
112
|
`createPlayerSystemInterfacePortabilityContract()`, and
|
|
@@ -87,11 +116,22 @@ The inherited feature flag for this work is `isekai.player-system.runtime-portab
|
|
|
87
116
|
- required adapter capabilities are documented instead of assumed implicitly
|
|
88
117
|
- multi-pane and multi-overlay compositions stay within bounded panel, alert, and focus budgets
|
|
89
118
|
|
|
119
|
+
## Interface Shell Contracts
|
|
120
|
+
|
|
121
|
+
`createInterfaceShellDefinition()`, `createFocusPaneShellDefinition()`,
|
|
122
|
+
`createLineOfSightTargetPopupDefinition()`, and
|
|
123
|
+
`assessInterfaceShellDefinition()` cover the reusable shell surface for Story
|
|
124
|
+
`#417`:
|
|
125
|
+
|
|
126
|
+
- focused panes and line-of-sight target popups are first-class contracts
|
|
127
|
+
- Party and Player System surfaces can coexist in one shell definition
|
|
128
|
+
- reduced-combat behavior is explicit per surface and bounded by the shell policy
|
|
129
|
+
|
|
90
130
|
## Governance
|
|
91
131
|
|
|
92
132
|
- ADRs: [docs/adrs](./docs/adrs)
|
|
93
133
|
- TDRs: [docs/tdrs](./docs/tdrs)
|
|
94
134
|
- Design notes: [docs/design](./docs/design)
|
|
95
|
-
- Parent feature flag: `isekai.player-system.
|
|
135
|
+
- Parent feature flag: `isekai.player-system.interface.enabled`
|
|
96
136
|
- Capability: not required for package bootstrap; interface adoption remains feature-flag led
|
|
97
|
-
- Rollback: disable `isekai.player-system.
|
|
137
|
+
- Rollback: disable `isekai.player-system.interface.enabled` to halt package-family adoption without changing package code
|
package/dist/index.cjs
CHANGED
|
@@ -26,22 +26,28 @@ __export(index_exports, {
|
|
|
26
26
|
PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID: () => PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,
|
|
27
27
|
PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID: () => PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,
|
|
28
28
|
PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID: () => PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,
|
|
29
|
+
assessInterfaceShellDefinition: () => assessInterfaceShellDefinition,
|
|
29
30
|
assessPlayerSystemInterfaceComposition: () => assessPlayerSystemInterfaceComposition,
|
|
31
|
+
createFocusPaneShellDefinition: () => createFocusPaneShellDefinition,
|
|
32
|
+
createInterfaceShellDefinition: () => createInterfaceShellDefinition,
|
|
33
|
+
createInterfaceShellSurfaceDefinition: () => createInterfaceShellSurfaceDefinition,
|
|
34
|
+
createLineOfSightTargetPopupDefinition: () => createLineOfSightTargetPopupDefinition,
|
|
30
35
|
createPlayerSystemInterfaceContract: () => createPlayerSystemInterfaceContract,
|
|
31
36
|
createPlayerSystemInterfacePortabilityContract: () => createPlayerSystemInterfacePortabilityContract,
|
|
32
37
|
createWorldSpacePanelDefinition: () => createWorldSpacePanelDefinition,
|
|
33
38
|
defaultPlayerSystemInterfaceContract: () => defaultPlayerSystemInterfaceContract,
|
|
34
39
|
defaultPlayerSystemInterfacePortabilityContract: () => defaultPlayerSystemInterfacePortabilityContract,
|
|
40
|
+
defaultReducedCombatOverlayPolicy: () => defaultReducedCombatOverlayPolicy,
|
|
35
41
|
isPlayerSystemInterfaceMode: () => isPlayerSystemInterfaceMode,
|
|
36
42
|
packageDescriptor: () => packageDescriptor
|
|
37
43
|
});
|
|
38
44
|
module.exports = __toCommonJS(index_exports);
|
|
39
45
|
var PLAYER_SYSTEM_INTERFACE_PACKAGE = "@plasius/player-system-interface";
|
|
40
46
|
var PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = "PLAYER_SYSTEM_INTERFACE";
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID =
|
|
44
|
-
var PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID =
|
|
47
|
+
var PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
48
|
+
var PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID = PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;
|
|
49
|
+
var PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID = PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;
|
|
50
|
+
var PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID = PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;
|
|
45
51
|
var packageDescriptor = Object.freeze({
|
|
46
52
|
packageName: PLAYER_SYSTEM_INTERFACE_PACKAGE,
|
|
47
53
|
featureFlagId: PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,
|
|
@@ -88,6 +94,16 @@ var defaultPlayerSystemInterfacePortabilityContract = Object.freeze({
|
|
|
88
94
|
maxInteractivePanelsPerFrame: 2
|
|
89
95
|
})
|
|
90
96
|
});
|
|
97
|
+
var defaultReducedCombatOverlayPolicy = Object.freeze({
|
|
98
|
+
featureFlagId: PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,
|
|
99
|
+
mode: "combat-safe",
|
|
100
|
+
retainedSurfaceKinds: Object.freeze([
|
|
101
|
+
"alert-marker",
|
|
102
|
+
"target-popup",
|
|
103
|
+
"focus-pane"
|
|
104
|
+
]),
|
|
105
|
+
maxInteractiveSurfaces: 1
|
|
106
|
+
});
|
|
91
107
|
function isPlayerSystemInterfaceMode(value) {
|
|
92
108
|
return value === "ambient" || value === "focused" || value === "combat-safe";
|
|
93
109
|
}
|
|
@@ -129,6 +145,30 @@ function createPlayerSystemInterfacePortabilityContract(input = {}) {
|
|
|
129
145
|
})
|
|
130
146
|
});
|
|
131
147
|
}
|
|
148
|
+
function createInterfaceShellSurfaceDefinition(input) {
|
|
149
|
+
return Object.freeze({ ...input });
|
|
150
|
+
}
|
|
151
|
+
function createFocusPaneShellDefinition(input) {
|
|
152
|
+
return Object.freeze({ ...input });
|
|
153
|
+
}
|
|
154
|
+
function createLineOfSightTargetPopupDefinition(input) {
|
|
155
|
+
return Object.freeze({ ...input });
|
|
156
|
+
}
|
|
157
|
+
function createInterfaceShellDefinition(input = {}) {
|
|
158
|
+
return Object.freeze({
|
|
159
|
+
featureFlagId: input.featureFlagId ?? PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,
|
|
160
|
+
surfaces: Object.freeze([...input.surfaces ?? []]),
|
|
161
|
+
focusPane: input.focusPane ? Object.freeze({ ...input.focusPane }) : void 0,
|
|
162
|
+
targetPopups: Object.freeze([...input.targetPopups ?? []]),
|
|
163
|
+
reducedCombat: Object.freeze({
|
|
164
|
+
...defaultReducedCombatOverlayPolicy,
|
|
165
|
+
...input.reducedCombat,
|
|
166
|
+
retainedSurfaceKinds: Object.freeze([
|
|
167
|
+
...input.reducedCombat?.retainedSurfaceKinds ?? defaultReducedCombatOverlayPolicy.retainedSurfaceKinds
|
|
168
|
+
])
|
|
169
|
+
})
|
|
170
|
+
});
|
|
171
|
+
}
|
|
132
172
|
function assessPlayerSystemInterfaceComposition(sample, contract = defaultPlayerSystemInterfacePortabilityContract) {
|
|
133
173
|
const violations = [];
|
|
134
174
|
if (sample.panelCount > contract.compositionScale.maxWorldPanels) {
|
|
@@ -148,6 +188,44 @@ function assessPlayerSystemInterfaceComposition(sample, contract = defaultPlayer
|
|
|
148
188
|
violations: Object.freeze(violations)
|
|
149
189
|
});
|
|
150
190
|
}
|
|
191
|
+
function assessInterfaceShellDefinition(shell) {
|
|
192
|
+
const violations = [];
|
|
193
|
+
const ownerSet = new Set(shell.surfaces.map((surface) => surface.owner));
|
|
194
|
+
const retainedSurfaceKinds = new Set(shell.reducedCombat.retainedSurfaceKinds);
|
|
195
|
+
const interactiveSurfaceCount = shell.surfaces.filter(
|
|
196
|
+
(surface) => surface.interactive && retainedSurfaceKinds.has(surface.kind)
|
|
197
|
+
).length;
|
|
198
|
+
const focusPane = shell.focusPane;
|
|
199
|
+
if (shell.surfaces.length === 0) {
|
|
200
|
+
violations.push("surfaces");
|
|
201
|
+
}
|
|
202
|
+
if (focusPane && !ownerSet.has(focusPane.owner)) {
|
|
203
|
+
violations.push("focusPaneOwner");
|
|
204
|
+
}
|
|
205
|
+
if (focusPane) {
|
|
206
|
+
const matchingSurface = shell.surfaces.find(
|
|
207
|
+
(surface) => surface.kind === "focus-pane" && surface.anchorId === focusPane.anchorId && surface.owner === focusPane.owner
|
|
208
|
+
);
|
|
209
|
+
if (!matchingSurface) {
|
|
210
|
+
violations.push("focusPaneSurface");
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (interactiveSurfaceCount > shell.reducedCombat.maxInteractiveSurfaces) {
|
|
214
|
+
violations.push("interactiveSurfaceCount");
|
|
215
|
+
}
|
|
216
|
+
for (const popup of shell.targetPopups) {
|
|
217
|
+
if (popup.requiresLineOfSight && popup.anchorId.length === 0) {
|
|
218
|
+
violations.push(`popup:${popup.popupId}`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (ownerSet.has("player-system") && ownerSet.has("party-system") && shell.reducedCombat.retainedSurfaceKinds.length === 0) {
|
|
222
|
+
violations.push("reducedCombat");
|
|
223
|
+
}
|
|
224
|
+
return Object.freeze({
|
|
225
|
+
accepted: violations.length === 0,
|
|
226
|
+
violations: Object.freeze(violations)
|
|
227
|
+
});
|
|
228
|
+
}
|
|
151
229
|
// Annotate the CommonJS export names for ESM import in node:
|
|
152
230
|
0 && (module.exports = {
|
|
153
231
|
PLAYER_SYSTEM_INTERFACE_ENV_PREFIX,
|
|
@@ -156,12 +234,18 @@ function assessPlayerSystemInterfaceComposition(sample, contract = defaultPlayer
|
|
|
156
234
|
PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,
|
|
157
235
|
PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,
|
|
158
236
|
PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,
|
|
237
|
+
assessInterfaceShellDefinition,
|
|
159
238
|
assessPlayerSystemInterfaceComposition,
|
|
239
|
+
createFocusPaneShellDefinition,
|
|
240
|
+
createInterfaceShellDefinition,
|
|
241
|
+
createInterfaceShellSurfaceDefinition,
|
|
242
|
+
createLineOfSightTargetPopupDefinition,
|
|
160
243
|
createPlayerSystemInterfaceContract,
|
|
161
244
|
createPlayerSystemInterfacePortabilityContract,
|
|
162
245
|
createWorldSpacePanelDefinition,
|
|
163
246
|
defaultPlayerSystemInterfaceContract,
|
|
164
247
|
defaultPlayerSystemInterfacePortabilityContract,
|
|
248
|
+
defaultReducedCombatOverlayPolicy,
|
|
165
249
|
isPlayerSystemInterfaceMode,
|
|
166
250
|
packageDescriptor
|
|
167
251
|
});
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface PackageDescriptor {\n readonly packageName: string;\n readonly featureFlagId: string;\n readonly envPrefix: string;\n readonly summary: string;\n}\n\nexport type OverlayKeyboardPath = \"sequential\" | \"direct-hotkey\" | \"read-only\";\n\nexport interface OverlayAccessibilityContract {\n readonly keyboardPath: OverlayKeyboardPath;\n readonly focusRestorationTarget: \"trigger\" | \"pane-heading\" | \"nearest-anchor\";\n readonly liveRegionMode: \"polite\" | \"assertive\" | \"off\";\n readonly requiresAccessibleName: boolean;\n}\n\nexport interface InterfaceFrameBudget {\n readonly targetFps: number;\n readonly maxFrameMs: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport type OverlayHostKind =\n | \"dom-overlay\"\n | \"native-overlay\"\n | \"headless-snapshot\";\n\nexport type OverlayAdapterCapability =\n | \"focus-restoration\"\n | \"live-region\"\n | \"anchor-registry\";\n\nexport interface OverlayHostAdapterContract {\n readonly supportedHosts: readonly OverlayHostKind[];\n readonly requiredCapabilities: readonly OverlayAdapterCapability[];\n readonly forbiddenAssumptions: readonly string[];\n}\n\nexport interface OverlayCompositionScaleContract {\n readonly maxWorldPanels: number;\n readonly maxFocusPanes: number;\n readonly maxAlertMarkers: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport interface PlayerSystemInterfaceContract {\n readonly featureFlagId: string;\n readonly accessibility: OverlayAccessibilityContract;\n readonly frameBudget: InterfaceFrameBudget;\n}\n\nexport interface PlayerSystemInterfacePortabilityContract {\n readonly featureFlagId: string;\n readonly hostAdapters: OverlayHostAdapterContract;\n readonly compositionScale: OverlayCompositionScaleContract;\n}\n\nexport interface PlayerSystemInterfaceContractInput {\n readonly featureFlagId?: string;\n readonly accessibility?: Partial<OverlayAccessibilityContract>;\n readonly frameBudget?: Partial<InterfaceFrameBudget>;\n}\n\nexport interface PlayerSystemInterfacePortabilityContractInput {\n readonly featureFlagId?: string;\n readonly hostAdapters?: Partial<OverlayHostAdapterContract>;\n readonly compositionScale?: Partial<OverlayCompositionScaleContract>;\n}\n\nexport type PlayerSystemInterfaceMode = \"ambient\" | \"focused\" | \"combat-safe\";\n\nexport type PlayerSystemPaneId =\n | \"identity\"\n | \"missions\"\n | \"guild-quests\"\n | \"logs\"\n | \"mcc\"\n | \"tutorial\"\n | \"points-store\";\n\nexport interface WorldSpacePanelDefinition {\n readonly panelId: string;\n readonly pane: PlayerSystemPaneId;\n readonly anchorId: string;\n readonly interactive: boolean;\n readonly accessibilityLabel?: string;\n readonly focusOrder?: number;\n}\n\nexport interface OverlayAlertMarker {\n readonly markerId: string;\n readonly severity: \"info\" | \"warning\" | \"danger\";\n readonly anchorId: string;\n}\n\nexport interface WorldSpaceCompositionSample {\n readonly panelCount: number;\n readonly focusPaneCount: number;\n readonly alertMarkerCount: number;\n readonly interactivePanelCount: number;\n}\n\nexport interface InterfaceContractAssessment {\n readonly accepted: boolean;\n readonly violations: readonly string[];\n}\n\nexport const PLAYER_SYSTEM_INTERFACE_PACKAGE = \"@plasius/player-system-interface\";\nexport const PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = \"PLAYER_SYSTEM_INTERFACE\";\nexport const PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID =\n \"isekai.player-system.packages.enabled\";\nexport const PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID;\nexport const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID =\n \"isekai.player-system.runtime-nfr.enabled\";\nexport const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID =\n \"isekai.player-system.runtime-portability.enabled\";\n\nexport const packageDescriptor: PackageDescriptor = Object.freeze({\n packageName: PLAYER_SYSTEM_INTERFACE_PACKAGE,\n featureFlagId: PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,\n envPrefix: PLAYER_SYSTEM_INTERFACE_ENV_PREFIX,\n summary:\n \"World-space Player System overlays, focus panes, and target-surface contracts for Plasius game experiences.\",\n});\n\nexport const defaultPlayerSystemInterfaceContract: PlayerSystemInterfaceContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,\n accessibility: Object.freeze({\n keyboardPath: \"sequential\",\n focusRestorationTarget: \"trigger\",\n liveRegionMode: \"polite\",\n requiresAccessibleName: true,\n }),\n frameBudget: Object.freeze({\n targetFps: 60,\n maxFrameMs: 16,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport const defaultPlayerSystemInterfacePortabilityContract: PlayerSystemInterfacePortabilityContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,\n hostAdapters: Object.freeze({\n supportedHosts: Object.freeze([\n \"dom-overlay\",\n \"native-overlay\",\n \"headless-snapshot\",\n ] satisfies OverlayHostKind[]),\n requiredCapabilities: Object.freeze([\n \"focus-restoration\",\n \"live-region\",\n \"anchor-registry\",\n ] satisfies OverlayAdapterCapability[]),\n forbiddenAssumptions: Object.freeze([\n \"window-global\",\n \"single-pane-layout\",\n \"absolute-scene-coordinates\",\n ]),\n }),\n compositionScale: Object.freeze({\n maxWorldPanels: 6,\n maxFocusPanes: 3,\n maxAlertMarkers: 8,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport function isPlayerSystemInterfaceMode(\n value: string\n): value is PlayerSystemInterfaceMode {\n return value === \"ambient\" || value === \"focused\" || value === \"combat-safe\";\n}\n\nexport function createWorldSpacePanelDefinition(\n input: WorldSpacePanelDefinition\n): WorldSpacePanelDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createPlayerSystemInterfaceContract(\n input: PlayerSystemInterfaceContractInput = {}\n): PlayerSystemInterfaceContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ?? defaultPlayerSystemInterfaceContract.featureFlagId,\n accessibility: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.accessibility,\n ...input.accessibility,\n }),\n frameBudget: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.frameBudget,\n ...input.frameBudget,\n }),\n });\n}\n\nexport function createPlayerSystemInterfacePortabilityContract(\n input: PlayerSystemInterfacePortabilityContractInput = {}\n): PlayerSystemInterfacePortabilityContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ??\n defaultPlayerSystemInterfacePortabilityContract.featureFlagId,\n hostAdapters: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.hostAdapters,\n ...input.hostAdapters,\n supportedHosts: Object.freeze([\n ...(input.hostAdapters?.supportedHosts ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .supportedHosts),\n ]),\n requiredCapabilities: Object.freeze([\n ...(input.hostAdapters?.requiredCapabilities ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .requiredCapabilities),\n ]),\n forbiddenAssumptions: Object.freeze([\n ...(input.hostAdapters?.forbiddenAssumptions ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .forbiddenAssumptions),\n ]),\n }),\n compositionScale: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.compositionScale,\n ...input.compositionScale,\n }),\n });\n}\n\nexport function assessPlayerSystemInterfaceComposition(\n sample: WorldSpaceCompositionSample,\n contract: PlayerSystemInterfacePortabilityContract = defaultPlayerSystemInterfacePortabilityContract\n): InterfaceContractAssessment {\n const violations: string[] = [];\n\n if (sample.panelCount > contract.compositionScale.maxWorldPanels) {\n violations.push(\"panelCount\");\n }\n\n if (sample.focusPaneCount > contract.compositionScale.maxFocusPanes) {\n violations.push(\"focusPaneCount\");\n }\n\n if (sample.alertMarkerCount > contract.compositionScale.maxAlertMarkers) {\n violations.push(\"alertMarkerCount\");\n }\n\n if (\n sample.interactivePanelCount >\n contract.compositionScale.maxInteractivePanelsPerFrame\n ) {\n violations.push(\"interactivePanelCount\");\n }\n\n return Object.freeze({\n accepted: violations.length === 0,\n violations: Object.freeze(violations),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2GO,IAAM,kCAAkC;AACxC,IAAM,qCAAqC;AAC3C,IAAM,yCACX;AACK,IAAM,0CACX;AACK,IAAM,4CACX;AACK,IAAM,oDACX;AAEK,IAAM,oBAAuC,OAAO,OAAO;AAAA,EAChE,aAAa;AAAA,EACb,eAAe;AAAA,EACf,WAAW;AAAA,EACX,SACE;AACJ,CAAC;AAEM,IAAM,uCACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,eAAe,OAAO,OAAO;AAAA,IAC3B,cAAc;AAAA,IACd,wBAAwB;AAAA,IACxB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B,CAAC;AAAA,EACD,aAAa,OAAO,OAAO;AAAA,IACzB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,8BAA8B;AAAA,EAChC,CAAC;AACH,CAAC;AAEI,IAAM,kDACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,cAAc,OAAO,OAAO;AAAA,IAC1B,gBAAgB,OAAO,OAAO;AAAA,MAC5B;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAA6B;AAAA,IAC7B,sBAAsB,OAAO,OAAO;AAAA,MAClC;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAsC;AAAA,IACtC,sBAAsB,OAAO,OAAO;AAA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gD;AAAA,MACnD,GAAG,MAAM;AAAA,IACX,CAAC;AAAA,EACH,CAAC;AACH;AAEO,SAAS,uCACd,QACA,WAAqD,iDACxB;AAC7B,QAAM,aAAuB,CAAC;AAE9B,MAAI,OAAO,aAAa,SAAS,iBAAiB,gBAAgB;AAChE,eAAW,KAAK,YAAY;AAAA,EAC9B;AAEA,MAAI,OAAO,iBAAiB,SAAS,iBAAiB,eAAe;AACnE,eAAW,KAAK,gBAAgB;AAAA,EAClC;AAEA,MAAI,OAAO,mBAAmB,SAAS,iBAAiB,iBAAiB;AACvE,eAAW,KAAK,kBAAkB;AAAA,EACpC;AAEA,MACE,OAAO,wBACP,SAAS,iBAAiB,8BAC1B;AACA,eAAW,KAAK,uBAAuB;AAAA,EACzC;AAEA,SAAO,OAAO,OAAO;AAAA,IACnB,UAAU,WAAW,WAAW;AAAA,IAChC,YAAY,OAAO,OAAO,UAAU;AAAA,EACtC,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface PackageDescriptor {\n readonly packageName: string;\n readonly featureFlagId: string;\n readonly envPrefix: string;\n readonly summary: string;\n}\n\nexport type OverlayKeyboardPath = \"sequential\" | \"direct-hotkey\" | \"read-only\";\n\nexport interface OverlayAccessibilityContract {\n readonly keyboardPath: OverlayKeyboardPath;\n readonly focusRestorationTarget: \"trigger\" | \"pane-heading\" | \"nearest-anchor\";\n readonly liveRegionMode: \"polite\" | \"assertive\" | \"off\";\n readonly requiresAccessibleName: boolean;\n}\n\nexport interface InterfaceFrameBudget {\n readonly targetFps: number;\n readonly maxFrameMs: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport type OverlayHostKind =\n | \"dom-overlay\"\n | \"native-overlay\"\n | \"headless-snapshot\";\n\nexport type OverlayAdapterCapability =\n | \"focus-restoration\"\n | \"live-region\"\n | \"anchor-registry\";\n\nexport interface OverlayHostAdapterContract {\n readonly supportedHosts: readonly OverlayHostKind[];\n readonly requiredCapabilities: readonly OverlayAdapterCapability[];\n readonly forbiddenAssumptions: readonly string[];\n}\n\nexport interface OverlayCompositionScaleContract {\n readonly maxWorldPanels: number;\n readonly maxFocusPanes: number;\n readonly maxAlertMarkers: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport interface PlayerSystemInterfaceContract {\n readonly featureFlagId: string;\n readonly accessibility: OverlayAccessibilityContract;\n readonly frameBudget: InterfaceFrameBudget;\n}\n\nexport interface PlayerSystemInterfacePortabilityContract {\n readonly featureFlagId: string;\n readonly hostAdapters: OverlayHostAdapterContract;\n readonly compositionScale: OverlayCompositionScaleContract;\n}\n\nexport interface PlayerSystemInterfaceContractInput {\n readonly featureFlagId?: string;\n readonly accessibility?: Partial<OverlayAccessibilityContract>;\n readonly frameBudget?: Partial<InterfaceFrameBudget>;\n}\n\nexport interface PlayerSystemInterfacePortabilityContractInput {\n readonly featureFlagId?: string;\n readonly hostAdapters?: Partial<OverlayHostAdapterContract>;\n readonly compositionScale?: Partial<OverlayCompositionScaleContract>;\n}\n\nexport type PlayerSystemInterfaceMode = \"ambient\" | \"focused\" | \"combat-safe\";\n\nexport type PlayerSystemPaneId =\n | \"identity\"\n | \"missions\"\n | \"guild-quests\"\n | \"logs\"\n | \"mcc\"\n | \"tutorial\"\n | \"points-store\";\n\nexport type InterfaceShellOwner = \"player-system\" | \"party-system\";\nexport type InterfaceShellSurfaceKind =\n | \"world-panel\"\n | \"focus-pane\"\n | \"target-popup\"\n | \"alert-marker\";\nexport type InterfaceCombatBehavior = \"persist\" | \"reduce\" | \"suspend\";\n\nexport interface InterfaceShellSurfaceDefinition {\n readonly surfaceId: string;\n readonly owner: InterfaceShellOwner;\n readonly kind: InterfaceShellSurfaceKind;\n readonly anchorId: string;\n readonly interactive: boolean;\n readonly priority: number;\n readonly combatBehavior: InterfaceCombatBehavior;\n}\n\nexport interface FocusPaneShellDefinition {\n readonly panelId: string;\n readonly owner: InterfaceShellOwner;\n readonly pane: PlayerSystemPaneId;\n readonly anchorId: string;\n readonly heading: string;\n readonly interactive: boolean;\n readonly combatBehavior: InterfaceCombatBehavior;\n}\n\nexport interface LineOfSightTargetPopupDefinition {\n readonly popupId: string;\n readonly owner: InterfaceShellOwner;\n readonly anchorId: string;\n readonly targetId: string;\n readonly summary: string;\n readonly requiresLineOfSight: boolean;\n readonly actionLabel?: string;\n}\n\nexport interface ReducedCombatOverlayPolicy {\n readonly featureFlagId: string;\n readonly mode: \"combat-safe\";\n readonly retainedSurfaceKinds: readonly InterfaceShellSurfaceKind[];\n readonly maxInteractiveSurfaces: number;\n}\n\nexport interface InterfaceShellDefinition {\n readonly featureFlagId: string;\n readonly surfaces: readonly InterfaceShellSurfaceDefinition[];\n readonly focusPane?: FocusPaneShellDefinition;\n readonly targetPopups: readonly LineOfSightTargetPopupDefinition[];\n readonly reducedCombat: ReducedCombatOverlayPolicy;\n}\n\nexport interface InterfaceShellDefinitionInput {\n readonly featureFlagId?: string;\n readonly surfaces?: readonly InterfaceShellSurfaceDefinition[];\n readonly focusPane?: FocusPaneShellDefinition;\n readonly targetPopups?: readonly LineOfSightTargetPopupDefinition[];\n readonly reducedCombat?: Partial<ReducedCombatOverlayPolicy>;\n}\n\nexport interface WorldSpacePanelDefinition {\n readonly panelId: string;\n readonly pane: PlayerSystemPaneId;\n readonly anchorId: string;\n readonly interactive: boolean;\n readonly accessibilityLabel?: string;\n readonly focusOrder?: number;\n}\n\nexport interface OverlayAlertMarker {\n readonly markerId: string;\n readonly severity: \"info\" | \"warning\" | \"danger\";\n readonly anchorId: string;\n}\n\nexport interface WorldSpaceCompositionSample {\n readonly panelCount: number;\n readonly focusPaneCount: number;\n readonly alertMarkerCount: number;\n readonly interactivePanelCount: number;\n}\n\nexport interface InterfaceContractAssessment {\n readonly accepted: boolean;\n readonly violations: readonly string[];\n}\n\nexport const PLAYER_SYSTEM_INTERFACE_PACKAGE = \"@plasius/player-system-interface\";\nexport const PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = \"PLAYER_SYSTEM_INTERFACE\";\nexport const PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID =\n \"isekai.player-system.interface.enabled\";\nexport const PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;\nexport const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;\nexport const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;\n\nexport const packageDescriptor: PackageDescriptor = Object.freeze({\n packageName: PLAYER_SYSTEM_INTERFACE_PACKAGE,\n featureFlagId: PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,\n envPrefix: PLAYER_SYSTEM_INTERFACE_ENV_PREFIX,\n summary:\n \"World-space Player System overlays, focus panes, and target-surface contracts for Plasius game experiences.\",\n});\n\nexport const defaultPlayerSystemInterfaceContract: PlayerSystemInterfaceContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,\n accessibility: Object.freeze({\n keyboardPath: \"sequential\",\n focusRestorationTarget: \"trigger\",\n liveRegionMode: \"polite\",\n requiresAccessibleName: true,\n }),\n frameBudget: Object.freeze({\n targetFps: 60,\n maxFrameMs: 16,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport const defaultPlayerSystemInterfacePortabilityContract: PlayerSystemInterfacePortabilityContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,\n hostAdapters: Object.freeze({\n supportedHosts: Object.freeze([\n \"dom-overlay\",\n \"native-overlay\",\n \"headless-snapshot\",\n ] satisfies OverlayHostKind[]),\n requiredCapabilities: Object.freeze([\n \"focus-restoration\",\n \"live-region\",\n \"anchor-registry\",\n ] satisfies OverlayAdapterCapability[]),\n forbiddenAssumptions: Object.freeze([\n \"window-global\",\n \"single-pane-layout\",\n \"absolute-scene-coordinates\",\n ]),\n }),\n compositionScale: Object.freeze({\n maxWorldPanels: 6,\n maxFocusPanes: 3,\n maxAlertMarkers: 8,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport const defaultReducedCombatOverlayPolicy: ReducedCombatOverlayPolicy =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,\n mode: \"combat-safe\",\n retainedSurfaceKinds: Object.freeze([\n \"alert-marker\",\n \"target-popup\",\n \"focus-pane\",\n ] satisfies InterfaceShellSurfaceKind[]),\n maxInteractiveSurfaces: 1,\n });\n\nexport function isPlayerSystemInterfaceMode(\n value: string\n): value is PlayerSystemInterfaceMode {\n return value === \"ambient\" || value === \"focused\" || value === \"combat-safe\";\n}\n\nexport function createWorldSpacePanelDefinition(\n input: WorldSpacePanelDefinition\n): WorldSpacePanelDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createPlayerSystemInterfaceContract(\n input: PlayerSystemInterfaceContractInput = {}\n): PlayerSystemInterfaceContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ?? defaultPlayerSystemInterfaceContract.featureFlagId,\n accessibility: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.accessibility,\n ...input.accessibility,\n }),\n frameBudget: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.frameBudget,\n ...input.frameBudget,\n }),\n });\n}\n\nexport function createPlayerSystemInterfacePortabilityContract(\n input: PlayerSystemInterfacePortabilityContractInput = {}\n): PlayerSystemInterfacePortabilityContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ??\n defaultPlayerSystemInterfacePortabilityContract.featureFlagId,\n hostAdapters: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.hostAdapters,\n ...input.hostAdapters,\n supportedHosts: Object.freeze([\n ...(input.hostAdapters?.supportedHosts ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .supportedHosts),\n ]),\n requiredCapabilities: Object.freeze([\n ...(input.hostAdapters?.requiredCapabilities ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .requiredCapabilities),\n ]),\n forbiddenAssumptions: Object.freeze([\n ...(input.hostAdapters?.forbiddenAssumptions ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .forbiddenAssumptions),\n ]),\n }),\n compositionScale: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.compositionScale,\n ...input.compositionScale,\n }),\n });\n}\n\nexport function createInterfaceShellSurfaceDefinition(\n input: InterfaceShellSurfaceDefinition\n): InterfaceShellSurfaceDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createFocusPaneShellDefinition(\n input: FocusPaneShellDefinition\n): FocusPaneShellDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createLineOfSightTargetPopupDefinition(\n input: LineOfSightTargetPopupDefinition\n): LineOfSightTargetPopupDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createInterfaceShellDefinition(\n input: InterfaceShellDefinitionInput = {}\n): InterfaceShellDefinition {\n return Object.freeze({\n featureFlagId: input.featureFlagId ?? PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,\n surfaces: Object.freeze([...(input.surfaces ?? [])]),\n focusPane: input.focusPane ? Object.freeze({ ...input.focusPane }) : undefined,\n targetPopups: Object.freeze([...(input.targetPopups ?? [])]),\n reducedCombat: Object.freeze({\n ...defaultReducedCombatOverlayPolicy,\n ...input.reducedCombat,\n retainedSurfaceKinds: Object.freeze([\n ...(input.reducedCombat?.retainedSurfaceKinds ??\n defaultReducedCombatOverlayPolicy.retainedSurfaceKinds),\n ]),\n }),\n });\n}\n\nexport function assessPlayerSystemInterfaceComposition(\n sample: WorldSpaceCompositionSample,\n contract: PlayerSystemInterfacePortabilityContract = defaultPlayerSystemInterfacePortabilityContract\n): InterfaceContractAssessment {\n const violations: string[] = [];\n\n if (sample.panelCount > contract.compositionScale.maxWorldPanels) {\n violations.push(\"panelCount\");\n }\n\n if (sample.focusPaneCount > contract.compositionScale.maxFocusPanes) {\n violations.push(\"focusPaneCount\");\n }\n\n if (sample.alertMarkerCount > contract.compositionScale.maxAlertMarkers) {\n violations.push(\"alertMarkerCount\");\n }\n\n if (\n sample.interactivePanelCount >\n contract.compositionScale.maxInteractivePanelsPerFrame\n ) {\n violations.push(\"interactivePanelCount\");\n }\n\n return Object.freeze({\n accepted: violations.length === 0,\n violations: Object.freeze(violations),\n });\n}\n\nexport function assessInterfaceShellDefinition(\n shell: InterfaceShellDefinition\n): InterfaceContractAssessment {\n const violations: string[] = [];\n const ownerSet = new Set(shell.surfaces.map((surface) => surface.owner));\n const retainedSurfaceKinds = new Set(shell.reducedCombat.retainedSurfaceKinds);\n const interactiveSurfaceCount = shell.surfaces.filter(\n (surface) => surface.interactive && retainedSurfaceKinds.has(surface.kind)\n ).length;\n const focusPane = shell.focusPane;\n\n if (shell.surfaces.length === 0) {\n violations.push(\"surfaces\");\n }\n\n if (focusPane && !ownerSet.has(focusPane.owner)) {\n violations.push(\"focusPaneOwner\");\n }\n\n if (focusPane) {\n const matchingSurface = shell.surfaces.find(\n (surface) =>\n surface.kind === \"focus-pane\" &&\n surface.anchorId === focusPane.anchorId &&\n surface.owner === focusPane.owner\n );\n if (!matchingSurface) {\n violations.push(\"focusPaneSurface\");\n }\n }\n\n if (\n interactiveSurfaceCount > shell.reducedCombat.maxInteractiveSurfaces\n ) {\n violations.push(\"interactiveSurfaceCount\");\n }\n\n for (const popup of shell.targetPopups) {\n if (popup.requiresLineOfSight && popup.anchorId.length === 0) {\n violations.push(`popup:${popup.popupId}`);\n }\n }\n\n if (\n ownerSet.has(\"player-system\") &&\n ownerSet.has(\"party-system\") &&\n shell.reducedCombat.retainedSurfaceKinds.length === 0\n ) {\n violations.push(\"reducedCombat\");\n }\n\n return Object.freeze({\n accepted: violations.length === 0,\n violations: Object.freeze(violations),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAA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 -51,6 +51,56 @@ interface PlayerSystemInterfacePortabilityContractInput {
|
|
|
51
51
|
}
|
|
52
52
|
type PlayerSystemInterfaceMode = "ambient" | "focused" | "combat-safe";
|
|
53
53
|
type PlayerSystemPaneId = "identity" | "missions" | "guild-quests" | "logs" | "mcc" | "tutorial" | "points-store";
|
|
54
|
+
type InterfaceShellOwner = "player-system" | "party-system";
|
|
55
|
+
type InterfaceShellSurfaceKind = "world-panel" | "focus-pane" | "target-popup" | "alert-marker";
|
|
56
|
+
type InterfaceCombatBehavior = "persist" | "reduce" | "suspend";
|
|
57
|
+
interface InterfaceShellSurfaceDefinition {
|
|
58
|
+
readonly surfaceId: string;
|
|
59
|
+
readonly owner: InterfaceShellOwner;
|
|
60
|
+
readonly kind: InterfaceShellSurfaceKind;
|
|
61
|
+
readonly anchorId: string;
|
|
62
|
+
readonly interactive: boolean;
|
|
63
|
+
readonly priority: number;
|
|
64
|
+
readonly combatBehavior: InterfaceCombatBehavior;
|
|
65
|
+
}
|
|
66
|
+
interface FocusPaneShellDefinition {
|
|
67
|
+
readonly panelId: string;
|
|
68
|
+
readonly owner: InterfaceShellOwner;
|
|
69
|
+
readonly pane: PlayerSystemPaneId;
|
|
70
|
+
readonly anchorId: string;
|
|
71
|
+
readonly heading: string;
|
|
72
|
+
readonly interactive: boolean;
|
|
73
|
+
readonly combatBehavior: InterfaceCombatBehavior;
|
|
74
|
+
}
|
|
75
|
+
interface LineOfSightTargetPopupDefinition {
|
|
76
|
+
readonly popupId: string;
|
|
77
|
+
readonly owner: InterfaceShellOwner;
|
|
78
|
+
readonly anchorId: string;
|
|
79
|
+
readonly targetId: string;
|
|
80
|
+
readonly summary: string;
|
|
81
|
+
readonly requiresLineOfSight: boolean;
|
|
82
|
+
readonly actionLabel?: string;
|
|
83
|
+
}
|
|
84
|
+
interface ReducedCombatOverlayPolicy {
|
|
85
|
+
readonly featureFlagId: string;
|
|
86
|
+
readonly mode: "combat-safe";
|
|
87
|
+
readonly retainedSurfaceKinds: readonly InterfaceShellSurfaceKind[];
|
|
88
|
+
readonly maxInteractiveSurfaces: number;
|
|
89
|
+
}
|
|
90
|
+
interface InterfaceShellDefinition {
|
|
91
|
+
readonly featureFlagId: string;
|
|
92
|
+
readonly surfaces: readonly InterfaceShellSurfaceDefinition[];
|
|
93
|
+
readonly focusPane?: FocusPaneShellDefinition;
|
|
94
|
+
readonly targetPopups: readonly LineOfSightTargetPopupDefinition[];
|
|
95
|
+
readonly reducedCombat: ReducedCombatOverlayPolicy;
|
|
96
|
+
}
|
|
97
|
+
interface InterfaceShellDefinitionInput {
|
|
98
|
+
readonly featureFlagId?: string;
|
|
99
|
+
readonly surfaces?: readonly InterfaceShellSurfaceDefinition[];
|
|
100
|
+
readonly focusPane?: FocusPaneShellDefinition;
|
|
101
|
+
readonly targetPopups?: readonly LineOfSightTargetPopupDefinition[];
|
|
102
|
+
readonly reducedCombat?: Partial<ReducedCombatOverlayPolicy>;
|
|
103
|
+
}
|
|
54
104
|
interface WorldSpacePanelDefinition {
|
|
55
105
|
readonly panelId: string;
|
|
56
106
|
readonly pane: PlayerSystemPaneId;
|
|
@@ -76,17 +126,23 @@ interface InterfaceContractAssessment {
|
|
|
76
126
|
}
|
|
77
127
|
declare const PLAYER_SYSTEM_INTERFACE_PACKAGE = "@plasius/player-system-interface";
|
|
78
128
|
declare const PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = "PLAYER_SYSTEM_INTERFACE";
|
|
79
|
-
declare const
|
|
80
|
-
declare const
|
|
81
|
-
declare const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID = "isekai.player-system.
|
|
82
|
-
declare const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID = "isekai.player-system.
|
|
129
|
+
declare const PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
130
|
+
declare const PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
131
|
+
declare const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
132
|
+
declare const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
83
133
|
declare const packageDescriptor: PackageDescriptor;
|
|
84
134
|
declare const defaultPlayerSystemInterfaceContract: PlayerSystemInterfaceContract;
|
|
85
135
|
declare const defaultPlayerSystemInterfacePortabilityContract: PlayerSystemInterfacePortabilityContract;
|
|
136
|
+
declare const defaultReducedCombatOverlayPolicy: ReducedCombatOverlayPolicy;
|
|
86
137
|
declare function isPlayerSystemInterfaceMode(value: string): value is PlayerSystemInterfaceMode;
|
|
87
138
|
declare function createWorldSpacePanelDefinition(input: WorldSpacePanelDefinition): WorldSpacePanelDefinition;
|
|
88
139
|
declare function createPlayerSystemInterfaceContract(input?: PlayerSystemInterfaceContractInput): PlayerSystemInterfaceContract;
|
|
89
140
|
declare function createPlayerSystemInterfacePortabilityContract(input?: PlayerSystemInterfacePortabilityContractInput): PlayerSystemInterfacePortabilityContract;
|
|
141
|
+
declare function createInterfaceShellSurfaceDefinition(input: InterfaceShellSurfaceDefinition): InterfaceShellSurfaceDefinition;
|
|
142
|
+
declare function createFocusPaneShellDefinition(input: FocusPaneShellDefinition): FocusPaneShellDefinition;
|
|
143
|
+
declare function createLineOfSightTargetPopupDefinition(input: LineOfSightTargetPopupDefinition): LineOfSightTargetPopupDefinition;
|
|
144
|
+
declare function createInterfaceShellDefinition(input?: InterfaceShellDefinitionInput): InterfaceShellDefinition;
|
|
90
145
|
declare function assessPlayerSystemInterfaceComposition(sample: WorldSpaceCompositionSample, contract?: PlayerSystemInterfacePortabilityContract): InterfaceContractAssessment;
|
|
146
|
+
declare function assessInterfaceShellDefinition(shell: InterfaceShellDefinition): InterfaceContractAssessment;
|
|
91
147
|
|
|
92
|
-
export { type InterfaceContractAssessment, type InterfaceFrameBudget, type OverlayAccessibilityContract, type OverlayAdapterCapability, type OverlayAlertMarker, type OverlayCompositionScaleContract, type OverlayHostAdapterContract, type OverlayHostKind, type OverlayKeyboardPath, PLAYER_SYSTEM_INTERFACE_ENV_PREFIX, PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID, PLAYER_SYSTEM_INTERFACE_PACKAGE, PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID, type PackageDescriptor, type PlayerSystemInterfaceContract, type PlayerSystemInterfaceContractInput, type PlayerSystemInterfaceMode, type PlayerSystemInterfacePortabilityContract, type PlayerSystemInterfacePortabilityContractInput, type PlayerSystemPaneId, type WorldSpaceCompositionSample, type WorldSpacePanelDefinition, assessPlayerSystemInterfaceComposition, createPlayerSystemInterfaceContract, createPlayerSystemInterfacePortabilityContract, createWorldSpacePanelDefinition, defaultPlayerSystemInterfaceContract, defaultPlayerSystemInterfacePortabilityContract, isPlayerSystemInterfaceMode, packageDescriptor };
|
|
148
|
+
export { type FocusPaneShellDefinition, type InterfaceCombatBehavior, type InterfaceContractAssessment, type InterfaceFrameBudget, type InterfaceShellDefinition, type InterfaceShellDefinitionInput, type InterfaceShellOwner, type InterfaceShellSurfaceDefinition, type InterfaceShellSurfaceKind, type LineOfSightTargetPopupDefinition, type OverlayAccessibilityContract, type OverlayAdapterCapability, type OverlayAlertMarker, type OverlayCompositionScaleContract, type OverlayHostAdapterContract, type OverlayHostKind, type OverlayKeyboardPath, PLAYER_SYSTEM_INTERFACE_ENV_PREFIX, PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID, PLAYER_SYSTEM_INTERFACE_PACKAGE, PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID, type PackageDescriptor, type PlayerSystemInterfaceContract, type PlayerSystemInterfaceContractInput, type PlayerSystemInterfaceMode, type PlayerSystemInterfacePortabilityContract, type PlayerSystemInterfacePortabilityContractInput, type PlayerSystemPaneId, type ReducedCombatOverlayPolicy, type WorldSpaceCompositionSample, type WorldSpacePanelDefinition, assessInterfaceShellDefinition, assessPlayerSystemInterfaceComposition, createFocusPaneShellDefinition, createInterfaceShellDefinition, createInterfaceShellSurfaceDefinition, createLineOfSightTargetPopupDefinition, createPlayerSystemInterfaceContract, createPlayerSystemInterfacePortabilityContract, createWorldSpacePanelDefinition, defaultPlayerSystemInterfaceContract, defaultPlayerSystemInterfacePortabilityContract, defaultReducedCombatOverlayPolicy, isPlayerSystemInterfaceMode, packageDescriptor };
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,56 @@ interface PlayerSystemInterfacePortabilityContractInput {
|
|
|
51
51
|
}
|
|
52
52
|
type PlayerSystemInterfaceMode = "ambient" | "focused" | "combat-safe";
|
|
53
53
|
type PlayerSystemPaneId = "identity" | "missions" | "guild-quests" | "logs" | "mcc" | "tutorial" | "points-store";
|
|
54
|
+
type InterfaceShellOwner = "player-system" | "party-system";
|
|
55
|
+
type InterfaceShellSurfaceKind = "world-panel" | "focus-pane" | "target-popup" | "alert-marker";
|
|
56
|
+
type InterfaceCombatBehavior = "persist" | "reduce" | "suspend";
|
|
57
|
+
interface InterfaceShellSurfaceDefinition {
|
|
58
|
+
readonly surfaceId: string;
|
|
59
|
+
readonly owner: InterfaceShellOwner;
|
|
60
|
+
readonly kind: InterfaceShellSurfaceKind;
|
|
61
|
+
readonly anchorId: string;
|
|
62
|
+
readonly interactive: boolean;
|
|
63
|
+
readonly priority: number;
|
|
64
|
+
readonly combatBehavior: InterfaceCombatBehavior;
|
|
65
|
+
}
|
|
66
|
+
interface FocusPaneShellDefinition {
|
|
67
|
+
readonly panelId: string;
|
|
68
|
+
readonly owner: InterfaceShellOwner;
|
|
69
|
+
readonly pane: PlayerSystemPaneId;
|
|
70
|
+
readonly anchorId: string;
|
|
71
|
+
readonly heading: string;
|
|
72
|
+
readonly interactive: boolean;
|
|
73
|
+
readonly combatBehavior: InterfaceCombatBehavior;
|
|
74
|
+
}
|
|
75
|
+
interface LineOfSightTargetPopupDefinition {
|
|
76
|
+
readonly popupId: string;
|
|
77
|
+
readonly owner: InterfaceShellOwner;
|
|
78
|
+
readonly anchorId: string;
|
|
79
|
+
readonly targetId: string;
|
|
80
|
+
readonly summary: string;
|
|
81
|
+
readonly requiresLineOfSight: boolean;
|
|
82
|
+
readonly actionLabel?: string;
|
|
83
|
+
}
|
|
84
|
+
interface ReducedCombatOverlayPolicy {
|
|
85
|
+
readonly featureFlagId: string;
|
|
86
|
+
readonly mode: "combat-safe";
|
|
87
|
+
readonly retainedSurfaceKinds: readonly InterfaceShellSurfaceKind[];
|
|
88
|
+
readonly maxInteractiveSurfaces: number;
|
|
89
|
+
}
|
|
90
|
+
interface InterfaceShellDefinition {
|
|
91
|
+
readonly featureFlagId: string;
|
|
92
|
+
readonly surfaces: readonly InterfaceShellSurfaceDefinition[];
|
|
93
|
+
readonly focusPane?: FocusPaneShellDefinition;
|
|
94
|
+
readonly targetPopups: readonly LineOfSightTargetPopupDefinition[];
|
|
95
|
+
readonly reducedCombat: ReducedCombatOverlayPolicy;
|
|
96
|
+
}
|
|
97
|
+
interface InterfaceShellDefinitionInput {
|
|
98
|
+
readonly featureFlagId?: string;
|
|
99
|
+
readonly surfaces?: readonly InterfaceShellSurfaceDefinition[];
|
|
100
|
+
readonly focusPane?: FocusPaneShellDefinition;
|
|
101
|
+
readonly targetPopups?: readonly LineOfSightTargetPopupDefinition[];
|
|
102
|
+
readonly reducedCombat?: Partial<ReducedCombatOverlayPolicy>;
|
|
103
|
+
}
|
|
54
104
|
interface WorldSpacePanelDefinition {
|
|
55
105
|
readonly panelId: string;
|
|
56
106
|
readonly pane: PlayerSystemPaneId;
|
|
@@ -76,17 +126,23 @@ interface InterfaceContractAssessment {
|
|
|
76
126
|
}
|
|
77
127
|
declare const PLAYER_SYSTEM_INTERFACE_PACKAGE = "@plasius/player-system-interface";
|
|
78
128
|
declare const PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = "PLAYER_SYSTEM_INTERFACE";
|
|
79
|
-
declare const
|
|
80
|
-
declare const
|
|
81
|
-
declare const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID = "isekai.player-system.
|
|
82
|
-
declare const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID = "isekai.player-system.
|
|
129
|
+
declare const PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
130
|
+
declare const PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
131
|
+
declare const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
132
|
+
declare const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
83
133
|
declare const packageDescriptor: PackageDescriptor;
|
|
84
134
|
declare const defaultPlayerSystemInterfaceContract: PlayerSystemInterfaceContract;
|
|
85
135
|
declare const defaultPlayerSystemInterfacePortabilityContract: PlayerSystemInterfacePortabilityContract;
|
|
136
|
+
declare const defaultReducedCombatOverlayPolicy: ReducedCombatOverlayPolicy;
|
|
86
137
|
declare function isPlayerSystemInterfaceMode(value: string): value is PlayerSystemInterfaceMode;
|
|
87
138
|
declare function createWorldSpacePanelDefinition(input: WorldSpacePanelDefinition): WorldSpacePanelDefinition;
|
|
88
139
|
declare function createPlayerSystemInterfaceContract(input?: PlayerSystemInterfaceContractInput): PlayerSystemInterfaceContract;
|
|
89
140
|
declare function createPlayerSystemInterfacePortabilityContract(input?: PlayerSystemInterfacePortabilityContractInput): PlayerSystemInterfacePortabilityContract;
|
|
141
|
+
declare function createInterfaceShellSurfaceDefinition(input: InterfaceShellSurfaceDefinition): InterfaceShellSurfaceDefinition;
|
|
142
|
+
declare function createFocusPaneShellDefinition(input: FocusPaneShellDefinition): FocusPaneShellDefinition;
|
|
143
|
+
declare function createLineOfSightTargetPopupDefinition(input: LineOfSightTargetPopupDefinition): LineOfSightTargetPopupDefinition;
|
|
144
|
+
declare function createInterfaceShellDefinition(input?: InterfaceShellDefinitionInput): InterfaceShellDefinition;
|
|
90
145
|
declare function assessPlayerSystemInterfaceComposition(sample: WorldSpaceCompositionSample, contract?: PlayerSystemInterfacePortabilityContract): InterfaceContractAssessment;
|
|
146
|
+
declare function assessInterfaceShellDefinition(shell: InterfaceShellDefinition): InterfaceContractAssessment;
|
|
91
147
|
|
|
92
|
-
export { type InterfaceContractAssessment, type InterfaceFrameBudget, type OverlayAccessibilityContract, type OverlayAdapterCapability, type OverlayAlertMarker, type OverlayCompositionScaleContract, type OverlayHostAdapterContract, type OverlayHostKind, type OverlayKeyboardPath, PLAYER_SYSTEM_INTERFACE_ENV_PREFIX, PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID, PLAYER_SYSTEM_INTERFACE_PACKAGE, PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID, type PackageDescriptor, type PlayerSystemInterfaceContract, type PlayerSystemInterfaceContractInput, type PlayerSystemInterfaceMode, type PlayerSystemInterfacePortabilityContract, type PlayerSystemInterfacePortabilityContractInput, type PlayerSystemPaneId, type WorldSpaceCompositionSample, type WorldSpacePanelDefinition, assessPlayerSystemInterfaceComposition, createPlayerSystemInterfaceContract, createPlayerSystemInterfacePortabilityContract, createWorldSpacePanelDefinition, defaultPlayerSystemInterfaceContract, defaultPlayerSystemInterfacePortabilityContract, isPlayerSystemInterfaceMode, packageDescriptor };
|
|
148
|
+
export { type FocusPaneShellDefinition, type InterfaceCombatBehavior, type InterfaceContractAssessment, type InterfaceFrameBudget, type InterfaceShellDefinition, type InterfaceShellDefinitionInput, type InterfaceShellOwner, type InterfaceShellSurfaceDefinition, type InterfaceShellSurfaceKind, type LineOfSightTargetPopupDefinition, type OverlayAccessibilityContract, type OverlayAdapterCapability, type OverlayAlertMarker, type OverlayCompositionScaleContract, type OverlayHostAdapterContract, type OverlayHostKind, type OverlayKeyboardPath, PLAYER_SYSTEM_INTERFACE_ENV_PREFIX, PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID, PLAYER_SYSTEM_INTERFACE_PACKAGE, PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID, PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID, type PackageDescriptor, type PlayerSystemInterfaceContract, type PlayerSystemInterfaceContractInput, type PlayerSystemInterfaceMode, type PlayerSystemInterfacePortabilityContract, type PlayerSystemInterfacePortabilityContractInput, type PlayerSystemPaneId, type ReducedCombatOverlayPolicy, type WorldSpaceCompositionSample, type WorldSpacePanelDefinition, assessInterfaceShellDefinition, assessPlayerSystemInterfaceComposition, createFocusPaneShellDefinition, createInterfaceShellDefinition, createInterfaceShellSurfaceDefinition, createLineOfSightTargetPopupDefinition, createPlayerSystemInterfaceContract, createPlayerSystemInterfacePortabilityContract, createWorldSpacePanelDefinition, defaultPlayerSystemInterfaceContract, defaultPlayerSystemInterfacePortabilityContract, defaultReducedCombatOverlayPolicy, isPlayerSystemInterfaceMode, packageDescriptor };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
var PLAYER_SYSTEM_INTERFACE_PACKAGE = "@plasius/player-system-interface";
|
|
3
3
|
var PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = "PLAYER_SYSTEM_INTERFACE";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID =
|
|
7
|
-
var PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID =
|
|
4
|
+
var PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID = "isekai.player-system.interface.enabled";
|
|
5
|
+
var PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID = PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;
|
|
6
|
+
var PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID = PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;
|
|
7
|
+
var PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID = PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;
|
|
8
8
|
var packageDescriptor = Object.freeze({
|
|
9
9
|
packageName: PLAYER_SYSTEM_INTERFACE_PACKAGE,
|
|
10
10
|
featureFlagId: PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,
|
|
@@ -51,6 +51,16 @@ var defaultPlayerSystemInterfacePortabilityContract = Object.freeze({
|
|
|
51
51
|
maxInteractivePanelsPerFrame: 2
|
|
52
52
|
})
|
|
53
53
|
});
|
|
54
|
+
var defaultReducedCombatOverlayPolicy = Object.freeze({
|
|
55
|
+
featureFlagId: PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,
|
|
56
|
+
mode: "combat-safe",
|
|
57
|
+
retainedSurfaceKinds: Object.freeze([
|
|
58
|
+
"alert-marker",
|
|
59
|
+
"target-popup",
|
|
60
|
+
"focus-pane"
|
|
61
|
+
]),
|
|
62
|
+
maxInteractiveSurfaces: 1
|
|
63
|
+
});
|
|
54
64
|
function isPlayerSystemInterfaceMode(value) {
|
|
55
65
|
return value === "ambient" || value === "focused" || value === "combat-safe";
|
|
56
66
|
}
|
|
@@ -92,6 +102,30 @@ function createPlayerSystemInterfacePortabilityContract(input = {}) {
|
|
|
92
102
|
})
|
|
93
103
|
});
|
|
94
104
|
}
|
|
105
|
+
function createInterfaceShellSurfaceDefinition(input) {
|
|
106
|
+
return Object.freeze({ ...input });
|
|
107
|
+
}
|
|
108
|
+
function createFocusPaneShellDefinition(input) {
|
|
109
|
+
return Object.freeze({ ...input });
|
|
110
|
+
}
|
|
111
|
+
function createLineOfSightTargetPopupDefinition(input) {
|
|
112
|
+
return Object.freeze({ ...input });
|
|
113
|
+
}
|
|
114
|
+
function createInterfaceShellDefinition(input = {}) {
|
|
115
|
+
return Object.freeze({
|
|
116
|
+
featureFlagId: input.featureFlagId ?? PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,
|
|
117
|
+
surfaces: Object.freeze([...input.surfaces ?? []]),
|
|
118
|
+
focusPane: input.focusPane ? Object.freeze({ ...input.focusPane }) : void 0,
|
|
119
|
+
targetPopups: Object.freeze([...input.targetPopups ?? []]),
|
|
120
|
+
reducedCombat: Object.freeze({
|
|
121
|
+
...defaultReducedCombatOverlayPolicy,
|
|
122
|
+
...input.reducedCombat,
|
|
123
|
+
retainedSurfaceKinds: Object.freeze([
|
|
124
|
+
...input.reducedCombat?.retainedSurfaceKinds ?? defaultReducedCombatOverlayPolicy.retainedSurfaceKinds
|
|
125
|
+
])
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
}
|
|
95
129
|
function assessPlayerSystemInterfaceComposition(sample, contract = defaultPlayerSystemInterfacePortabilityContract) {
|
|
96
130
|
const violations = [];
|
|
97
131
|
if (sample.panelCount > contract.compositionScale.maxWorldPanels) {
|
|
@@ -111,6 +145,44 @@ function assessPlayerSystemInterfaceComposition(sample, contract = defaultPlayer
|
|
|
111
145
|
violations: Object.freeze(violations)
|
|
112
146
|
});
|
|
113
147
|
}
|
|
148
|
+
function assessInterfaceShellDefinition(shell) {
|
|
149
|
+
const violations = [];
|
|
150
|
+
const ownerSet = new Set(shell.surfaces.map((surface) => surface.owner));
|
|
151
|
+
const retainedSurfaceKinds = new Set(shell.reducedCombat.retainedSurfaceKinds);
|
|
152
|
+
const interactiveSurfaceCount = shell.surfaces.filter(
|
|
153
|
+
(surface) => surface.interactive && retainedSurfaceKinds.has(surface.kind)
|
|
154
|
+
).length;
|
|
155
|
+
const focusPane = shell.focusPane;
|
|
156
|
+
if (shell.surfaces.length === 0) {
|
|
157
|
+
violations.push("surfaces");
|
|
158
|
+
}
|
|
159
|
+
if (focusPane && !ownerSet.has(focusPane.owner)) {
|
|
160
|
+
violations.push("focusPaneOwner");
|
|
161
|
+
}
|
|
162
|
+
if (focusPane) {
|
|
163
|
+
const matchingSurface = shell.surfaces.find(
|
|
164
|
+
(surface) => surface.kind === "focus-pane" && surface.anchorId === focusPane.anchorId && surface.owner === focusPane.owner
|
|
165
|
+
);
|
|
166
|
+
if (!matchingSurface) {
|
|
167
|
+
violations.push("focusPaneSurface");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (interactiveSurfaceCount > shell.reducedCombat.maxInteractiveSurfaces) {
|
|
171
|
+
violations.push("interactiveSurfaceCount");
|
|
172
|
+
}
|
|
173
|
+
for (const popup of shell.targetPopups) {
|
|
174
|
+
if (popup.requiresLineOfSight && popup.anchorId.length === 0) {
|
|
175
|
+
violations.push(`popup:${popup.popupId}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (ownerSet.has("player-system") && ownerSet.has("party-system") && shell.reducedCombat.retainedSurfaceKinds.length === 0) {
|
|
179
|
+
violations.push("reducedCombat");
|
|
180
|
+
}
|
|
181
|
+
return Object.freeze({
|
|
182
|
+
accepted: violations.length === 0,
|
|
183
|
+
violations: Object.freeze(violations)
|
|
184
|
+
});
|
|
185
|
+
}
|
|
114
186
|
export {
|
|
115
187
|
PLAYER_SYSTEM_INTERFACE_ENV_PREFIX,
|
|
116
188
|
PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,
|
|
@@ -118,12 +190,18 @@ export {
|
|
|
118
190
|
PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,
|
|
119
191
|
PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,
|
|
120
192
|
PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,
|
|
193
|
+
assessInterfaceShellDefinition,
|
|
121
194
|
assessPlayerSystemInterfaceComposition,
|
|
195
|
+
createFocusPaneShellDefinition,
|
|
196
|
+
createInterfaceShellDefinition,
|
|
197
|
+
createInterfaceShellSurfaceDefinition,
|
|
198
|
+
createLineOfSightTargetPopupDefinition,
|
|
122
199
|
createPlayerSystemInterfaceContract,
|
|
123
200
|
createPlayerSystemInterfacePortabilityContract,
|
|
124
201
|
createWorldSpacePanelDefinition,
|
|
125
202
|
defaultPlayerSystemInterfaceContract,
|
|
126
203
|
defaultPlayerSystemInterfacePortabilityContract,
|
|
204
|
+
defaultReducedCombatOverlayPolicy,
|
|
127
205
|
isPlayerSystemInterfaceMode,
|
|
128
206
|
packageDescriptor
|
|
129
207
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface PackageDescriptor {\n readonly packageName: string;\n readonly featureFlagId: string;\n readonly envPrefix: string;\n readonly summary: string;\n}\n\nexport type OverlayKeyboardPath = \"sequential\" | \"direct-hotkey\" | \"read-only\";\n\nexport interface OverlayAccessibilityContract {\n readonly keyboardPath: OverlayKeyboardPath;\n readonly focusRestorationTarget: \"trigger\" | \"pane-heading\" | \"nearest-anchor\";\n readonly liveRegionMode: \"polite\" | \"assertive\" | \"off\";\n readonly requiresAccessibleName: boolean;\n}\n\nexport interface InterfaceFrameBudget {\n readonly targetFps: number;\n readonly maxFrameMs: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport type OverlayHostKind =\n | \"dom-overlay\"\n | \"native-overlay\"\n | \"headless-snapshot\";\n\nexport type OverlayAdapterCapability =\n | \"focus-restoration\"\n | \"live-region\"\n | \"anchor-registry\";\n\nexport interface OverlayHostAdapterContract {\n readonly supportedHosts: readonly OverlayHostKind[];\n readonly requiredCapabilities: readonly OverlayAdapterCapability[];\n readonly forbiddenAssumptions: readonly string[];\n}\n\nexport interface OverlayCompositionScaleContract {\n readonly maxWorldPanels: number;\n readonly maxFocusPanes: number;\n readonly maxAlertMarkers: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport interface PlayerSystemInterfaceContract {\n readonly featureFlagId: string;\n readonly accessibility: OverlayAccessibilityContract;\n readonly frameBudget: InterfaceFrameBudget;\n}\n\nexport interface PlayerSystemInterfacePortabilityContract {\n readonly featureFlagId: string;\n readonly hostAdapters: OverlayHostAdapterContract;\n readonly compositionScale: OverlayCompositionScaleContract;\n}\n\nexport interface PlayerSystemInterfaceContractInput {\n readonly featureFlagId?: string;\n readonly accessibility?: Partial<OverlayAccessibilityContract>;\n readonly frameBudget?: Partial<InterfaceFrameBudget>;\n}\n\nexport interface PlayerSystemInterfacePortabilityContractInput {\n readonly featureFlagId?: string;\n readonly hostAdapters?: Partial<OverlayHostAdapterContract>;\n readonly compositionScale?: Partial<OverlayCompositionScaleContract>;\n}\n\nexport type PlayerSystemInterfaceMode = \"ambient\" | \"focused\" | \"combat-safe\";\n\nexport type PlayerSystemPaneId =\n | \"identity\"\n | \"missions\"\n | \"guild-quests\"\n | \"logs\"\n | \"mcc\"\n | \"tutorial\"\n | \"points-store\";\n\nexport interface WorldSpacePanelDefinition {\n readonly panelId: string;\n readonly pane: PlayerSystemPaneId;\n readonly anchorId: string;\n readonly interactive: boolean;\n readonly accessibilityLabel?: string;\n readonly focusOrder?: number;\n}\n\nexport interface OverlayAlertMarker {\n readonly markerId: string;\n readonly severity: \"info\" | \"warning\" | \"danger\";\n readonly anchorId: string;\n}\n\nexport interface WorldSpaceCompositionSample {\n readonly panelCount: number;\n readonly focusPaneCount: number;\n readonly alertMarkerCount: number;\n readonly interactivePanelCount: number;\n}\n\nexport interface InterfaceContractAssessment {\n readonly accepted: boolean;\n readonly violations: readonly string[];\n}\n\nexport const PLAYER_SYSTEM_INTERFACE_PACKAGE = \"@plasius/player-system-interface\";\nexport const PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = \"PLAYER_SYSTEM_INTERFACE\";\nexport const PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID =\n \"isekai.player-system.packages.enabled\";\nexport const PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID;\nexport const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID =\n \"isekai.player-system.runtime-nfr.enabled\";\nexport const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID =\n \"isekai.player-system.runtime-portability.enabled\";\n\nexport const packageDescriptor: PackageDescriptor = Object.freeze({\n packageName: PLAYER_SYSTEM_INTERFACE_PACKAGE,\n featureFlagId: PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,\n envPrefix: PLAYER_SYSTEM_INTERFACE_ENV_PREFIX,\n summary:\n \"World-space Player System overlays, focus panes, and target-surface contracts for Plasius game experiences.\",\n});\n\nexport const defaultPlayerSystemInterfaceContract: PlayerSystemInterfaceContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,\n accessibility: Object.freeze({\n keyboardPath: \"sequential\",\n focusRestorationTarget: \"trigger\",\n liveRegionMode: \"polite\",\n requiresAccessibleName: true,\n }),\n frameBudget: Object.freeze({\n targetFps: 60,\n maxFrameMs: 16,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport const defaultPlayerSystemInterfacePortabilityContract: PlayerSystemInterfacePortabilityContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,\n hostAdapters: Object.freeze({\n supportedHosts: Object.freeze([\n \"dom-overlay\",\n \"native-overlay\",\n \"headless-snapshot\",\n ] satisfies OverlayHostKind[]),\n requiredCapabilities: Object.freeze([\n \"focus-restoration\",\n \"live-region\",\n \"anchor-registry\",\n ] satisfies OverlayAdapterCapability[]),\n forbiddenAssumptions: Object.freeze([\n \"window-global\",\n \"single-pane-layout\",\n \"absolute-scene-coordinates\",\n ]),\n }),\n compositionScale: Object.freeze({\n maxWorldPanels: 6,\n maxFocusPanes: 3,\n maxAlertMarkers: 8,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport function isPlayerSystemInterfaceMode(\n value: string\n): value is PlayerSystemInterfaceMode {\n return value === \"ambient\" || value === \"focused\" || value === \"combat-safe\";\n}\n\nexport function createWorldSpacePanelDefinition(\n input: WorldSpacePanelDefinition\n): WorldSpacePanelDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createPlayerSystemInterfaceContract(\n input: PlayerSystemInterfaceContractInput = {}\n): PlayerSystemInterfaceContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ?? defaultPlayerSystemInterfaceContract.featureFlagId,\n accessibility: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.accessibility,\n ...input.accessibility,\n }),\n frameBudget: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.frameBudget,\n ...input.frameBudget,\n }),\n });\n}\n\nexport function createPlayerSystemInterfacePortabilityContract(\n input: PlayerSystemInterfacePortabilityContractInput = {}\n): PlayerSystemInterfacePortabilityContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ??\n defaultPlayerSystemInterfacePortabilityContract.featureFlagId,\n hostAdapters: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.hostAdapters,\n ...input.hostAdapters,\n supportedHosts: Object.freeze([\n ...(input.hostAdapters?.supportedHosts ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .supportedHosts),\n ]),\n requiredCapabilities: Object.freeze([\n ...(input.hostAdapters?.requiredCapabilities ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .requiredCapabilities),\n ]),\n forbiddenAssumptions: Object.freeze([\n ...(input.hostAdapters?.forbiddenAssumptions ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .forbiddenAssumptions),\n ]),\n }),\n compositionScale: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.compositionScale,\n ...input.compositionScale,\n }),\n });\n}\n\nexport function assessPlayerSystemInterfaceComposition(\n sample: WorldSpaceCompositionSample,\n contract: PlayerSystemInterfacePortabilityContract = defaultPlayerSystemInterfacePortabilityContract\n): InterfaceContractAssessment {\n const violations: string[] = [];\n\n if (sample.panelCount > contract.compositionScale.maxWorldPanels) {\n violations.push(\"panelCount\");\n }\n\n if (sample.focusPaneCount > contract.compositionScale.maxFocusPanes) {\n violations.push(\"focusPaneCount\");\n }\n\n if (sample.alertMarkerCount > contract.compositionScale.maxAlertMarkers) {\n violations.push(\"alertMarkerCount\");\n }\n\n if (\n sample.interactivePanelCount >\n contract.compositionScale.maxInteractivePanelsPerFrame\n ) {\n violations.push(\"interactivePanelCount\");\n }\n\n return Object.freeze({\n accepted: violations.length === 0,\n violations: Object.freeze(violations),\n });\n}\n"],"mappings":";AA2GO,IAAM,kCAAkC;AACxC,IAAM,qCAAqC;AAC3C,IAAM,yCACX;AACK,IAAM,0CACX;AACK,IAAM,4CACX;AACK,IAAM,oDACX;AAEK,IAAM,oBAAuC,OAAO,OAAO;AAAA,EAChE,aAAa;AAAA,EACb,eAAe;AAAA,EACf,WAAW;AAAA,EACX,SACE;AACJ,CAAC;AAEM,IAAM,uCACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,eAAe,OAAO,OAAO;AAAA,IAC3B,cAAc;AAAA,IACd,wBAAwB;AAAA,IACxB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B,CAAC;AAAA,EACD,aAAa,OAAO,OAAO;AAAA,IACzB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,8BAA8B;AAAA,EAChC,CAAC;AACH,CAAC;AAEI,IAAM,kDACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,cAAc,OAAO,OAAO;AAAA,IAC1B,gBAAgB,OAAO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P,CAAC;AAAA,MACD,sBAAsB,OAAO,OAAO;AAAA,QAClC,GAAI,MAAM,cAAc,wBACtB,gDAAgD,aAC7C;AAAA,MACP,CAAC;AAAA,IACH,CAAC;AAAA,IACD,kBAAkB,OAAO,OAAO;AAAA,MAC9B,GAAG,gDAAgD;AAAA,MACnD,GAAG,MAAM;AAAA,IACX,CAAC;AAAA,EACH,CAAC;AACH;AAEO,SAAS,uCACd,QACA,WAAqD,iDACxB;AAC7B,QAAM,aAAuB,CAAC;AAE9B,MAAI,OAAO,aAAa,SAAS,iBAAiB,gBAAgB;AAChE,eAAW,KAAK,YAAY;AAAA,EAC9B;AAEA,MAAI,OAAO,iBAAiB,SAAS,iBAAiB,eAAe;AACnE,eAAW,KAAK,gBAAgB;AAAA,EAClC;AAEA,MAAI,OAAO,mBAAmB,SAAS,iBAAiB,iBAAiB;AACvE,eAAW,KAAK,kBAAkB;AAAA,EACpC;AAEA,MACE,OAAO,wBACP,SAAS,iBAAiB,8BAC1B;AACA,eAAW,KAAK,uBAAuB;AAAA,EACzC;AAEA,SAAO,OAAO,OAAO;AAAA,IACnB,UAAU,WAAW,WAAW;AAAA,IAChC,YAAY,OAAO,OAAO,UAAU;AAAA,EACtC,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface PackageDescriptor {\n readonly packageName: string;\n readonly featureFlagId: string;\n readonly envPrefix: string;\n readonly summary: string;\n}\n\nexport type OverlayKeyboardPath = \"sequential\" | \"direct-hotkey\" | \"read-only\";\n\nexport interface OverlayAccessibilityContract {\n readonly keyboardPath: OverlayKeyboardPath;\n readonly focusRestorationTarget: \"trigger\" | \"pane-heading\" | \"nearest-anchor\";\n readonly liveRegionMode: \"polite\" | \"assertive\" | \"off\";\n readonly requiresAccessibleName: boolean;\n}\n\nexport interface InterfaceFrameBudget {\n readonly targetFps: number;\n readonly maxFrameMs: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport type OverlayHostKind =\n | \"dom-overlay\"\n | \"native-overlay\"\n | \"headless-snapshot\";\n\nexport type OverlayAdapterCapability =\n | \"focus-restoration\"\n | \"live-region\"\n | \"anchor-registry\";\n\nexport interface OverlayHostAdapterContract {\n readonly supportedHosts: readonly OverlayHostKind[];\n readonly requiredCapabilities: readonly OverlayAdapterCapability[];\n readonly forbiddenAssumptions: readonly string[];\n}\n\nexport interface OverlayCompositionScaleContract {\n readonly maxWorldPanels: number;\n readonly maxFocusPanes: number;\n readonly maxAlertMarkers: number;\n readonly maxInteractivePanelsPerFrame: number;\n}\n\nexport interface PlayerSystemInterfaceContract {\n readonly featureFlagId: string;\n readonly accessibility: OverlayAccessibilityContract;\n readonly frameBudget: InterfaceFrameBudget;\n}\n\nexport interface PlayerSystemInterfacePortabilityContract {\n readonly featureFlagId: string;\n readonly hostAdapters: OverlayHostAdapterContract;\n readonly compositionScale: OverlayCompositionScaleContract;\n}\n\nexport interface PlayerSystemInterfaceContractInput {\n readonly featureFlagId?: string;\n readonly accessibility?: Partial<OverlayAccessibilityContract>;\n readonly frameBudget?: Partial<InterfaceFrameBudget>;\n}\n\nexport interface PlayerSystemInterfacePortabilityContractInput {\n readonly featureFlagId?: string;\n readonly hostAdapters?: Partial<OverlayHostAdapterContract>;\n readonly compositionScale?: Partial<OverlayCompositionScaleContract>;\n}\n\nexport type PlayerSystemInterfaceMode = \"ambient\" | \"focused\" | \"combat-safe\";\n\nexport type PlayerSystemPaneId =\n | \"identity\"\n | \"missions\"\n | \"guild-quests\"\n | \"logs\"\n | \"mcc\"\n | \"tutorial\"\n | \"points-store\";\n\nexport type InterfaceShellOwner = \"player-system\" | \"party-system\";\nexport type InterfaceShellSurfaceKind =\n | \"world-panel\"\n | \"focus-pane\"\n | \"target-popup\"\n | \"alert-marker\";\nexport type InterfaceCombatBehavior = \"persist\" | \"reduce\" | \"suspend\";\n\nexport interface InterfaceShellSurfaceDefinition {\n readonly surfaceId: string;\n readonly owner: InterfaceShellOwner;\n readonly kind: InterfaceShellSurfaceKind;\n readonly anchorId: string;\n readonly interactive: boolean;\n readonly priority: number;\n readonly combatBehavior: InterfaceCombatBehavior;\n}\n\nexport interface FocusPaneShellDefinition {\n readonly panelId: string;\n readonly owner: InterfaceShellOwner;\n readonly pane: PlayerSystemPaneId;\n readonly anchorId: string;\n readonly heading: string;\n readonly interactive: boolean;\n readonly combatBehavior: InterfaceCombatBehavior;\n}\n\nexport interface LineOfSightTargetPopupDefinition {\n readonly popupId: string;\n readonly owner: InterfaceShellOwner;\n readonly anchorId: string;\n readonly targetId: string;\n readonly summary: string;\n readonly requiresLineOfSight: boolean;\n readonly actionLabel?: string;\n}\n\nexport interface ReducedCombatOverlayPolicy {\n readonly featureFlagId: string;\n readonly mode: \"combat-safe\";\n readonly retainedSurfaceKinds: readonly InterfaceShellSurfaceKind[];\n readonly maxInteractiveSurfaces: number;\n}\n\nexport interface InterfaceShellDefinition {\n readonly featureFlagId: string;\n readonly surfaces: readonly InterfaceShellSurfaceDefinition[];\n readonly focusPane?: FocusPaneShellDefinition;\n readonly targetPopups: readonly LineOfSightTargetPopupDefinition[];\n readonly reducedCombat: ReducedCombatOverlayPolicy;\n}\n\nexport interface InterfaceShellDefinitionInput {\n readonly featureFlagId?: string;\n readonly surfaces?: readonly InterfaceShellSurfaceDefinition[];\n readonly focusPane?: FocusPaneShellDefinition;\n readonly targetPopups?: readonly LineOfSightTargetPopupDefinition[];\n readonly reducedCombat?: Partial<ReducedCombatOverlayPolicy>;\n}\n\nexport interface WorldSpacePanelDefinition {\n readonly panelId: string;\n readonly pane: PlayerSystemPaneId;\n readonly anchorId: string;\n readonly interactive: boolean;\n readonly accessibilityLabel?: string;\n readonly focusOrder?: number;\n}\n\nexport interface OverlayAlertMarker {\n readonly markerId: string;\n readonly severity: \"info\" | \"warning\" | \"danger\";\n readonly anchorId: string;\n}\n\nexport interface WorldSpaceCompositionSample {\n readonly panelCount: number;\n readonly focusPaneCount: number;\n readonly alertMarkerCount: number;\n readonly interactivePanelCount: number;\n}\n\nexport interface InterfaceContractAssessment {\n readonly accepted: boolean;\n readonly violations: readonly string[];\n}\n\nexport const PLAYER_SYSTEM_INTERFACE_PACKAGE = \"@plasius/player-system-interface\";\nexport const PLAYER_SYSTEM_INTERFACE_ENV_PREFIX = \"PLAYER_SYSTEM_INTERFACE\";\nexport const PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID =\n \"isekai.player-system.interface.enabled\";\nexport const PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;\nexport const PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;\nexport const PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID =\n PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID;\n\nexport const packageDescriptor: PackageDescriptor = Object.freeze({\n packageName: PLAYER_SYSTEM_INTERFACE_PACKAGE,\n featureFlagId: PLAYER_SYSTEM_PACKAGES_FEATURE_FLAG_ID,\n envPrefix: PLAYER_SYSTEM_INTERFACE_ENV_PREFIX,\n summary:\n \"World-space Player System overlays, focus panes, and target-surface contracts for Plasius game experiences.\",\n});\n\nexport const defaultPlayerSystemInterfaceContract: PlayerSystemInterfaceContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_NFR_FEATURE_FLAG_ID,\n accessibility: Object.freeze({\n keyboardPath: \"sequential\",\n focusRestorationTarget: \"trigger\",\n liveRegionMode: \"polite\",\n requiresAccessibleName: true,\n }),\n frameBudget: Object.freeze({\n targetFps: 60,\n maxFrameMs: 16,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport const defaultPlayerSystemInterfacePortabilityContract: PlayerSystemInterfacePortabilityContract =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_RUNTIME_PORTABILITY_FEATURE_FLAG_ID,\n hostAdapters: Object.freeze({\n supportedHosts: Object.freeze([\n \"dom-overlay\",\n \"native-overlay\",\n \"headless-snapshot\",\n ] satisfies OverlayHostKind[]),\n requiredCapabilities: Object.freeze([\n \"focus-restoration\",\n \"live-region\",\n \"anchor-registry\",\n ] satisfies OverlayAdapterCapability[]),\n forbiddenAssumptions: Object.freeze([\n \"window-global\",\n \"single-pane-layout\",\n \"absolute-scene-coordinates\",\n ]),\n }),\n compositionScale: Object.freeze({\n maxWorldPanels: 6,\n maxFocusPanes: 3,\n maxAlertMarkers: 8,\n maxInteractivePanelsPerFrame: 2,\n }),\n });\n\nexport const defaultReducedCombatOverlayPolicy: ReducedCombatOverlayPolicy =\n Object.freeze({\n featureFlagId: PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,\n mode: \"combat-safe\",\n retainedSurfaceKinds: Object.freeze([\n \"alert-marker\",\n \"target-popup\",\n \"focus-pane\",\n ] satisfies InterfaceShellSurfaceKind[]),\n maxInteractiveSurfaces: 1,\n });\n\nexport function isPlayerSystemInterfaceMode(\n value: string\n): value is PlayerSystemInterfaceMode {\n return value === \"ambient\" || value === \"focused\" || value === \"combat-safe\";\n}\n\nexport function createWorldSpacePanelDefinition(\n input: WorldSpacePanelDefinition\n): WorldSpacePanelDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createPlayerSystemInterfaceContract(\n input: PlayerSystemInterfaceContractInput = {}\n): PlayerSystemInterfaceContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ?? defaultPlayerSystemInterfaceContract.featureFlagId,\n accessibility: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.accessibility,\n ...input.accessibility,\n }),\n frameBudget: Object.freeze({\n ...defaultPlayerSystemInterfaceContract.frameBudget,\n ...input.frameBudget,\n }),\n });\n}\n\nexport function createPlayerSystemInterfacePortabilityContract(\n input: PlayerSystemInterfacePortabilityContractInput = {}\n): PlayerSystemInterfacePortabilityContract {\n return Object.freeze({\n featureFlagId:\n input.featureFlagId ??\n defaultPlayerSystemInterfacePortabilityContract.featureFlagId,\n hostAdapters: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.hostAdapters,\n ...input.hostAdapters,\n supportedHosts: Object.freeze([\n ...(input.hostAdapters?.supportedHosts ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .supportedHosts),\n ]),\n requiredCapabilities: Object.freeze([\n ...(input.hostAdapters?.requiredCapabilities ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .requiredCapabilities),\n ]),\n forbiddenAssumptions: Object.freeze([\n ...(input.hostAdapters?.forbiddenAssumptions ??\n defaultPlayerSystemInterfacePortabilityContract.hostAdapters\n .forbiddenAssumptions),\n ]),\n }),\n compositionScale: Object.freeze({\n ...defaultPlayerSystemInterfacePortabilityContract.compositionScale,\n ...input.compositionScale,\n }),\n });\n}\n\nexport function createInterfaceShellSurfaceDefinition(\n input: InterfaceShellSurfaceDefinition\n): InterfaceShellSurfaceDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createFocusPaneShellDefinition(\n input: FocusPaneShellDefinition\n): FocusPaneShellDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createLineOfSightTargetPopupDefinition(\n input: LineOfSightTargetPopupDefinition\n): LineOfSightTargetPopupDefinition {\n return Object.freeze({ ...input });\n}\n\nexport function createInterfaceShellDefinition(\n input: InterfaceShellDefinitionInput = {}\n): InterfaceShellDefinition {\n return Object.freeze({\n featureFlagId: input.featureFlagId ?? PLAYER_SYSTEM_INTERFACE_FEATURE_FLAG_ID,\n surfaces: Object.freeze([...(input.surfaces ?? [])]),\n focusPane: input.focusPane ? Object.freeze({ ...input.focusPane }) : undefined,\n targetPopups: Object.freeze([...(input.targetPopups ?? [])]),\n reducedCombat: Object.freeze({\n ...defaultReducedCombatOverlayPolicy,\n ...input.reducedCombat,\n retainedSurfaceKinds: Object.freeze([\n ...(input.reducedCombat?.retainedSurfaceKinds ??\n defaultReducedCombatOverlayPolicy.retainedSurfaceKinds),\n ]),\n }),\n });\n}\n\nexport function assessPlayerSystemInterfaceComposition(\n sample: WorldSpaceCompositionSample,\n contract: PlayerSystemInterfacePortabilityContract = defaultPlayerSystemInterfacePortabilityContract\n): InterfaceContractAssessment {\n const violations: string[] = [];\n\n if (sample.panelCount > contract.compositionScale.maxWorldPanels) {\n violations.push(\"panelCount\");\n }\n\n if (sample.focusPaneCount > contract.compositionScale.maxFocusPanes) {\n violations.push(\"focusPaneCount\");\n }\n\n if (sample.alertMarkerCount > contract.compositionScale.maxAlertMarkers) {\n violations.push(\"alertMarkerCount\");\n }\n\n if (\n sample.interactivePanelCount >\n contract.compositionScale.maxInteractivePanelsPerFrame\n ) {\n violations.push(\"interactivePanelCount\");\n }\n\n return Object.freeze({\n accepted: violations.length === 0,\n violations: Object.freeze(violations),\n });\n}\n\nexport function assessInterfaceShellDefinition(\n shell: InterfaceShellDefinition\n): InterfaceContractAssessment {\n const violations: string[] = [];\n const ownerSet = new Set(shell.surfaces.map((surface) => surface.owner));\n const retainedSurfaceKinds = new Set(shell.reducedCombat.retainedSurfaceKinds);\n const interactiveSurfaceCount = shell.surfaces.filter(\n (surface) => surface.interactive && retainedSurfaceKinds.has(surface.kind)\n ).length;\n const focusPane = shell.focusPane;\n\n if (shell.surfaces.length === 0) {\n violations.push(\"surfaces\");\n }\n\n if (focusPane && !ownerSet.has(focusPane.owner)) {\n violations.push(\"focusPaneOwner\");\n }\n\n if (focusPane) {\n const matchingSurface = shell.surfaces.find(\n (surface) =>\n surface.kind === \"focus-pane\" &&\n surface.anchorId === focusPane.anchorId &&\n surface.owner === focusPane.owner\n );\n if (!matchingSurface) {\n violations.push(\"focusPaneSurface\");\n }\n }\n\n if (\n interactiveSurfaceCount > shell.reducedCombat.maxInteractiveSurfaces\n ) {\n violations.push(\"interactiveSurfaceCount\");\n }\n\n for (const popup of shell.targetPopups) {\n if (popup.requiresLineOfSight && popup.anchorId.length === 0) {\n violations.push(`popup:${popup.popupId}`);\n }\n }\n\n if (\n ownerSet.has(\"player-system\") &&\n ownerSet.has(\"party-system\") &&\n shell.reducedCombat.retainedSurfaceKinds.length === 0\n ) {\n violations.push(\"reducedCombat\");\n }\n\n return Object.freeze({\n accepted: violations.length === 0,\n violations: Object.freeze(violations),\n });\n}\n"],"mappings":";AAwKO,IAAM,kCAAkC;AACxC,IAAM,qCAAqC;AAC3C,IAAM,0CACX;AACK,IAAM,yCACX;AACK,IAAM,4CACX;AACK,IAAM,oDACX;AAEK,IAAM,oBAAuC,OAAO,OAAO;AAAA,EAChE,aAAa;AAAA,EACb,eAAe;AAAA,EACf,WAAW;AAAA,EACX,SACE;AACJ,CAAC;AAEM,IAAM,uCACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,eAAe,OAAO,OAAO;AAAA,IAC3B,cAAc;AAAA,IACd,wBAAwB;AAAA,IACxB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B,CAAC;AAAA,EACD,aAAa,OAAO,OAAO;AAAA,IACzB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,8BAA8B;AAAA,EAChC,CAAC;AACH,CAAC;AAEI,IAAM,kDACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,cAAc,OAAO,OAAO;AAAA,IAC1B,gBAAgB,OAAO,OAAO;AAAA,MAC5B;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAA6B;AAAA,IAC7B,sBAAsB,OAAO,OAAO;AAAA,MAClC;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAsC;AAAA,IACtC,sBAAsB,OAAO,OAAO;AAAA,MAClC;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAAA,EACD,kBAAkB,OAAO,OAAO;AAAA,IAC9B,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,8BAA8B;AAAA,EAChC,CAAC;AACH,CAAC;AAEI,IAAM,oCACX,OAAO,OAAO;AAAA,EACZ,eAAe;AAAA,EACf,MAAM;AAAA,EACN,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