@ai-matrx/records 0.87.17 → 0.87.18
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/CHANGELOG.md +13 -1
- package/dist/core/index.cjs +12 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +12 -3
- package/dist/core/index.js.map +1 -1
- package/dist/data/index.cjs +7 -2
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.js +7 -2
- package/dist/data/index.js.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +12 -3
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +8 -1
- package/dist/react/index.d.ts +8 -1
- package/dist/react/index.js +12 -3
- package/dist/react/index.js.map +1 -1
- package/dist/typed-table/index.cjs +7 -2
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.js +7 -2
- package/dist/typed-table/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -17,6 +17,13 @@ declare function isAutonumberField(field: CoercibleField | null | undefined): bo
|
|
|
17
17
|
declare function autonumberPrefixOf(field: WithFormat | null | undefined): string;
|
|
18
18
|
/** A record number as a person reads it: its prefix and the number ("TASK-42"); null when there is none. */
|
|
19
19
|
declare function autonumberWords(field: WithFormat, value: unknown): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* A prefix as it stands before its number (walk 2026-10-08 D4): "TASK" reads "TASK-2", as the
|
|
22
|
+
* Prefix box's own placeholder promises; a prefix that already ends in a separator ("TASK-",
|
|
23
|
+
* "INV #", "PO/") is kept as typed. The same rule as the grid's `autonumber` format
|
|
24
|
+
* (@ai-matrx/design-system field-formats), so a card, a copy and a cell never disagree.
|
|
25
|
+
*/
|
|
26
|
+
declare function autonumberJoin(prefix: string): string;
|
|
20
27
|
/**
|
|
21
28
|
* A SEARCH FOR A RECORD NUMBER BY ITS WORDS. "TASK-42", "task-42" or "TASK 42" names record 42 of the record
|
|
22
29
|
* number whose prefix is "TASK-": the store keeps 42, so the words are turned into that column's number.
|
|
@@ -414,4 +421,4 @@ declare function forgetAllOps(): void;
|
|
|
414
421
|
/** Test seam: how many operations are currently remembered. */
|
|
415
422
|
declare function rememberedOpCount(): number;
|
|
416
423
|
|
|
417
|
-
export { CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, type ResolutionTriple, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, autonumberPrefixOf, autonumberSearchOf, autonumberWords, filterWithAutonumber, forgetAllOps, indexedDbStore, isAutonumberField, isDecided, isOwnOp, localeDateOrder, memoryStore, mintClientKey, mintOpId, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, rememberedOpCount, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
|
424
|
+
export { CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, type ResolutionTriple, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, filterWithAutonumber, forgetAllOps, indexedDbStore, isAutonumberField, isDecided, isOwnOp, localeDateOrder, memoryStore, mintClientKey, mintOpId, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, rememberedOpCount, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ declare function isAutonumberField(field: CoercibleField | null | undefined): bo
|
|
|
17
17
|
declare function autonumberPrefixOf(field: WithFormat | null | undefined): string;
|
|
18
18
|
/** A record number as a person reads it: its prefix and the number ("TASK-42"); null when there is none. */
|
|
19
19
|
declare function autonumberWords(field: WithFormat, value: unknown): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* A prefix as it stands before its number (walk 2026-10-08 D4): "TASK" reads "TASK-2", as the
|
|
22
|
+
* Prefix box's own placeholder promises; a prefix that already ends in a separator ("TASK-",
|
|
23
|
+
* "INV #", "PO/") is kept as typed. The same rule as the grid's `autonumber` format
|
|
24
|
+
* (@ai-matrx/design-system field-formats), so a card, a copy and a cell never disagree.
|
|
25
|
+
*/
|
|
26
|
+
declare function autonumberJoin(prefix: string): string;
|
|
20
27
|
/**
|
|
21
28
|
* A SEARCH FOR A RECORD NUMBER BY ITS WORDS. "TASK-42", "task-42" or "TASK 42" names record 42 of the record
|
|
22
29
|
* number whose prefix is "TASK-": the store keeps 42, so the words are turned into that column's number.
|
|
@@ -414,4 +421,4 @@ declare function forgetAllOps(): void;
|
|
|
414
421
|
/** Test seam: how many operations are currently remembered. */
|
|
415
422
|
declare function rememberedOpCount(): number;
|
|
416
423
|
|
|
417
|
-
export { CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, type ResolutionTriple, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, autonumberPrefixOf, autonumberSearchOf, autonumberWords, filterWithAutonumber, forgetAllOps, indexedDbStore, isAutonumberField, isDecided, isOwnOp, localeDateOrder, memoryStore, mintClientKey, mintOpId, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, rememberedOpCount, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
|
424
|
+
export { CaptureFileRef, CaptureOutcome, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSyncReport, CoercibleField, Delivery, Freshness, type MergeField, MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, MergeFieldSemanticType, MergeFieldSource, type MergeFieldTransform, type MissingBehavior, OverridePolicy, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, REFUSALS_WORTH_REPEATING, type ResolutionTriple, Timestamp, type TypedDate, type TypedMatchScore, type TypedNumber, type TypedTime, Uuid, autonumberJoin, autonumberPrefixOf, autonumberSearchOf, autonumberWords, filterWithAutonumber, forgetAllOps, indexedDbStore, isAutonumberField, isDecided, isOwnOp, localeDateOrder, memoryStore, mintClientKey, mintOpId, openCaptureQueue, rankTypedMatches, readTypedDate, readTypedNumber, readTypedTime, rememberedOpCount, twoDigitYear, typedDateText, typedMatchScore, typedTimeText };
|
package/dist/index.js
CHANGED
|
@@ -1154,7 +1154,10 @@ function autonumberPrefixOf(field) {
|
|
|
1154
1154
|
function autonumberWords(field, value) {
|
|
1155
1155
|
const n = typeof value === "number" ? value : typeof value === "string" && /^\d+$/.test(value.trim()) ? Number(value) : NaN;
|
|
1156
1156
|
if (!Number.isFinite(n)) return null;
|
|
1157
|
-
return `${autonumberPrefixOf(field)}${Math.trunc(n)}`;
|
|
1157
|
+
return `${autonumberJoin(autonumberPrefixOf(field))}${Math.trunc(n)}`;
|
|
1158
|
+
}
|
|
1159
|
+
function autonumberJoin(prefix) {
|
|
1160
|
+
return prefix === "" || /[-_#.:/\s]$/.test(prefix) ? prefix : `${prefix}-`;
|
|
1158
1161
|
}
|
|
1159
1162
|
function autonumberSearchOf(fields, words) {
|
|
1160
1163
|
const text = words.trim();
|
|
@@ -5042,6 +5045,7 @@ export {
|
|
|
5042
5045
|
asChoiceNudge,
|
|
5043
5046
|
asPermissionLevel,
|
|
5044
5047
|
atLeast,
|
|
5048
|
+
autonumberJoin,
|
|
5045
5049
|
autonumberPrefixOf,
|
|
5046
5050
|
autonumberSearchOf,
|
|
5047
5051
|
autonumberWords,
|