@synopackageland/ui 0.20.6 → 0.20.7

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 (43) hide show
  1. package/CHANGELOG.md +14 -4
  2. package/LICENSES/source-notices.md +110 -0
  3. package/README.md +1 -1
  4. package/dist/components/composite/form/FormItem.vue.d.ts +1 -1
  5. package/dist/components/composite/record-panel/recordPanelWidth.d.ts +4 -25
  6. package/dist/components/primitives/context-menu/ContextMenu.vue.d.ts +2 -2
  7. package/dist/composables/collisionBoundary.d.ts +7 -1
  8. package/dist/composables/elementWidth.d.ts +8 -2
  9. package/dist/dnd/autoScroll.d.ts +3 -22
  10. package/dist/dnd/dragKit.d.ts +1 -1
  11. package/dist/grid/cells/number.d.ts +1 -1
  12. package/dist/grid/cells/types.d.ts +1 -1
  13. package/dist/grid/clipboard/tsv.d.ts +1 -2
  14. package/dist/grid/contracts.d.ts +1 -1
  15. package/dist/grid/focus/editor-style.d.ts +1 -1
  16. package/dist/grid/host/controller.d.ts +11 -11
  17. package/dist/grid/range/block.d.ts +1 -1
  18. package/dist/grid-core/auto-scroll.d.ts +7 -7
  19. package/dist/grid-core/column-resize.d.ts +1 -1
  20. package/dist/grid-core/config.d.ts +1 -1
  21. package/dist/grid-core/keys.d.ts +2 -2
  22. package/dist/grid-core/renderer/layout.d.ts +1 -1
  23. package/dist/grid-core/selection-controller.d.ts +2 -2
  24. package/dist/grid-core/theme.d.ts +5 -5
  25. package/dist/grid.js +13 -13
  26. package/dist/index.js +10053 -10034
  27. package/dist/interaction/ime.d.ts +3 -22
  28. package/dist/json-preview/preview.js +8206 -8192
  29. package/dist/lib/adaptiveLayout.d.ts +7 -0
  30. package/dist/lib/fieldWidth.d.ts +2 -2
  31. package/dist/reka-runtime.json +1 -1
  32. package/dist/theme.css +1 -1
  33. package/dist/themes/dsm7-embedded-theme.css +1 -1
  34. package/dist/themes/dsm7-embedded.css +1 -1
  35. package/dist/themes/dsm7.css +1 -1
  36. package/docs/layout-rules.md +1 -1
  37. package/docs/mobile-native.md +2 -2
  38. package/docs/ux-grid.md +6 -8
  39. package/package.json +1 -90
  40. package/LICENSES/ux-foundation.md +0 -83
  41. package/LICENSES/ux-grid-baserow.md +0 -35
  42. package/LICENSES/ux-grid-teable.md +0 -48
  43. package/docs/ux-foundation.md +0 -133
package/dist/grid.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @synopackageland/ui/grid includes code ported from Teable packages/sdk (MIT, Copyright (c) 2023-2025 Teable, Inc.) and Baserow (MIT, Copyright (c) 2019-present Baserow B.V.); see LICENSES/ux-grid-teable.md and LICENSES/ux-grid-baserow.md */
1
+ /*! @synopackageland/ui/grid: MIT, Copyright (c) 2023-2025 Teable, Inc. and Copyright (c) 2019-present Baserow B.V. in parts; see LICENSES/source-notices.md */
2
2
  import { watch as ue, toValue as eo, getCurrentScope as qo, onScopeDispose as to, shallowRef as ce, defineComponent as Xo, useId as Yo, ref as xe, computed as _, onMounted as jo, onBeforeUnmount as Qo, openBlock as pe, createElementBlock as Ce, unref as J, createElementVNode as ee, toDisplayString as we, normalizeStyle as Be, Fragment as Zo, renderList as Jo, createCommentVNode as Oe, renderSlot as hn, createTextVNode as ei, inject as ti } from "vue";
3
3
  import { useUiText as ni } from "./index.js";
