@entifix/core 0.1.0-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 (351) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/base-entities/configuration-client/configuration-client-singleton.d.ts +39 -0
  4. package/dist/base-entities/configuration-client/configuration-client-singleton.d.ts.map +1 -0
  5. package/dist/base-entities/configuration-client/configuration-client-singleton.js +164 -0
  6. package/dist/base-entities/configuration-client/configuration-client-singleton.js.map +1 -0
  7. package/dist/base-entities/configuration-client/index.d.ts +4 -0
  8. package/dist/base-entities/configuration-client/index.d.ts.map +1 -0
  9. package/dist/base-entities/configuration-client/index.js +5 -0
  10. package/dist/base-entities/configuration-client/index.js.map +1 -0
  11. package/dist/base-entities/configuration-client/read-configuration-from-process.d.ts +11 -0
  12. package/dist/base-entities/configuration-client/read-configuration-from-process.d.ts.map +1 -0
  13. package/dist/base-entities/configuration-client/read-configuration-from-process.js +26 -0
  14. package/dist/base-entities/configuration-client/read-configuration-from-process.js.map +1 -0
  15. package/dist/base-entities/configuration-client/types.d.ts +38 -0
  16. package/dist/base-entities/configuration-client/types.d.ts.map +1 -0
  17. package/dist/base-entities/configuration-client/types.js +3 -0
  18. package/dist/base-entities/configuration-client/types.js.map +1 -0
  19. package/dist/base-entities/entifix-error/entifix-error.d.ts +31 -0
  20. package/dist/base-entities/entifix-error/entifix-error.d.ts.map +1 -0
  21. package/dist/base-entities/entifix-error/entifix-error.js +56 -0
  22. package/dist/base-entities/entifix-error/entifix-error.js.map +1 -0
  23. package/dist/base-entities/entifix-error/index.d.ts +2 -0
  24. package/dist/base-entities/entifix-error/index.d.ts.map +1 -0
  25. package/dist/base-entities/entifix-error/index.js +3 -0
  26. package/dist/base-entities/entifix-error/index.js.map +1 -0
  27. package/dist/command-palette/command-matching.d.ts +79 -0
  28. package/dist/command-palette/command-matching.d.ts.map +1 -0
  29. package/dist/command-palette/command-matching.js +116 -0
  30. package/dist/command-palette/command-matching.js.map +1 -0
  31. package/dist/command-palette/command-source.d.ts +109 -0
  32. package/dist/command-palette/command-source.d.ts.map +1 -0
  33. package/dist/command-palette/command-source.js +11 -0
  34. package/dist/command-palette/command-source.js.map +1 -0
  35. package/dist/command-palette/index.d.ts +3 -0
  36. package/dist/command-palette/index.d.ts.map +1 -0
  37. package/dist/command-palette/index.js +4 -0
  38. package/dist/command-palette/index.js.map +1 -0
  39. package/dist/entity-definition/decorators/accessor/accessor.d.ts +3 -0
  40. package/dist/entity-definition/decorators/accessor/accessor.d.ts.map +1 -0
  41. package/dist/entity-definition/decorators/accessor/accessor.js +11 -0
  42. package/dist/entity-definition/decorators/accessor/accessor.js.map +1 -0
  43. package/dist/entity-definition/decorators/accessor/index.d.ts +2 -0
  44. package/dist/entity-definition/decorators/accessor/index.d.ts.map +1 -0
  45. package/dist/entity-definition/decorators/accessor/index.js +3 -0
  46. package/dist/entity-definition/decorators/accessor/index.js.map +1 -0
  47. package/dist/entity-definition/decorators/entity/entity.d.ts +4 -0
  48. package/dist/entity-definition/decorators/entity/entity.d.ts.map +1 -0
  49. package/dist/entity-definition/decorators/entity/entity.js +9 -0
  50. package/dist/entity-definition/decorators/entity/entity.js.map +1 -0
  51. package/dist/entity-definition/decorators/entity/index.d.ts +2 -0
  52. package/dist/entity-definition/decorators/entity/index.d.ts.map +1 -0
  53. package/dist/entity-definition/decorators/entity/index.js +3 -0
  54. package/dist/entity-definition/decorators/entity/index.js.map +1 -0
  55. package/dist/entity-definition/decorators/method/index.d.ts +2 -0
  56. package/dist/entity-definition/decorators/method/index.d.ts.map +1 -0
  57. package/dist/entity-definition/decorators/method/index.js +3 -0
  58. package/dist/entity-definition/decorators/method/index.js.map +1 -0
  59. package/dist/entity-definition/decorators/method/method.d.ts +3 -0
  60. package/dist/entity-definition/decorators/method/method.d.ts.map +1 -0
  61. package/dist/entity-definition/decorators/method/method.js +10 -0
  62. package/dist/entity-definition/decorators/method/method.js.map +1 -0
  63. package/dist/entity-definition/decorators/use-case/index.d.ts +2 -0
  64. package/dist/entity-definition/decorators/use-case/index.d.ts.map +1 -0
  65. package/dist/entity-definition/decorators/use-case/index.js +3 -0
  66. package/dist/entity-definition/decorators/use-case/index.js.map +1 -0
  67. package/dist/entity-definition/decorators/use-case/use-case.d.ts +18 -0
  68. package/dist/entity-definition/decorators/use-case/use-case.d.ts.map +1 -0
  69. package/dist/entity-definition/decorators/use-case/use-case.js +26 -0
  70. package/dist/entity-definition/decorators/use-case/use-case.js.map +1 -0
  71. package/dist/entity-definition/describe/describe-child-columns.d.ts +33 -0
  72. package/dist/entity-definition/describe/describe-child-columns.d.ts.map +1 -0
  73. package/dist/entity-definition/describe/describe-child-columns.js +44 -0
  74. package/dist/entity-definition/describe/describe-child-columns.js.map +1 -0
  75. package/dist/entity-definition/describe/describe-entity-columns.d.ts +83 -0
  76. package/dist/entity-definition/describe/describe-entity-columns.d.ts.map +1 -0
  77. package/dist/entity-definition/describe/describe-entity-columns.js +112 -0
  78. package/dist/entity-definition/describe/describe-entity-columns.js.map +1 -0
  79. package/dist/entity-definition/describe/describe-entity-use-cases.d.ts +34 -0
  80. package/dist/entity-definition/describe/describe-entity-use-cases.d.ts.map +1 -0
  81. package/dist/entity-definition/describe/describe-entity-use-cases.js +24 -0
  82. package/dist/entity-definition/describe/describe-entity-use-cases.js.map +1 -0
  83. package/dist/entity-definition/describe/index.d.ts +4 -0
  84. package/dist/entity-definition/describe/index.d.ts.map +1 -0
  85. package/dist/entity-definition/describe/index.js +5 -0
  86. package/dist/entity-definition/describe/index.js.map +1 -0
  87. package/dist/entity-definition/field-path.d.ts +49 -0
  88. package/dist/entity-definition/field-path.d.ts.map +1 -0
  89. package/dist/entity-definition/field-path.js +58 -0
  90. package/dist/entity-definition/field-path.js.map +1 -0
  91. package/dist/entity-definition/helpers/entity-definition-helpers.d.ts +59 -0
  92. package/dist/entity-definition/helpers/entity-definition-helpers.d.ts.map +1 -0
  93. package/dist/entity-definition/helpers/entity-definition-helpers.js +115 -0
  94. package/dist/entity-definition/helpers/entity-definition-helpers.js.map +1 -0
  95. package/dist/entity-definition/helpers/index.d.ts +2 -0
  96. package/dist/entity-definition/helpers/index.d.ts.map +1 -0
  97. package/dist/entity-definition/helpers/index.js +3 -0
  98. package/dist/entity-definition/helpers/index.js.map +1 -0
  99. package/dist/entity-definition/links/apply-entity-links/apply-entity-links.d.ts +48 -0
  100. package/dist/entity-definition/links/apply-entity-links/apply-entity-links.d.ts.map +1 -0
  101. package/dist/entity-definition/links/apply-entity-links/apply-entity-links.js +88 -0
  102. package/dist/entity-definition/links/apply-entity-links/apply-entity-links.js.map +1 -0
  103. package/dist/entity-definition/links/apply-entity-links/index.d.ts +2 -0
  104. package/dist/entity-definition/links/apply-entity-links/index.d.ts.map +1 -0
  105. package/dist/entity-definition/links/apply-entity-links/index.js +3 -0
  106. package/dist/entity-definition/links/apply-entity-links/index.js.map +1 -0
  107. package/dist/entity-definition/links/entity-collection-link/entity-collection-link.d.ts +29 -0
  108. package/dist/entity-definition/links/entity-collection-link/entity-collection-link.d.ts.map +1 -0
  109. package/dist/entity-definition/links/entity-collection-link/entity-collection-link.js +61 -0
  110. package/dist/entity-definition/links/entity-collection-link/entity-collection-link.js.map +1 -0
  111. package/dist/entity-definition/links/entity-collection-link/index.d.ts +2 -0
  112. package/dist/entity-definition/links/entity-collection-link/index.d.ts.map +1 -0
  113. package/dist/entity-definition/links/entity-collection-link/index.js +3 -0
  114. package/dist/entity-definition/links/entity-collection-link/index.js.map +1 -0
  115. package/dist/entity-definition/links/entity-link/entity-link.d.ts +58 -0
  116. package/dist/entity-definition/links/entity-link/entity-link.d.ts.map +1 -0
  117. package/dist/entity-definition/links/entity-link/entity-link.js +79 -0
  118. package/dist/entity-definition/links/entity-link/entity-link.js.map +1 -0
  119. package/dist/entity-definition/links/entity-link/index.d.ts +2 -0
  120. package/dist/entity-definition/links/entity-link/index.d.ts.map +1 -0
  121. package/dist/entity-definition/links/entity-link/index.js +3 -0
  122. package/dist/entity-definition/links/entity-link/index.js.map +1 -0
  123. package/dist/entity-definition/links/entity-link-source/entity-link-source.d.ts +74 -0
  124. package/dist/entity-definition/links/entity-link-source/entity-link-source.d.ts.map +1 -0
  125. package/dist/entity-definition/links/entity-link-source/entity-link-source.js +11 -0
  126. package/dist/entity-definition/links/entity-link-source/entity-link-source.js.map +1 -0
  127. package/dist/entity-definition/links/entity-link-source/index.d.ts +2 -0
  128. package/dist/entity-definition/links/entity-link-source/index.d.ts.map +1 -0
  129. package/dist/entity-definition/links/entity-link-source/index.js +3 -0
  130. package/dist/entity-definition/links/entity-link-source/index.js.map +1 -0
  131. package/dist/entity-definition/meta-entities/meta-accessor/index.d.ts +2 -0
  132. package/dist/entity-definition/meta-entities/meta-accessor/index.d.ts.map +1 -0
  133. package/dist/entity-definition/meta-entities/meta-accessor/index.js +3 -0
  134. package/dist/entity-definition/meta-entities/meta-accessor/index.js.map +1 -0
  135. package/dist/entity-definition/meta-entities/meta-accessor/meta-accessor.d.ts +137 -0
  136. package/dist/entity-definition/meta-entities/meta-accessor/meta-accessor.d.ts.map +1 -0
  137. package/dist/entity-definition/meta-entities/meta-accessor/meta-accessor.js +52 -0
  138. package/dist/entity-definition/meta-entities/meta-accessor/meta-accessor.js.map +1 -0
  139. package/dist/entity-definition/meta-entities/meta-entity/index.d.ts +2 -0
  140. package/dist/entity-definition/meta-entities/meta-entity/index.d.ts.map +1 -0
  141. package/dist/entity-definition/meta-entities/meta-entity/index.js +3 -0
  142. package/dist/entity-definition/meta-entities/meta-entity/index.js.map +1 -0
  143. package/dist/entity-definition/meta-entities/meta-entity/meta-entity.d.ts +17 -0
  144. package/dist/entity-definition/meta-entities/meta-entity/meta-entity.d.ts.map +1 -0
  145. package/dist/entity-definition/meta-entities/meta-entity/meta-entity.js +13 -0
  146. package/dist/entity-definition/meta-entities/meta-entity/meta-entity.js.map +1 -0
  147. package/dist/entity-definition/meta-entities/meta-method/index.d.ts +2 -0
  148. package/dist/entity-definition/meta-entities/meta-method/index.d.ts.map +1 -0
  149. package/dist/entity-definition/meta-entities/meta-method/index.js +3 -0
  150. package/dist/entity-definition/meta-entities/meta-method/index.js.map +1 -0
  151. package/dist/entity-definition/meta-entities/meta-method/meta-method.d.ts +16 -0
  152. package/dist/entity-definition/meta-entities/meta-method/meta-method.d.ts.map +1 -0
  153. package/dist/entity-definition/meta-entities/meta-method/meta-method.js +11 -0
  154. package/dist/entity-definition/meta-entities/meta-method/meta-method.js.map +1 -0
  155. package/dist/entity-definition/meta-entities/meta-use-case/index.d.ts +2 -0
  156. package/dist/entity-definition/meta-entities/meta-use-case/index.d.ts.map +1 -0
  157. package/dist/entity-definition/meta-entities/meta-use-case/index.js +3 -0
  158. package/dist/entity-definition/meta-entities/meta-use-case/index.js.map +1 -0
  159. package/dist/entity-definition/meta-entities/meta-use-case/meta-use-case.d.ts +94 -0
  160. package/dist/entity-definition/meta-entities/meta-use-case/meta-use-case.d.ts.map +1 -0
  161. package/dist/entity-definition/meta-entities/meta-use-case/meta-use-case.js +17 -0
  162. package/dist/entity-definition/meta-entities/meta-use-case/meta-use-case.js.map +1 -0
  163. package/dist/entity-definition/metadata/entity-metadata-document.d.ts +23 -0
  164. package/dist/entity-definition/metadata/entity-metadata-document.d.ts.map +1 -0
  165. package/dist/entity-definition/metadata/entity-metadata-document.js +16 -0
  166. package/dist/entity-definition/metadata/entity-metadata-document.js.map +1 -0
  167. package/dist/entity-definition/metadata/entity-metadata-source.d.ts +19 -0
  168. package/dist/entity-definition/metadata/entity-metadata-source.d.ts.map +1 -0
  169. package/dist/entity-definition/metadata/entity-metadata-source.js +15 -0
  170. package/dist/entity-definition/metadata/entity-metadata-source.js.map +1 -0
  171. package/dist/entity-definition/metadata/index.d.ts +3 -0
  172. package/dist/entity-definition/metadata/index.d.ts.map +1 -0
  173. package/dist/entity-definition/metadata/index.js +4 -0
  174. package/dist/entity-definition/metadata/index.js.map +1 -0
  175. package/dist/entity-definition/reconstruct/clone-entity-draft.d.ts +34 -0
  176. package/dist/entity-definition/reconstruct/clone-entity-draft.d.ts.map +1 -0
  177. package/dist/entity-definition/reconstruct/clone-entity-draft.js +75 -0
  178. package/dist/entity-definition/reconstruct/clone-entity-draft.js.map +1 -0
  179. package/dist/entity-definition/reconstruct/coerce-field-value.d.ts +34 -0
  180. package/dist/entity-definition/reconstruct/coerce-field-value.d.ts.map +1 -0
  181. package/dist/entity-definition/reconstruct/coerce-field-value.js +42 -0
  182. package/dist/entity-definition/reconstruct/coerce-field-value.js.map +1 -0
  183. package/dist/entity-definition/reconstruct/index.d.ts +5 -0
  184. package/dist/entity-definition/reconstruct/index.d.ts.map +1 -0
  185. package/dist/entity-definition/reconstruct/index.js +6 -0
  186. package/dist/entity-definition/reconstruct/index.js.map +1 -0
  187. package/dist/entity-definition/reconstruct/reconstruct-child.d.ts +35 -0
  188. package/dist/entity-definition/reconstruct/reconstruct-child.d.ts.map +1 -0
  189. package/dist/entity-definition/reconstruct/reconstruct-child.js +47 -0
  190. package/dist/entity-definition/reconstruct/reconstruct-child.js.map +1 -0
  191. package/dist/entity-definition/reconstruct/reconstruct-entity.d.ts +49 -0
  192. package/dist/entity-definition/reconstruct/reconstruct-entity.d.ts.map +1 -0
  193. package/dist/entity-definition/reconstruct/reconstruct-entity.js +116 -0
  194. package/dist/entity-definition/reconstruct/reconstruct-entity.js.map +1 -0
  195. package/dist/entity-definition/serializer/deserialize.d.ts +13 -0
  196. package/dist/entity-definition/serializer/deserialize.d.ts.map +1 -0
  197. package/dist/entity-definition/serializer/deserialize.js +145 -0
  198. package/dist/entity-definition/serializer/deserialize.js.map +1 -0
  199. package/dist/entity-definition/serializer/index.d.ts +3 -0
  200. package/dist/entity-definition/serializer/index.d.ts.map +1 -0
  201. package/dist/entity-definition/serializer/index.js +4 -0
  202. package/dist/entity-definition/serializer/index.js.map +1 -0
  203. package/dist/entity-definition/serializer/serialize.d.ts +26 -0
  204. package/dist/entity-definition/serializer/serialize.d.ts.map +1 -0
  205. package/dist/entity-definition/serializer/serialize.js +64 -0
  206. package/dist/entity-definition/serializer/serialize.js.map +1 -0
  207. package/dist/envelope/event-pattern.d.ts +14 -0
  208. package/dist/envelope/event-pattern.d.ts.map +1 -0
  209. package/dist/envelope/event-pattern.js +30 -0
  210. package/dist/envelope/event-pattern.js.map +1 -0
  211. package/dist/envelope/index.d.ts +5 -0
  212. package/dist/envelope/index.d.ts.map +1 -0
  213. package/dist/envelope/index.js +6 -0
  214. package/dist/envelope/index.js.map +1 -0
  215. package/dist/envelope/make-envelope.d.ts +45 -0
  216. package/dist/envelope/make-envelope.d.ts.map +1 -0
  217. package/dist/envelope/make-envelope.js +111 -0
  218. package/dist/envelope/make-envelope.js.map +1 -0
  219. package/dist/envelope/read-envelope.d.ts +48 -0
  220. package/dist/envelope/read-envelope.d.ts.map +1 -0
  221. package/dist/envelope/read-envelope.js +138 -0
  222. package/dist/envelope/read-envelope.js.map +1 -0
  223. package/dist/envelope/types.d.ts +173 -0
  224. package/dist/envelope/types.d.ts.map +1 -0
  225. package/dist/envelope/types.js +6 -0
  226. package/dist/envelope/types.js.map +1 -0
  227. package/dist/http/session-cookies.d.ts +25 -0
  228. package/dist/http/session-cookies.d.ts.map +1 -0
  229. package/dist/http/session-cookies.js +22 -0
  230. package/dist/http/session-cookies.js.map +1 -0
  231. package/dist/i18n/format.d.ts +22 -0
  232. package/dist/i18n/format.d.ts.map +1 -0
  233. package/dist/i18n/format.js +49 -0
  234. package/dist/i18n/format.js.map +1 -0
  235. package/dist/i18n/index.d.ts +4 -0
  236. package/dist/i18n/index.d.ts.map +1 -0
  237. package/dist/i18n/index.js +5 -0
  238. package/dist/i18n/index.js.map +1 -0
  239. package/dist/i18n/locales.d.ts +23 -0
  240. package/dist/i18n/locales.d.ts.map +1 -0
  241. package/dist/i18n/locales.js +25 -0
  242. package/dist/i18n/locales.js.map +1 -0
  243. package/dist/i18n/negotiate.d.ts +39 -0
  244. package/dist/i18n/negotiate.d.ts.map +1 -0
  245. package/dist/i18n/negotiate.js +63 -0
  246. package/dist/i18n/negotiate.js.map +1 -0
  247. package/dist/index.d.ts +42 -0
  248. package/dist/index.d.ts.map +1 -0
  249. package/dist/index.js +43 -0
  250. package/dist/index.js.map +1 -0
  251. package/dist/rsql/coerce-rsql.d.ts +27 -0
  252. package/dist/rsql/coerce-rsql.d.ts.map +1 -0
  253. package/dist/rsql/coerce-rsql.js +121 -0
  254. package/dist/rsql/coerce-rsql.js.map +1 -0
  255. package/dist/rsql/index.d.ts +8 -0
  256. package/dist/rsql/index.d.ts.map +1 -0
  257. package/dist/rsql/index.js +9 -0
  258. package/dist/rsql/index.js.map +1 -0
  259. package/dist/rsql/load-request-url.d.ts +30 -0
  260. package/dist/rsql/load-request-url.d.ts.map +1 -0
  261. package/dist/rsql/load-request-url.js +67 -0
  262. package/dist/rsql/load-request-url.js.map +1 -0
  263. package/dist/rsql/parse-rsql.d.ts +35 -0
  264. package/dist/rsql/parse-rsql.d.ts.map +1 -0
  265. package/dist/rsql/parse-rsql.js +235 -0
  266. package/dist/rsql/parse-rsql.js.map +1 -0
  267. package/dist/rsql/rsql-operators.d.ts +36 -0
  268. package/dist/rsql/rsql-operators.d.ts.map +1 -0
  269. package/dist/rsql/rsql-operators.js +65 -0
  270. package/dist/rsql/rsql-operators.js.map +1 -0
  271. package/dist/rsql/rsql-values.d.ts +11 -0
  272. package/dist/rsql/rsql-values.d.ts.map +1 -0
  273. package/dist/rsql/rsql-values.js +26 -0
  274. package/dist/rsql/rsql-values.js.map +1 -0
  275. package/dist/rsql/serialize-rsql.d.ts +19 -0
  276. package/dist/rsql/serialize-rsql.d.ts.map +1 -0
  277. package/dist/rsql/serialize-rsql.js +71 -0
  278. package/dist/rsql/serialize-rsql.js.map +1 -0
  279. package/dist/rsql/sort-param.d.ts +20 -0
  280. package/dist/rsql/sort-param.d.ts.map +1 -0
  281. package/dist/rsql/sort-param.js +66 -0
  282. package/dist/rsql/sort-param.js.map +1 -0
  283. package/dist/types/BulkOutcome.d.ts +27 -0
  284. package/dist/types/BulkOutcome.d.ts.map +1 -0
  285. package/dist/types/BulkOutcome.js +8 -0
  286. package/dist/types/BulkOutcome.js.map +1 -0
  287. package/dist/types/Entity.d.ts +6 -0
  288. package/dist/types/Entity.d.ts.map +1 -0
  289. package/dist/types/Entity.js +3 -0
  290. package/dist/types/Entity.js.map +1 -0
  291. package/dist/types/EntityAction.d.ts +15 -0
  292. package/dist/types/EntityAction.d.ts.map +1 -0
  293. package/dist/types/EntityAction.js +18 -0
  294. package/dist/types/EntityAction.js.map +1 -0
  295. package/dist/types/EntityDraft.d.ts +47 -0
  296. package/dist/types/EntityDraft.d.ts.map +1 -0
  297. package/dist/types/EntityDraft.js +14 -0
  298. package/dist/types/EntityDraft.js.map +1 -0
  299. package/dist/types/EntityFiltering.d.ts +45 -0
  300. package/dist/types/EntityFiltering.d.ts.map +1 -0
  301. package/dist/types/EntityFiltering.js +30 -0
  302. package/dist/types/EntityFiltering.js.map +1 -0
  303. package/dist/types/EntityLoadRequest.d.ts +10 -0
  304. package/dist/types/EntityLoadRequest.d.ts.map +1 -0
  305. package/dist/types/EntityLoadRequest.js +3 -0
  306. package/dist/types/EntityLoadRequest.js.map +1 -0
  307. package/dist/types/EntityPage.d.ts +8 -0
  308. package/dist/types/EntityPage.d.ts.map +1 -0
  309. package/dist/types/EntityPage.js +3 -0
  310. package/dist/types/EntityPage.js.map +1 -0
  311. package/dist/types/EntityRowDraft.d.ts +79 -0
  312. package/dist/types/EntityRowDraft.d.ts.map +1 -0
  313. package/dist/types/EntityRowDraft.js +65 -0
  314. package/dist/types/EntityRowDraft.js.map +1 -0
  315. package/dist/types/EntitySelection.d.ts +117 -0
  316. package/dist/types/EntitySelection.d.ts.map +1 -0
  317. package/dist/types/EntitySelection.js +107 -0
  318. package/dist/types/EntitySelection.js.map +1 -0
  319. package/dist/types/EntitySorting.d.ts +7 -0
  320. package/dist/types/EntitySorting.d.ts.map +1 -0
  321. package/dist/types/EntitySorting.js +3 -0
  322. package/dist/types/EntitySorting.js.map +1 -0
  323. package/dist/types/Json.d.ts +37 -0
  324. package/dist/types/Json.d.ts.map +1 -0
  325. package/dist/types/Json.js +43 -0
  326. package/dist/types/Json.js.map +1 -0
  327. package/dist/types/StandardSchema.d.ts +45 -0
  328. package/dist/types/StandardSchema.d.ts.map +1 -0
  329. package/dist/types/StandardSchema.js +15 -0
  330. package/dist/types/StandardSchema.js.map +1 -0
  331. package/dist/types/UseCase.d.ts +10 -0
  332. package/dist/types/UseCase.d.ts.map +1 -0
  333. package/dist/types/UseCase.js +10 -0
  334. package/dist/types/UseCase.js.map +1 -0
  335. package/dist/wizard/index.d.ts +4 -0
  336. package/dist/wizard/index.d.ts.map +1 -0
  337. package/dist/wizard/index.js +5 -0
  338. package/dist/wizard/index.js.map +1 -0
  339. package/dist/wizard/wizard-definition.d.ts +108 -0
  340. package/dist/wizard/wizard-definition.d.ts.map +1 -0
  341. package/dist/wizard/wizard-definition.js +125 -0
  342. package/dist/wizard/wizard-definition.js.map +1 -0
  343. package/dist/wizard/wizard-navigation.d.ts +81 -0
  344. package/dist/wizard/wizard-navigation.d.ts.map +1 -0
  345. package/dist/wizard/wizard-navigation.js +139 -0
  346. package/dist/wizard/wizard-navigation.js.map +1 -0
  347. package/dist/wizard/wizard-state.d.ts +89 -0
  348. package/dist/wizard/wizard-state.d.ts.map +1 -0
  349. package/dist/wizard/wizard-state.js +103 -0
  350. package/dist/wizard/wizard-state.js.map +1 -0
  351. package/package.json +64 -0
