推进 INI 面板 workflow overview embedding mount DOM readiness
This commit is contained in:
@@ -311,6 +311,9 @@
|
||||
getWorkflowOverviewEmbeddingMountDomContract: (options) => (
|
||||
shellViewModel.createWorkflowOverviewEmbeddingMountDomContract(options)
|
||||
),
|
||||
getWorkflowOverviewEmbeddingMountDomReadiness: (options) => (
|
||||
shellViewModel.createWorkflowOverviewEmbeddingMountDomReadiness(options)
|
||||
),
|
||||
isSupportedShellSessionHandoffPackage: shellViewModel.isSupportedShellSessionHandoffPackage,
|
||||
getLauncherLinks: () => shellViewModel.launcherLinks,
|
||||
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
|
||||
|
||||
@@ -169,6 +169,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
|
||||
"getWorkflowOverviewEmbeddingMountDisplayViewModel",
|
||||
"getWorkflowOverviewEmbeddingMountRenderState",
|
||||
"getWorkflowOverviewEmbeddingMountDomContract",
|
||||
"getWorkflowOverviewEmbeddingMountDomReadiness",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -2253,6 +2254,37 @@ export function createIniPanelShellWorkflowOverviewEmbeddingMountDomContract({
|
||||
};
|
||||
}
|
||||
|
||||
export function createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness({
|
||||
rowDatasetPrefix = "workflowOverviewEmbeddingMount",
|
||||
contract = createIniPanelShellWorkflowOverviewEmbeddingMountDomContract({ rowDatasetPrefix }),
|
||||
documentRef = globalThis.document,
|
||||
mountNode = documentRef?.querySelector?.(contract.selectors.mount),
|
||||
statusNode = documentRef?.querySelector?.(contract.selectors.status),
|
||||
rowsNode = documentRef?.querySelector?.(contract.selectors.rows),
|
||||
} = {}) {
|
||||
const checks = {
|
||||
document: Boolean(documentRef?.createElement),
|
||||
mount: Boolean(mountNode),
|
||||
status: Boolean(statusNode),
|
||||
rows: Boolean(rowsNode),
|
||||
rowDatasetPrefix: Boolean(contract.rowDatasetPrefix),
|
||||
};
|
||||
const missing = Object.entries(checks)
|
||||
.filter(([, passed]) => !passed)
|
||||
.map(([name]) => name);
|
||||
const ready = missing.length === 0;
|
||||
|
||||
return {
|
||||
apiName: "ini-panel-shell-workflow-overview-embedding-mount-dom-readiness",
|
||||
readinessVersion: 1,
|
||||
phase: ready ? "ready" : "blocked",
|
||||
ready,
|
||||
missing,
|
||||
checks,
|
||||
contract,
|
||||
};
|
||||
}
|
||||
|
||||
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
|
||||
const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries);
|
||||
const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest);
|
||||
@@ -2424,6 +2456,8 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountRenderState,
|
||||
createWorkflowOverviewEmbeddingMountDomContract:
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
|
||||
createWorkflowOverviewEmbeddingMountDomReadiness:
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
|
||||
isSupportedShellSessionHandoffPackage: isSupportedIniPanelShellSessionHandoffPackage,
|
||||
controlPage: {
|
||||
browserApiSchema: createControlPageBrowserApiSchema(),
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountRenderState,
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
|
||||
renderIniPanelShellSessionHandoffWorkflowState,
|
||||
mountIniPanelShellSessionHandoffWorkflow,
|
||||
} from "./ui-shell.js";
|
||||
@@ -173,6 +174,9 @@
|
||||
getWorkflowOverviewEmbeddingMountDomContract: (options) => (
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract(options)
|
||||
),
|
||||
getWorkflowOverviewEmbeddingMountDomReadiness: (options) => (
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness(options ?? { documentRef: document })
|
||||
),
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user