@inspecto-dev/core 0.3.0 → 0.3.2

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/index.cjs CHANGED
@@ -2945,11 +2945,17 @@ function getAnnotateSidebarOptions(ctx) {
2945
2945
  })
2946
2946
  );
2947
2947
  }
2948
- void sendAnnotationBatch(state, transports, "batch", composeAnnotateInstruction(state), () => {
2949
- state.annotateDrafts.clear();
2950
- state.annotateEditingRecord = null;
2951
- state.annotateSession = createEmptySession();
2952
- });
2948
+ void sendAnnotationBatch(
2949
+ state,
2950
+ transports,
2951
+ "batch",
2952
+ composeAnnotateInstruction(state),
2953
+ () => {
2954
+ state.annotateDrafts.clear();
2955
+ state.annotateEditingRecord = null;
2956
+ state.annotateSession = createEmptySession();
2957
+ }
2958
+ );
2953
2959
  },
2954
2960
  onExit: () => {
2955
2961
  state.setMode("inspect");
@@ -3263,7 +3269,7 @@ function updateBadgeContent(ctx) {
3263
3269
  button.classList.toggle("active", active);
3264
3270
  button.setAttribute("aria-pressed", String(active));
3265
3271
  };
3266
- let stateLabel = "";
3272
+ let stateLabel;
3267
3273
  if (state.disabled) {
3268
3274
  stateLabel = "Selection paused";
3269
3275
  indicator.dataset.state = "paused";
@@ -3927,7 +3933,7 @@ function showIntentMenu(shadowRoot, location, clickX, clickY, options, onClose,
3927
3933
  const maxSnippetLines = (_a2 = options.maxSnippetLines) != null ? _a2 : 100;
3928
3934
  const includeSnippet = (_b = options.includeSnippet) != null ? _b : false;
3929
3935
  let canAttachRuntimeContext2 = ((_c = options.runtimeContext) == null ? void 0 : _c.enabled) === true && typeof deps.getRuntimeContext === "function";
3930
- let canAttachScreenshotContext2 = false;
3936
+ const canAttachScreenshotContext2 = false;
3931
3937
  let runtimeContextPreference = null;
3932
3938
  let runtimeContextDefaultMode = "off";
3933
3939
  let screenshotContextEnabled = false;
@@ -3943,13 +3949,13 @@ function showIntentMenu(shadowRoot, location, clickX, clickY, options, onClose,
3943
3949
  runtimeToggleBadge,
3944
3950
  screenshotToggleButton,
3945
3951
  cssToggleButton
3946
- } = createMenuHeaderDom({
3947
- location,
3948
- targetLabel: deps.targetLabel,
3952
+ } = createMenuHeaderDom(__spreadProps(__spreadValues({
3953
+ location
3954
+ }, deps.targetLabel ? { targetLabel: deps.targetLabel } : {}), {
3949
3955
  canAttachRuntimeContext: canAttachRuntimeContext2,
3950
3956
  canAttachScreenshotContext: canAttachScreenshotContext2,
3951
3957
  canAttachCssContext: canAttachCssContext2
3952
- });
3958
+ }));
3953
3959
  const syncScreenshotToggleButton = () => {
3954
3960
  screenshotToggleButton.hidden = !canAttachScreenshotContext2;
3955
3961
  if (!canAttachScreenshotContext2) {
@@ -5143,11 +5149,7 @@ function createAnnotateSidebarDom(shadowRoot) {
5143
5149
  const headerActions = document.createElement("div");
5144
5150
  headerActions.className = annotateSidebarActionsClass;
5145
5151
  headerActions.setAttribute("data-inspecto-annotate-header-actions", "true");
5146
- const quickCaptureButton = createSidebarButton(
5147
- pureMarkIconSvg,
5148
- annotateSidebarButtonClass,
5149
- true
5150
- );
5152
+ const quickCaptureButton = createSidebarButton(pureMarkIconSvg, annotateSidebarButtonClass, true);
5151
5153
  quickCaptureButton.dataset.role = "quick-capture";
5152
5154
  quickCaptureButton.classList.add(runtimeToggleClass);
5153
5155
  quickCaptureButton.setAttribute("aria-label", "Toggle quick capture");
@@ -5978,7 +5980,10 @@ function syncModeUi(ctx) {
5978
5980
  function mountAnnotateSidebar(ctx) {
5979
5981
  const state = asModeUiContext(ctx);
5980
5982
  if (state.annotateSidebar) return;
5981
- state.annotateSidebar = createAnnotateSidebar(state.shadowRootEl, state.getAnnotateSidebarOptions());
5983
+ state.annotateSidebar = createAnnotateSidebar(
5984
+ state.shadowRootEl,
5985
+ state.getAnnotateSidebarOptions()
5986
+ );
5982
5987
  }
5983
5988
  function updateAnnotateSidebar(ctx) {
5984
5989
  var _a2;
@@ -6241,7 +6246,9 @@ function syncRuntimeContextCapture(ctx) {
6241
6246
  const runtimeContextEnabled = ((_a2 = state.options.runtimeContext) == null ? void 0 : _a2.enabled) === true && (state.mode === "inspect" || state.mode === "annotate" && !state.disabled);
6242
6247
  if (runtimeContextEnabled) {
6243
6248
  if (!state.cleanupRuntimeContextCapture) {
6244
- state.cleanupRuntimeContextCapture = attachRuntimeContextCapture(state.runtimeContextCollector);
6249
+ state.cleanupRuntimeContextCapture = attachRuntimeContextCapture(
6250
+ state.runtimeContextCollector
6251
+ );
6245
6252
  }
6246
6253
  return;
6247
6254
  }