@spotpatch/runtime 1.15.3 → 1.15.5
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/{chunk-ELCIEQGT.js → chunk-HVI76KFV.js} +10 -10
- package/dist/chunk-HVI76KFV.js.map +1 -0
- package/dist/chunk-N4TPX3YF.js +224 -0
- package/dist/chunk-N4TPX3YF.js.map +1 -0
- package/dist/contextual-ask-panel.cjs +153 -71
- package/dist/contextual-ask-panel.cjs.map +1 -1
- package/dist/contextual-ask-panel.js +145 -63
- package/dist/contextual-ask-panel.js.map +1 -1
- package/dist/data-flow-panel.cjs +20 -19
- package/dist/data-flow-panel.cjs.map +1 -1
- package/dist/data-flow-panel.js +20 -19
- package/dist/data-flow-panel.js.map +1 -1
- package/dist/external-handoff-panel.cjs +49 -42
- package/dist/external-handoff-panel.cjs.map +1 -1
- package/dist/external-handoff-panel.js +42 -34
- package/dist/external-handoff-panel.js.map +1 -1
- package/dist/index.cjs +563 -422
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +458 -423
- package/dist/index.js.map +1 -1
- package/dist/motion.cjs +113 -187
- package/dist/motion.cjs.map +1 -1
- package/dist/motion.js +107 -188
- package/dist/motion.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-ELCIEQGT.js.map +0 -1
- package/dist/chunk-P7W3F4UA.js +0 -115
- package/dist/chunk-P7W3F4UA.js.map +0 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SELECT_PICKER_STYLES,
|
|
7
7
|
createSelectPicker
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HVI76KFV.js";
|
|
9
9
|
import {
|
|
10
10
|
createButton,
|
|
11
11
|
createMarkedElement
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
EXTERNAL_AGENT_CONTROL_LIMITS as EXTERNAL_AGENT_CONTROL_LIMITS2,
|
|
18
18
|
EXTERNAL_AGENT_MANAGED_PROFILE,
|
|
19
19
|
EXTERNAL_HANDOFF_BROKER_PROTOCOL_VERSION,
|
|
20
|
+
EXTERNAL_HANDOFF_FRAMEWORKS,
|
|
20
21
|
EXTERNAL_HANDOFF_LIMITS,
|
|
21
22
|
EXTERNAL_HANDOFF_SNAPSHOT_SCHEMA_VERSION,
|
|
22
23
|
SPOTPATCH_ENDPOINTS as SPOTPATCH_ENDPOINTS2,
|
|
@@ -498,6 +499,9 @@ function parseStatusResult(value) {
|
|
|
498
499
|
dispatch
|
|
499
500
|
});
|
|
500
501
|
}
|
|
502
|
+
function isExternalHandoffFramework(value) {
|
|
503
|
+
return EXTERNAL_HANDOFF_FRAMEWORKS.some((framework) => framework === value);
|
|
504
|
+
}
|
|
501
505
|
function parseSummary(value) {
|
|
502
506
|
if (!record(value)) throw new ExternalHandoffApiError();
|
|
503
507
|
const expectedKeys = [
|
|
@@ -513,7 +517,7 @@ function parseSummary(value) {
|
|
|
513
517
|
"targetCount",
|
|
514
518
|
...value.pickedUpAt === void 0 ? [] : ["pickedUpAt"]
|
|
515
519
|
];
|
|
516
|
-
if (!exactKeys(value, expectedKeys) || typeof value.sessionId !== "string" || !OPAQUE_ID_PATTERN.test(value.sessionId) || value.framework
|
|
520
|
+
if (!exactKeys(value, expectedKeys) || typeof value.sessionId !== "string" || !OPAQUE_ID_PATTERN.test(value.sessionId) || !isExternalHandoffFramework(value.framework) || !Number.isSafeInteger(value.revision) || value.revision <= 0 || typeof value.cursor !== "string" || !OPAQUE_ID_PATTERN.test(value.cursor) || !Number.isSafeInteger(value.targetCount) || value.targetCount <= 0 || !record(value.page) || !exactKeys(value.page, ["origin", "pathname"]) || typeof value.page.origin !== "string" || typeof value.page.pathname !== "string" || !validTimestamp(value.publishedAt) || !validTimestamp(value.expiresAt) || value.state !== "available" && value.state !== "expired" && value.state !== "superseded" || !Number.isSafeInteger(value.pickupCount) || value.pickupCount < 0 || value.pickupCount > EXTERNAL_HANDOFF_LIMITS.maximumConnectorReceipts || value.pickedUpAt !== void 0 && !validTimestamp(value.pickedUpAt)) {
|
|
517
521
|
throw new ExternalHandoffApiError();
|
|
518
522
|
}
|
|
519
523
|
return Object.freeze({
|
|
@@ -1199,41 +1203,45 @@ function createStyles(document) {
|
|
|
1199
1203
|
const styles = document.createElement("style");
|
|
1200
1204
|
styles.textContent = `
|
|
1201
1205
|
${SELECT_PICKER_STYLES}
|
|
1202
|
-
.spotpatch-external-handoff { margin-top:
|
|
1203
|
-
.spotpatch-external-handoff[hidden] { display: none; }
|
|
1206
|
+
.spotpatch-external-handoff { margin-top: 10px; padding: 12px; border: 1px solid var(--spotpatch-cyan-line); border-radius: var(--spotpatch-radius-card); background: var(--spotpatch-cyan-tint); }
|
|
1204
1207
|
.spotpatch-external-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
1205
|
-
.spotpatch-external-heading strong { font-size:
|
|
1206
|
-
.spotpatch-external-description, .spotpatch-external-status, .spotpatch-external-settings p { margin: 6px 0 0; font-size:
|
|
1207
|
-
.spotpatch-external-status {
|
|
1208
|
-
.spotpatch-external-status[data-state="error"] { border-color: var(--spotpatch-danger); color:
|
|
1209
|
-
.spotpatch-external-status[data-state="picked-up"] { border-color: var(--spotpatch-success); color:
|
|
1210
|
-
.spotpatch-external-control { margin-top:
|
|
1208
|
+
.spotpatch-external-heading strong { font-size: 13px; font-weight: 620; }
|
|
1209
|
+
.spotpatch-external-description, .spotpatch-external-status, .spotpatch-external-settings p { margin: 6px 0 0; color: var(--spotpatch-text-secondary); font-size: 12px; line-height: 1.5; }
|
|
1210
|
+
.spotpatch-external-status { border-left: 2px solid var(--spotpatch-accent-cyan); padding-left: 10px; color: var(--spotpatch-text); }
|
|
1211
|
+
.spotpatch-external-status[data-state="error"] { border-color: var(--spotpatch-danger); color: var(--spotpatch-danger-text); }
|
|
1212
|
+
.spotpatch-external-status[data-state="picked-up"] { border-color: var(--spotpatch-success); color: var(--spotpatch-success-text); }
|
|
1213
|
+
.spotpatch-external-control { margin-top: 10px; padding: 10px; border: 1px solid var(--spotpatch-border-subtle); border-radius: var(--spotpatch-radius-md); background: var(--spotpatch-bg-input); }
|
|
1211
1214
|
.spotpatch-external-control-field { display: grid; gap: 5px; min-width: 0; }
|
|
1212
|
-
.spotpatch-external-control-field + .spotpatch-external-control-field { margin-top:
|
|
1213
|
-
.spotpatch-external-control-field > label { color: var(--spotpatch-text-secondary); font-size:
|
|
1214
|
-
.spotpatch-external-agent-value { box-sizing: border-box; display: flex; width: 100%; min-height: 38px; align-items: center; border: 1px solid var(--spotpatch-border); border-radius:
|
|
1215
|
-
.spotpatch-external-control-status { margin:
|
|
1215
|
+
.spotpatch-external-control-field + .spotpatch-external-control-field { margin-top: 10px; }
|
|
1216
|
+
.spotpatch-external-control-field > label { color: var(--spotpatch-text-secondary); font-size: 11px; }
|
|
1217
|
+
.spotpatch-external-agent-value { box-sizing: border-box; display: flex; width: 100%; min-height: 38px; align-items: center; overflow: hidden; border: 1px solid var(--spotpatch-border); border-radius: var(--spotpatch-radius-md); padding: 0 12px; color: var(--spotpatch-text); background: var(--spotpatch-hover); font: inherit; text-overflow: ellipsis; white-space: nowrap; }
|
|
1218
|
+
.spotpatch-external-control-status { margin: 8px 0 0; color: var(--spotpatch-text-secondary); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; }
|
|
1216
1219
|
.spotpatch-external-control-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
|
1217
|
-
.spotpatch-external-control-actions button
|
|
1218
|
-
.spotpatch-external-
|
|
1219
|
-
.spotpatch-external-
|
|
1220
|
-
.spotpatch-external-
|
|
1221
|
-
.spotpatch-external-
|
|
1222
|
-
.spotpatch-external-
|
|
1223
|
-
.spotpatch-external-refresh
|
|
1224
|
-
.spotpatch-external-
|
|
1225
|
-
.spotpatch-external-
|
|
1226
|
-
.spotpatch-external-
|
|
1227
|
-
.spotpatch-external-resolve:disabled { cursor: default; opacity: .
|
|
1228
|
-
.spotpatch-external-
|
|
1229
|
-
.spotpatch-external-
|
|
1230
|
-
.spotpatch-external-
|
|
1231
|
-
.spotpatch-external-
|
|
1232
|
-
.spotpatch-external-
|
|
1233
|
-
.spotpatch-external-
|
|
1234
|
-
.spotpatch-external-disclosure-
|
|
1235
|
-
.spotpatch-external-disclosure-
|
|
1236
|
-
.spotpatch-external-disclosure-
|
|
1220
|
+
.spotpatch-external-control-actions button,
|
|
1221
|
+
.spotpatch-external-refresh,
|
|
1222
|
+
.spotpatch-external-disclosure-actions button { border: 1px solid var(--spotpatch-border); border-radius: var(--spotpatch-radius-sm); color: var(--spotpatch-text); background: var(--spotpatch-bg-raised); cursor: pointer; font: inherit; transition: border-color var(--spotpatch-duration-fast) ease, background var(--spotpatch-duration-fast) ease; }
|
|
1223
|
+
.spotpatch-external-control-actions button { padding: 5px 10px; font-size: 11.5px; }
|
|
1224
|
+
.spotpatch-external-refresh { padding: 3px 8px; color: var(--spotpatch-text-secondary); background: transparent; font-size: 11px; }
|
|
1225
|
+
.spotpatch-external-control-actions button:hover:not(:disabled),
|
|
1226
|
+
.spotpatch-external-refresh:hover:not(:disabled),
|
|
1227
|
+
.spotpatch-external-disclosure-actions button:hover:not(:disabled) { border-color: var(--spotpatch-border-strong); background: var(--spotpatch-bg-active); }
|
|
1228
|
+
.spotpatch-external-control-actions button:disabled,
|
|
1229
|
+
.spotpatch-external-refresh:disabled,
|
|
1230
|
+
.spotpatch-external-resolve:disabled { cursor: default; opacity: .4; }
|
|
1231
|
+
.spotpatch-external-result { margin-top: 8px; color: var(--spotpatch-text-secondary); font-size: 11px; }
|
|
1232
|
+
.spotpatch-external-result pre { max-height: 180px; overflow: auto; margin: 6px 0 0; border-radius: var(--spotpatch-radius-xs); padding: 8px; color: var(--spotpatch-text); background: var(--spotpatch-bg); font: 10.5px/1.5 var(--spotpatch-font-mono); white-space: pre; }
|
|
1233
|
+
.spotpatch-external-settings { margin-top: 10px; }
|
|
1234
|
+
.spotpatch-external-settings summary { color: var(--spotpatch-accent-soft); cursor: pointer; font-size: 12px; }
|
|
1235
|
+
.spotpatch-external-resolve { margin-top: 8px; border: 1px solid var(--spotpatch-warning-line); border-radius: var(--spotpatch-radius-sm); padding: 6px 10px; color: var(--spotpatch-warning-text); background: var(--spotpatch-warning-tint); cursor: pointer; font: inherit; font-size: 11.5px; }
|
|
1236
|
+
.spotpatch-external-disclosure { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px; background: var(--spotpatch-scrim); backdrop-filter: blur(4px); }
|
|
1237
|
+
.spotpatch-external-disclosure-card { width: min(420px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--spotpatch-border); border-radius: var(--spotpatch-radius-panel); padding: 20px; background: var(--spotpatch-surface-fill); box-shadow: var(--spotpatch-shadow-panel), var(--spotpatch-shadow-inset); animation: spotpatch-pop var(--spotpatch-duration-base) var(--spotpatch-ease-spring) both; }
|
|
1238
|
+
.spotpatch-external-disclosure-card h3 { margin: 0; font-size: 15px; font-weight: 650; }
|
|
1239
|
+
.spotpatch-external-disclosure-card p { margin: 9px 0 0; color: var(--spotpatch-text-secondary); font-size: 12px; line-height: 1.55; }
|
|
1240
|
+
.spotpatch-external-files { max-height: 96px; overflow: auto; color: var(--spotpatch-accent-soft); font: 11px/1.5 var(--spotpatch-font-mono); white-space: pre-wrap; }
|
|
1241
|
+
.spotpatch-external-disclosure-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
|
|
1242
|
+
.spotpatch-external-disclosure-actions button { min-height: 34px; padding: 0 12px; font-size: 12.5px; font-weight: 600; }
|
|
1243
|
+
.spotpatch-external-disclosure-actions .spotpatch-primary { border-color: transparent; color: var(--spotpatch-text-on-accent); background: var(--spotpatch-primary-fill); }
|
|
1244
|
+
.spotpatch-external-disclosure-actions .spotpatch-primary:hover:not(:disabled) { border-color: transparent; background: var(--spotpatch-primary-fill); filter: brightness(1.1); }
|
|
1237
1245
|
`;
|
|
1238
1246
|
return styles;
|
|
1239
1247
|
}
|