@nivaro/react 0.3.36 → 0.3.37

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 (102) hide show
  1. package/dist/components/slots/CommentsSlot.js +44 -36
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +9 -1
  5. package/dist/shared/components/AgentBadge.js +26 -0
  6. package/dist/shared/components/AgentQuestionsCard.js +198 -0
  7. package/dist/shared/components/ItemEditForm.js +3329 -3263
  8. package/dist/shared/components/McpConnectionScope.js +480 -0
  9. package/dist/shared/components/MyWorkView.js +223 -208
  10. package/dist/shared/components/RecordReadView.js +620 -575
  11. package/dist/shared/components/chat/ChatPanel.js +683 -671
  12. package/dist/shared/components/imports/DownloadSampleButton.js +69 -0
  13. package/dist/shared/components/imports/ImportConsole.js +106 -104
  14. package/dist/shared/components/imports/RunDetailSheet.js +11 -10
  15. package/dist/shared/components/item-edit/FieldAffordances.js +32 -32
  16. package/dist/shared/components/item-edit/FormTour.js +279 -0
  17. package/dist/shared/components/item-edit/GroupSection.js +377 -360
  18. package/dist/shared/components/item-edit/PersonalDefaultControl.js +28 -28
  19. package/dist/shared/components/item-edit/entry/EntryStrip.js +30 -26
  20. package/dist/shared/components/item-edit/form-density.js +36 -0
  21. package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -46
  22. package/dist/shared/components/item-edit/usePersonalDefaults.js +312 -296
  23. package/dist/shared/components/layout-editor/AddPanel.js +349 -192
  24. package/dist/shared/components/layout-editor/DesignNode.js +126 -112
  25. package/dist/shared/components/layout-editor/EditorTopBar.js +123 -103
  26. package/dist/shared/components/layout-editor/LayoutEditor.js +829 -751
  27. package/dist/shared/components/layout-editor/PlaceTools.js +334 -0
  28. package/dist/shared/components/layout-editor/SlashInsert.js +252 -0
  29. package/dist/shared/components/layout-editor/StructureMenu.js +285 -242
  30. package/dist/shared/components/layout-editor/add-target.js +54 -43
  31. package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +238 -155
  32. package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +1 -1
  33. package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +15 -12
  34. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +347 -189
  35. package/dist/shared/components/layout-editor/dnd/TrashZone.js +60 -32
  36. package/dist/shared/components/layout-editor/dnd/UndoChip.js +76 -0
  37. package/dist/shared/components/layout-editor/dnd/merge-drop.js +33 -0
  38. package/dist/shared/components/layout-editor/dnd/multi-drop.js +87 -0
  39. package/dist/shared/components/layout-editor/dnd/node.js +115 -105
  40. package/dist/shared/components/layout-editor/dnd/sensors.js +23 -0
  41. package/dist/shared/components/layout-editor/dnd/trash-drop.js +34 -28
  42. package/dist/shared/components/layout-editor/dnd/trash-links.js +97 -0
  43. package/dist/shared/components/layout-editor/even-row.js +86 -0
  44. package/dist/shared/components/layout-editor/field-list.js +99 -0
  45. package/dist/shared/components/layout-editor/format-painter.js +102 -0
  46. package/dist/shared/components/layout-editor/grid-guides.js +15 -13
  47. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +150 -132
  48. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +57 -53
  49. package/dist/shared/components/layout-editor/inspector/EvenRowAction.js +31 -0
  50. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +154 -141
  51. package/dist/shared/components/layout-editor/inspector/Inspector.js +209 -178
  52. package/dist/shared/components/layout-editor/inspector/LookTab.js +106 -98
  53. package/dist/shared/components/layout-editor/inspector/RulesTab.js +38 -37
  54. package/dist/shared/components/layout-editor/inspector/kit.js +280 -223
  55. package/dist/shared/components/layout-editor/keyboard-move.js +15 -15
  56. package/dist/shared/components/layout-editor/lint/LabelStyle.js +201 -0
  57. package/dist/shared/components/layout-editor/lint/LintPanel.js +132 -84
  58. package/dist/shared/components/layout-editor/lint/lint-api.js +65 -28
  59. package/dist/shared/components/layout-editor/nav/NavTools.js +14 -12
  60. package/dist/shared/components/layout-editor/nav/ZoomControls.js +145 -0
  61. package/dist/shared/components/layout-editor/nav/useEditorNav.js +34 -32
  62. package/dist/shared/components/layout-editor/nav/view-prefs.js +100 -15
  63. package/dist/shared/components/layout-editor/outputs/LayoutFile.js +89 -0
  64. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +272 -195
  65. package/dist/shared/components/layout-editor/outputs/layout-file-plan.js +176 -0
  66. package/dist/shared/components/layout-editor/outputs/output-api.js +71 -37
  67. package/dist/shared/components/layout-editor/overview/describe-conditions.js +16 -11
  68. package/dist/shared/components/layout-editor/overview/purpose.js +5 -5
  69. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  70. package/dist/shared/components/layout-editor/pin.js +37 -19
  71. package/dist/shared/components/layout-editor/place-clip.js +257 -0
  72. package/dist/shared/components/layout-editor/preview/PreviewModes.js +27 -26
  73. package/dist/shared/components/layout-editor/preview/PreviewPanes.js +148 -117
  74. package/dist/shared/components/layout-editor/preview/SampleRecord.js +113 -0
  75. package/dist/shared/components/layout-editor/preview/preview-model.js +79 -60
  76. package/dist/shared/components/layout-editor/preview/sample-record.js +105 -0
  77. package/dist/shared/components/layout-editor/removed-log.js +151 -0
  78. package/dist/shared/components/layout-editor/reuse/LibraryRows.js +109 -78
  79. package/dist/shared/components/layout-editor/reuse/linked-sections.js +373 -0
  80. package/dist/shared/components/layout-editor/revert-element.js +140 -0
  81. package/dist/shared/components/layout-editor/section-structure.js +193 -170
  82. package/dist/shared/components/layout-editor/settings/EntrySection.js +63 -45
  83. package/dist/shared/components/layout-editor/settings/LayoutSection.js +63 -32
  84. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +179 -137
  85. package/dist/shared/components/layout-editor/settings/WhoSection.js +18 -17
  86. package/dist/shared/components/layout-editor/settings/settings-registry.js +24 -0
  87. package/dist/shared/components/layout-editor/shortcuts.js +21 -16
  88. package/dist/shared/components/layout-editor/structure-ops.js +221 -195
  89. package/dist/shared/components/layout-editor/usage/UsagePanel.js +133 -85
  90. package/dist/shared/components/layout-editor/usage/refusal-lens.js +130 -0
  91. package/dist/shared/components/layout-editor/usage/usage-api.js +12 -11
  92. package/dist/shared/components/panels/CommentPanel.js +47 -45
  93. package/dist/shared/components/panels/RevisionsPanel.js +66 -64
  94. package/dist/shared/components/panels/TaskPanel.js +395 -332
  95. package/dist/shared/components/profile/AgentsPanel.js +196 -147
  96. package/dist/shared/components/profile/ConnectionRollback.js +329 -0
  97. package/dist/shared/components/profile/MyDefaultsCard.js +526 -520
  98. package/dist/shared/lib/entry-config.js +22 -22
  99. package/dist/shared/lib/form-usage-beacon.js +91 -55
  100. package/dist/shared/lib/layout-lint.js +530 -284
  101. package/dist/shared/lib/layout-resolve.js +58 -44
  102. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- const s = /^\d{4}-\d{2}-\d{2}$/, c = (t) => typeof t == "string" && s.test(t);
