@stcn52/pro 0.2.0 → 0.2.1

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/styles.css CHANGED
@@ -1664,6 +1664,7 @@
1664
1664
 
1665
1665
  .pro-table tbody tr:hover td.pro-table__pick,
1666
1666
  .pro-table tbody tr.is-selected td.pro-table__pick,
1667
+ .pro-table tbody tr.is-cursor td.pro-table__pick,
1667
1668
  .pro-table tbody tr:active td.pro-table__pick {
1668
1669
  background: inherit;
1669
1670
  }
@@ -1739,7 +1740,8 @@
1739
1740
  box-shadow: inset 0 0 0 2px var(--accent);
1740
1741
  }
1741
1742
 
1742
- .pro-table tbody tr.is-selected {
1743
+ .pro-table tbody tr.is-selected,
1744
+ .pro-table tbody tr.is-cursor {
1743
1745
  background: var(--surface-table-row-selected);
1744
1746
  --pro-row-overlay: var(--surface-table-row-selected);
1745
1747
  }
@@ -1765,6 +1767,15 @@
1765
1767
  overflow: hidden;
1766
1768
  }
1767
1769
 
1770
+ .pro-table__cell--wrap {
1771
+ white-space: normal;
1772
+ overflow-wrap: anywhere;
1773
+ }
1774
+
1775
+ .pro-table__cell--wrap > span {
1776
+ min-width: 0;
1777
+ }
1778
+
1768
1779
  .pro-table thead .pro-table__cell {
1769
1780
  min-height: 43px;
1770
1781
  }
@@ -3368,9 +3379,9 @@
3368
3379
  .pro-table--compact .pro-table__actions-col {
3369
3380
  /* Reserved, not overlaid: a 36px row has no room to float commands over the
3370
3381
  * last data column. `pro-table__cell--actions` right-aligns them inside the
3371
- * 64px floor (a fixed layout hands the column any slack). */
3372
- width: 64px;
3373
- min-width: 64px;
3382
+ * 96px floor (a fixed layout hands the column any slack). */
3383
+ width: 96px;
3384
+ min-width: 96px;
3374
3385
  }
3375
3386
 
3376
3387
  /* ---- grouped grid -------------------------------------------------------- */
@@ -9016,8 +9027,7 @@ button.pro-scatter__point:disabled {
9016
9027
  }
9017
9028
 
9018
9029
  .pro-table tbody td:hover .pro-assignee-cell__assign,