@@ -0,0 +1,116 @@
1
+ import { EntifixLogicError } from '../base-entities/entifix-error/index.js';
2
+ /**
3
+ * Normalize a string for matching: case-folded, and with accents removed.
4
+ *
5
+ * ⚠️ The accent fold is correctness, not polish. The fleet ships Spanish as its
6
+ * default locale, and without it `categoria` does not match `Categoría`, `marron`
7
+ * does not match `Marrón`, and `articulo` does not match `Artículo` — so the
8
+ * palette silently finds nothing for the most natural way to type most of its
9
+ * own copy. Nobody reaches for the accented key in a search box.
10
+ *
11
+ * NFD splits a precomposed letter into its base plus a combining mark, and the
12
+ * `\p{Diacritic}` class is what then removes only the mark. `ñ` decomposes too,
13
+ * so `nino` matches `Niño` — which is what a person typing quickly wants, even
14
+ * though ñ is a letter of its own in Spanish rather than an accented n.
15
+ */ export function foldForMatch(text) {
16
+ return text.normalize('NFD').replace(RegExp("[\\u005E\\u0060\\u00A8\\u00AF\\u00B4\\u00B7-\\u00B8\\u02B0-\\u034E\\u0350-\\u0357\\u035D-\\u0362\\u0374-\\u0375\\u037A\\u0384-\\u0385\\u0483-\\u0487\\u0559\\u0591-\\u05BD\\u05BF\\u05C1-\\u05C2\\u05C4-\\u05C5\\u05C7\\u064B-\\u0652\\u0657-\\u0658\\u06DF-\\u06E0\\u06E5-\\u06E6\\u06EA-\\u06EC\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F5\\u0818-\\u0819\\u0898-\\u089F\\u08C9-\\u08D2\\u08E3-\\u08FE\\u093C\\u094D\\u0951-\\u0954\\u0971\\u09BC\\u09CD\\u0A3C\\u0A4D\\u0ABC\\u0ACD\\u0AFD-\\u0AFF\\u0B3C\\u0B4D\\u0B55\\u0BCD\\u0C3C\\u0C4D\\u0CBC\\u0CCD\\u0D3B-\\u0D3C\\u0D4D\\u0DCA\\u0E3A\\u0E47-\\u0E4C\\u0E4E\\u0EBA\\u0EC8-\\u0ECC\\u0F18-\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F3F\\u0F82-\\u0F84\\u0F86-\\u0F87\\u0FC6\\u1037\\u1039-\\u103A\\u1063-\\u1064\\u1069-\\u106D\\u1087-\\u108D\\u108F\\u109A-\\u109B\\u135D-\\u135F\\u1714-\\u1715\\u1734\\u17C9-\\u17D3\\u17DD\\u1939-\\u193B\\u1A60\\u1A75-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1AC1-\\u1ACB\\u1ACF-\\u1ADD\\u1AE0-\\u1AEB\\u1B34\\u1B44\\u1B6B-\\u1B73\\u1BAA-\\u1BAB\\u1BE6\\u1BF2-\\u1BF3\\u1C36-\\u1C37\\u1C78-\\u1C7D\\u1CD0-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1D2C-\\u1D6A\\u1D9B-\\u1DBE\\u1DC4-\\u1DCF\\u1DF5-\\u1DFF\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD-\\u1FFE\\u2CEF-\\u2CF1\\u2E2F\\u302A-\\u302F\\u3099-\\u309C\\u30FC\\uA66F\\uA67C-\\uA67D\\uA67F\\uA69C-\\uA69D\\uA6F0-\\uA6F1\\uA700-\\uA721\\uA788-\\uA78A\\uA7F1\\uA7F8-\\uA7F9\\uA806\\uA82C\\uA8C4\\uA8E0-\\uA8F1\\uA92B-\\uA92E\\uA953\\uA9B3\\uA9C0\\uA9E5\\uAA7B-\\uAA7D\\uAABF-\\uAAC2\\uAAF6\\uAB5B-\\uAB5F\\uAB69-\\uAB6B\\uABEC-\\uABED\\uFB1E\\uFE20-\\uFE2F\\uFF3E\\uFF40\\uFF70\\uFF9E-\\uFF9F\\uFFE3\\u{102E0}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}-\\u{10AE6}\\u{10D22}-\\u{10D27}\\u{10D4E}\\u{10D69}-\\u{10D6D}\\u{10EFA}\\u{10EFD}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11046}\\u{11070}\\u{110B9}-\\u{110BA}\\u{11133}-\\u{11134}\\u{11173}\\u{111C0}\\u{111CA}-\\u{111CC}\\u{11235}-\\u{11236}\\u{112E9}-\\u{112EA}\\u{1133B}-\\u{1133C}\\u{1134D}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113CE}-\\u{113D0}\\u{113D2}-\\u{113D3}\\u{113E1}-\\u{113E2}\\u{11442}\\u{11446}\\u{114C2}-\\u{114C3}\\u{115BF}-\\u{115C0}\\u{1163F}\\u{116B6}-\\u{116B7}\\u{1172B}\\u{11839}-\\u{1183A}\\u{1193D}-\\u{1193E}\\u{11943}\\u{119E0}\\u{11A34}\\u{11A47}\\u{11A99}\\u{11C3F}\\u{11D42}\\u{11D44}-\\u{11D45}\\u{11D97}\\u{11DD9}\\u{11F41}-\\u{11F42}\\u{11F5A}\\u{13447}-\\u{13455}\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16D6B}-\\u{16D6C}\\u{16F8F}-\\u{16F9F}\\u{16FF0}-\\u{16FF1}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}-\\u{1AFFE}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D16D}-\\u{1D172}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1E030}-\\u{1E06D}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E5EE}-\\u{1E5EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E946}\\u{1E948}-\\u{1E94A}]", "gu"), '').toLocaleLowerCase();
17
+ }
18
+ /**
19
+ * Does `text` contain every character of `term`, in order?
20
+ *
21
+ * Subsequence rather than substring, so `prbr` finds "Producto Bruto" and `numa`
22
+ * finds "Nueva marca" — the thing that makes a palette feel fast. Deliberately
23
+ * **not** scored: ADR 0040 fixed group order as the ranking, and a score inside
24
+ * a group would reshuffle it on every keystroke for no gain a person can learn.
25
+ *
26
+ * An empty term matches everything, which is what makes an unfiltered palette
27
+ * the same code path as a filtered one.
28
+ */ export function subsequenceMatch(term, text) {
29
+ const needle = foldForMatch(term);
30
+ if (needle === '') return true;
31
+ const haystack = foldForMatch(text);
32
+ let cursor = 0;
33
+ for (const character of haystack){
34
+ if (character === needle[cursor]) cursor += 1;
35
+ if (cursor === needle.length) return true;
36
+ }
37
+ return false;
38
+ }
39
+ /**
40
+ * Does this option answer to `term`, by its label or by any of its keywords?
41
+ *
42
+ * The keywords are what let a Spanish command match an English word someone
43
+ * typed — "Nuevo producto" answering to `new` — without translating the label.
44
+ */ export function matchesCommand(term, option) {
45
+ var _option_keywords;
46
+ if (subsequenceMatch(term, option.label)) return true;
47
+ return ((_option_keywords = option.keywords) != null ? _option_keywords : []).some((keyword)=>subsequenceMatch(term, keyword));
48
+ }
49
+ /**
50
+ * Split a catalog-resolved keyword list into terms.
51
+ *
52
+ * `MetaUseCase.keywordsKey` is a catalog **key** rather than a `string[]` so the
53
+ * terms are per-locale; what the catalog holds is therefore one string, and this
54
+ * is the convention for reading it. Commas, because a keyword may itself be two
55
+ * words ("cerrar sesión") and splitting on whitespace would break that into
56
+ * terms that match nothing on their own.
57
+ *
58
+ * Empty entries are dropped rather than kept as `''`, which would match every
59
+ * option through {@link subsequenceMatch}'s empty-term rule.
60
+ */ export function parseKeywords(value) {
61
+ if (value === undefined) return [];
62
+ return value.split(',').map((keyword)=>keyword.trim()).filter((keyword)=>keyword !== '');
63
+ }
64
+ /**
65
+ * `>` narrows to commands, `#` to records, anything else searches both.
66
+ *
67
+ * A grammar for *entry* rather than for depth: descending into a sub-picker is a
68
+ * page stack, not a third prefix, because a prefix a person has to remember is
69
+ * worse than a list they can see. Two characters only, and both are the ones
70
+ * VS Code and GitHub already trained people on.
71
+ *
72
+ * The prefix is stripped and the remainder trimmed at the front only — a
73
+ * trailing space is something the person is still typing, and eating it would
74
+ * make the list jump between keystrokes.
75
+ */ export function parseCommandTerm(raw) {
76
+ if (raw.startsWith('>')) {
77
+ return {
78
+ scope: 'commands',
79
+ term: raw.slice(1).trimStart()
80
+ };
81
+ }
82
+ if (raw.startsWith('#')) {
83
+ return {
84
+ scope: 'records',
85
+ term: raw.slice(1).trimStart()
86
+ };
87
+ }
88
+ return {
89
+ scope: 'all',
90
+ term: raw
91
+ };
92
+ }
93
+ /**
94
+ * The one thing selecting an option does.
95
+ *
96
+ * An option declaring none is a line that looks selectable and does nothing;
97
+ * one declaring two is a line whose behaviour depends on the order a renderer
98
+ * happens to check its members in. Both are silent, so this throws — at the
99
+ * first render of the palette rather than on the click, which is the posture
100
+ * `surfaceFor` and `assertSearchable` already take for the same reason.
101
+ */ export function commandEffectOf(option) {
102
+ const declared = [
103
+ 'href',
104
+ 'run',
105
+ 'push'
106
+ ].filter((effect)=>option[effect] !== undefined);
107
+ if (declared.length !== 1) {
108
+ throw new EntifixLogicError(`The command "${option.id}" declares ${declared.length} effects (${declared.join(', ') || 'none'}), and must declare exactly one. ` + 'Give it an `href` to navigate, a `run` to invoke, or a `push` to open another page.', undefined, {
109
+ id: option.id,
110
+ declared
111
+ });
112
+ }
113
+ return declared[0];
114
+ }
115
+
116
+ //# sourceMappingURL=command-matching.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/command-palette/command-matching.ts"],"sourcesContent":["import { EntifixLogicError } from '../base-entities/entifix-error/index.js';\nimport type { CommandOption } from './command-source.js';\n\n/**\n * Normalize a string for matching: case-folded, and with accents removed.\n *\n * ⚠️ The accent fold is correctness, not polish. The fleet ships Spanish as its\n * default locale, and without it `categoria` does not match `Categoría`, `marron`\n * does not match `Marrón`, and `articulo` does not match `Artículo` — so the\n * palette silently finds nothing for the most natural way to type most of its\n * own copy. Nobody reaches for the accented key in a search box.\n *\n * NFD splits a precomposed letter into its base plus a combining mark, and the\n * `\\p{Diacritic}` class is what then removes only the mark. `ñ` decomposes too,\n * so `nino` matches `Niño` — which is what a person typing quickly wants, even\n * though ñ is a letter of its own in Spanish rather than an accented n.\n */\nexport function foldForMatch(text: string): string {\n return text\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '')\n .toLocaleLowerCase();\n}\n\n/**\n * Does `text` contain every character of `term`, in order?\n *\n * Subsequence rather than substring, so `prbr` finds \"Producto Bruto\" and `numa`\n * finds \"Nueva marca\" — the thing that makes a palette feel fast. Deliberately\n * **not** scored: ADR 0040 fixed group order as the ranking, and a score inside\n * a group would reshuffle it on every keystroke for no gain a person can learn.\n *\n * An empty term matches everything, which is what makes an unfiltered palette\n * the same code path as a filtered one.\n */\nexport function subsequenceMatch(term: string, text: string): boolean {\n const needle = foldForMatch(term);\n if (needle === '') return true;\n\n const haystack = foldForMatch(text);\n let cursor = 0;\n for (const character of haystack) {\n if (character === needle[cursor]) cursor += 1;\n if (cursor === needle.length) return true;\n }\n return false;\n}\n\n/**\n * Does this option answer to `term`, by its label or by any of its keywords?\n *\n * The keywords are what let a Spanish command match an English word someone\n * typed — \"Nuevo producto\" answering to `new` — without translating the label.\n */\nexport function matchesCommand(term: string, option: CommandOption): boolean {\n if (subsequenceMatch(term, option.label)) return true;\n return (option.keywords ?? []).some(keyword =>\n subsequenceMatch(term, keyword),\n );\n}\n\n/**\n * Split a catalog-resolved keyword list into terms.\n *\n * `MetaUseCase.keywordsKey` is a catalog **key** rather than a `string[]` so the\n * terms are per-locale; what the catalog holds is therefore one string, and this\n * is the convention for reading it. Commas, because a keyword may itself be two\n * words (\"cerrar sesión\") and splitting on whitespace would break that into\n * terms that match nothing on their own.\n *\n * Empty entries are dropped rather than kept as `''`, which would match every\n * option through {@link subsequenceMatch}'s empty-term rule.\n */\nexport function parseKeywords(value: string | undefined): string[] {\n if (value === undefined) return [];\n return value\n .split(',')\n .map(keyword => keyword.trim())\n .filter(keyword => keyword !== '');\n}\n\n/** Which sources a typed term is asking for. */\nexport type CommandScope = 'all' | 'commands' | 'records';\n\n/** A term, split into the scope its prefix asked for and the rest. */\nexport interface ParsedCommandTerm {\n readonly scope: CommandScope;\n readonly term: string;\n}\n\n/**\n * `>` narrows to commands, `#` to records, anything else searches both.\n *\n * A grammar for *entry* rather than for depth: descending into a sub-picker is a\n * page stack, not a third prefix, because a prefix a person has to remember is\n * worse than a list they can see. Two characters only, and both are the ones\n * VS Code and GitHub already trained people on.\n *\n * The prefix is stripped and the remainder trimmed at the front only — a\n * trailing space is something the person is still typing, and eating it would\n * make the list jump between keystrokes.\n */\nexport function parseCommandTerm(raw: string): ParsedCommandTerm {\n if (raw.startsWith('>')) {\n return { scope: 'commands', term: raw.slice(1).trimStart() };\n }\n if (raw.startsWith('#')) {\n return { scope: 'records', term: raw.slice(1).trimStart() };\n }\n return { scope: 'all', term: raw };\n}\n\n/**\n * The one thing selecting an option does.\n *\n * An option declaring none is a line that looks selectable and does nothing;\n * one declaring two is a line whose behaviour depends on the order a renderer\n * happens to check its members in. Both are silent, so this throws — at the\n * first render of the palette rather than on the click, which is the posture\n * `surfaceFor` and `assertSearchable` already take for the same reason.\n */\nexport function commandEffectOf(\n option: CommandOption,\n): 'href' | 'run' | 'push' {\n const declared = (['href', 'run', 'push'] as const).filter(\n effect => option[effect] !== undefined,\n );\n\n if (declared.length !== 1) {\n throw new EntifixLogicError(\n `The command \"${option.id}\" declares ${declared.length} effects (${declared.join(', ') || 'none'}), and must declare exactly one. ` +\n 'Give it an `href` to navigate, a `run` to invoke, or a `push` to open another page.',\n undefined,\n { id: option.id, declared },\n );\n }\n\n return declared[0];\n}\n"],"names":["EntifixLogicError","foldForMatch","text","normalize","replace","toLocaleLowerCase","subsequenceMatch","term","needle","haystack","cursor","character","length","matchesCommand","option","label","keywords","some","keyword","parseKeywords","value","undefined","split","map","trim","filter","parseCommandTerm","raw","startsWith","scope","slice","trimStart","commandEffectOf","declared","effect","id","join"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,0CAA0C;AAG5E;;;;;;;;;;;;;CAaC,GACD,OAAO,SAASC,aAAaC,IAAY;IACvC,OAAOA,KACJC,SAAS,CAAC,OACVC,OAAO,CAAC,q6FAAmB,IAC3BC,iBAAiB;AACtB;AAEA;;;;;;;;;;CAUC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEL,IAAY;IACzD,MAAMM,SAASP,aAAaM;IAC5B,IAAIC,WAAW,IAAI,OAAO;IAE1B,MAAMC,WAAWR,aAAaC;IAC9B,IAAIQ,SAAS;IACb,KAAK,MAAMC,aAAaF,SAAU;QAChC,IAAIE,cAAcH,MAAM,CAACE,OAAO,EAAEA,UAAU;QAC5C,IAAIA,WAAWF,OAAOI,MAAM,EAAE,OAAO;IACvC;IACA,OAAO;AACT;AAEA;;;;;CAKC,GACD,OAAO,SAASC,eAAeN,IAAY,EAAEO,MAAqB;QAExDA;IADR,IAAIR,iBAAiBC,MAAMO,OAAOC,KAAK,GAAG,OAAO;IACjD,OAAO,EAACD,mBAAAA,OAAOE,QAAQ,YAAfF,mBAAmB,EAAE,EAAEG,IAAI,CAACC,CAAAA,UAClCZ,iBAAiBC,MAAMW;AAE3B;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,cAAcC,KAAyB;IACrD,IAAIA,UAAUC,WAAW,OAAO,EAAE;IAClC,OAAOD,MACJE,KAAK,CAAC,KACNC,GAAG,CAACL,CAAAA,UAAWA,QAAQM,IAAI,IAC3BC,MAAM,CAACP,CAAAA,UAAWA,YAAY;AACnC;AAWA;;;;;;;;;;;CAWC,GACD,OAAO,SAASQ,iBAAiBC,GAAW;IAC1C,IAAIA,IAAIC,UAAU,CAAC,MAAM;QACvB,OAAO;YAAEC,OAAO;YAAYtB,MAAMoB,IAAIG,KAAK,CAAC,GAAGC,SAAS;QAAG;IAC7D;IACA,IAAIJ,IAAIC,UAAU,CAAC,MAAM;QACvB,OAAO;YAAEC,OAAO;YAAWtB,MAAMoB,IAAIG,KAAK,CAAC,GAAGC,SAAS;QAAG;IAC5D;IACA,OAAO;QAAEF,OAAO;QAAOtB,MAAMoB;IAAI;AACnC;AAEA;;;;;;;;CAQC,GACD,OAAO,SAASK,gBACdlB,MAAqB;IAErB,MAAMmB,WAAW,AAAC;QAAC;QAAQ;QAAO;KAAO,CAAWR,MAAM,CACxDS,CAAAA,SAAUpB,MAAM,CAACoB,OAAO,KAAKb;IAG/B,IAAIY,SAASrB,MAAM,KAAK,GAAG;QACzB,MAAM,IAAIZ,kBACR,CAAC,aAAa,EAAEc,OAAOqB,EAAE,CAAC,WAAW,EAAEF,SAASrB,MAAM,CAAC,UAAU,EAAEqB,SAASG,IAAI,CAAC,SAAS,OAAO,iCAAiC,CAAC,GACjI,uFACFf,WACA;YAAEc,IAAIrB,OAAOqB,EAAE;YAAEF;QAAS;IAE9B;IAEA,OAAOA,QAAQ,CAAC,EAAE;AACpB"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * What a command palette renders, as state rather than as a query.
3
+ *
4
+ * The same contract `EntityLinkSource` is, and for the same boundary reason: the
5
+ * hooks that fetch live in the shell layer, the component that renders lives in
6
+ * `@entifix/react-controls`, and those two may not import each other. It carries
7
+ * no Effect, no React and no router — a source hands over resolved copy and a
8
+ * thunk, never a key and never a `push()`.
9
+ */
10
+ /** How a group's absence is explained. */
11
+ export type CommandUnavailableSeverity = 'scope' | 'reachability';
12
+ /**
13
+ * A source that produced no options, and why.
14
+ *
15
+ * The two severities must not be conflated, which is the same split ADR 0040's
16
+ * `RecordSearchUnavailableReason` draws and the reason this member is not a
17
+ * bare string. `scope` is the **normal** state for some callers — an operator
18
+ * holds no membership, so every tenant-plane search answers `409` on every
19
+ * keystroke — while `reachability` means something is actually wrong. Rendering
20
+ * a warning for the ordinary case teaches people to ignore the one that matters.
21
+ */
22
+ export interface CommandUnavailable {
23
+ /** Already-resolved copy. The source owns the catalog lookup. */
24
+ readonly message: string;
25
+ readonly severity: CommandUnavailableSeverity;
26
+ }
27
+ /** What selecting an option does. Exactly one arm is populated. */
28
+ export interface CommandEffect {
29
+ /**
30
+ * Navigate. **Already locale-prefixed** by the source, because the palette is
31
+ * presentational and a control may not reach for a router or a locale.
32
+ */
33
+ readonly href?: string;
34
+ /** Invoke. The source owns the request, the optimism and the error. */
35
+ readonly run?: () => void | Promise<void>;
36
+ /** Descend into another {@link CommandPage} by id — this is the page stack. */
37
+ readonly push?: string;
38
+ }
39
+ /** Ask before running. Resolved copy, like everything else that crosses here. */
40
+ export interface CommandConfirm {
41
+ readonly tone: 'destructive' | 'neutral';
42
+ readonly message: string;
43
+ }
44
+ /** One selectable line. */
45
+ export interface CommandOption extends CommandEffect {
46
+ /** Unique within the whole palette — it is also the recency key. */
47
+ readonly id: string;
48
+ /** Resolved copy. A source that holds a catalog key resolves it before here. */
49
+ readonly label: string;
50
+ /** A second line: a code, a role, the record's entity. */
51
+ readonly sublabel?: string;
52
+ /**
53
+ * Extra terms this option matches on, so a Spanish command still answers to
54
+ * the English word someone typed. Raycast's mechanism, and the reason
55
+ * `MetaUseCase` carries a `keywordsKey` at all.
56
+ */
57
+ readonly keywords?: readonly string[];
58
+ /** Trailing text — a shortcut hint, the source's own name. */
59
+ readonly hint?: string;
60
+ readonly confirm?: CommandConfirm;
61
+ }
62
+ /** One heading and the options under it. */
63
+ export interface CommandGroup {
64
+ readonly key: string;
65
+ /** Resolved copy. */
66
+ readonly label: string;
67
+ readonly options: readonly CommandOption[];
68
+ /**
69
+ * Matches **before** any per-group limit, so "N más" is renderable. Omitted
70
+ * when the source did not count — never defaulted to `options.length`, which
71
+ * would claim there is no more when nobody looked.
72
+ */
73
+ readonly total?: number;
74
+ readonly isLoading: boolean;
75
+ /**
76
+ * Set when this group could not be produced. A group carrying this is still
77
+ * rendered: an omitted group reads as "nothing matched", which is a confident
78
+ * claim nobody is in a position to make about a source they could not reach.
79
+ */
80
+ readonly unavailable?: CommandUnavailable;
81
+ }
82
+ /**
83
+ * One contributor's whole answer.
84
+ *
85
+ * Several groups, not one, because the record search fans out over four entities
86
+ * and each is its own heading — flattening them here would make the palette
87
+ * re-derive what ADR 0040 already grouped.
88
+ */
89
+ export interface CommandSource {
90
+ readonly key: string;
91
+ readonly groups: readonly CommandGroup[];
92
+ }
93
+ /**
94
+ * One level of the palette.
95
+ *
96
+ * Depth is a **stack of pages** rather than nested prefixes: selecting "Nuevo…"
97
+ * makes the palette *become* the entity picker, which is Raycast's and Linear's
98
+ * arrangement and reads far better than a second grammar character.
99
+ */
100
+ export interface CommandPage {
101
+ readonly id: string;
102
+ /** Shown as a chip beside the input on any page but the root. */
103
+ readonly title?: string;
104
+ readonly placeholder: string;
105
+ readonly sources: readonly CommandSource[];
106
+ }
107
+ /** The id of the page a palette opens on. */
108
+ export declare const ROOT_COMMAND_PAGE = "root";
109
+ //# sourceMappingURL=command-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-source.d.ts","sourceRoot":"","sources":["../../src/command-palette/command-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,cAAc,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;CAC/C;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,iFAAiF;AACjF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,2BAA2B;AAC3B,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,oEAAoE;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;CAC5C;AAED,6CAA6C;AAC7C,eAAO,MAAM,iBAAiB,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * What a command palette renders, as state rather than as a query.
3
+ *
4
+ * The same contract `EntityLinkSource` is, and for the same boundary reason: the
5
+ * hooks that fetch live in the shell layer, the component that renders lives in
6
+ * `@entifix/react-controls`, and those two may not import each other. It carries
7
+ * no Effect, no React and no router — a source hands over resolved copy and a
8
+ * thunk, never a key and never a `push()`.
9
+ */ /** How a group's absence is explained. */ /** The id of the page a palette opens on. */ export const ROOT_COMMAND_PAGE = 'root';
10
+
11
+ //# sourceMappingURL=command-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/command-palette/command-source.ts"],"sourcesContent":["/**\n * What a command palette renders, as state rather than as a query.\n *\n * The same contract `EntityLinkSource` is, and for the same boundary reason: the\n * hooks that fetch live in the shell layer, the component that renders lives in\n * `@entifix/react-controls`, and those two may not import each other. It carries\n * no Effect, no React and no router — a source hands over resolved copy and a\n * thunk, never a key and never a `push()`.\n */\n\n/** How a group's absence is explained. */\nexport type CommandUnavailableSeverity = 'scope' | 'reachability';\n\n/**\n * A source that produced no options, and why.\n *\n * The two severities must not be conflated, which is the same split ADR 0040's\n * `RecordSearchUnavailableReason` draws and the reason this member is not a\n * bare string. `scope` is the **normal** state for some callers — an operator\n * holds no membership, so every tenant-plane search answers `409` on every\n * keystroke — while `reachability` means something is actually wrong. Rendering\n * a warning for the ordinary case teaches people to ignore the one that matters.\n */\nexport interface CommandUnavailable {\n /** Already-resolved copy. The source owns the catalog lookup. */\n readonly message: string;\n readonly severity: CommandUnavailableSeverity;\n}\n\n/** What selecting an option does. Exactly one arm is populated. */\nexport interface CommandEffect {\n /**\n * Navigate. **Already locale-prefixed** by the source, because the palette is\n * presentational and a control may not reach for a router or a locale.\n */\n readonly href?: string;\n /** Invoke. The source owns the request, the optimism and the error. */\n readonly run?: () => void | Promise<void>;\n /** Descend into another {@link CommandPage} by id — this is the page stack. */\n readonly push?: string;\n}\n\n/** Ask before running. Resolved copy, like everything else that crosses here. */\nexport interface CommandConfirm {\n readonly tone: 'destructive' | 'neutral';\n readonly message: string;\n}\n\n/** One selectable line. */\nexport interface CommandOption extends CommandEffect {\n /** Unique within the whole palette — it is also the recency key. */\n readonly id: string;\n /** Resolved copy. A source that holds a catalog key resolves it before here. */\n readonly label: string;\n /** A second line: a code, a role, the record's entity. */\n readonly sublabel?: string;\n /**\n * Extra terms this option matches on, so a Spanish command still answers to\n * the English word someone typed. Raycast's mechanism, and the reason\n * `MetaUseCase` carries a `keywordsKey` at all.\n */\n readonly keywords?: readonly string[];\n /** Trailing text — a shortcut hint, the source's own name. */\n readonly hint?: string;\n readonly confirm?: CommandConfirm;\n}\n\n/** One heading and the options under it. */\nexport interface CommandGroup {\n readonly key: string;\n /** Resolved copy. */\n readonly label: string;\n readonly options: readonly CommandOption[];\n /**\n * Matches **before** any per-group limit, so \"N más\" is renderable. Omitted\n * when the source did not count — never defaulted to `options.length`, which\n * would claim there is no more when nobody looked.\n */\n readonly total?: number;\n readonly isLoading: boolean;\n /**\n * Set when this group could not be produced. A group carrying this is still\n * rendered: an omitted group reads as \"nothing matched\", which is a confident\n * claim nobody is in a position to make about a source they could not reach.\n */\n readonly unavailable?: CommandUnavailable;\n}\n\n/**\n * One contributor's whole answer.\n *\n * Several groups, not one, because the record search fans out over four entities\n * and each is its own heading — flattening them here would make the palette\n * re-derive what ADR 0040 already grouped.\n */\nexport interface CommandSource {\n readonly key: string;\n readonly groups: readonly CommandGroup[];\n}\n\n/**\n * One level of the palette.\n *\n * Depth is a **stack of pages** rather than nested prefixes: selecting \"Nuevo…\"\n * makes the palette *become* the entity picker, which is Raycast's and Linear's\n * arrangement and reads far better than a second grammar character.\n */\nexport interface CommandPage {\n readonly id: string;\n /** Shown as a chip beside the input on any page but the root. */\n readonly title?: string;\n readonly placeholder: string;\n readonly sources: readonly CommandSource[];\n}\n\n/** The id of the page a palette opens on. */\nexport const ROOT_COMMAND_PAGE = 'root';\n"],"names":["ROOT_COMMAND_PAGE"],"mappings":"AAAA;;;;;;;;CAQC,GAED,wCAAwC,GAyGxC,2CAA2C,GAC3C,OAAO,MAAMA,oBAAoB,OAAO"}
@@ -0,0 +1,3 @@
1
+ export * from './command-matching.js';
2
+ export * from './command-source.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-palette/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './command-matching.js';
2
+ export * from './command-source.js';
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/command-palette/index.ts"],"sourcesContent":["export * from './command-matching.js';\nexport * from './command-source.js';\n"],"names":[],"mappings":"AAAA,cAAc,wBAAwB;AACtC,cAAc,sBAAsB"}
@@ -0,0 +1,3 @@
1
+ import { MetaAccessorOptions } from '../../meta-entities/meta-accessor/index.js';
2
+ export declare function accessor(options?: MetaAccessorOptions): (_value: unknown, context: ClassGetterDecoratorContext | ClassSetterDecoratorContext) => void;
3
+ //# sourceMappingURL=accessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessor.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/accessor/accessor.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,mBAAmB,EACpB,MAAM,4CAA4C,CAAC;AAEpD,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,IAElD,QAAQ,OAAO,EACf,SAAS,2BAA2B,GAAG,2BAA2B,UAOrE"}
@@ -0,0 +1,11 @@
1
+ import { appendMetaAccessor } from '../../helpers/index.js';
2
+ import { MetaAccessor } from '../../meta-entities/meta-accessor/index.js';
3
+ export function accessor(options) {
4
+ return (_value, context)=>{
5
+ const kind = context.kind === 'getter' ? 'getter' : 'setter';
6
+ const meta = new MetaAccessor(context.name, kind, options);
7
+ appendMetaAccessor(context.metadata, meta);
8
+ };
9
+ }
10
+
11
+ //# sourceMappingURL=accessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/accessor/accessor.ts"],"sourcesContent":["import { appendMetaAccessor } from '../../helpers/index.js';\nimport {\n MetaAccessor,\n MetaAccessorKind,\n MetaAccessorOptions,\n} from '../../meta-entities/meta-accessor/index.js';\n\nexport function accessor(options?: MetaAccessorOptions) {\n return (\n _value: unknown,\n context: ClassGetterDecoratorContext | ClassSetterDecoratorContext,\n ) => {\n const kind: MetaAccessorKind =\n context.kind === 'getter' ? 'getter' : 'setter';\n const meta = new MetaAccessor(context.name, kind, options);\n appendMetaAccessor(context.metadata, meta);\n };\n}\n"],"names":["appendMetaAccessor","MetaAccessor","accessor","options","_value","context","kind","meta","name","metadata"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SACEC,YAAY,QAGP,6CAA6C;AAEpD,OAAO,SAASC,SAASC,OAA6B;IACpD,OAAO,CACLC,QACAC;QAEA,MAAMC,OACJD,QAAQC,IAAI,KAAK,WAAW,WAAW;QACzC,MAAMC,OAAO,IAAIN,aAAaI,QAAQG,IAAI,EAAEF,MAAMH;QAClDH,mBAAmBK,QAAQI,QAAQ,EAAEF;IACvC;AACF"}
@@ -0,0 +1,2 @@
1
+ export * from './accessor.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/accessor/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './accessor.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/accessor/index.ts"],"sourcesContent":["export * from './accessor.js';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB"}
@@ -0,0 +1,4 @@
1
+ import type { Entity, EntityConstructor } from '../../../types/Entity.js';
2
+ import { MetaEntityOptions } from '../../meta-entities/meta-entity/index.js';
3
+ export declare function entity<TEntity extends Entity>(options?: MetaEntityOptions): (target: EntityConstructor<TEntity>, context: ClassDecoratorContext) => void;
4
+ //# sourceMappingURL=entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/entity/entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,EAEL,iBAAiB,EAClB,MAAM,0CAA0C,CAAC;AAElD,wBAAgB,MAAM,CAAC,OAAO,SAAS,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,IAEtE,QAAQ,iBAAiB,CAAC,OAAO,CAAC,EAClC,SAAS,qBAAqB,UAIjC"}
@@ -0,0 +1,9 @@
1
+ import { setMetaEntity } from '../../helpers/index.js';
2
+ import { MetaEntity } from '../../meta-entities/meta-entity/index.js';
3
+ export function entity(options) {
4
+ return (target, context)=>{
5
+ setMetaEntity(context.metadata, new MetaEntity(target.name, options));
6
+ };
7
+ }
8
+
9
+ //# sourceMappingURL=entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/entity/entity.ts"],"sourcesContent":["import type { Entity, EntityConstructor } from '../../../types/Entity.js';\nimport { setMetaEntity } from '../../helpers/index.js';\nimport {\n MetaEntity,\n MetaEntityOptions,\n} from '../../meta-entities/meta-entity/index.js';\n\nexport function entity<TEntity extends Entity>(options?: MetaEntityOptions) {\n return (\n target: EntityConstructor<TEntity>,\n context: ClassDecoratorContext,\n ) => {\n setMetaEntity(context.metadata, new MetaEntity(target.name, options));\n };\n}\n"],"names":["setMetaEntity","MetaEntity","entity","options","target","context","metadata","name"],"mappings":"AACA,SAASA,aAAa,QAAQ,yBAAyB;AACvD,SACEC,UAAU,QAEL,2CAA2C;AAElD,OAAO,SAASC,OAA+BC,OAA2B;IACxE,OAAO,CACLC,QACAC;QAEAL,cAAcK,QAAQC,QAAQ,EAAE,IAAIL,WAAWG,OAAOG,IAAI,EAAEJ;IAC9D;AACF"}
@@ -0,0 +1,2 @@
1
+ export * from './entity.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './entity.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/entity/index.ts"],"sourcesContent":["export * from './entity.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './method.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/method/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './method.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/method/index.ts"],"sourcesContent":["export * from './method.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc"}
@@ -0,0 +1,3 @@
1
+ import { MetaMethodOptions } from '../../meta-entities/meta-method/index.js';
2
+ export declare function method(options?: MetaMethodOptions): (_value: (...args: unknown[]) => unknown, context: ClassMethodDecoratorContext) => void;
3
+ //# sourceMappingURL=method.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/method/method.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAClB,MAAM,0CAA0C,CAAC;AAElD,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,iBAAiB,IAE9C,QAAQ,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACvC,SAAS,2BAA2B,UAKvC"}
@@ -0,0 +1,10 @@
1
+ import { appendMetaMethod } from '../../helpers/index.js';
2
+ import { MetaMethod } from '../../meta-entities/meta-method/index.js';
3
+ export function method(options) {
4
+ return (_value, context)=>{
5
+ const meta = new MetaMethod(context.name, options);
6
+ appendMetaMethod(context.metadata, meta);
7
+ };
8
+ }
9
+
10
+ //# sourceMappingURL=method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/method/method.ts"],"sourcesContent":["import { appendMetaMethod } from '../../helpers/index.js';\nimport {\n MetaMethod,\n MetaMethodOptions,\n} from '../../meta-entities/meta-method/index.js';\n\nexport function method(options?: MetaMethodOptions) {\n return (\n _value: (...args: unknown[]) => unknown,\n context: ClassMethodDecoratorContext,\n ) => {\n const meta = new MetaMethod(context.name, options);\n appendMetaMethod(context.metadata, meta);\n };\n}\n"],"names":["appendMetaMethod","MetaMethod","method","options","_value","context","meta","name","metadata"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,yBAAyB;AAC1D,SACEC,UAAU,QAEL,2CAA2C;AAElD,OAAO,SAASC,OAAOC,OAA2B;IAChD,OAAO,CACLC,QACAC;QAEA,MAAMC,OAAO,IAAIL,WAAWI,QAAQE,IAAI,EAAEJ;QAC1CH,iBAAiBK,QAAQG,QAAQ,EAAEF;IACrC;AACF"}
@@ -0,0 +1,2 @@
1
+ export * from './use-case.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/use-case/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './use-case.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/use-case/index.ts"],"sourcesContent":["export * from './use-case.js';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB"}
@@ -0,0 +1,18 @@
1
+ import type { Entity } from '../../../types/Entity.js';
2
+ import { MetaUseCaseOptions } from '../../meta-entities/meta-use-case/index.js';
3
+ /**
4
+ * Declares a use case: a verb on an entity beyond the `read`/`write`/`delete`
5
+ * triple, with everything a surface needs to render it.
6
+ *
7
+ * It writes twice, and the two writes have different jobs. The descriptor is
8
+ * appended to the **entity's** metadata, because that is what a form, a table or
9
+ * the palette holds. The entity/verb pair is written to the **class's own**
10
+ * metadata, which is what lets `permissionForUseCase(SomeUC)` derive the
11
+ * permission from one argument.
12
+ *
13
+ * The `const` type parameter keeps `key` a literal at the declaration site.
14
+ * Write it inline — `@useCase({ ...DESCRIPTOR })` would compile and would make
15
+ * the source scan in `@r10c/slices` stop seeing the declaration.
16
+ */
17
+ export declare function useCase<const TKey extends string, TEntity extends Entity>(options: MetaUseCaseOptions<TKey, TEntity>): (_target: unknown, context: ClassDecoratorContext) => void;
18
+ //# sourceMappingURL=use-case.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-case.d.ts","sourceRoot":"","sources":["../../../../src/entity-definition/decorators/use-case/use-case.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKvD,OAAO,EAEL,kBAAkB,EACnB,MAAM,4CAA4C,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,OAAO,SAAS,MAAM,EACvE,OAAO,EAAE,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,IAElC,SAAS,OAAO,EAAE,SAAS,qBAAqB,UAOzD"}
@@ -0,0 +1,26 @@
1
+ import { appendMetaUseCase, setMetaUseCaseBinding } from '../../helpers/index.js';
2
+ import { MetaUseCase } from '../../meta-entities/meta-use-case/index.js';
3
+ /**
4
+ * Declares a use case: a verb on an entity beyond the `read`/`write`/`delete`
5
+ * triple, with everything a surface needs to render it.
6
+ *
7
+ * It writes twice, and the two writes have different jobs. The descriptor is
8
+ * appended to the **entity's** metadata, because that is what a form, a table or
9
+ * the palette holds. The entity/verb pair is written to the **class's own**
10
+ * metadata, which is what lets `permissionForUseCase(SomeUC)` derive the
11
+ * permission from one argument.
12
+ *
13
+ * The `const` type parameter keeps `key` a literal at the declaration site.
14
+ * Write it inline — `@useCase({ ...DESCRIPTOR })` would compile and would make
15
+ * the source scan in `@r10c/slices` stop seeing the declaration.
16
+ */ export function useCase(options) {
17
+ return (_target, context)=>{
18
+ appendMetaUseCase(options.entity, new MetaUseCase(options));
19
+ setMetaUseCaseBinding(context.metadata, {
20
+ entity: options.entity,
21
+ key: options.key
22
+ });
23
+ };
24
+ }
25
+
26
+ //# sourceMappingURL=use-case.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/entity-definition/decorators/use-case/use-case.ts"],"sourcesContent":["import type { Entity } from '../../../types/Entity.js';\nimport {\n appendMetaUseCase,\n setMetaUseCaseBinding,\n} from '../../helpers/index.js';\nimport {\n MetaUseCase,\n MetaUseCaseOptions,\n} from '../../meta-entities/meta-use-case/index.js';\n\n/**\n * Declares a use case: a verb on an entity beyond the `read`/`write`/`delete`\n * triple, with everything a surface needs to render it.\n *\n * It writes twice, and the two writes have different jobs. The descriptor is\n * appended to the **entity's** metadata, because that is what a form, a table or\n * the palette holds. The entity/verb pair is written to the **class's own**\n * metadata, which is what lets `permissionForUseCase(SomeUC)` derive the\n * permission from one argument.\n *\n * The `const` type parameter keeps `key` a literal at the declaration site.\n * Write it inline — `@useCase({ ...DESCRIPTOR })` would compile and would make\n * the source scan in `@r10c/slices` stop seeing the declaration.\n */\nexport function useCase<const TKey extends string, TEntity extends Entity>(\n options: MetaUseCaseOptions<TKey, TEntity>,\n) {\n return (_target: unknown, context: ClassDecoratorContext) => {\n appendMetaUseCase(options.entity, new MetaUseCase(options));\n setMetaUseCaseBinding(context.metadata, {\n entity: options.entity,\n key: options.key,\n });\n };\n}\n"],"names":["appendMetaUseCase","setMetaUseCaseBinding","MetaUseCase","useCase","options","_target","context","entity","metadata","key"],"mappings":"AACA,SACEA,iBAAiB,EACjBC,qBAAqB,QAChB,yBAAyB;AAChC,SACEC,WAAW,QAEN,6CAA6C;AAEpD;;;;;;;;;;;;;CAaC,GACD,OAAO,SAASC,QACdC,OAA0C;IAE1C,OAAO,CAACC,SAAkBC;QACxBN,kBAAkBI,QAAQG,MAAM,EAAE,IAAIL,YAAYE;QAClDH,sBAAsBK,QAAQE,QAAQ,EAAE;YACtCD,QAAQH,QAAQG,MAAM;YACtBE,KAAKL,QAAQK,GAAG;QAClB;IACF;AACF"}
@@ -0,0 +1,33 @@
1
+ import type { ChildConstructor } from '../meta-entities/meta-accessor/index.js';
2
+ import { type EntityFieldDescriptor } from './describe-entity-columns.js';
3
+ /**
4
+ * The columns of one row of an owned collection.
5
+ *
6
+ * Thin over {@link describeEntityColumns}, which already accepts a
7
+ * `ChildConstructor` — a child is described by its accessors and needs no
8
+ * `@entity()` ([ADR 0034](../../../../../../../docs/adr/0034-composition-metadata.md)).
9
+ * What this adds is the one rule a row has and an entity does not.
10
+ *
11
+ * **A child may not declare `$key`.** That name is the row's minted client
12
+ * identity, and a member of the same name would be overwritten by it — the row
13
+ * would re-key on every keystroke, drop focus mid-word, and address another
14
+ * row's errors. Throwing is the only honest option: silently renaming the
15
+ * member would write the wrong column, and preferring the member over the key
16
+ * would leave the grid with no identity at all.
17
+ *
18
+ * `EntifixBuildError` rather than a logic error, because this is a declaration
19
+ * fault in the entity — the same class `assertNotQueryable` raises when a
20
+ * collection claims to be sortable.
21
+ */
22
+ export declare function describeChildColumns<TChild extends object>(childType: ChildConstructor<TChild>, sample?: TChild): EntityFieldDescriptor[];
23
+ /**
24
+ * The columns a detail grid actually edits.
25
+ *
26
+ * A read-only member still has a column — it is shown, just not written, exactly
27
+ * as a form shows one. What is dropped is a **nested collection**: a child that
28
+ * owns rows of its own would need a grid inside a grid, and `reconstructChild`
29
+ * is one level deep by decision. Dropping it here rather than rendering a
30
+ * disabled cell keeps that decision in one place.
31
+ */
32
+ export declare function editableChildColumns(descriptors: readonly EntityFieldDescriptor[]): EntityFieldDescriptor[];
33
+ //# sourceMappingURL=describe-child-columns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe-child-columns.d.ts","sourceRoot":"","sources":["../../../src/entity-definition/describe/describe-child-columns.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,SAAS,MAAM,EACxD,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACnC,MAAM,CAAC,EAAE,MAAM,GACd,qBAAqB,EAAE,CAezB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,SAAS,qBAAqB,EAAE,GAC5C,qBAAqB,EAAE,CAOzB"}
@@ -0,0 +1,44 @@
1
+ import { EntifixBuildError } from '../../base-entities/entifix-error/index.js';
2
+ import { ROW_KEY } from '../../types/EntityRowDraft.js';
3
+ import { describeEntityColumns } from './describe-entity-columns.js';
4
+ /**
5
+ * The columns of one row of an owned collection.
6
+ *
7
+ * Thin over {@link describeEntityColumns}, which already accepts a
8
+ * `ChildConstructor` — a child is described by its accessors and needs no
9
+ * `@entity()` ([ADR 0034](../../../../../../../docs/adr/0034-composition-metadata.md)).
10
+ * What this adds is the one rule a row has and an entity does not.
11
+ *
12
+ * **A child may not declare `$key`.** That name is the row's minted client
13
+ * identity, and a member of the same name would be overwritten by it — the row
14
+ * would re-key on every keystroke, drop focus mid-word, and address another
15
+ * row's errors. Throwing is the only honest option: silently renaming the
16
+ * member would write the wrong column, and preferring the member over the key
17
+ * would leave the grid with no identity at all.
18
+ *
19
+ * `EntifixBuildError` rather than a logic error, because this is a declaration
20
+ * fault in the entity — the same class `assertNotQueryable` raises when a
21
+ * collection claims to be sortable.
22
+ */ export function describeChildColumns(childType, sample) {
23
+ const descriptors = describeEntityColumns(childType, sample);
24
+ const reserved = descriptors.find((descriptor)=>descriptor.name === ROW_KEY);
25
+ if (reserved !== undefined) {
26
+ throw new EntifixBuildError(`A composition child declares a member named \`${ROW_KEY}\`, which is reserved ` + 'for the row’s client-side key. Rename the member: the key and the member ' + 'cannot share a name, and the row would lose its identity on every edit.', undefined, {
27
+ member: ROW_KEY
28
+ });
29
+ }
30
+ return descriptors;
31
+ }
32
+ /**
33
+ * The columns a detail grid actually edits.
34
+ *
35
+ * A read-only member still has a column — it is shown, just not written, exactly
36
+ * as a form shows one. What is dropped is a **nested collection**: a child that
37
+ * owns rows of its own would need a grid inside a grid, and `reconstructChild`
38
+ * is one level deep by decision. Dropping it here rather than rendering a
39
+ * disabled cell keeps that decision in one place.
40
+ */ export function editableChildColumns(descriptors) {
41
+ return descriptors.filter((descriptor)=>descriptor.type !== 'composition' && descriptor.type !== 'linkCollection' && descriptor.type !== 'link');
42
+ }
43
+
44
+ //# sourceMappingURL=describe-child-columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/entity-definition/describe/describe-child-columns.ts"],"sourcesContent":["import { EntifixBuildError } from '../../base-entities/entifix-error/index.js';\nimport { ROW_KEY } from '../../types/EntityRowDraft.js';\nimport type { ChildConstructor } from '../meta-entities/meta-accessor/index.js';\nimport {\n describeEntityColumns,\n type EntityFieldDescriptor,\n} from './describe-entity-columns.js';\n\n/**\n * The columns of one row of an owned collection.\n *\n * Thin over {@link describeEntityColumns}, which already accepts a\n * `ChildConstructor` — a child is described by its accessors and needs no\n * `@entity()` ([ADR 0034](../../../../../../../docs/adr/0034-composition-metadata.md)).\n * What this adds is the one rule a row has and an entity does not.\n *\n * **A child may not declare `$key`.** That name is the row's minted client\n * identity, and a member of the same name would be overwritten by it — the row\n * would re-key on every keystroke, drop focus mid-word, and address another\n * row's errors. Throwing is the only honest option: silently renaming the\n * member would write the wrong column, and preferring the member over the key\n * would leave the grid with no identity at all.\n *\n * `EntifixBuildError` rather than a logic error, because this is a declaration\n * fault in the entity — the same class `assertNotQueryable` raises when a\n * collection claims to be sortable.\n */\nexport function describeChildColumns<TChild extends object>(\n childType: ChildConstructor<TChild>,\n sample?: TChild,\n): EntityFieldDescriptor[] {\n const descriptors = describeEntityColumns(childType, sample);\n const reserved = descriptors.find(descriptor => descriptor.name === ROW_KEY);\n\n if (reserved !== undefined) {\n throw new EntifixBuildError(\n `A composition child declares a member named \\`${ROW_KEY}\\`, which is reserved ` +\n 'for the row’s client-side key. Rename the member: the key and the member ' +\n 'cannot share a name, and the row would lose its identity on every edit.',\n undefined,\n { member: ROW_KEY },\n );\n }\n\n return descriptors;\n}\n\n/**\n * The columns a detail grid actually edits.\n *\n * A read-only member still has a column — it is shown, just not written, exactly\n * as a form shows one. What is dropped is a **nested collection**: a child that\n * owns rows of its own would need a grid inside a grid, and `reconstructChild`\n * is one level deep by decision. Dropping it here rather than rendering a\n * disabled cell keeps that decision in one place.\n */\nexport function editableChildColumns(\n descriptors: readonly EntityFieldDescriptor[],\n): EntityFieldDescriptor[] {\n return descriptors.filter(\n descriptor =>\n descriptor.type !== 'composition' &&\n descriptor.type !== 'linkCollection' &&\n descriptor.type !== 'link',\n );\n}\n"],"names":["EntifixBuildError","ROW_KEY","describeEntityColumns","describeChildColumns","childType","sample","descriptors","reserved","find","descriptor","name","undefined","member","editableChildColumns","filter","type"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,6CAA6C;AAC/E,SAASC,OAAO,QAAQ,gCAAgC;AAExD,SACEC,qBAAqB,QAEhB,+BAA+B;AAEtC;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,SAASC,qBACdC,SAAmC,EACnCC,MAAe;IAEf,MAAMC,cAAcJ,sBAAsBE,WAAWC;IACrD,MAAME,WAAWD,YAAYE,IAAI,CAACC,CAAAA,aAAcA,WAAWC,IAAI,KAAKT;IAEpE,IAAIM,aAAaI,WAAW;QAC1B,MAAM,IAAIX,kBACR,CAAC,8CAA8C,EAAEC,QAAQ,sBAAsB,CAAC,GAC9E,8EACA,2EACFU,WACA;YAAEC,QAAQX;QAAQ;IAEtB;IAEA,OAAOK;AACT;AAEA;;;;;;;;CAQC,GACD,OAAO,SAASO,qBACdP,WAA6C;IAE7C,OAAOA,YAAYQ,MAAM,CACvBL,CAAAA,aACEA,WAAWM,IAAI,KAAK,iBACpBN,WAAWM,IAAI,KAAK,oBACpBN,WAAWM,IAAI,KAAK;AAE1B"}