4
4
  var H = /* @__PURE__ */ ((e) => (e.Rows = "Rows", e.Columns = "Columns", e.Cells = "Cells", e.None = "None", e))(H || {}), x = /* @__PURE__ */ ((e) => (e.Cell = "Cell", e.ActiveCell = "ActiveCell", e.AppendRow = "AppendRow", e.AppendColumn = "AppendColumn", e.ColumnHeader = "ColumnHeader", e.ColumnHeaderMenu = "ColumnHeaderMenu", e.ColumnPrimaryIcon = "ColumnPrimaryIcon", e.ColumnDescription = "ColumnDescription", e.ColumnResizeHandler = "ColumnResizeHandler", e.ColumnFreezeHandler = "ColumnFreezeHandler", e.RowHeaderDragHandler = "RowHeaderDragHandler", e.RowHeaderExpandHandler = "RowHeaderExpandHandler", e.RowHeaderCheckbox = "RowHeaderCheckbox", e.RowGroupControl = "RowGroupControl", e.RowGroupHeader = "RowGroupHeader", e.RowHeader = "RowHeader", e.AllCheckbox = "AllCheckbox", e.FillHandler = "FillHandler", e.Blank = "Blank", e.None = "None", e))(x || {}), O = /* @__PURE__ */ ((e) => (e.Rows = "Rows", e.Columns = "Columns", e.None = "None", e))(O || {}), X = /* @__PURE__ */ ((e) => (e.Spacer = "Spacer", e.Drag = "Drag", e.Expand = "Expand", e.Checkbox = "Checkbox", e))(X || {}), de = /* @__PURE__ */ ((e) => (e.All = "all", e.None = "none", e.Column = "column", e.Row = "row", e))(de || {}), $ = /* @__PURE__ */ ((e) => (e.All = "all", e.None = "none", e.Column = "column", e.Row = "row", e.Cell = "cell", e))($ || {}), se = /* @__PURE__ */ ((e) => (e[e.Group = 0] = "Group", e[e.Row = 1] = "Row", e[e.Append = 2] = "Append", e))(se || {});
