@pygmalionjs/pygmalion 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{CameraLayer-DtugUkJW.js → CameraLayer-DK2pbMx_.js} +3 -3
- package/dist-lib/pygmalion.js +6853 -6793
- package/dist-lib/{runtime-DLaOoI2y.js → runtime-Bb9_M0iT.js} +1402 -1371
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +9 -9
- package/dist-lib/types/lib.d.ts +3 -1
- package/dist-lib/types/workspace/ScreenStateSwitch.d.ts +17 -0
- package/dist-lib/types/workspace/configuration.d.ts +2 -0
- package/dist-lib/types/workspace/screenStates.d.ts +32 -0
- package/package.json +1 -1
package/dist-lib/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c0 as l, T as u } from "./runtime-Bb9_M0iT.js";
|
|
2
|
+
import { bs as y, ci as E, cj as P, ck as b, bo as T, aw as $ } from "./runtime-Bb9_M0iT.js";
|
|
3
3
|
const v = {
|
|
4
4
|
mirror: ["status", "refresh", "refs"],
|
|
5
5
|
session: ["open", "check", "previewVisual", "applyVisual", "revertVisual"],
|
|
@@ -8,7 +8,7 @@ const v = {
|
|
|
8
8
|
preview: ["artifact", "progress", "catalog"],
|
|
9
9
|
storyboard: ["environment", "sourceUsage", "componentBranches"]
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function g(m = {}, t = {}) {
|
|
12
12
|
const n = [], d = t.origin ?? "", r = (e) => {
|
|
13
13
|
var a;
|
|
14
14
|
const i = {};
|
|
@@ -38,10 +38,10 @@ function h(m = {}, t = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
40
|
y as EditorRuntimeProvider,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
E as EditorStore,
|
|
42
|
+
P as FrozenRoutePreviewView,
|
|
43
|
+
b as NodeModel,
|
|
44
|
+
T as createEditorRuntime,
|
|
45
|
+
g as createMemoryTransport,
|
|
46
|
+
$ as serializeNode
|
|
47
47
|
};
|
package/dist-lib/types/lib.d.ts
CHANGED
|
@@ -34,7 +34,9 @@ export type { InspectSourceRuntime, SourceWritePolicy, SourceWriteErrorCode } fr
|
|
|
34
34
|
export { WorkspaceController } from './workspace/controller.js';
|
|
35
35
|
export { createLegacyModeAdapter } from './workspace/legacyModeAdapter.js';
|
|
36
36
|
export type * from './workspace/contracts.js';
|
|
37
|
-
export { createWorkspaceTargetResolver, resolveWorkspaceTarget } from './workspace/configuration.js';
|
|
37
|
+
export { canEditWorkspaceTarget, createWorkspaceTargetResolver, resolveWorkspaceTarget } from './workspace/configuration.js';
|
|
38
|
+
export { screenStateGroup, screenStateLabel } from './workspace/screenStates.js';
|
|
39
|
+
export type { ScreenStateGroup, ScreenStateMember } from './workspace/screenStates.js';
|
|
38
40
|
export type { WorkspaceConfiguration, WorkspaceTargetConfiguration, WorkspaceTargetResolverOptions } from './workspace/configuration.js';
|
|
39
41
|
export { capturedScreenMetadata, screenDocumentFromImport } from './document/screenImport.js';
|
|
40
42
|
export { createCapturedScreenDocumentLoader } from './workspace/capture/capturedScreenDocument.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EditorRuntime } from '../core/runtime.js';
|
|
2
|
+
import type { PageModel } from '../editor/store.js';
|
|
3
|
+
import type { WorkspaceTarget } from './contracts.js';
|
|
4
|
+
export interface ScreenStateSwitchProps {
|
|
5
|
+
runtime: EditorRuntime;
|
|
6
|
+
target: WorkspaceTarget;
|
|
7
|
+
/** Whether a sibling can be opened where this switch lives; a closed sibling stays listed but disabled. */
|
|
8
|
+
canOpen?: (page: PageModel) => boolean;
|
|
9
|
+
closedReason?: string;
|
|
10
|
+
onSwitch: (page: PageModel) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One select over the declared states of the current screen. It renders
|
|
14
|
+
* nothing while the screen has no sibling state to flip to, so a switch never
|
|
15
|
+
* announces a choice that does not exist.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ScreenStateSwitch: import("react").FunctionComponent<ScreenStateSwitchProps>;
|
|
@@ -50,6 +50,8 @@ export interface WorkspaceTargetResolverOptions {
|
|
|
50
50
|
}
|
|
51
51
|
/** Retain capability identities per screen and revision; unsupported targets remain retryable. */
|
|
52
52
|
export declare function createWorkspaceTargetResolver({ resolve, maxEntries }: WorkspaceTargetResolverOptions): (target: WorkspaceTarget) => WorkspaceTargetConfiguration | undefined;
|
|
53
|
+
/** Whether Edit can open this target: its resolved capabilities include a document loader. Never loads anything. */
|
|
54
|
+
export declare function canEditWorkspaceTarget(configuration: WorkspaceConfiguration, target: WorkspaceTarget | null | undefined): boolean;
|
|
53
55
|
/** An explicit target resolver never inherits capabilities from the root configuration. */
|
|
54
56
|
export declare function resolveWorkspaceTarget(configuration: WorkspaceConfiguration, target: WorkspaceTarget): WorkspaceTargetConfiguration | undefined;
|
|
55
57
|
/** Compares captured capability identities without invoking any host callbacks. */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PageModel } from '../editor/store.js';
|
|
2
|
+
/**
|
|
3
|
+
* Sibling states of one screen are a host declaration: pages that share a
|
|
4
|
+
* scenario belong together (see `editor/screenStateGroups.ts`). The core never
|
|
5
|
+
* infers membership from names, routes, or canvas proximity, so a screen
|
|
6
|
+
* without a scenario simply has no siblings to flip to.
|
|
7
|
+
*/
|
|
8
|
+
export interface ScreenStateMember {
|
|
9
|
+
page: PageModel;
|
|
10
|
+
screenId: string;
|
|
11
|
+
/** The declared state label; an undeclared state is the default one. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Host-declared kind of the state branch (overlay, badge, layout, …), presentation only. */
|
|
14
|
+
kind?: string;
|
|
15
|
+
current: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ScreenStateGroup {
|
|
18
|
+
/** The shared scenario declaration. */
|
|
19
|
+
key: string;
|
|
20
|
+
/** The default member's name, or the first declared member's. */
|
|
21
|
+
name: string;
|
|
22
|
+
members: readonly ScreenStateMember[];
|
|
23
|
+
}
|
|
24
|
+
export declare const isScreenPage: (page: PageModel) => boolean;
|
|
25
|
+
export declare const screenStateLabel: (page: PageModel) => string;
|
|
26
|
+
/**
|
|
27
|
+
* The declared states of the screen `screenId` belongs to, default state first
|
|
28
|
+
* and then in declaration order. Hidden siblings (other runtimes or conditions)
|
|
29
|
+
* are left out; the current state always stays. Returns null when the screen
|
|
30
|
+
* is unknown or declares no scenario.
|
|
31
|
+
*/
|
|
32
|
+
export declare function screenStateGroup(pages: readonly PageModel[], screenId: string, isVisible?: (page: PageModel) => boolean): ScreenStateGroup | null;
|