buckyos 0.7.183 → 0.7.184

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.
@@ -31521,7 +31521,7 @@ function newId(label, prefix) {
31521
31521
  }
31522
31522
  function fieldAdd(table, def, opts = {}) {
31523
31523
  const fields = fieldsOf(table);
31524
- const { options, field_id, ...rest } = def;
31524
+ const { options, field_id, default: fallback, ...rest } = def;
31525
31525
  const field = { field_id: field_id ?? newId(def.name, "f"), ...rest };
31526
31526
  if (options) {
31527
31527
  const used = /* @__PURE__ */ new Set();
@@ -31536,6 +31536,8 @@ function fieldAdd(table, def, opts = {}) {
31536
31536
  }
31537
31537
  const last = fields.map((f2) => f2.order_key).filter((k) => typeof k === "string" && k.length > 0).sort().pop();
31538
31538
  const op = { op: "table.add_field", source_id: table.entity_id, field, ...last ? { order_key: orderKeyBetween(last, null) } : {} };
31539
+ if (fallback !== void 0 && fallback !== null)
31540
+ field.default = cellValue(field, fallback);
31539
31541
  if (opts.backfill !== void 0)
31540
31542
  op.backfill = cellValue(field, opts.backfill);
31541
31543
  return op;
@@ -32266,4 +32268,4 @@ export {
32266
32268
  NOTIFY_CHOICE_CONTROL_ID as y,
32267
32269
  NOTIFY_TEXT_CONTROL_ID as z
32268
32270
  };
32269
- //# sourceMappingURL=aiws_write-c2de498e.mjs.map
32271
+ //# sourceMappingURL=aiws_write-ed4f0ec4.mjs.map