@stndrds/schema 1.0.0-alpha.285 → 1.0.0-alpha.287

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/dist/{all-bG_ha0VV.d.mts → all-DaucFjyz.d.mts} +1 -1
  2. package/dist/{all-DanoPxKr.d.ts → all-FGIrc6mI.d.ts} +1 -1
  3. package/dist/{chunk-V26R64A4.js → chunk-3YCZ5H3H.js} +1 -1
  4. package/dist/{chunk-BOICAZHR.js → chunk-5JMQNH2A.js} +4 -4
  5. package/dist/{chunk-RUO25ERR.mjs → chunk-7WEOBXXA.mjs} +1 -1
  6. package/dist/{chunk-R57T4UDX.mjs → chunk-JSQCTLV5.mjs} +1 -1
  7. package/dist/{chunk-YZ5RCMIQ.js → chunk-K7XGY34S.js} +36 -36
  8. package/dist/{chunk-PNOWKRH2.mjs → chunk-KLDZHAGX.mjs} +1 -1
  9. package/dist/{chunk-I3EYILYO.js → chunk-RDYTVHNN.js} +4 -4
  10. package/dist/{chunk-AGRAFDGU.mjs → chunk-RMJ75YLQ.mjs} +2 -2
  11. package/dist/{chunk-5OBQRDRM.mjs → chunk-UW3BOSB6.mjs} +1 -1
  12. package/dist/{chunk-K6ET4CXP.js → chunk-ZHB4VBCX.js} +3 -3
  13. package/dist/exceptions.js +39 -39
  14. package/dist/exceptions.mjs +1 -1
  15. package/dist/{index-Ns6KGfrZ.d.ts → index-0VG9u1XW.d.ts} +12 -0
  16. package/dist/{index-Ca-MzQuU.d.mts → index-Eh1tYq3i.d.mts} +12 -0
  17. package/dist/index.d.mts +68 -63
  18. package/dist/index.d.ts +68 -63
  19. package/dist/index.js +316 -346
  20. package/dist/index.mjs +47 -73
  21. package/dist/utils.js +8 -8
  22. package/dist/utils.mjs +2 -2
  23. package/dist/validation/all.d.mts +2 -2
  24. package/dist/validation/all.d.ts +2 -2
  25. package/dist/validation/all.js +29 -29
  26. package/dist/validation/all.mjs +4 -4
  27. package/dist/validation/config/index.d.mts +1 -1
  28. package/dist/validation/config/index.d.ts +1 -1
  29. package/dist/validation/config/index.js +12 -12
  30. package/dist/validation/config/index.mjs +2 -2
  31. package/dist/validation/object/index.js +14 -14
  32. package/dist/validation/object/index.mjs +2 -2
  33. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import './types-CVYiFc69.mjs';
2
2
  import './validation/core/index.mjs';
3
- import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-Ca-MzQuU.mjs';
3
+ import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-Eh1tYq3i.mjs';
4
4
  import { z } from 'zod';
5
5
  import './helpers-Dul_r9rJ.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import './types-NGEww_ln.js';
2
2
  import './validation/core/index.js';
3
- import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-Ns6KGfrZ.js';
3
+ import { D as DetailViewConfig, L as ListViewConfig, V as ViewType, a as ViewConfig } from './index-0VG9u1XW.js';
4
4
  import { z } from 'zod';
5
5
  import './helpers-CXkVwpsl.js';
6
6
 