@@ -18,7 +18,7 @@ const B = {
18
18
  columnResizeHandlerPaddingTop: 4,
19
19
  columnFreezeHandlerWidth: 8,
20
20
  columnFreezeHandlerHeight: 30,
21
- /** Teable's hard-coded minimum while resizing. */
21
+ /** The minimum while resizing. */
22
22
  columnMinWidth: 100,
23
23
  cellHorizontalPadding: 8,
24
24
  cellVerticalPaddingMD: 10,
@@ -936,7 +936,7 @@ const ma = ({ isEditing: e, eventTarget: t, hiddenFocusEl: n }) => {
936
936
  if (o && n?.write) {
937
937
  const a = new o({
938
938
  "text/plain": e.then(({ text: s }) => new Blob([s], { type: "text/plain" })),
939
- // Baserow passes null for no HTML; an empty table keeps the blob type valid in every browser.
939
+ // Null means no HTML; an empty table keeps the blob type valid in every browser.
940
940
  "text/html": e.then(({ text: s, html: r }) => new Blob([r ?? Ra(s)], { type: "text/html" }))
941
941
  });
942
942
  return n.write([a]);
@@ -2279,7 +2279,7 @@ class Rs {
2279
2279
  /**
2280
2280
  * Touch on a grid no wider than 640 px. There a tap opens the record (the
2281
2281
  * cell and its editor cannot fit beside the keyboard), the row header shows
2282
- * numbers only and no column is frozen: Teable's phone grid.
2282
+ * numbers only and no column is frozen.
2283
2283
  */
2284
2284
  get isPhone() {
2285
2285
  return !!this.config.touch && this.width > 0 && this.width <= Ss;
@@ -2315,7 +2315,7 @@ class Rs {
2315
2315
  }
2316
2316
  /**
2317
2317
  * Frozen columns that fit: the scrolling part keeps at least 240 px, so on a
2318
- * phone a wide first column stops freezing (Teable's getMaxFreezeColumnCount).
2318
+ * phone a wide first column stops freezing.
2319
2319
  */
2320
2320
  freezeCount(t) {
2321
2321
  const { columns: n } = this.config, o = Math.min(t, n.length);
@@ -2398,7 +2398,7 @@ class Rs {
2398
2398
  height: this.coord.getRowHeight(o)
2399
2399
  };
2400
2400
  }
2401
- /** Minimal scroll that shows the cell with Teable's 16 px buffer; instant. */
2401
+ /** Minimal scroll that shows the cell with a 16 px buffer; instant. */
2402
2402
  scrollToCell(t) {
2403
2403
  const [n, o] = t, { coord: i } = this, a = B.cellScrollBuffer;
2404
2404
  let { scrollLeft: s, scrollTop: r } = this.scroll;
@@ -2434,7 +2434,7 @@ class Rs {
2434
2434
  get isFillEnabled() {
2435
2435
  return !!this.config.fillable && !this.config.readonly && this.config.selectable !== "none" && !this.config.touch;
2436
2436
  }
2437
- /** No resize handle on touch: a 5 px edge is no finger target (Teable has none on touch either). */
2437
+ /** No resize handle on touch: a 5 px edge is no finger target. */
2438
2438
  get isResizeEnabled() {
2439
2439
  return this.config.columnResizable && !this.config.touch;
2440
2440
  }
@@ -2579,11 +2579,11 @@ class Rs {
2579
2579
  * The tapped row or header keeps a pressed tint until `clearTapFeedback`.
2580
2580
  *
2581
2581
  * - A cell on a phone (`isPhone`): selects it and opens the record
2582
- * (`rowExpand` with the column), as Teable's touch grid.
2582
+ * (`rowExpand` with the column).
2583
2583
  * - A cell on a wider touch screen: the first tap selects it, a second tap
2584
2584
  * on the selected cell asks for an edit (`tap` trigger).
2585
- * - A header with a menu opens the menu, as in Teable's touch layer (the
2586
- * 16 px chevron is no finger target); without one it selects the column.
2585
+ * - A header with a menu opens the menu (the 16 px chevron is no finger
2586
+ * target); without one it selects the column.
2587
2587
  * - The row header is one target: on a phone it opens the record; wider, it
2588
2588
  * expands the row with the `expand` control, else toggles the checkbox.
2589
2589
  *
@@ -2648,7 +2648,7 @@ class Rs {
2648
2648
  }
2649
2649
  /**
2650
2650
  * After an edit of `cell` commits: Enter moves down, Tab right, Shift+Tab
2651
- * left (Teable's enterCommitSelection / tabSelection), from the edited cell.
2651
+ * left, from the edited cell.
2652
2652
  */
2653
2653
  moveAfterEdit(t, n) {
2654
2654
  const { rowCount: o, columns: i } = this.config;
@@ -3619,7 +3619,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
3619
3619
  });
3620
3620
  },
3621
3621
  describe: (e, { labels: t }) => e.value ? t.checked : t.unchecked,
3622
- // Teable hit-tests the icon box exactly; ours adds 4 px around it (a 24 px target at 16 px).
3622
+ // The icon box is hit exactly, plus 4 px around it (a 24 px target at 16 px).
3623
3623
  hitTest: (e, { point: t, size: n, metrics: o }) => {
3624
3624
  if (e.readonly) return null;
3625
3625
  const i = Xn(n.width, n.height, o), a = { x: i.x - 4, y: Math.max(0, i.y - 4), width: i.width + 8, height: Math.min(n.height, i.height + 8) };
@@ -3634,7 +3634,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
3634
3634
  er(e, c, s, a, n.value > l ? i.ratingOn : i.ratingOff), c += a + At;
3635
3635
  },
3636
3636
  describe: (e, { labels: t }) => e.value > 0 ? yo(t.rating, { value: e.value, max: st(e) }) : "",
3637
- // Click the n-th star: value n; click the current value again: clear (Teable).
3637
+ // Click the n-th star: value n; click the current value again: clear.
3638
3638
  hitTest: (e, { point: t, size: n, metrics: o }) => {
3639
3639
  if (e.readonly) return null;
3640
3640
  const i = o.icon + At, a = st(e), s = { x: o.padding, y: Math.max(0, n.height / 2 - o.icon), width: a * i, height: Math.min(n.height, 2 * o.icon) };