@spotpatch/runtime 1.9.0 → 1.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spotpatch/runtime",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Browser runtime, collectors, and Shadow DOM UI for SpotPatch.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -59,6 +59,16 @@
59
59
  "types": "./dist/data-flow-panel.d.cts",
60
60
  "default": "./dist/data-flow-panel.cjs"
61
61
  }
62
+ },
63
+ "./external-handoff-panel": {
64
+ "import": {
65
+ "types": "./dist/external-handoff-panel.d.ts",
66
+ "default": "./dist/external-handoff-panel.js"
67
+ },
68
+ "require": {
69
+ "types": "./dist/external-handoff-panel.d.cts",
70
+ "default": "./dist/external-handoff-panel.cjs"
71
+ }
62
72
  }
63
73
  },
64
74
  "typesVersions": {
@@ -68,12 +78,15 @@
68
78
  ],
69
79
  "data-flow-panel": [
70
80
  "dist/data-flow-panel.d.ts"
81
+ ],
82
+ "external-handoff-panel": [
83
+ "dist/external-handoff-panel.d.ts"
71
84
  ]
72
85
  }
73
86
  },
74
87
  "dependencies": {
75
88
  "@spotpatch/react-adapter": "^1.1.0",
76
- "@spotpatch/shared": "^1.9.0"
89
+ "@spotpatch/shared": "^1.10.0"
77
90
  },
78
91
  "publishConfig": {
79
92
  "access": "public",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ui/ui-constants.ts","../src/ui/data-flow-panel-contract.ts","../src/ui/dom.ts"],"sourcesContent":["export const UI_MARKER_ATTRIBUTE = \"data-spotpatch-ui\" as const;\n\nexport const UI_Z_INDEX = Object.freeze({\n highlight: 2_147_483_646,\n controls: 2_147_483_647,\n});\n","import type {\n ComponentDataFlowReport,\n NetworkObservation,\n PageDataFlowReport,\n SpotPatchLocale,\n} from \"@spotpatch/shared\";\n\nimport type { DataFlowComponentRegistration } from \"../data-flow/data-flow-runtime.js\";\n\nexport type DataFlowPanelStatus = \"disabled\" | \"idle\" | \"loading\" | \"ready\" | \"error\";\n\nexport interface DataFlowPanelSnapshot {\n readonly status: DataFlowPanelStatus;\n readonly report?: ComponentDataFlowReport | PageDataFlowReport;\n readonly message?: string;\n}\n\nexport interface DataFlowViewState {\n readonly component: DataFlowPanelSnapshot;\n readonly page: DataFlowPanelSnapshot;\n readonly observationCount: number;\n}\n\nexport interface DataFlowPanel {\n readonly root: HTMLElement;\n readonly refreshButton: HTMLButtonElement;\n readonly styles: HTMLStyleElement;\n readonly dispose: () => void;\n readonly render: (state: DataFlowViewState) => void;\n readonly resetView: () => void;\n}\n\nexport type DataFlowPanelFactory = (\n document: Document,\n enabled: boolean,\n locale: () => SpotPatchLocale,\n changesRoot: HTMLElement,\n diagnosticsRoot: HTMLElement,\n onViewChange: () => void,\n) => DataFlowPanel;\n\nexport interface DataFlowExtension {\n readonly createPanel: DataFlowPanelFactory;\n readonly getComponentRegistration: (\n component: object,\n ) => DataFlowComponentRegistration | undefined;\n readonly observations: (routeKey: string) => readonly NetworkObservation[];\n readonly mergeComponentReport: (\n report: ComponentDataFlowReport,\n observations: readonly NetworkObservation[],\n ) => ComponentDataFlowReport;\n readonly mergePageReport: (\n report: PageDataFlowReport,\n observations: readonly NetworkObservation[],\n ) => PageDataFlowReport;\n}\n\nconst DATA_FLOW_EXTENSION_KEY = Symbol.for(\"spotpatch.data-flow.extension.v1\");\ntype ExtensionStore = Partial<Record<symbol, DataFlowExtension>>;\n\nexport function registerDataFlowExtension(\n extension: DataFlowExtension,\n target: ExtensionStore = globalThis,\n): void {\n target[DATA_FLOW_EXTENSION_KEY] = extension;\n}\n\nexport function getDataFlowExtension(\n target: ExtensionStore = globalThis,\n): DataFlowExtension | undefined {\n return target[DATA_FLOW_EXTENSION_KEY];\n}\n","import { UI_MARKER_ATTRIBUTE } from \"./ui-constants.js\";\n\nexport function createMarkedElement<K extends keyof HTMLElementTagNameMap>(\n document: Document,\n tagName: K,\n): HTMLElementTagNameMap[K] {\n const element = document.createElement(tagName);\n element.setAttribute(UI_MARKER_ATTRIBUTE, \"\");\n return element;\n}\n\nexport function createButton(\n document: Document,\n label: string,\n className = \"\",\n): HTMLButtonElement {\n const button = createMarkedElement(document, \"button\");\n button.type = \"button\";\n button.className = className;\n button.textContent = label;\n return button;\n}\n"],"mappings":";AAAO,IAAM,sBAAsB;AAE5B,IAAM,aAAa,OAAO,OAAO;AAAA,EACtC,WAAW;AAAA,EACX,UAAU;AACZ,CAAC;;;ACoDD,IAAM,0BAA0B,uBAAO,IAAI,kCAAkC;AAGtE,SAAS,0BACd,WACA,SAAyB,YACnB;AACN,SAAO,uBAAuB,IAAI;AACpC;AAEO,SAAS,qBACd,SAAyB,YACM;AAC/B,SAAO,OAAO,uBAAuB;AACvC;;;ACrEO,SAAS,oBACd,UACA,SAC0B;AAC1B,QAAM,UAAU,SAAS,cAAc,OAAO;AAC9C,UAAQ,aAAa,qBAAqB,EAAE;AAC5C,SAAO;AACT;AAEO,SAAS,aACd,UACA,OACA,YAAY,IACO;AACnB,QAAM,SAAS,oBAAoB,UAAU,QAAQ;AACrD,SAAO,OAAO;AACd,SAAO,YAAY;AACnB,SAAO,cAAc;AACrB,SAAO;AACT;","names":[]}