@@ -474,7 +474,7 @@ var AccessDeniedError = class extends SchemaError {
474
474
  var RepositoryError = class extends SchemaError {
475
475
  constructor(operation, entity, message, cause) {
476
476
  const code = operation === "create" ? SchemaErrorCode.REPOSITORY_CREATE_FAILED : operation === "update" ? SchemaErrorCode.REPOSITORY_UPDATE_FAILED : operation === "delete" ? SchemaErrorCode.REPOSITORY_DELETE_FAILED : SchemaErrorCode.REPOSITORY_QUERY_FAILED;
477
- super(`Failed to ${operation} ${entity}: ${message}`, code, {
477
+ super(`Failed to ${operation} ${entity}: ${message}${cause ? ` (${cause})` : ""}`, code, {
478
478
  operation,
479
479
  entity,
480
480
  cause
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkV26R64A4_js = require('./chunk-V26R64A4.js');
3
+ var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
4
4
  var zod = require('zod');
5
5
  var constants = require('@stndrds/constants');
6
6
 
@@ -551,7 +551,7 @@ var attributeConfigSchemas = {
551
551
  function getAttributeConfigSchema(type) {
552
552
  const schema = attributeConfigSchemas[type];
553
553
  if (!schema) {
554
- throw new chunkV26R64A4_js.ValidationError(`Unsupported attribute type: ${type}`, []);
554
+ throw new chunk3YCZ5H3H_js.ValidationError(`Unsupported attribute type: ${type}`, []);
555
555
  }
556
556
  return schema;
557
557
  }
@@ -575,7 +575,7 @@ function getAttributeConfigWriteSchema(type) {
575
575
  }
576
576
  }
577
577
  function validationErrorFromIssues(issues) {
578
- return chunkV26R64A4_js.ValidationError.fromZodErrors(
578
+ return chunk3YCZ5H3H_js.ValidationError.fromZodErrors(
579
579
  issues.map((issue) => ({
580
580
  path: issue.path.map((segment) => typeof segment === "symbol" ? String(segment) : segment),
581
581
  message: issue.message
@@ -598,7 +598,7 @@ function validatePatchedIcon(patch) {
598
598
  }
599
599
  const result = iconNameSchema.optional().safeParse(patch.icon);
600
600
  if (!result.success) {
601
- throw chunkV26R64A4_js.ValidationError.fromZodErrors(
601
+ throw chunk3YCZ5H3H_js.ValidationError.fromZodErrors(
602
602
  result.error.issues.map((issue) => ({
603
603
  path: [
604
604
  "icon",
@@ -472,7 +472,7 @@ var AccessDeniedError = class extends SchemaError {
472
472
  var RepositoryError = class extends SchemaError {
473
473
  constructor(operation, entity, message, cause) {
474
474
  const code = operation === "create" ? SchemaErrorCode.REPOSITORY_CREATE_FAILED : operation === "update" ? SchemaErrorCode.REPOSITORY_UPDATE_FAILED : operation === "delete" ? SchemaErrorCode.REPOSITORY_DELETE_FAILED : SchemaErrorCode.REPOSITORY_QUERY_FAILED;
475
- super(`Failed to ${operation} ${entity}: ${message}`, code, {
475
+ super(`Failed to ${operation} ${entity}: ${message}${cause ? ` (${cause})` : ""}`, code, {
476
476
  operation,
477
477
  entity,
478
478
  cause
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './chunk-RUO25ERR.mjs';
1
+ import { ValidationError } from './chunk-7WEOBXXA.mjs';
2
2
 
3
3
  // src/utils/canonical-json.ts
4
4
  function canonicalStringify(value) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkBOICAZHR_js = require('./chunk-BOICAZHR.js');
4
- var chunkV26R64A4_js = require('./chunk-V26R64A4.js');
3
+ var chunk5JMQNH2A_js = require('./chunk-5JMQNH2A.js');
4
+ var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  // src/types/system-attributes.ts
@@ -500,7 +500,7 @@ function canonicalizeFilterValue(rule, effectiveType) {
500
500
  const message = `Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(
501
501
  value
502
502
  )}`;
503
- throw new chunkV26R64A4_js.ValidationError(message, [{ path: ["value"], message }]);
503
+ throw new chunk3YCZ5H3H_js.ValidationError(message, [{ path: ["value"], message }]);
504
504
  }
505
505
  function hasCurrencyAmount(value) {
506
506
  if (typeof value !== "object") return true;
@@ -661,13 +661,13 @@ function resolveCanonicalOperator(rawOperator, effectiveType) {
661
661
  const replacement = REMOVED_OPERATOR_REPLACEMENTS[rawOperator];
662
662
  if (replacement) {
663
663
  const m = `Unknown filter operator "${rawOperator}" \u2014 use ${replacement}`;
664
- throw new chunkV26R64A4_js.ValidationError(m, [{ path: ["operator"], message: m }]);
664
+ throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["operator"], message: m }]);
665
665
  }
666
666
  const normalized = normalizeOperator(rawOperator);
667
667
  const membership = SUBSTRING_TO_MEMBERSHIP[normalized];
668
668
  if (membership && SET_MEMBERSHIP_TYPES.has(effectiveType)) {
669
669
  const m = `Operator "${normalized}" is not valid for type "${effectiveType}" \u2014 use "${membership}"`;
670
- throw new chunkV26R64A4_js.ValidationError(m, [{ path: ["operator"], message: m }]);
670
+ throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["operator"], message: m }]);
671
671
  }
672
672
  return normalized;
673
673
  }
@@ -677,7 +677,7 @@ function assertOperatorForType(operator, type, context) {
677
677
  if (!ops?.includes(normalized)) {
678
678
  const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
679
679
  const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
680
- throw new chunkV26R64A4_js.ValidationError(summary, [
680
+ throw new chunk3YCZ5H3H_js.ValidationError(summary, [
681
681
  {
682
682
  path: ["operator"],
683
683
  message: summary
@@ -690,7 +690,7 @@ function assertRelativeDateValue(rule) {
690
690
  if (rule.operator !== "is_within") return;
691
691
  if (!isRelativeDateValue(rule.value)) {
692
692
  const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
693
- throw new chunkV26R64A4_js.ValidationError(m, [{ path: ["value"], message: m }]);
693
+ throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
694
694
  }
695
695
  }
696
696
  function applyCanonicalForm(rule, operator, effectiveType) {
@@ -703,11 +703,11 @@ function assertDynamicValueForAttribute(rule, attrType) {
703
703
  const v = rule.value;
704
704
  if (v.dynamic === "actor" && attrType !== "user") {
705
705
  const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
706
- throw new chunkV26R64A4_js.ValidationError(m, [{ path: ["value"], message: m }]);
706
+ throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
707
707
  }
708
708
  if (v.dynamic === "date" && attrType !== "date") {
709
709
  const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
710
- throw new chunkV26R64A4_js.ValidationError(m, [{ path: ["value"], message: m }]);
710
+ throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
711
711
  }
712
712
  }
713
713
  function collectQualifiedRuleIssues(rule, context) {
@@ -715,7 +715,7 @@ function collectQualifiedRuleIssues(rule, context) {
715
715
  validateQualifiedRule({ ...rule }, context);
716
716
  return [];
717
717
  } catch (error) {
718
- if (!(error instanceof chunkV26R64A4_js.ValidationError)) throw error;
718
+ if (!(error instanceof chunk3YCZ5H3H_js.ValidationError)) throw error;
719
719
  return error.errors.map((issue) => ({ ...issue, path: [...issue.path] }));
720
720
  }
721
721
  }
@@ -723,17 +723,17 @@ function validateQualifiedRule(rule, context) {
723
723
  const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
724
724
  const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
725
725
  if (!(rootAttr || systemOps)) {
726
- throw new chunkV26R64A4_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
726
+ throw new chunk3YCZ5H3H_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
727
727
  { path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
728
728
  ]);
729
729
  }
730
730
  if (rule.quantifier !== void 0 && !rule.property) {
731
731
  const m = `quantifier is only valid on qualified edge rules (set "property")`;
732
- throw new chunkV26R64A4_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
732
+ throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
733
733
  }
734
734
  if (!rootAttr) {
735
735
  if (rule.property) {
736
- throw new chunkV26R64A4_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
736
+ throw new chunk3YCZ5H3H_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
737
737
  { path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
738
738
  ]);
739
739
  }
@@ -741,7 +741,7 @@ function validateQualifiedRule(rule, context) {
741
741
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, effectiveType);
742
742
  if (!systemOps.includes(normalizedOperator2)) {
743
743
  const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
744
- throw new chunkV26R64A4_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
744
+ throw new chunk3YCZ5H3H_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
745
745
  }
746
746
  applyCanonicalForm(rule, normalizedOperator2, effectiveType);
747
747
  return;
@@ -753,25 +753,25 @@ function validateQualifiedRule(rule, context) {
753
753
  if (!ops.includes(normalizedOperator2)) {
754
754
  const validList = ops.length ? ops.join(", ") : "(not filterable)";
755
755
  const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
756
- throw new chunkV26R64A4_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
756
+ throw new chunk3YCZ5H3H_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
757
757
  }
758
758
  applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
759
759
  return;
760
760
  }
761
761
  if (!REFERENCE_TYPES.has(rootAttr.type)) {
762
- throw new chunkV26R64A4_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
762
+ throw new chunk3YCZ5H3H_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
763
763
  { path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
764
764
  ]);
765
765
  }
766
766
  const propSchema = rootAttr.properties;
767
767
  if (!propSchema) {
768
- throw new chunkV26R64A4_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
768
+ throw new chunk3YCZ5H3H_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
769
769
  { path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
770
770
  ]);
771
771
  }
772
772
  const propDef = propSchema.definitions.find((p) => p.name === rule.property);
773
773
  if (!propDef) {
774
- throw new chunkV26R64A4_js.ValidationError(
774
+ throw new chunk3YCZ5H3H_js.ValidationError(
775
775
  `Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
776
776
  [{ path: ["property"], message: `Unknown property: ${rule.property}` }]
777
777
  );
@@ -787,7 +787,7 @@ function parseResourceVisibility(value) {
787
787
  if (typeof value === "string" && RESOURCE_VISIBILITIES.includes(value)) {
788
788
  return value;
789
789
  }
790
- throw new chunkV26R64A4_js.ValidationError(
790
+ throw new chunk3YCZ5H3H_js.ValidationError(
791
791
  `visibility must be one of: ${RESOURCE_VISIBILITIES.join(", ")} (received: ${String(value)})`,
792
792
  []
793
793
  );
@@ -821,12 +821,12 @@ var RESERVED_OBJECT_NAMES = ["skill"];
821
821
  // src/validators/view-config.schema.ts
822
822
  var createModeSchema = zod.z.enum(["redirect", "inline", "peek"]);
823
823
  var nonEmptyStringArraySchema = zod.z.array(zod.z.string()).min(1);
824
- var columnsSchema = zod.z.array(zod.z.string()).max(chunkBOICAZHR_js.SCHEMA_LIMITS.columnsPerTab);
824
+ var columnsSchema = zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.columnsPerTab);
825
825
  var sortRuleSchema = zod.z.object({
826
826
  attribute: zod.z.string(),
827
827
  direction: zod.z.enum(["asc", "desc"])
828
828
  }).strict();
829
- var sortsSchema = zod.z.array(sortRuleSchema).max(chunkBOICAZHR_js.SCHEMA_LIMITS.sortsPerTab);
829
+ var sortsSchema = zod.z.array(sortRuleSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sortsPerTab);
830
830
  var relativeDateValueSchema = zod.z.object({
831
831
  amount: zod.z.number(),
832
832
  unit: zod.z.enum(["days", "weeks", "months", "years"]),
@@ -900,7 +900,7 @@ var filterRuleSchema = zod.z.object({
900
900
  operator: filterOperatorSchema,
901
901
  value: filterValueSchema
902
902
  }).strict();
903
- var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunkBOICAZHR_js.SCHEMA_LIMITS.filterRulesPerTab);
903
+ var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.filterRulesPerTab);
904
904
  var filterStateSchema = zod.z.object({
905
905
  combinator: zod.z.enum(["and", "or"]),
906
906
  rules: filterRulesSchema
@@ -991,17 +991,17 @@ var baseGroupShape = {
991
991
  var fieldGroupWriteSchema = zod.z.object({
992
992
  ...baseGroupShape,
993
993
  type: zod.z.literal("fields"),
994
- fields: zod.z.array(fieldSchema).max(chunkBOICAZHR_js.SCHEMA_LIMITS.fieldsPerGroup)
994
+ fields: zod.z.array(fieldSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerGroup)
995
995
  }).strict();
996
996
  var groupWriteSchema = fieldGroupWriteSchema;
997
997
  var baseTabShape = {
998
998
  id: zod.z.string(),
999
999
  name: zod.z.string(),
1000
1000
  label: zod.z.string(),
1001
- icon: chunkBOICAZHR_js.iconNameSchema.optional(),
1001
+ icon: chunk5JMQNH2A_js.iconNameSchema.optional(),
1002
1002
  order: zod.z.number().optional()
1003
1003
  };
1004
- var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunkBOICAZHR_js.SCHEMA_LIMITS.groupsPerFormTab);
1004
+ var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.groupsPerFormTab);
1005
1005
  var formTabShape = {
1006
1006
  ...baseTabShape,
1007
1007
  type: zod.z.literal("form"),
@@ -1016,13 +1016,13 @@ function refineFormTab(tab, ctx) {
1016
1016
  (count, group) => count + (group.type === "fields" ? group.fields.length : 0),
1017
1017
  0
1018
1018
  );
1019
- if (totalFields > chunkBOICAZHR_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1019
+ if (totalFields > chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1020
1020
  ctx.addIssue({
1021
1021
  code: "too_big",
1022
1022
  origin: "array",
1023
- maximum: chunkBOICAZHR_js.SCHEMA_LIMITS.fieldsPerFormTab,
1023
+ maximum: chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab,
1024
1024
  inclusive: true,
1025
- message: `A form tab can contain at most ${chunkBOICAZHR_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1025
+ message: `A form tab can contain at most ${chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1026
1026
  path: ["groups"]
1027
1027
  });
1028
1028
  }
@@ -1226,12 +1226,12 @@ var formsTabSchema = zod.z.object({
1226
1226
  var emailsTabSchema = zod.z.object({
1227
1227
  ...baseTabShape,
1228
1228
  type: zod.z.literal("emails"),
1229
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunkBOICAZHR_js.SCHEMA_LIMITS.emailAttributesPerTab)
1229
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.emailAttributesPerTab)
1230
1230
  }).strict();
1231
1231
  var meetingsTabSchema = zod.z.object({
1232
1232
  ...baseTabShape,
1233
1233
  type: zod.z.literal("meetings"),
1234
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunkBOICAZHR_js.SCHEMA_LIMITS.emailAttributesPerTab)
1234
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.emailAttributesPerTab)
1235
1235
  }).strict();
1236
1236
  var nonFormDetailTabSchemas = [
1237
1237
  tableTabSchema,
@@ -1254,7 +1254,7 @@ var detailTabDraftSchema = zod.z.discriminatedUnion("type", [
1254
1254
  var listTabCommonShape = {
1255
1255
  id: zod.z.string(),
1256
1256
  label: zod.z.string(),
1257
- icon: chunkBOICAZHR_js.iconNameSchema.optional(),
1257
+ icon: chunk5JMQNH2A_js.iconNameSchema.optional(),
1258
1258
  default: zod.z.boolean().optional(),
1259
1259
  // Which records the tab scopes to. `"all"` is the default and means "impose
1260
1260
  // no scope" — the mandatory viewer predicate alone decides, so the tab shows
@@ -1288,7 +1288,7 @@ var listViewTabSchema = zod.z.discriminatedUnion("layout", [
1288
1288
  ]);
1289
1289
  var _listViewConfigSchema = zod.z.object({
1290
1290
  defaultFilters: filterGroupSchema.optional(),
1291
- tabs: zod.z.array(listViewTabSchema).min(1).max(chunkBOICAZHR_js.SCHEMA_LIMITS.tabsPerView)
1291
+ tabs: zod.z.array(listViewTabSchema).min(1).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.tabsPerView)
1292
1292
  }).strict().superRefine((config, ctx) => {
1293
1293
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1294
1294
  let hasDefault = false;
@@ -1309,7 +1309,7 @@ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1309
1309
  kind: zod.z.literal("fields"),
1310
1310
  id: zod.z.string().optional(),
1311
1311
  label: zod.z.string().optional(),
1312
- attributes: zod.z.array(zod.z.string()).max(chunkBOICAZHR_js.SCHEMA_LIMITS.sidePanelAttributes)
1312
+ attributes: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelAttributes)
1313
1313
  }).strict(),
1314
1314
  zod.z.object({
1315
1315
  kind: zod.z.literal("activity"),
@@ -1328,10 +1328,10 @@ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1328
1328
  }).strict()
1329
1329
  ]);
1330
1330
  var _detailViewConfigSchema = zod.z.object({
1331
- tabs: zod.z.array(detailTabSchema).min(1).max(chunkBOICAZHR_js.SCHEMA_LIMITS.tabsPerView),
1331
+ tabs: zod.z.array(detailTabSchema).min(1).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.tabsPerView),
1332
1332
  sidePanel: zod.z.object({
1333
- attributes: zod.z.array(zod.z.string()).max(chunkBOICAZHR_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1334
- panes: zod.z.array(sidePanelPaneSchema).max(chunkBOICAZHR_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1333
+ attributes: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1334
+ panes: zod.z.array(sidePanelPaneSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1335
1335
  width: zod.z.number().optional()
1336
1336
  }).strict().refine((sidePanel) => sidePanel.attributes !== void 0 || sidePanel.panes !== void 0, {
1337
1337
  message: "sidePanel requires attributes or panes"
@@ -8,7 +8,7 @@ import { createCheckboxValidator } from './chunk-OSSGN43B.mjs';
8
8
  import { createDateValidator } from './chunk-Q44QKLN4.mjs';
9
9
  import { createNumberValidator } from './chunk-UANQJ2GH.mjs';
10
10
  import { createTextValidator } from './chunk-O73ROMWQ.mjs';
11
- import { ValidationError } from './chunk-RUO25ERR.mjs';
11
+ import { ValidationError } from './chunk-7WEOBXXA.mjs';
12
12
  import { createCurrencyValidator } from './chunk-AYVHMVKQ.mjs';
13
13
  import { createLocationValidator } from './chunk-YUFTHPOE.mjs';
14
14
  import { createPhoneValidator } from './chunk-R5LAJCBU.mjs';
@@ -10,7 +10,7 @@ var chunk5WATIVCA_js = require('./chunk-5WATIVCA.js');
10
10
  var chunkSI34M4IC_js = require('./chunk-SI34M4IC.js');
11
11
  var chunkYIP5FJ5H_js = require('./chunk-YIP5FJ5H.js');
12
12
  var chunkZPFOKBIN_js = require('./chunk-ZPFOKBIN.js');
13
- var chunkV26R64A4_js = require('./chunk-V26R64A4.js');
13
+ var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
14
14
  var chunkACKMC6FL_js = require('./chunk-ACKMC6FL.js');
15
15
  var chunkE6JUYGJX_js = require('./chunk-E6JUYGJX.js');
16
16
  var chunkQ4SZAMJT_js = require('./chunk-Q4SZAMJT.js');
@@ -162,7 +162,7 @@ function validateObjectOrThrow(objectDef, data) {
162
162
  if (!result.success) {
163
163
  const errors = result.errors ?? [];
164
164
  const detail = errors.map((err) => `${err.path.join(".")}: ${err.message}`).join("\n") || "Unknown validation error";
165
- throw new chunkV26R64A4_js.ValidationError(
165
+ throw new chunk3YCZ5H3H_js.ValidationError(
166
166
  `Validation failed for ${objectDef.label}:
167
167
  ${detail}`,
168
168
  errors.map((err) => ({ path: err.path, message: err.message }))
@@ -189,7 +189,7 @@ function validateDraftOrThrow(objectDef, data) {
189
189
  if (!result.success) {
190
190
  const errors = result.errors ?? [];
191
191
  const detail = errors.map((err) => `${err.path.join(".")}: ${err.message}`).join("\n") || "Unknown validation error";
192
- throw new chunkV26R64A4_js.ValidationError(
192
+ throw new chunk3YCZ5H3H_js.ValidationError(
193
193
  `Draft validation failed for ${objectDef.label}:
194
194
  ${detail}`,
195
195
  errors.map((err) => ({ path: err.path, message: err.message }))
@@ -201,7 +201,7 @@ function rejectUnknownAttributesOrThrow(objectDef, data) {
201
201
  const knownNames = new Set(objectDef.attributes.map((a) => a.name));
202
202
  const unknownKeys = Object.keys(data).filter((key) => !knownNames.has(key));
203
203
  if (unknownKeys.length > 0) {
204
- throw new chunkV26R64A4_js.ValidationError(
204
+ throw new chunk3YCZ5H3H_js.ValidationError(
205
205
  `Unknown attribute${unknownKeys.length > 1 ? "s" : ""} for ${objectDef.label}: ${unknownKeys.join(", ")}`,
206
206
  unknownKeys.map((key) => ({ path: [key], message: "Unknown attribute" }))
207
207
  );
@@ -1,5 +1,5 @@
1
- import { SCHEMA_LIMITS, iconNameSchema } from './chunk-5OBQRDRM.mjs';
2
- import { ValidationError } from './chunk-RUO25ERR.mjs';
1
+ import { SCHEMA_LIMITS, iconNameSchema } from './chunk-UW3BOSB6.mjs';
2
+ import { ValidationError } from './chunk-7WEOBXXA.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  // src/types/system-attributes.ts
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './chunk-RUO25ERR.mjs';
1
+ import { ValidationError } from './chunk-7WEOBXXA.mjs';
2
2
  import { z } from 'zod';
3
3
  import { ICONS, COLORS } from '@stndrds/constants';
4
4
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkV26R64A4_js = require('./chunk-V26R64A4.js');
3
+ var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
4
4
 
5
5
  // src/utils/canonical-json.ts
6
6
  function canonicalStringify(value) {
@@ -17,10 +17,10 @@ function canonicalStringify(value) {
17
17
  case "object":
18
18
  break;
19
19
  default:
20
- throw new chunkV26R64A4_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
20
+ throw new chunk3YCZ5H3H_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
21
21
  }
22
22
  const obj = v;
23
- if (seen.has(obj)) throw new chunkV26R64A4_js.ValidationError("Cannot canonicalize circular structure", []);
23
+ if (seen.has(obj)) throw new chunk3YCZ5H3H_js.ValidationError("Cannot canonicalize circular structure", []);
24
24
  seen.add(obj);
25
25
  try {
26
26
  if (Array.isArray(obj)) return `[${obj.map((e) => encode(e) ?? "null").join(",")}]`;
@@ -1,158 +1,158 @@
1
1
  'use strict';
2
2
 
3
- var chunkV26R64A4_js = require('./chunk-V26R64A4.js');
3
+ var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "AccessDeniedError", {
8
8
  enumerable: true,
9
- get: function () { return chunkV26R64A4_js.AccessDeniedError; }
9
+ get: function () { return chunk3YCZ5H3H_js.AccessDeniedError; }
10
10
  });
11
11
  Object.defineProperty(exports, "AttributeInUseError", {
12
12
  enumerable: true,
13
- get: function () { return chunkV26R64A4_js.AttributeInUseError; }
13
+ get: function () { return chunk3YCZ5H3H_js.AttributeInUseError; }
14
14
  });
15
15
  Object.defineProperty(exports, "AttributeNotFoundError", {
16
16
  enumerable: true,
17
- get: function () { return chunkV26R64A4_js.AttributeNotFoundError; }
17
+ get: function () { return chunk3YCZ5H3H_js.AttributeNotFoundError; }
18
18
  });
19
19
  Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
20
20
  enumerable: true,
21
- get: function () { return chunkV26R64A4_js.ChangeTypeNotSupportedError; }
21
+ get: function () { return chunk3YCZ5H3H_js.ChangeTypeNotSupportedError; }
22
22
  });
23
23
  Object.defineProperty(exports, "ConcurrentModificationError", {
24
24
  enumerable: true,
25
- get: function () { return chunkV26R64A4_js.ConcurrentModificationError; }
25
+ get: function () { return chunk3YCZ5H3H_js.ConcurrentModificationError; }
26
26
  });
27
27
  Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
28
28
  enumerable: true,
29
- get: function () { return chunkV26R64A4_js.DestructiveSyncNotAllowedError; }
29
+ get: function () { return chunk3YCZ5H3H_js.DestructiveSyncNotAllowedError; }
30
30
  });
31
31
  Object.defineProperty(exports, "DuplicateError", {
32
32
  enumerable: true,
33
- get: function () { return chunkV26R64A4_js.DuplicateError; }
33
+ get: function () { return chunk3YCZ5H3H_js.DuplicateError; }
34
34
  });
35
35
  Object.defineProperty(exports, "ForbiddenError", {
36
36
  enumerable: true,
37
- get: function () { return chunkV26R64A4_js.ForbiddenError; }
37
+ get: function () { return chunk3YCZ5H3H_js.ForbiddenError; }
38
38
  });
39
39
  Object.defineProperty(exports, "MemoryNotFoundError", {
40
40
  enumerable: true,
41
- get: function () { return chunkV26R64A4_js.MemoryNotFoundError; }
41
+ get: function () { return chunk3YCZ5H3H_js.MemoryNotFoundError; }
42
42
  });
43
43
  Object.defineProperty(exports, "MigrationTimeoutError", {
44
44
  enumerable: true,
45
- get: function () { return chunkV26R64A4_js.MigrationTimeoutError; }
45
+ get: function () { return chunk3YCZ5H3H_js.MigrationTimeoutError; }
46
46
  });
47
47
  Object.defineProperty(exports, "NotFoundError", {
48
48
  enumerable: true,
49
- get: function () { return chunkV26R64A4_js.NotFoundError; }
49
+ get: function () { return chunk3YCZ5H3H_js.NotFoundError; }
50
50
  });
51
51
  Object.defineProperty(exports, "NotImplementedError", {
52
52
  enumerable: true,
53
- get: function () { return chunkV26R64A4_js.NotImplementedError; }
53
+ get: function () { return chunk3YCZ5H3H_js.NotImplementedError; }
54
54
  });
55
55
  Object.defineProperty(exports, "ObjectNotFoundError", {
56
56
  enumerable: true,
57
- get: function () { return chunkV26R64A4_js.ObjectNotFoundError; }
57
+ get: function () { return chunk3YCZ5H3H_js.ObjectNotFoundError; }
58
58
  });
59
59
  Object.defineProperty(exports, "ObjectReferencedError", {
60
60
  enumerable: true,
61
- get: function () { return chunkV26R64A4_js.ObjectReferencedError; }
61
+ get: function () { return chunk3YCZ5H3H_js.ObjectReferencedError; }
62
62
  });
63
63
  Object.defineProperty(exports, "OrphanSystemAttributeError", {
64
64
  enumerable: true,
65
- get: function () { return chunkV26R64A4_js.OrphanSystemAttributeError; }
65
+ get: function () { return chunk3YCZ5H3H_js.OrphanSystemAttributeError; }
66
66
  });
67
67
  Object.defineProperty(exports, "ProtectedResourceError", {
68
68
  enumerable: true,
69
- get: function () { return chunkV26R64A4_js.ProtectedResourceError; }
69
+ get: function () { return chunk3YCZ5H3H_js.ProtectedResourceError; }
70
70
  });
71
71
  Object.defineProperty(exports, "ProtectedRoleError", {
72
72
  enumerable: true,
73
- get: function () { return chunkV26R64A4_js.ProtectedRoleError; }
73
+ get: function () { return chunk3YCZ5H3H_js.ProtectedRoleError; }
74
74
  });
75
75
  Object.defineProperty(exports, "RecordNotFoundError", {
76
76
  enumerable: true,
77
- get: function () { return chunkV26R64A4_js.RecordNotFoundError; }
77
+ get: function () { return chunk3YCZ5H3H_js.RecordNotFoundError; }
78
78
  });
79
79
  Object.defineProperty(exports, "RecordReferencedError", {
80
80
  enumerable: true,
81
- get: function () { return chunkV26R64A4_js.RecordReferencedError; }
81
+ get: function () { return chunk3YCZ5H3H_js.RecordReferencedError; }
82
82
  });
83
83
  Object.defineProperty(exports, "RepositoryError", {
84
84
  enumerable: true,
85
- get: function () { return chunkV26R64A4_js.RepositoryError; }
85
+ get: function () { return chunk3YCZ5H3H_js.RepositoryError; }
86
86
  });
87
87
  Object.defineProperty(exports, "RoleNotFoundError", {
88
88
  enumerable: true,
89
- get: function () { return chunkV26R64A4_js.RoleNotFoundError; }
89
+ get: function () { return chunk3YCZ5H3H_js.RoleNotFoundError; }
90
90
  });
91
91
  Object.defineProperty(exports, "SchemaError", {
92
92
  enumerable: true,
93
- get: function () { return chunkV26R64A4_js.SchemaError; }
93
+ get: function () { return chunk3YCZ5H3H_js.SchemaError; }
94
94
  });
95
95
  Object.defineProperty(exports, "SchemaErrorCode", {
96
96
  enumerable: true,
97
- get: function () { return chunkV26R64A4_js.SchemaErrorCode; }
97
+ get: function () { return chunk3YCZ5H3H_js.SchemaErrorCode; }
98
98
  });
99
99
  Object.defineProperty(exports, "SchemaPlanNotFoundError", {
100
100
  enumerable: true,
101
- get: function () { return chunkV26R64A4_js.SchemaPlanNotFoundError; }
101
+ get: function () { return chunk3YCZ5H3H_js.SchemaPlanNotFoundError; }
102
102
  });
103
103
  Object.defineProperty(exports, "SearchBackendError", {
104
104
  enumerable: true,
105
- get: function () { return chunkV26R64A4_js.SearchBackendError; }
105
+ get: function () { return chunk3YCZ5H3H_js.SearchBackendError; }
106
106
  });
107
107
  Object.defineProperty(exports, "StorageError", {
108
108
  enumerable: true,
109
- get: function () { return chunkV26R64A4_js.StorageError; }
109
+ get: function () { return chunk3YCZ5H3H_js.StorageError; }
110
110
  });
111
111
  Object.defineProperty(exports, "SyncCascadeError", {
112
112
  enumerable: true,
113
- get: function () { return chunkV26R64A4_js.SyncCascadeError; }
113
+ get: function () { return chunk3YCZ5H3H_js.SyncCascadeError; }
114
114
  });
115
115
  Object.defineProperty(exports, "SyncConflictError", {
116
116
  enumerable: true,
117
- get: function () { return chunkV26R64A4_js.SyncConflictError; }
117
+ get: function () { return chunk3YCZ5H3H_js.SyncConflictError; }
118
118
  });
119
119
  Object.defineProperty(exports, "SyncError", {
120
120
  enumerable: true,
121
- get: function () { return chunkV26R64A4_js.SyncError; }
121
+ get: function () { return chunk3YCZ5H3H_js.SyncError; }
122
122
  });
123
123
  Object.defineProperty(exports, "SystemEntityImmutableError", {
124
124
  enumerable: true,
125
- get: function () { return chunkV26R64A4_js.SystemEntityImmutableError; }
125
+ get: function () { return chunk3YCZ5H3H_js.SystemEntityImmutableError; }
126
126
  });
127
127
  Object.defineProperty(exports, "ValidationError", {
128
128
  enumerable: true,
129
- get: function () { return chunkV26R64A4_js.ValidationError; }
129
+ get: function () { return chunk3YCZ5H3H_js.ValidationError; }
130
130
  });
131
131
  Object.defineProperty(exports, "isAttributeInUseError", {
132
132
  enumerable: true,
133
- get: function () { return chunkV26R64A4_js.isAttributeInUseError; }
133
+ get: function () { return chunk3YCZ5H3H_js.isAttributeInUseError; }
134
134
  });
135
135
  Object.defineProperty(exports, "isNotFoundError", {
136
136
  enumerable: true,
137
- get: function () { return chunkV26R64A4_js.isNotFoundError; }
137
+ get: function () { return chunk3YCZ5H3H_js.isNotFoundError; }
138
138
  });
139
139
  Object.defineProperty(exports, "isObjectReferencedError", {
140
140
  enumerable: true,
141
- get: function () { return chunkV26R64A4_js.isObjectReferencedError; }
141
+ get: function () { return chunk3YCZ5H3H_js.isObjectReferencedError; }
142
142
  });
143
143
  Object.defineProperty(exports, "isProtectedResourceError", {
144
144
  enumerable: true,
145
- get: function () { return chunkV26R64A4_js.isProtectedResourceError; }
145
+ get: function () { return chunk3YCZ5H3H_js.isProtectedResourceError; }
146
146
  });
147
147
  Object.defineProperty(exports, "isRecordReferencedError", {
148
148
  enumerable: true,
149
- get: function () { return chunkV26R64A4_js.isRecordReferencedError; }
149
+ get: function () { return chunk3YCZ5H3H_js.isRecordReferencedError; }
150
150
  });
151
151
  Object.defineProperty(exports, "isSchemaError", {
152
152
  enumerable: true,
153
- get: function () { return chunkV26R64A4_js.isSchemaError; }
153
+ get: function () { return chunk3YCZ5H3H_js.isSchemaError; }
154
154
  });
155
155
  Object.defineProperty(exports, "isValidationError", {
156
156
  enumerable: true,
157
- get: function () { return chunkV26R64A4_js.isValidationError; }
157
+ get: function () { return chunk3YCZ5H3H_js.isValidationError; }
158
158
  });
@@ -1 +1 @@
1
- export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from './chunk-RUO25ERR.mjs';
1
+ export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from './chunk-7WEOBXXA.mjs';