1
+ const a = /^\d{4}-\d{2}-\d{2}$/, c = (t) => typeof t == "string" && a.test(t);
2
2
  function o(t) {
3
3
  let n = t;
4
4
  if (typeof n == "string")
@@ -9,25 +9,25 @@ function o(t) {
9
9
  }
10
10
  return n && typeof n == "object" && !Array.isArray(n) ? n : null;
11
11
  }
12
- function l(t, n, e) {
12
+ function u(t, n, e) {
13
13
  const r = { ...o(t) ?? {} };
14
14
  return e == null ? delete r[n] : r[n] = e, Object.keys(r).length > 0 ? r : null;
15
15
  }
16
- function a(t = /* @__PURE__ */ new Date()) {
16
+ function s(t = /* @__PURE__ */ new Date()) {
17
17
  const n = (e) => String(e).padStart(2, "0");
18
18
  return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
19
19
  }
20
- function p(t) {
21
- var u;
22
- const n = o((u = o(t)) == null ? void 0 : u.active_window);
20
+ function w(t) {
21
+ var i;
22
+ const n = o((i = o(t)) == null ? void 0 : i.active_window);
23
23
  if (!n) return null;
24
24
  const e = c(n.from) ? n.from : null, r = c(n.until) ? n.until : null;
25
25
  return e || r ? { from: e, until: r } : null;
26
26
  }
27
- function h(t, n) {
27
+ function g(t, n) {
28
28
  return t ? t.from && n < t.from ? "before" : t.until && n > t.until ? "after" : "open" : null;
29
29
  }
30
- function i(t) {
30
+ function l(t) {
31
31
  return (/* @__PURE__ */ new Date(`${t}T00:00:00Z`)).toLocaleDateString(void 0, {
32
32
  day: "numeric",
33
33
  month: "short",
@@ -35,28 +35,39 @@ function i(t) {
35
35
  timeZone: "UTC"
36
36
  });
37
37
  }
38
- function g(t) {
39
- return t.from && t.until ? `${i(t.from)} – ${i(t.until)}` : t.from ? `from ${i(t.from)}` : `until ${i(t.until)}`;
38
+ function _(t) {
39
+ return t.from && t.until ? `${l(t.from)} – ${l(t.until)}` : t.from ? `from ${l(t.from)}` : `until ${l(t.until)}`;
40
40
  }
41
- function b(t, n) {
41
+ function O(t, n) {
42
42
  const e = n.from || null, r = n.until || null;
43
43
  return {
44
- conditions: l(
44
+ conditions: u(
45
45
  t,
46
46
  "active_window",
47
47
  e || r ? { ...e ? { from: e } : {}, ...r ? { until: r } : {} } : null
48
48
  )
49
49
  };
50
50
  }
51
- function _(t) {
51
+ function d(t) {
52
52
  var e;
53
53
  const n = Number((e = o(t)) == null ? void 0 : e.phone_of);
54
54
  return Number.isInteger(n) && n > 0 ? n : null;
55
55
  }
56
- function w(t, n) {
57
- return { conditions: l(t, "phone_of", n) };
56
+ function x(t, n) {
57
+ return { conditions: u(t, "phone_of", n) };
58
58
  }
59
- function y(t) {
59
+ function m(t) {
60
+ var e;
61
+ const n = Number((e = o(t)) == null ? void 0 : e.tablet_of);
62
+ return Number.isInteger(n) && n > 0 ? n : null;
63
+ }
64
+ function v(t, n) {
65
+ return { conditions: u(t, "tablet_of", n) };
66
+ }
67
+ function z(t) {
68
+ return d(t) ?? m(t);
69
+ }
70
+ function h(t) {
60
71
  var e;
61
72
  const n = o((e = o(t)) == null ? void 0 : e.freeze);
62
73
  return !n || !c(n.until) ? null : {
@@ -67,47 +78,50 @@ function y(t) {
67
78
  at: typeof n.at == "string" ? n.at : null
68
79
  };
69
80
  }
70
- function z(t, n = a()) {
71
- const e = y(t);
81
+ function $(t, n = s()) {
82
+ const e = h(t);
72
83
  return e && n < e.until ? e : null;
73
84
  }
74
- function O(t, n) {
75
- return { conditions: l(t, "freeze", n) };
85
+ function S(t, n) {
86
+ return { conditions: u(t, "freeze", n) };
76
87
  }
77
- function d(t) {
88
+ function y(t) {
78
89
  var e;
79
90
  const n = (e = o(t)) == null ? void 0 : e.lazy_sections;
80
91
  return Array.isArray(n) ? [...new Set(n.filter((r) => typeof r == "string"))] : [];
81
92
  }
82
- function $(t, n, e) {
83
- const r = d(t).filter((f) => f !== n), u = e ? [...r, n] : r;
84
- return { conditions: l(t, "lazy_sections", u.length ? u : null) };
93
+ function D(t, n, e) {
94
+ const r = y(t).filter((f) => f !== n), i = e ? [...r, n] : r;
95
+ return { conditions: u(t, "lazy_sections", i.length ? i : null) };
85
96
  }
86
- const m = "(max-width: 639px)";
87
- function S() {
88
- var t;
97
+ const p = "(max-width: 639px)", b = "(min-width: 640px) and (max-width: 1023px), (min-width: 640px) and (max-width: 1366px) and (hover: none) and (pointer: coarse)";
98
+ function A() {
89
99
  try {
90
- return typeof window < "u" && ((t = window.matchMedia) != null && t.call(window, m).matches) ? "phone" : null;
100
+ return typeof window > "u" || !window.matchMedia ? null : window.matchMedia(p).matches ? "phone" : window.matchMedia(b).matches ? "tablet" : null;
91
101
  } catch {
92
102
  return null;
93
103
  }
94
104
  }
95
105
  export {
96
- m as PHONE_QUERY,
97
- z as activeFreeze,
98
- p as activeWindowOf,
99
- b as activeWindowPatch,
106
+ p as PHONE_QUERY,
107
+ b as TABLET_QUERY,
108
+ $ as activeFreeze,
109
+ w as activeWindowOf,
110
+ O as activeWindowPatch,
100
111
  o as conditionsObject,
101
- l as conditionsWithKey,
102
- S as currentViewport,
103
- i as dayWords,
104
- y as freezeOf,
105
- O as freezePatch,
106
- $ as lazySectionPatch,
107
- d as lazySectionsOf,
108
- a as localDay,
109
- _ as phoneOf,
110
- w as phoneOfPatch,
111
- h as windowState,
112
- g as windowWords
112
+ u as conditionsWithKey,
113
+ A as currentViewport,
114
+ l as dayWords,
115
+ h as freezeOf,
116
+ S as freezePatch,
117
+ D as lazySectionPatch,
118
+ y as lazySectionsOf,
119
+ s as localDay,
120
+ d as phoneOf,
121
+ x as phoneOfPatch,
122
+ z as screenVersionOf,
123
+ m as tabletOf,
124
+ v as tabletOfPatch,
125
+ g as windowState,
126
+ _ as windowWords
113
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/react",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "description": "React hooks and components for Nivaro CMS forms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",