@ai-matrx/records-ui 0.116.109 → 0.116.111

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 (33) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/dist/{SaveToTable-WZ4BELUI.js → SaveToTable-PDRY5OXB.js} +4 -4
  3. package/dist/{chunk-TABDUUEC.js → chunk-266JKBAS.js} +16 -3
  4. package/dist/chunk-266JKBAS.js.map +1 -0
  5. package/dist/{chunk-T7SXM6ZL.js → chunk-FD4GYJX6.js} +3 -3
  6. package/dist/{chunk-NS2VEKMS.js → chunk-FZVW6XVB.js} +2 -2
  7. package/dist/{chunk-TZ2KUSHH.js → chunk-HTZPVHDG.js} +26 -5
  8. package/dist/chunk-HTZPVHDG.js.map +1 -0
  9. package/dist/{chunk-K7OX6RG6.js → chunk-JTEIYLII.js} +3 -1
  10. package/dist/chunk-JTEIYLII.js.map +1 -0
  11. package/dist/{chunk-D7LNXDKV.js → chunk-Z3EUU2NM.js} +2 -2
  12. package/dist/helpers.cjs +17 -2
  13. package/dist/helpers.cjs.map +1 -1
  14. package/dist/helpers.js +17 -2
  15. package/dist/helpers.js.map +1 -1
  16. package/dist/index.cjs +414 -349
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +7 -2
  19. package/dist/index.d.ts +7 -2
  20. package/dist/index.js +221 -191
  21. package/dist/index.js.map +1 -1
  22. package/dist/pickers.cjs +195 -160
  23. package/dist/pickers.cjs.map +1 -1
  24. package/dist/pickers.js +4 -4
  25. package/dist/skeleton.js +3 -3
  26. package/package.json +2 -2
  27. package/dist/chunk-K7OX6RG6.js.map +0 -1
  28. package/dist/chunk-TABDUUEC.js.map +0 -1
  29. package/dist/chunk-TZ2KUSHH.js.map +0 -1
  30. /package/dist/{SaveToTable-WZ4BELUI.js.map → SaveToTable-PDRY5OXB.js.map} +0 -0
  31. /package/dist/{chunk-T7SXM6ZL.js.map → chunk-FD4GYJX6.js.map} +0 -0
  32. /package/dist/{chunk-NS2VEKMS.js.map → chunk-FZVW6XVB.js.map} +0 -0
  33. /package/dist/{chunk-D7LNXDKV.js.map → chunk-Z3EUU2NM.js.map} +0 -0
package/dist/helpers.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { globalSlot } from '@ai-matrx/kit/global-slot';
2
2
  import { tableStyleIsEmpty, parseTableStyle, setColorRuleTimeZone, setDisplayTimeZone } from '@ai-matrx/design-system/data-table/table-style';
3
+ import { setReadersTimeZone } from '@ai-matrx/records';
3
4
  import { DECLARABLE_FIELD_KINDS, NEWER_FIELD_KINDS, PARITY_FIELD_TYPES, KERNEL_TABLES, atLeast, fieldKindFor, isButtonField, newerKindOf } from '@ai-matrx/records/field-kinds';
4
5
  export { DEFAULT_FIELDS, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/field-kinds';
5
6
  import { isUuidShape } from '@ai-matrx/kit/uuid';
@@ -89,6 +90,7 @@ function setPersonTimeZone(next) {
89
90
  state.zone = clean;
90
91
  setColorRuleTimeZone(clean);
91
92
  setDisplayTimeZone(clean);
93
+ setReadersTimeZone(clean);
92
94
  state.listeners.forEach((l) => l());
93
95
  }
94
96
  function getPersonTimeZone() {
@@ -1045,11 +1047,21 @@ function peopleSentence(message) {
1045
1047
  function refusalSentence(error) {
1046
1048
  return refusalForAPerson(error).sentence;
1047
1049
  }
1050
+ var BUILD_LABEL = String.raw`(?:Test \d+ \([^)]{1,40}\)|[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+|[A-Z]{1,5}\d+[a-z]?)`;
1051
+ var LEADING_BUILD_LABEL = new RegExp(String.raw`^${BUILD_LABEL}(?:\s*\/\s*${BUILD_LABEL})*:\s+`);
1052
+ function withoutBuildLabel(sentence) {
1053
+ const hit = LEADING_BUILD_LABEL.exec(sentence);
1054
+ if (!hit) return { label: null, rest: sentence };
1055
+ const rest = sentence.slice(hit[0].length).trim();
1056
+ return { label: hit[0].trim(), rest: rest.charAt(0).toUpperCase() + rest.slice(1) };
1057
+ }
1048
1058
  function plainSentence(message) {
1049
1059
  const dropped = [];
1050
1060
  const kept = [];
1051
1061
  for (const raw of message.split(/(?<=[.!?])\s+/)) {
1052
- const sentence = raw.trim();
1062
+ const labelled = withoutBuildLabel(raw.trim());
1063
+ if (labelled.label) dropped.push(labelled.label);
1064
+ const sentence = labelled.rest;
1053
1065
  if (sentence === "") continue;
1054
1066
  const cleaned = withoutMachineClauses(sentence);
1055
1067
  dropped.push(...cleaned.dropped);
@@ -1057,6 +1069,9 @@ function plainSentence(message) {
1057
1069
  }
1058
1070
  return { kept: kept.length === 0 ? null : kept.join(" "), dropped };
1059
1071
  }
1072
+ function readsAsASentence(text) {
1073
+ return (text ?? "").trim().split(/\s+/).filter(Boolean).length >= 2;
1074
+ }
1060
1075
  function exampleOf(error) {
1061
1076
  const detail = error.detail;
1062
1077
  if (!detail || typeof detail !== "object") return null;
@@ -1073,7 +1088,7 @@ function refusalForAPerson(error) {
1073
1088
  const title = timedOut ? TITLE["timed_out"] : TITLE[code] ?? "That was refused";
1074
1089
  const hintIsForEngineers = isDeveloperHint(String(error.hint ?? ""));
1075
1090
  const example = exampleOf(error);
1076
- const remedy = (example ? `Enter it like ${example}.` : null) ?? (hintIsForEngineers ? null : hint.kept) ?? (timedOut ? REMEDY["timed_out"] : REMEDY[code]) ?? REMEDY["internal"];
1091
+ const remedy = (example ? `Enter it like ${example}.` : null) ?? (hintIsForEngineers || !readsAsASentence(hint.kept) ? null : hint.kept) ?? (timedOut ? REMEDY["timed_out"] : REMEDY[code]) ?? REMEDY["internal"];
1077
1092
  const messageIsForEngineers = isEngineerText(String(error.message ?? ""));
1078
1093
  const said = timedOut ? TIMED_OUT_SAID : (messageIsForEngineers ? "" : message.kept ?? "").trim();
1079
1094
  const forEngineers = [