9019
- .pro-assignee-cell:focus-within .pro-assignee-cell__assign,
9020
- .pro-assignee-cell.is-open .pro-assignee-cell__assign {
9030
+ .pro-table tbody td:focus-within .pro-assignee-cell__assign {
9021
9031
  opacity: 1;
9022
9032
  }
9023
9033
 
package/docs/api.md CHANGED
@@ -2692,6 +2692,21 @@ _Type._
2692
2692
 
2693
2693
  ## Ship surface
2694
2694
 
2695
+ <sub>`src/ship/AttachmentUpload.tsx`</sub>
2696
+
2697
+ ### `AttachmentUpload`
2698
+
2699
+ The detail sheet's attachment tool: a drop zone that also opens the file picker, a real per-file read with a progress bar, and the list of files already linked to this record with a confirmed unlink.
2700
+
2701
+ | Prop | Type | Notes |
2702
+ | ------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------ |
2703
+ | `currentUser` | `string` | The signed-in author — the host attributes the upload when it stores it. |
2704
+ | `entityId?` | `string` | Record identity: changing it cancels pending reads and resets attachment dialogs. |
2705
+ | `files` | `Array<{ relationId: string; file: Attachment }>` | Files already linked to the record, in the order the list should show them. |
2706
+ | `label?` | `string` | Rendered at the right of the drop zone header. |
2707
+ | `maxSizeMb?` | `number` | Hard limit per file; anything larger is refused before a byte is read. |
2708
+ | `onNotify?` | `Notify` | Raised for the two failures no callback can carry: a refused file and a broken read. |
2709
+
2695
2710
  <sub>`src/ship/Bits.tsx`</sub>
2696
2711
 
2697
2712
  ### `EntityKind`
@@ -368,7 +368,11 @@ onSelect }]`) renders boxes over the cell's right edge, revealed by the pointer
368
368
  Unfreeze itself, while Move / Insert / Remove rewrite the host's `columns` array
369
369
  and leave through `onColumnCommand`. The demo freezes `id`, which is how the
370
370
  product's grid opens: the checkbox column and the ID scroll together and the
371
- rest goes under them.
371
+ rest goes under them. Host-defined `column.fixed` remains host-owned: Unfreeze
372
+ forwards to `onColumnCommand`, and the host updates `columns` to remove it.
373
+ Without that callback the workbench locally unpins the column for this session.
374
+ Selected export requires every selected record to be present in `rows`; missing
375
+ records produce an error rather than an incomplete file.
372
376
  - **The keyboard cursor is the cell.** `cursor` makes the body one tab stop whose
373
377
  unit is the **cell** — ← → walk the columns, ↑ ↓ the rows, Home / End jump to
374
378
  the ends of the row, Enter opens the record, Space toggles its row's selection
@@ -721,7 +725,7 @@ host-managed through `selectedKeys`/`onSelectedKeysChange`.
721
725
  use `defaultExpandedRowKeys`, or control it with `expandedRowKeys` and
722
726
  `onExpandedRowKeysChange`.
723
727
 
724
- Columns support `hidden`, `ellipsis: false` for wrapping, and `onCell` for native
728
+ Columns support `hidden`, `ellipsis: false` for wrapping (disables fixed-height virtual scrolling), and `onCell` for native
725
729
  cell attributes. Use `rowSpan`/`colSpan` and a zero span on covered cells. Keep
726
730
  `onCell` pure: layout and cursor navigation both read it. Cursor navigation skips
727
731
  omitted cells and follows visible grouped rows in their rendered order.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stcn52/pro",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Klun Pro — PingCode/Ship visual restoration component library: design tokens, primitives and Ship business components with light/dark themes.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,6 +35,24 @@
35
35
  "./tokens.css": "./dist/tokens.css",
36
36
  "./package.json": "./package.json"
37
37
  },
38
+ "scripts": {
39
+ "build": "tsup && node scripts/build-styles.mjs",
40
+ "dev": "tsup --watch",
41
+ "storybook": "storybook dev -p 6006",
42
+ "build:storybook": "storybook build -o dist-storybook",
43
+ "typecheck": "tsc --noEmit",
44
+ "lint": "eslint .",
45
+ "format": "prettier --write .",
46
+ "format:check": "prettier --check .",
47
+ "gen:docs": "node scripts/gen-docs.mjs",
48
+ "release": "node scripts/release.mjs",
49
+ "test": "vitest run",
50
+ "test:watch": "vitest",
51
+ "verify": "node scripts/verify.mjs",
52
+ "gen:icons": "node scripts/gen-icons.mjs",
53
+ "build:styles": "node scripts/build-styles.mjs",
54
+ "prepublishOnly": "pnpm verify"
55
+ },
38
56
  "peerDependencies": {
39
57
  "react": ">=18",
40
58
  "react-dom": ">=18"
@@ -75,21 +93,5 @@
75
93
  "engines": {
76
94
  "node": ">=20"
77
95
  },
78
- "scripts": {
79
- "build": "tsup && node scripts/build-styles.mjs",
80
- "dev": "tsup --watch",
81
- "storybook": "storybook dev -p 6006",
82
- "build:storybook": "storybook build -o dist-storybook",
83
- "typecheck": "tsc --noEmit",
84
- "lint": "eslint .",
85
- "format": "prettier --write .",
86
- "format:check": "prettier --check .",
87
- "gen:docs": "node scripts/gen-docs.mjs",
88
- "release": "node scripts/release.mjs",
89
- "test": "vitest run",
90
- "test:watch": "vitest",
91
- "verify": "node scripts/verify.mjs",
92
- "gen:icons": "node scripts/gen-icons.mjs",
93
- "build:styles": "node scripts/build-styles.mjs"
94
- }
95
- }
96
+ "packageManager": "pnpm@11.7.0"
97
+ }