@nuvio/overlay 0.5.4 → 0.5.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -18
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1191,12 +1191,12 @@ function mapUnsupportedReasonToSimple(reason) {
1191
1191
  function getSimpleBlockedEditFallback(selectedId, selectedEntry) {
1192
1192
  const textContext = selectedEntry?.textEditable === true || selectedId != null && /\.(label|value|nameText|name|price|category|status|title|subtitle)$/.test(selectedId) || selectedId != null && selectedId.includes(".header.");
1193
1193
  if (textContext) {
1194
- return "Nuvio can't safely edit this text yet.";
1194
+ return "nuvio can't safely edit this text yet.";
1195
1195
  }
1196
- return "Nuvio can't safely edit this element.";
1196
+ return "nuvio can't safely edit this element.";
1197
1197
  }
1198
1198
  function getSimpleIndexEmptyMessage() {
1199
- return "Nothing is set up to edit yet. Add Nuvio ids to elements in your project, then restart the dev server.";
1199
+ return "Nothing is set up to edit yet. Add nuvio ids to elements in your project, then restart the dev server.";
1200
1200
  }
1201
1201
  function getSimplePatchBlockedMessage(indexIdCount, selectionResolved) {
1202
1202
  if (indexIdCount === 0) {
@@ -1761,7 +1761,7 @@ var REASON_MAP = [
1761
1761
  {
1762
1762
  match: (r) => r.includes("host_not_found") || r.includes("No JSX host"),
1763
1763
  message: {
1764
- sentence: "Nuvio couldn't find this element in source \u2014 click it again or refresh the page.",
1764
+ sentence: "nuvio couldn't find this element in source \u2014 click it again or refresh the page.",
1765
1765
  suggestedAction: "addId"
1766
1766
  }
1767
1767
  },
@@ -1782,9 +1782,9 @@ var REASON_MAP = [
1782
1782
  {
1783
1783
  match: (r) => r.includes("Unknown or disallowed Tailwind"),
1784
1784
  message: {
1785
- sentence: "This class uses utilities Nuvio can't edit yet \u2014 simplify the styles on this element or edit in your code editor.",
1785
+ sentence: "This class uses utilities nuvio can't edit yet \u2014 simplify the styles on this element or edit in your code editor.",
1786
1786
  suggestedAction: "useHandoff",
1787
- handoffStep: "Remove or simplify responsive/dark Tailwind classes on this element so Nuvio can edit padding, radius, and shadow."
1787
+ handoffStep: "Remove or simplify responsive/dark Tailwind classes on this element so nuvio can edit padding, radius, and shadow."
1788
1788
  }
1789
1789
  }
1790
1790
  ];
@@ -1803,7 +1803,7 @@ function mapReasonToPlainMessage(reason) {
1803
1803
  }
1804
1804
  function getPlainPatchHandoffStep(message) {
1805
1805
  if (!message) {
1806
- return "Review this element in source and fix the styles or Nuvio ids.";
1806
+ return "Review this element in source and fix the styles or nuvio ids.";
1807
1807
  }
1808
1808
  const stripped = message.replace(/^Error:\s*/i, "").trim();
1809
1809
  const mapped = mapReasonToPlainMessage(stripped);
@@ -2442,7 +2442,7 @@ function buildFixHandoffClipboard(ctx) {
2442
2442
  const fileLine = ctx.file != null ? `${ctx.file}${ctx.line != null ? `:${ctx.line}` : ""}` : "(unknown file)";
2443
2443
  const component = ctx.componentName ?? ctx.hostId;
2444
2444
  return [
2445
- "Nuvio could not apply this edit safely.",
2445
+ "nuvio could not apply this edit safely.",
2446
2446
  "",
2447
2447
  `Component: ${component} (${ctx.hostId})`,
2448
2448
  `File: ${fileLine}`,
@@ -2455,7 +2455,7 @@ function buildFixHandoffClipboard(ctx) {
2455
2455
  `"In ${ctx.file ?? "the component file"}, ${ctx.suggestedNextStep}"`
2456
2456
  ].join("\n");
2457
2457
  }
2458
- var MAKE_TABLE_EDITABLE_SNIPPET = `Add Nuvio table ids (v0.4 contract):
2458
+ var MAKE_TABLE_EDITABLE_SNIPPET = `Add nuvio table ids (v0.4 contract):
2459
2459
  - Section wrapper: data-nuvio-id="{host}.section"
2460
2460
  - Title h3: data-nuvio-id="{host}.title"
2461
2461
  - Table scroll area: data-nuvio-id="{host}.table"
@@ -2679,7 +2679,7 @@ function HandoffActionBar({
2679
2679
  file,
2680
2680
  line,
2681
2681
  componentName,
2682
- userIntent = "edit selection in Nuvio",
2682
+ userIntent = "edit selection in nuvio",
2683
2683
  tableContext = false,
2684
2684
  simpleMode = false,
2685
2685
  onSwitchTarget,
@@ -2781,7 +2781,7 @@ function SimpleModeActionBar({
2781
2781
  // src/selection-guides.ts
2782
2782
  var GUIDE_CONTENT = {
2783
2783
  welcome: {
2784
- title: "Welcome to Nuvio",
2784
+ title: "Welcome to nuvio",
2785
2785
  body: "Click something on the page \u2192 choose what to change \u2192 Preview Changes \u2192 Apply to Code. Changes save to your source files. Undo anytime. If an area isn't editable, use Copy Fix Prompt."
2786
2786
  },
2787
2787
  "first-selection": {
@@ -4485,12 +4485,12 @@ function PropertyPanelShell({
4485
4485
  }
4486
4486
  if (hasText && !patchTextId) {
4487
4487
  return {
4488
- error: developerDetails ? "Text cannot be patched for this target \u2014 add a data-nuvio-id on the text element." : "Nuvio can't safely edit this text yet."
4488
+ error: developerDetails ? "Text cannot be patched for this target \u2014 add a data-nuvio-id on the text element." : "nuvio can't safely edit this text yet."
4489
4489
  };
4490
4490
  }
4491
4491
  if (hasStyle && !patchStyleId) {
4492
4492
  return {
4493
- error: developerDetails ? "Styles cannot be patched for this target." : "Nuvio can't safely edit this area yet."
4493
+ error: developerDetails ? "Styles cannot be patched for this target." : "nuvio can't safely edit this area yet."
4494
4494
  };
4495
4495
  }
4496
4496
  if (hasText && patchTextId) {
@@ -4604,7 +4604,7 @@ function PropertyPanelShell({
4604
4604
  ]
4605
4605
  );
4606
4606
  const showWelcome = shouldShowWelcome({ developerDetails, dismissed: dismissedGuides });
4607
- const patchBlockedReason = indexIdCount === 0 ? "Source index has 0 ids \u2014 the dev server cannot map data-nuvio-id to files. Run pnpm dev from the repo root (builds packages), then hard-refresh. Check the terminal for [Nuvio] index warnings." : selectedId && !selectionResolved ? selectError ?? "Server did not confirm this id (no source file). Patches stay disabled until selection succeeds." : null;
4607
+ const patchBlockedReason = indexIdCount === 0 ? "Source index has 0 ids \u2014 the dev server cannot map data-nuvio-id to files. Run pnpm dev from the repo root (builds packages), then hard-refresh. Check the terminal for [nuvio] index warnings." : selectedId && !selectionResolved ? selectError ?? "Server did not confirm this id (no source file). Patches stay disabled until selection succeeds." : null;
4608
4608
  const displayPatchBlockedReason = developerDetails ? patchBlockedReason : getSimplePatchBlockedMessage(indexIdCount, selectionResolved) ?? (selectError ? getSimpleSelectErrorMessage(selectError) : null);
4609
4609
  const previewApplyMismatch = hasStagedOps && selectionResolved && channelReady && indexIdCount > 0 && (!previewSummary || previewError != null || previewValidatedFingerprint !== stagedOpsFingerprint);
4610
4610
  const patchTargetConflict = textEditable && draftText !== baselineText && alphaPicksDiffer(picks, baselinePicks) && patchTextId != null && patchStyleId != null && patchTextId !== patchStyleId;
@@ -5156,7 +5156,7 @@ function PropertyPanelShell({
5156
5156
  ] }) : null,
5157
5157
  hasStagedOps && !displayPatchBlockedReason && previewApplyMismatch && simpleMode ? /* @__PURE__ */ jsx14("p", { className: "nuvio-text-2xs nuvio-text-muted", children: "Preview your changes before applying." }) : null,
5158
5158
  patchTargetConflict ? /* @__PURE__ */ jsx14("p", { className: "nuvio-banner nuvio-banner--warn nuvio-text-2xs nuvio-leading-snug", children: developerDetails ? "Text and styles apply to different elements. Preview text first, then change styles \u2014 or pick one target in Edit target." : "Text and styles apply to different parts. Preview text first, then change styles." }) : null,
5159
- patchTargetError ? /* @__PURE__ */ jsx14("p", { className: "nuvio-banner nuvio-banner--error nuvio-text-2xs", children: developerDetails ? patchTargetError : patchTargetError.startsWith("Nuvio can't") || patchTargetError.startsWith("Nothing") || patchTargetError.startsWith("No changes") || patchTargetError.startsWith("Text and styles") || patchTargetError.startsWith("This part") ? patchTargetError : getSimpleSelectErrorMessage(patchTargetError) ?? patchTargetError }) : null,
5159
+ patchTargetError ? /* @__PURE__ */ jsx14("p", { className: "nuvio-banner nuvio-banner--error nuvio-text-2xs", children: developerDetails ? patchTargetError : patchTargetError.startsWith("nuvio can't") || patchTargetError.startsWith("Nothing") || patchTargetError.startsWith("No changes") || patchTargetError.startsWith("Text and styles") || patchTargetError.startsWith("This part") ? patchTargetError : getSimpleSelectErrorMessage(patchTargetError) ?? patchTargetError }) : null,
5160
5160
  patchStyleId && selectedId && patchStyleId !== selectedId && developerDetails ? /* @__PURE__ */ jsxs14("p", { className: "nuvio-text-2xs nuvio-text-muted nuvio-leading-snug", children: [
5161
5161
  "Styles apply to",
5162
5162
  " ",
@@ -6243,7 +6243,7 @@ function NuvioDevShellInner() {
6243
6243
  }
6244
6244
  patchPendingMapRef.current.delete(requestId);
6245
6245
  setPreviewBusy(false);
6246
- setPreviewError("No validation response from the dev server (timed out). Check the terminal for [Nuvio] errors.");
6246
+ setPreviewError("No validation response from the dev server (timed out). Check the terminal for [nuvio] errors.");
6247
6247
  }, 15e3);
6248
6248
  }
6249
6249
  ws.send(
@@ -6706,7 +6706,7 @@ function NuvioDevShellInner() {
6706
6706
  className: `nuvio-chip-header ${chipDragging ? "nuvio-chip-header--grabbing" : ""}`,
6707
6707
  onPointerDown: onChipHeaderPointerDown,
6708
6708
  children: [
6709
- /* @__PURE__ */ jsx15("span", { className: "nuvio-chip-title", children: "Nuvio" }),
6709
+ /* @__PURE__ */ jsx15("span", { className: "nuvio-chip-title", children: "nuvio" }),
6710
6710
  /* @__PURE__ */ jsx15("span", { className: "nuvio-chip-spacer", "aria-hidden": "true" }),
6711
6711
  /* @__PURE__ */ jsx15(
6712
6712
  "button",
@@ -6714,7 +6714,7 @@ function NuvioDevShellInner() {
6714
6714
  type: "button",
6715
6715
  className: "nuvio-button-icon",
6716
6716
  title: chromeLayout.chip.collapsed ? "Expand chip" : "Collapse chip",
6717
- "aria-label": chromeLayout.chip.collapsed ? "Expand Nuvio chip" : "Collapse Nuvio chip",
6717
+ "aria-label": chromeLayout.chip.collapsed ? "Expand nuvio chip" : "Collapse nuvio chip",
6718
6718
  onPointerDown: (e) => e.stopPropagation(),
6719
6719
  onClick: () => onChipCollapsedChange(!chromeLayout.chip.collapsed),
6720
6720
  children: chromeLayout.chip.collapsed ? "+" : "\u2212"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvio/overlay",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Nuvio dev overlay: edit mode, selection, Editor panel, Validate/Apply/Undo against the Vite dev server.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "posthog-js": "^1.380.1",
48
- "@nuvio/shared": "0.5.4"
48
+ "@nuvio/shared": "0.5.5"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/react": "^19.0.8",