@ai-matrx/records-ui 0.116.71 → 0.116.73

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.
@@ -2400,6 +2400,10 @@ function tableNameFromFile(fileName) {
2400
2400
  import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2401
2401
  var NEW_TABLE = "__new__";
2402
2402
  var PREVIEW_ROWS = 6;
2403
+ function importTitleField(headers) {
2404
+ const label = headers[0]?.trim() || "Title";
2405
+ return { key: "title", label, type: "text", sort: 10, required: false };
2406
+ }
2403
2407
  function NewTableStart({
2404
2408
  templatesHref,
2405
2409
  describeHref,
@@ -2517,7 +2521,7 @@ function NewTableStart({
2517
2521
  const trimmed = importName.trim();
2518
2522
  setBusy(true);
2519
2523
  setError(null);
2520
- const result = await declareTable(client, { name: trimmed, slug: tokenFor(trimmed) });
2524
+ const result = await declareTable(client, { name: trimmed, slug: tokenFor(trimmed), fields: [importTitleField(parsed.headers)] });
2521
2525
  setBusy(false);
2522
2526
  if (!result.ok) {
2523
2527
  setError(result.error);
@@ -5094,4 +5098,4 @@ export {
5094
5098
  shapesOfSource,
5095
5099
  SaveToTable
5096
5100
  };
5097
- //# sourceMappingURL=chunk-DWYBPID4.js.map
5101
+ //# sourceMappingURL=chunk-XLHEYH5J.js.map