@stapel/listings-react 0.8.0 → 0.9.0

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 +56 -0
  2. package/dist/api/generated/schema.d.ts +66 -3
  3. package/dist/api/generated/schema.d.ts.map +1 -1
  4. package/dist/default/ListingComposerPage.d.ts +21 -7
  5. package/dist/default/ListingComposerPage.d.ts.map +1 -1
  6. package/dist/default/ListingComposerPage.js.map +1 -1
  7. package/dist/headless/ListingComposer.d.ts.map +1 -1
  8. package/dist/headless/ListingComposer.js +31 -11
  9. package/dist/headless/ListingComposer.js.map +1 -1
  10. package/dist/i18n/generated/errors.es.gen.d.ts +1 -1
  11. package/dist/i18n/generated/errors.es.gen.js +1 -1
  12. package/dist/i18n/generated/errors.gen.d.ts +6 -0
  13. package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
  14. package/dist/i18n/generated/errors.gen.js +3 -0
  15. package/dist/i18n/generated/errors.gen.js.map +1 -1
  16. package/dist/i18n/generated/errors.ru.gen.d.ts +1 -1
  17. package/dist/i18n/generated/errors.ru.gen.js +1 -1
  18. package/dist/model/features.d.ts.map +1 -1
  19. package/dist/model/features.js +9 -1
  20. package/dist/model/features.js.map +1 -1
  21. package/llms.txt +4 -3
  22. package/manifest.json +10 -2
  23. package/nav-manifest.json +1 -1
  24. package/package.json +8 -8
  25. package/src/analytics/generated/events.json +1 -1
  26. package/src/api/generated/schema.ts +66 -3
  27. package/src/default/ListingComposerPage.tsx +21 -7
  28. package/src/headless/ListingComposer.tsx +36 -12
  29. package/src/i18n/generated/errors.es.gen.ts +1 -1
  30. package/src/i18n/generated/errors.gen.ts +3 -0
  31. package/src/i18n/generated/errors.json +9 -0
  32. package/src/i18n/generated/errors.ru.gen.ts +1 -1
  33. package/src/model/features.ts +10 -1
@@ -56,6 +56,11 @@ const ENVELOPE = new Set(["slug", "value", "name", "order", "title", "badge"]);
56
56
  * the path with " / " and never consults an option table at all. */
57
57
  const OPTION_VALUED = new Set(["select"]);
58
58
 
59
+ /** The canon's `FeatureDef.translate` vocabulary — three values, closed. */
60
+ function isTranslateMode(value: unknown): value is "all" | "title" | "none" {
61
+ return value === "all" || value === "title" || value === "none";
62
+ }
63
+
59
64
  /**
60
65
  * The identity option table for a stored `select` — see the module header.
61
66
  *
@@ -100,7 +105,11 @@ export function featureFromDao(
100
105
  slug: dao.slug,
101
106
  config,
102
107
  name: dao.name ?? null,
103
- ...(dao.translate !== undefined ? { translate: dao.translate } : {}),
108
+ // `translate` is a CLOSED vocabulary in the canon (`all` / `title` /
109
+ // `none`), and the stored row types it as a loose string. A value outside
110
+ // the three is dropped rather than smuggled through: `FeatureDef`'s own
111
+ // default is `all`, which is what the engine falls back to anyway.
112
+ ...(isTranslateMode(dao.translate) ? { translate: dao.translate } : {}),
104
113
  };
105
114
 
106
115
  const value: FeatureValueDto | undefined =