@atolis-hq/corum 0.1.55 → 0.1.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/corum",
3
- "version": "0.1.55",
3
+ "version": "0.1.56",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -160,6 +160,10 @@ function buildPropertyRows(entries, onNavigate, depth = 0, parentPath = '', prop
160
160
  });
161
161
  }
162
162
 
163
+ function TableScroll({ children, className = '' }) {
164
+ return <div className="table-scroll"><div className={className}>{children}</div></div>;
165
+ }
166
+
163
167
  function PropertiesTable({ properties, onNavigate, propertyHints = {} }) {
164
168
  const entries = Object.entries(properties ?? {});
165
169
  const rows = buildPropertyRows(entries, onNavigate, 0, '', propertyHints);
@@ -168,20 +172,22 @@ function PropertiesTable({ properties, onNavigate, propertyHints = {} }) {
168
172
  }
169
173
 
170
174
  return (
171
- <table className="prop-table">
172
- <tbody>
173
- {rows.map(row => (
174
- <tr key={row.key} className={`prop-row${row.depth > 0 ? ' nested' : ''}`}>
175
- <td className="mono prop-key-cell">
176
- <span className="prop-key-label" style={{ '--prop-depth': row.depth }}>
177
- {row.label}
178
- </span>
179
- </td>
180
- <td>{row.value}</td>
181
- </tr>
182
- ))}
183
- </tbody>
184
- </table>
175
+ <TableScroll>
176
+ <table className="prop-table">
177
+ <tbody>
178
+ {rows.map(row => (
179
+ <tr key={row.key} className={`prop-row${row.depth > 0 ? ' nested' : ''}`}>
180
+ <td className="mono prop-key-cell">
181
+ <span className="prop-key-label" style={{ '--prop-depth': row.depth }}>
182
+ {row.label}
183
+ </span>
184
+ </td>
185
+ <td>{row.value}</td>
186
+ </tr>
187
+ ))}
188
+ </tbody>
189
+ </table>
190
+ </TableScroll>
185
191
  );
186
192
  }
187
193
 
@@ -667,24 +673,26 @@ function SchemaCard({ title, nodes, allNodes, edges, anchorIdForNode, overlayFie
667
673
  </div>
668
674
  <div className="label-sm mono">{enumNode.id}</div>
669
675
  </div>
670
- <div className="enum-row enum-row-head">
671
- <div className="label-xs">Name</div>
672
- <div className="label-xs">Description</div>
673
- <div className="label-xs">Status</div>
674
- </div>
675
- {values.length === 0 ? (
676
- <div className="enum-row">
677
- <div className="label-sm">No values.</div>
678
- <div />
679
- <div />
680
- </div>
681
- ) : values.map(value => (
682
- <div key={value.id} className="enum-row">
683
- <div className="name">{enumValueDisplayName(value)}</div>
684
- <div className="description">{enumValueDescription(value)}</div>
685
- <div className="state"><StateTag state={value.state} /></div>
676
+ <TableScroll className="enum-table">
677
+ <div className="enum-row enum-row-head">
678
+ <div className="label-xs">Name</div>
679
+ <div className="label-xs">Description</div>
680
+ <div className="label-xs">Status</div>
686
681
  </div>
687
- ))}
682
+ {values.length === 0 ? (
683
+ <div className="enum-row">
684
+ <div className="label-sm">No values.</div>
685
+ <div />
686
+ <div />
687
+ </div>
688
+ ) : values.map(value => (
689
+ <div key={value.id} className="enum-row">
690
+ <div className="name">{enumValueDisplayName(value)}</div>
691
+ <div className="description">{enumValueDescription(value)}</div>
692
+ <div className="state"><StateTag state={value.state} /></div>
693
+ </div>
694
+ ))}
695
+ </TableScroll>
688
696
  </div>
689
697
  );
690
698
  })}
@@ -713,27 +721,29 @@ function SchemaCard({ title, nodes, allNodes, edges, anchorIdForNode, overlayFie
713
721
  <div className="label-sm mono">{schema.id}</div>
714
722
  </div>
715
723
  {ghostFields.length > 0 && <OverlayLegend overlayRefs={overlayRefs} />}
716
- <div className="field-row field-row-head">
717
- <div />
718
- <div className="label-xs">Name</div>
719
- <div className="label-xs">Type</div>
720
- <div className="label-xs">Collection</div>
721
- <div className="label-xs">Req</div>
722
- <div className="label-xs">State</div>
723
- <div className="label-xs">Links</div>
724
- </div>
725
- <SchemaFieldRows
726
- schemaNodeId={schema.id}
727
- model={model}
728
- visited={new Set()}
729
- edges={edges ?? []}
730
- overlayFields={overlayFields}
731
- overlayRefs={overlayRefs}
732
- compact={compact}
733
- />
734
- {ghostFields.length > 0 && (
735
- <GhostFieldRows fields={ghostFields} overlayRefs={overlayRefs} compact={compact} />
736
- )}
724
+ <TableScroll className="field-table">
725
+ <div className="field-row field-row-head">
726
+ <div />
727
+ <div className="label-xs">Name</div>
728
+ <div className="label-xs">Type</div>
729
+ <div className="label-xs">Collection</div>
730
+ <div className="label-xs">Req</div>
731
+ <div className="label-xs">State</div>
732
+ <div className="label-xs">Links</div>
733
+ </div>
734
+ <SchemaFieldRows
735
+ schemaNodeId={schema.id}
736
+ model={model}
737
+ visited={new Set()}
738
+ edges={edges ?? []}
739
+ overlayFields={overlayFields}
740
+ overlayRefs={overlayRefs}
741
+ compact={compact}
742
+ />
743
+ {ghostFields.length > 0 && (
744
+ <GhostFieldRows fields={ghostFields} overlayRefs={overlayRefs} compact={compact} />
745
+ )}
746
+ </TableScroll>
737
747
  </div>
738
748
  );
739
749
  })}
package/web/style.css CHANGED
@@ -328,6 +328,23 @@ button {
328
328
  color: #fff;
329
329
  }
330
330
 
331
+ .table-scroll {
332
+ max-width: 100%;
333
+ overflow-x: auto;
334
+ -webkit-overflow-scrolling: touch;
335
+ overscroll-behavior-x: contain;
336
+ scrollbar-width: none;
337
+ }
338
+
339
+ .table-scroll::-webkit-scrollbar {
340
+ display: none;
341
+ }
342
+
343
+ /* Minimum grid tracks plus gaps and padding; retain desktop column sizing. */
344
+ /* 724px of tracks + six 10px gaps + two 14px paddings. */
345
+ .field-table { min-width: 812px; }
346
+ .enum-table { min-width: 532px; }
347
+
331
348
  .prop-table {
332
349
  width: 100%;
333
350
  border-collapse: collapse;
@@ -1718,6 +1735,12 @@ button {
1718
1735
  }
1719
1736
 
1720
1737
  @media (max-width: 780px) {
1738
+ .branch-bar {
1739
+ height: auto;
1740
+ min-height: 38px;
1741
+ flex-wrap: wrap;
1742
+ padding-block: 6px;
1743
+ }
1721
1744
  #root {
1722
1745
  height: 100dvh;
1723
1746
  }