@happyvertical/smrt-planner 0.0.0-stage → 0.0.2

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 (815) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +170 -2
  3. package/app/404.html +80 -0
  4. package/app/_app/immutable/assets/0.B5zXkXe_.css +1 -0
  5. package/app/_app/immutable/assets/10.hpcnxvK1.css +1 -0
  6. package/app/_app/immutable/assets/11.D7zoXfVV.css +1 -0
  7. package/app/_app/immutable/assets/12.CPobm1ED.css +1 -0
  8. package/app/_app/immutable/assets/2.CyaWdRdI.css +1 -0
  9. package/app/_app/immutable/assets/3.BlPQOes8.css +1 -0
  10. package/app/_app/immutable/assets/8.2gQeKBp_.css +1 -0
  11. package/app/_app/immutable/assets/9.HOPT4xtg.css +1 -0
  12. package/app/_app/immutable/assets/AiSetup.Cb22AigN.css +1 -0
  13. package/app/_app/immutable/assets/Button.DkP0qkG9.css +1 -0
  14. package/app/_app/immutable/assets/ConnectTools.BgIJOOGW.css +1 -0
  15. package/app/_app/immutable/assets/FieldMapForm.BCU-4pO4.css +1 -0
  16. package/app/_app/immutable/assets/ModelPage.Dd3LcMta.css +1 -0
  17. package/app/_app/immutable/assets/SectionActions.CTkVuNMF.css +1 -0
  18. package/app/_app/immutable/assets/SectionIcons.5Udq9vN-.css +1 -0
  19. package/app/_app/immutable/assets/SegmentedControl.B8SrQacd.css +1 -0
  20. package/app/_app/immutable/assets/dist.C5nHBk_O.css +1 -0
  21. package/app/_app/immutable/assets/feedback.BVKAwFck.css +1 -0
  22. package/app/_app/immutable/assets/forms.BChZ2RWM.css +1 -0
  23. package/app/_app/immutable/assets/inter-latin-ext.B_-bZUTo.woff2 +0 -0
  24. package/app/_app/immutable/assets/inter-latin.8kRkwJBP.woff2 +0 -0
  25. package/app/_app/immutable/assets/jetbrains-mono-latin-ext.Bnd2h4Br.woff2 +0 -0
  26. package/app/_app/immutable/assets/jetbrains-mono-latin.Db4Uuiha.woff2 +0 -0
  27. package/app/_app/immutable/assets/ort-wasm-simd-threaded.asyncify.CxOG5pUO.wasm +0 -0
  28. package/app/_app/immutable/assets/percent.LH0z-ozZ.css +1 -0
  29. package/app/_app/immutable/assets/space-grotesk-latin-ext.wJGaI8U0.woff2 +0 -0
  30. package/app/_app/immutable/assets/space-grotesk-latin.DPT1xrvW.woff2 +0 -0
  31. package/app/_app/immutable/assets/store.CGDwHkkF.css +1 -0
  32. package/app/_app/immutable/assets/ui.B1A1Zl2p.css +1 -0
  33. package/app/_app/immutable/assets/workspace.BIMkuZDb.css +1 -0
  34. package/app/_app/immutable/chunks/1okeBSoq.js +1 -0
  35. package/app/_app/immutable/chunks/2jFBkS1C.js +1 -0
  36. package/app/_app/immutable/chunks/6P9zxrzU.js +1 -0
  37. package/app/_app/immutable/chunks/B32EWqI8.js +9 -0
  38. package/app/_app/immutable/chunks/B4Kevpe0.js +1 -0
  39. package/app/_app/immutable/chunks/BJfAXhak.js +3 -0
  40. package/app/_app/immutable/chunks/BKwRT_1p.js +1 -0
  41. package/app/_app/immutable/chunks/BQxY8kkL.js +1 -0
  42. package/app/_app/immutable/chunks/BS4h9ES-.js +1 -0
  43. package/app/_app/immutable/chunks/BWPhGFHl.js +1 -0
  44. package/app/_app/immutable/chunks/BYcBM-fh.js +1 -0
  45. package/app/_app/immutable/chunks/BegKiy2G.js +1 -0
  46. package/app/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  47. package/app/_app/immutable/chunks/BnRri03M.js +1 -0
  48. package/app/_app/immutable/chunks/C7zBd-pD.js +1 -0
  49. package/app/_app/immutable/chunks/CA-A9Ngs.js +1 -0
  50. package/app/_app/immutable/chunks/CMhpRMKg.js +1 -0
  51. package/app/_app/immutable/chunks/CPRHZZeW.js +1 -0
  52. package/app/_app/immutable/chunks/CRQ1Pmzr.js +1 -0
  53. package/app/_app/immutable/chunks/CWtfVMDz.js +1 -0
  54. package/app/_app/immutable/chunks/CgAkqYsL.js +1 -0
  55. package/app/_app/immutable/chunks/Chyo8rdT.js +3 -0
  56. package/app/_app/immutable/chunks/Ci0DUht6.js +34 -0
  57. package/app/_app/immutable/chunks/CmmuWmp6.js +2 -0
  58. package/app/_app/immutable/chunks/CrFNLK0f.js +1 -0
  59. package/app/_app/immutable/chunks/CrO3W89x.js +1 -0
  60. package/app/_app/immutable/chunks/CsprTb3f.js +2 -0
  61. package/app/_app/immutable/chunks/CyUMm_Wp.js +1 -0
  62. package/app/_app/immutable/chunks/CygC84VT.js +2 -0
  63. package/app/_app/immutable/chunks/D0VgZnk1.js +1 -0
  64. package/app/_app/immutable/chunks/D71UrO5c.js +1 -0
  65. package/app/_app/immutable/chunks/D7hhQvDO.js +1 -0
  66. package/app/_app/immutable/chunks/DD7gpKb2.js +1 -0
  67. package/app/_app/immutable/chunks/DNRgqfTx.js +1 -0
  68. package/app/_app/immutable/chunks/DRByVC-c.js +1 -0
  69. package/app/_app/immutable/chunks/DVRKjN-E.js +1 -0
  70. package/app/_app/immutable/chunks/D_J_XtJy.js +846 -0
  71. package/app/_app/immutable/chunks/Dbjm4OuC.js +1 -0
  72. package/app/_app/immutable/chunks/Dc4q22LH.js +42 -0
  73. package/app/_app/immutable/chunks/Dd_uD5pT.js +1 -0
  74. package/app/_app/immutable/chunks/DkR8_Ws6.js +2 -0
  75. package/app/_app/immutable/chunks/Dp9GVO-9.js +1 -0
  76. package/app/_app/immutable/chunks/DqcD-WtP.js +1 -0
  77. package/app/_app/immutable/chunks/Dt-HX3Vu.js +1 -0
  78. package/app/_app/immutable/chunks/FbOxj-PF.js +69 -0
  79. package/app/_app/immutable/chunks/QukgIHDX.js +1 -0
  80. package/app/_app/immutable/chunks/WxSPP8QW.js +4 -0
  81. package/app/_app/immutable/chunks/Xp1g1t4n.js +3 -0
  82. package/app/_app/immutable/chunks/iET62IRm.js +2 -0
  83. package/app/_app/immutable/chunks/leQCwW2d.js +1 -0
  84. package/app/_app/immutable/chunks/p6bgzXiY.js +1 -0
  85. package/app/_app/immutable/chunks/uBIymjUX.js +1 -0
  86. package/app/_app/immutable/chunks/xihTtKlq.js +1 -0
  87. package/app/_app/immutable/entry/app.IZIJXhgq.js +2 -0
  88. package/app/_app/immutable/entry/start.BuaYHD1N.js +1 -0
  89. package/app/_app/immutable/nodes/0.m_U8WC7E.js +10 -0
  90. package/app/_app/immutable/nodes/1.Crw8ULhB.js +1 -0
  91. package/app/_app/immutable/nodes/10.1nQxyH9H.js +4 -0
  92. package/app/_app/immutable/nodes/11.Cw0JnQF3.js +1 -0
  93. package/app/_app/immutable/nodes/12.BIocA1aI.js +1 -0
  94. package/app/_app/immutable/nodes/2.CR5BwGnt.js +17 -0
  95. package/app/_app/immutable/nodes/3.1B56hgAG.js +1 -0
  96. package/app/_app/immutable/nodes/4.SSIC7sUh.js +1 -0
  97. package/app/_app/immutable/nodes/5.DgdwleDQ.js +1 -0
  98. package/app/_app/immutable/nodes/6.DmD9rqLU.js +1 -0
  99. package/app/_app/immutable/nodes/7.DdngsBmo.js +1 -0
  100. package/app/_app/immutable/nodes/8.D2Mszsua.js +3 -0
  101. package/app/_app/immutable/nodes/9.CLYsywul.js +1 -0
  102. package/app/_app/immutable/workers/assets/ort-wasm-simd-threaded.asyncify-CxOG5pUO.wasm +0 -0
  103. package/app/_app/immutable/workers/llm.worker-wfCOG_uk.js +69 -0
  104. package/app/_app/immutable/workers/local-speech.worker-DWbfmFUk.js +51 -0
  105. package/app/_app/version.json +1 -0
  106. package/app/ai/index.html +89 -0
  107. package/app/blueprint/index.html +87 -0
  108. package/app/cookbook/index.html +87 -0
  109. package/app/index.html +103 -0
  110. package/app/m/ads/AdDeliveryTier/index.html +96 -0
  111. package/app/m/ads/AdEvent/index.html +96 -0
  112. package/app/m/ads/AdFormat/index.html +96 -0
  113. package/app/m/ads/AdGroup/index.html +96 -0
  114. package/app/m/ads/AdVariation/index.html +96 -0
  115. package/app/m/analytics/AnalyticsDataStream/index.html +96 -0
  116. package/app/m/analytics/AnalyticsEvent/index.html +96 -0
  117. package/app/m/analytics/AnalyticsProperty/index.html +96 -0
  118. package/app/m/analytics/AnalyticsReport/index.html +96 -0
  119. package/app/m/approvals/ApprovalEvent/index.html +96 -0
  120. package/app/m/approvals/ApprovalPolicy/index.html +96 -0
  121. package/app/m/approvals/ApprovalRequest/index.html +96 -0
  122. package/app/m/assets/Asset/index.html +96 -0
  123. package/app/m/assets/AssetAssociation/index.html +97 -0
  124. package/app/m/assets/AssetMetafield/index.html +96 -0
  125. package/app/m/assets/AssetStatus/index.html +96 -0
  126. package/app/m/assets/AssetType/index.html +96 -0
  127. package/app/m/assets/Folder/index.html +96 -0
  128. package/app/m/chat/AgentSession/index.html +96 -0
  129. package/app/m/chat/ChatMessage/index.html +97 -0
  130. package/app/m/chat/ChatParticipant/index.html +97 -0
  131. package/app/m/chat/ChatReaction/index.html +96 -0
  132. package/app/m/chat/ChatRoom/index.html +96 -0
  133. package/app/m/chat/ChatThread/index.html +97 -0
  134. package/app/m/chat/VoiceGatewayTurn/index.html +96 -0
  135. package/app/m/chat/VoiceSession/index.html +96 -0
  136. package/app/m/commerce/Agreement/index.html +96 -0
  137. package/app/m/commerce/Cart/index.html +96 -0
  138. package/app/m/commerce/Contract/index.html +96 -0
  139. package/app/m/commerce/ContractLineItem/index.html +97 -0
  140. package/app/m/commerce/Customer/index.html +96 -0
  141. package/app/m/commerce/Estimate/index.html +96 -0
  142. package/app/m/commerce/Fulfillment/index.html +96 -0
  143. package/app/m/commerce/FulfillmentLineItem/index.html +97 -0
  144. package/app/m/commerce/Invoice/index.html +96 -0
  145. package/app/m/commerce/InvoiceLineItem/index.html +97 -0
  146. package/app/m/commerce/Lease/index.html +96 -0
  147. package/app/m/commerce/LicenseSale/index.html +96 -0
  148. package/app/m/commerce/Order/index.html +96 -0
  149. package/app/m/commerce/Payment/index.html +96 -0
  150. package/app/m/commerce/PaymentAllocation/index.html +97 -0
  151. package/app/m/commerce/PaymentInstrument/index.html +96 -0
  152. package/app/m/commerce/PaymentIntent/index.html +96 -0
  153. package/app/m/commerce/Payout/index.html +96 -0
  154. package/app/m/commerce/ProductionOrder/index.html +96 -0
  155. package/app/m/commerce/PurchaseOrder/index.html +96 -0
  156. package/app/m/commerce/Vendor/index.html +96 -0
  157. package/app/m/commerce/WholesaleOrder/index.html +96 -0
  158. package/app/m/content/Content/index.html +96 -0
  159. package/app/m/content/ContentContribution/index.html +96 -0
  160. package/app/m/content/ContentContributionAttachment/index.html +96 -0
  161. package/app/m/content/ContentContributionRevision/index.html +96 -0
  162. package/app/m/content/ContentContributionType/index.html +96 -0
  163. package/app/m/content/ContentContributor/index.html +96 -0
  164. package/app/m/content/ContentCorrection/index.html +96 -0
  165. package/app/m/content/ContentFeedSource/index.html +96 -0
  166. package/app/m/content/ContentGovernanceAssignment/index.html +96 -0
  167. package/app/m/content/ContentGovernancePolicy/index.html +96 -0
  168. package/app/m/content/ContentGovernanceProfile/index.html +96 -0
  169. package/app/m/content/ContentReference/index.html +96 -0
  170. package/app/m/content/ContentReview/index.html +96 -0
  171. package/app/m/content/ContentVersion/index.html +96 -0
  172. package/app/m/content/Contents/index.html +96 -0
  173. package/app/m/events/Event/index.html +96 -0
  174. package/app/m/events/EventParticipant/index.html +97 -0
  175. package/app/m/events/EventSeries/index.html +96 -0
  176. package/app/m/events/EventType/index.html +96 -0
  177. package/app/m/facts/Fact/index.html +96 -0
  178. package/app/m/facts/FactContent/index.html +96 -0
  179. package/app/m/facts/FactEvidence/index.html +96 -0
  180. package/app/m/facts/FactSource/index.html +96 -0
  181. package/app/m/facts/FactSubject/index.html +96 -0
  182. package/app/m/facts/FactTag/index.html +96 -0
  183. package/app/m/fields/FieldPolicy/index.html +96 -0
  184. package/app/m/fields/FieldPolicySuggestion/index.html +96 -0
  185. package/app/m/fields/FieldUsageCounter/index.html +96 -0
  186. package/app/m/images/Image/index.html +96 -0
  187. package/app/m/inventory/InventoryLocation/index.html +96 -0
  188. package/app/m/inventory/StockLevel/index.html +96 -0
  189. package/app/m/inventory/StockMovement/index.html +96 -0
  190. package/app/m/ledgers/Account/index.html +96 -0
  191. package/app/m/ledgers/Journal/index.html +96 -0
  192. package/app/m/ledgers/JournalEntry/index.html +97 -0
  193. package/app/m/manufacturing/Assembly/index.html +96 -0
  194. package/app/m/manufacturing/BillOfMaterials/index.html +96 -0
  195. package/app/m/manufacturing/BomLine/index.html +96 -0
  196. package/app/m/manufacturing/Operation/index.html +96 -0
  197. package/app/m/manufacturing/ProductionRun/index.html +96 -0
  198. package/app/m/manufacturing/ProductionRunCompletion/index.html +96 -0
  199. package/app/m/manufacturing/RoutingStep/index.html +96 -0
  200. package/app/m/marketing/Campaign/index.html +96 -0
  201. package/app/m/marketing/CampaignChannel/index.html +96 -0
  202. package/app/m/marketing/CampaignMetricSnapshot/index.html +96 -0
  203. package/app/m/messages/Account/index.html +96 -0
  204. package/app/m/messages/Attachment/index.html +96 -0
  205. package/app/m/messages/Blacklist/index.html +96 -0
  206. package/app/m/messages/Email/failed-sends/index.html +96 -0
  207. package/app/m/messages/Email/index.html +96 -0
  208. package/app/m/messages/Email/mailbox/index.html +96 -0
  209. package/app/m/messages/EmailAccount/index.html +96 -0
  210. package/app/m/messages/EmailFolder/index.html +96 -0
  211. package/app/m/messages/Message/index.html +96 -0
  212. package/app/m/messages/MessagingEndpoint/index.html +96 -0
  213. package/app/m/messages/PersonaMessageRoute/index.html +96 -0
  214. package/app/m/messages/SlackAccount/index.html +96 -0
  215. package/app/m/messages/SlackMessage/index.html +96 -0
  216. package/app/m/messages/TelegramAccount/index.html +96 -0
  217. package/app/m/messages/Tweet/index.html +96 -0
  218. package/app/m/messages/TwitterAccount/index.html +96 -0
  219. package/app/m/messages/Whitelist/index.html +96 -0
  220. package/app/m/messages/ZulipAccount/index.html +96 -0
  221. package/app/m/places/Place/index.html +96 -0
  222. package/app/m/places/PlaceType/index.html +96 -0
  223. package/app/m/preferences/UiPreferenceRecord/index.html +96 -0
  224. package/app/m/products/Category/index.html +96 -0
  225. package/app/m/products/Material/index.html +96 -0
  226. package/app/m/products/Product/index.html +96 -0
  227. package/app/m/products/Product/ingredients/index.html +96 -0
  228. package/app/m/products/ProductVariant/index.html +97 -0
  229. package/app/m/products/Sku/index.html +97 -0
  230. package/app/m/profiles/ApiKey/index.html +96 -0
  231. package/app/m/profiles/Bot/index.html +96 -0
  232. package/app/m/profiles/MagicLinkToken/index.html +96 -0
  233. package/app/m/profiles/NostrIdentity/index.html +96 -0
  234. package/app/m/profiles/OidcIdentity/index.html +96 -0
  235. package/app/m/profiles/Organization/index.html +96 -0
  236. package/app/m/profiles/Person/index.html +96 -0
  237. package/app/m/profiles/Profile/index.html +96 -0
  238. package/app/m/profiles/ProfileMetadata/index.html +96 -0
  239. package/app/m/profiles/ProfileMetafield/index.html +96 -0
  240. package/app/m/profiles/ProfileRelationship/index.html +96 -0
  241. package/app/m/profiles/ProfileRelationshipTerm/index.html +96 -0
  242. package/app/m/profiles/ProfileRelationshipType/index.html +96 -0
  243. package/app/m/profiles/ProfileType/index.html +96 -0
  244. package/app/m/projects/Comment/index.html +97 -0
  245. package/app/m/projects/Issue/index.html +96 -0
  246. package/app/m/projects/Label/index.html +96 -0
  247. package/app/m/projects/Project/index.html +96 -0
  248. package/app/m/projects/ProjectIntegration/index.html +96 -0
  249. package/app/m/projects/PullRequest/index.html +96 -0
  250. package/app/m/projects/Repository/index.html +96 -0
  251. package/app/m/properties/Property/index.html +96 -0
  252. package/app/m/properties/Zone/index.html +96 -0
  253. package/app/m/reports/RuntimeReport/index.html +96 -0
  254. package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +96 -0
  255. package/app/m/reports/SmrtReportLock/index.html +96 -0
  256. package/app/m/reports/SmrtReportRefreshTask/index.html +96 -0
  257. package/app/m/reports/SmrtReportRun/index.html +96 -0
  258. package/app/m/reports/SmrtReportSchedule/index.html +96 -0
  259. package/app/m/reports/SmrtReportWatermark/index.html +96 -0
  260. package/app/m/sales/AttributionException/index.html +96 -0
  261. package/app/m/sales/AttributionPolicy/index.html +96 -0
  262. package/app/m/sales/Commission/index.html +96 -0
  263. package/app/m/sales/CommissionAdjustment/index.html +96 -0
  264. package/app/m/sales/CommissionPayout/index.html +96 -0
  265. package/app/m/sales/CommissionPlan/index.html +96 -0
  266. package/app/m/sales/Earner/index.html +96 -0
  267. package/app/m/sales/EarnerSourceAttribution/index.html +96 -0
  268. package/app/m/sales/EarningEvent/index.html +96 -0
  269. package/app/m/sales/ExecutedAgreement/index.html +96 -0
  270. package/app/m/sales/Lead/index.html +96 -0
  271. package/app/m/sales/Opportunity/index.html +96 -0
  272. package/app/m/sales/OpportunityConversion/index.html +96 -0
  273. package/app/m/sales/PipelineDefinition/index.html +96 -0
  274. package/app/m/sales/PipelineStage/index.html +97 -0
  275. package/app/m/sales/Referral/index.html +96 -0
  276. package/app/m/sales/ReferralAgreement/index.html +96 -0
  277. package/app/m/sales/ReferralLink/index.html +96 -0
  278. package/app/m/sales/ReferralProgram/index.html +96 -0
  279. package/app/m/sales/ReferralTermSnapshot/index.html +96 -0
  280. package/app/m/sales/ReferralTouch/index.html +96 -0
  281. package/app/m/sales/Referrer/index.html +96 -0
  282. package/app/m/sales/SalesActivity/index.html +96 -0
  283. package/app/m/sales/SalesRepresentative/index.html +96 -0
  284. package/app/m/sites/Site/index.html +96 -0
  285. package/app/m/sites/SiteAgentBinding/index.html +96 -0
  286. package/app/m/social/OAuthState/index.html +96 -0
  287. package/app/m/social/SocialAccount/index.html +96 -0
  288. package/app/m/social/SocialPost/index.html +96 -0
  289. package/app/m/social/SocialPostAnalyticsSnapshot/index.html +96 -0
  290. package/app/m/subscriptions/BillingAdjustment/index.html +96 -0
  291. package/app/m/subscriptions/ClientCharge/index.html +96 -0
  292. package/app/m/subscriptions/CreditGrant/index.html +96 -0
  293. package/app/m/subscriptions/PricingRule/index.html +96 -0
  294. package/app/m/subscriptions/RetailCharge/index.html +96 -0
  295. package/app/m/subscriptions/SpendingPolicy/index.html +96 -0
  296. package/app/m/subscriptions/SubscriptionPlan/index.html +96 -0
  297. package/app/m/subscriptions/TenantSubscription/index.html +96 -0
  298. package/app/m/subscriptions/TenantUsageMetric/index.html +96 -0
  299. package/app/m/support/ServiceTimeEntry/index.html +96 -0
  300. package/app/m/support/SupportAiRun/index.html +96 -0
  301. package/app/m/support/SupportAvailability/index.html +96 -0
  302. package/app/m/support/SupportCase/index.html +96 -0
  303. package/app/m/support/SupportCaseEvent/index.html +96 -0
  304. package/app/m/support/SupportChannelBinding/index.html +96 -0
  305. package/app/m/support/SupportCharge/index.html +96 -0
  306. package/app/m/support/SupportCompensation/index.html +96 -0
  307. package/app/m/support/SupportCompensationPlan/index.html +96 -0
  308. package/app/m/support/SupportEscalation/index.html +96 -0
  309. package/app/m/support/SupportInteraction/index.html +96 -0
  310. package/app/m/support/SupportPlan/index.html +96 -0
  311. package/app/m/support/SupportPolicy/index.html +96 -0
  312. package/app/m/support/SupportQualification/index.html +96 -0
  313. package/app/m/support/SupportServiceTarget/index.html +96 -0
  314. package/app/m/support/SupportSpecialist/index.html +96 -0
  315. package/app/m/support/SupportWorkLink/index.html +96 -0
  316. package/app/m/tags/Tag/index.html +96 -0
  317. package/app/m/tags/TagAlias/index.html +96 -0
  318. package/app/m/timesheets/AttendanceBreak/index.html +96 -0
  319. package/app/m/timesheets/AttendancePunch/index.html +96 -0
  320. package/app/m/timesheets/ServiceChargeSnapshot/index.html +96 -0
  321. package/app/m/timesheets/ServiceCompensationSnapshot/index.html +96 -0
  322. package/app/m/timesheets/ServiceTimeEntry/index.html +96 -0
  323. package/app/m/users/AccessRequest/index.html +96 -0
  324. package/app/m/users/Group/index.html +96 -0
  325. package/app/m/users/GroupMember/index.html +96 -0
  326. package/app/m/users/GroupRole/index.html +96 -0
  327. package/app/m/users/Membership/index.html +97 -0
  328. package/app/m/users/MembershipOverride/index.html +96 -0
  329. package/app/m/users/Permission/index.html +96 -0
  330. package/app/m/users/ResourceGrant/index.html +96 -0
  331. package/app/m/users/Role/index.html +96 -0
  332. package/app/m/users/RolePermission/index.html +96 -0
  333. package/app/m/users/Session/index.html +96 -0
  334. package/app/m/users/Tenant/index.html +96 -0
  335. package/app/m/users/TenantIntegration/index.html +96 -0
  336. package/app/m/users/TenantPermissionOverride/index.html +96 -0
  337. package/app/m/users/User/index.html +96 -0
  338. package/app/m/users/UsersCliAuthRequest/index.html +96 -0
  339. package/app/m/users/UsersMagicLinkToken/index.html +96 -0
  340. package/app/m/video/Character/index.html +96 -0
  341. package/app/m/video/CharacterAsset/index.html +96 -0
  342. package/app/m/video/CompositeJob/index.html +96 -0
  343. package/app/m/video/Performer/index.html +96 -0
  344. package/app/m/video/PerformerAsset/index.html +96 -0
  345. package/app/m/video/Scene/index.html +96 -0
  346. package/app/m/video/SceneAsset/index.html +96 -0
  347. package/app/m/video/VideoComposition/index.html +96 -0
  348. package/app/m/video/VideoCompositionAsset/index.html +96 -0
  349. package/app/m/video/VideoSequence/index.html +96 -0
  350. package/app/m/video/VideoSequenceAsset/index.html +96 -0
  351. package/app/m/video/VideoShot/index.html +96 -0
  352. package/app/m/video/VideoShotAsset/index.html +96 -0
  353. package/app/m/video/VideoShotCharacter/index.html +96 -0
  354. package/app/m/video/VideoWorkflow/index.html +96 -0
  355. package/app/m/voice/VoiceOutput/index.html +96 -0
  356. package/app/m/voice/VoiceProfile/index.html +96 -0
  357. package/app/m/voice/VoiceSample/index.html +96 -0
  358. package/app/packages/ads/index.html +92 -0
  359. package/app/packages/analytics/index.html +92 -0
  360. package/app/packages/approvals/index.html +92 -0
  361. package/app/packages/assets/index.html +92 -0
  362. package/app/packages/chat/index.html +92 -0
  363. package/app/packages/comments/index.html +92 -0
  364. package/app/packages/commerce/index.html +92 -0
  365. package/app/packages/content/index.html +92 -0
  366. package/app/packages/events/index.html +92 -0
  367. package/app/packages/expenses/index.html +92 -0
  368. package/app/packages/facts/index.html +92 -0
  369. package/app/packages/fields/index.html +92 -0
  370. package/app/packages/human-resources/index.html +92 -0
  371. package/app/packages/images/index.html +92 -0
  372. package/app/packages/index.html +90 -0
  373. package/app/packages/inventory/index.html +92 -0
  374. package/app/packages/ledgers/index.html +92 -0
  375. package/app/packages/manufacturing/index.html +92 -0
  376. package/app/packages/marketing/index.html +92 -0
  377. package/app/packages/messages/index.html +92 -0
  378. package/app/packages/places/index.html +92 -0
  379. package/app/packages/preferences/index.html +92 -0
  380. package/app/packages/products/index.html +92 -0
  381. package/app/packages/profiles/index.html +92 -0
  382. package/app/packages/projects/index.html +92 -0
  383. package/app/packages/properties/index.html +92 -0
  384. package/app/packages/reports/index.html +92 -0
  385. package/app/packages/sales/index.html +92 -0
  386. package/app/packages/sites/index.html +92 -0
  387. package/app/packages/social/index.html +92 -0
  388. package/app/packages/subscriptions/index.html +92 -0
  389. package/app/packages/support/index.html +92 -0
  390. package/app/packages/tags/index.html +92 -0
  391. package/app/packages/timesheets/index.html +92 -0
  392. package/app/packages/users/index.html +92 -0
  393. package/app/packages/video/index.html +92 -0
  394. package/app/packages/voice/index.html +92 -0
  395. package/app/recipes/account-access/help/index.html +93 -0
  396. package/app/recipes/account-access/index.html +95 -0
  397. package/app/recipes/activity/help/index.html +93 -0
  398. package/app/recipes/activity/index.html +94 -0
  399. package/app/recipes/agreements/help/index.html +93 -0
  400. package/app/recipes/agreements/index.html +96 -0
  401. package/app/recipes/analytics.reports/help/index.html +93 -0
  402. package/app/recipes/analytics.reports/index.html +94 -0
  403. package/app/recipes/assets/help/index.html +93 -0
  404. package/app/recipes/assets/index.html +95 -0
  405. package/app/recipes/billing/help/index.html +93 -0
  406. package/app/recipes/billing/index.html +95 -0
  407. package/app/recipes/chat.assistant/help/index.html +93 -0
  408. package/app/recipes/chat.assistant/index.html +94 -0
  409. package/app/recipes/comments/help/index.html +93 -0
  410. package/app/recipes/comments/index.html +94 -0
  411. package/app/recipes/commerce.customers/help/index.html +93 -0
  412. package/app/recipes/commerce.customers/index.html +94 -0
  413. package/app/recipes/commerce.estimates/help/index.html +93 -0
  414. package/app/recipes/commerce.estimates/index.html +94 -0
  415. package/app/recipes/commerce.purchases/help/index.html +93 -0
  416. package/app/recipes/commerce.purchases/index.html +94 -0
  417. package/app/recipes/commerce.sales/help/index.html +93 -0
  418. package/app/recipes/commerce.sales/index.html +94 -0
  419. package/app/recipes/commerce.vendors/help/index.html +93 -0
  420. package/app/recipes/commerce.vendors/index.html +94 -0
  421. package/app/recipes/commerce.wholesale/help/index.html +93 -0
  422. package/app/recipes/commerce.wholesale/index.html +94 -0
  423. package/app/recipes/events.calendar/help/index.html +93 -0
  424. package/app/recipes/events.calendar/index.html +94 -0
  425. package/app/recipes/fields.form-customization/help/index.html +93 -0
  426. package/app/recipes/fields.form-customization/index.html +94 -0
  427. package/app/recipes/inventory.stock/help/index.html +93 -0
  428. package/app/recipes/inventory.stock/index.html +94 -0
  429. package/app/recipes/ledgers.bookkeeping/help/index.html +93 -0
  430. package/app/recipes/ledgers.bookkeeping/index.html +94 -0
  431. package/app/recipes/messages/help/index.html +93 -0
  432. package/app/recipes/messages/index.html +95 -0
  433. package/app/recipes/products/help/index.html +93 -0
  434. package/app/recipes/products/index.html +96 -0
  435. package/app/recipes/projects.tracker/help/index.html +93 -0
  436. package/app/recipes/projects.tracker/index.html +94 -0
  437. package/app/recipes/reports.materialized/help/index.html +93 -0
  438. package/app/recipes/reports.materialized/index.html +94 -0
  439. package/app/recipes/sales.pipeline/help/index.html +93 -0
  440. package/app/recipes/sales.pipeline/index.html +94 -0
  441. package/app/recipes/tags.taxonomy/help/index.html +93 -0
  442. package/app/recipes/tags.taxonomy/index.html +94 -0
  443. package/app/recipes/team-collaboration/help/index.html +93 -0
  444. package/app/recipes/team-collaboration/index.html +94 -0
  445. package/app/s/custom-billing/index.html +89 -0
  446. package/app/s/custom-buying/index.html +89 -0
  447. package/app/s/custom-classes/index.html +89 -0
  448. package/app/s/custom-jobs/index.html +89 -0
  449. package/app/s/custom-kitchen/index.html +89 -0
  450. package/app/s/custom-material/index.html +89 -0
  451. package/app/s/custom-members/index.html +89 -0
  452. package/app/s/custom-parts/index.html +89 -0
  453. package/app/s/custom-schedule/index.html +89 -0
  454. package/app/s/custom-shop/index.html +89 -0
  455. package/app/s/custom-wholesale/index.html +89 -0
  456. package/app/s/section-access-control/index.html +89 -0
  457. package/app/s/section-account-security/index.html +89 -0
  458. package/app/s/section-accounting/index.html +89 -0
  459. package/app/s/section-activity/index.html +89 -0
  460. package/app/s/section-agreements/index.html +89 -0
  461. package/app/s/section-analytics/index.html +89 -0
  462. package/app/s/section-assets/index.html +89 -0
  463. package/app/s/section-billing/index.html +89 -0
  464. package/app/s/section-calendar/index.html +89 -0
  465. package/app/s/section-catalog/index.html +89 -0
  466. package/app/s/section-chat.assistant/index.html +89 -0
  467. package/app/s/section-comments/index.html +89 -0
  468. package/app/s/section-fields.form-customization/index.html +89 -0
  469. package/app/s/section-messages/index.html +89 -0
  470. package/app/s/section-more/index.html +89 -0
  471. package/app/s/section-operations/index.html +89 -0
  472. package/app/s/section-projects/index.html +89 -0
  473. package/app/s/section-purchasing/index.html +89 -0
  474. package/app/s/section-reports.materialized/index.html +89 -0
  475. package/app/s/section-sales/index.html +89 -0
  476. package/app/s/section-taxonomy/index.html +89 -0
  477. package/app/s/section-team/index.html +89 -0
  478. package/dist/ai/echo-gate.d.ts +13 -0
  479. package/dist/ai/echo-gate.js +21 -0
  480. package/dist/ai/icons.d.ts +9 -0
  481. package/dist/ai/icons.js +9 -0
  482. package/dist/ai/instance.d.ts +3 -0
  483. package/dist/ai/instance.js +25 -0
  484. package/dist/ai/state.svelte.d.ts +130 -0
  485. package/dist/ai/state.svelte.js +316 -0
  486. package/dist/ai/status.d.ts +67 -0
  487. package/dist/ai/status.js +125 -0
  488. package/dist/assets/smrt-mark.svg +38 -0
  489. package/dist/assistant/change.d.ts +101 -0
  490. package/dist/assistant/change.js +209 -0
  491. package/dist/assistant/engine.d.ts +20 -0
  492. package/dist/assistant/engine.js +43 -0
  493. package/dist/assistant/llm.worker.d.ts +1 -0
  494. package/dist/assistant/llm.worker.js +7 -0
  495. package/dist/assistant/match.d.ts +59 -0
  496. package/dist/assistant/match.js +271 -0
  497. package/dist/assistant/models.d.ts +38 -0
  498. package/dist/assistant/models.js +57 -0
  499. package/dist/assistant/offers.svelte.d.ts +36 -0
  500. package/dist/assistant/offers.svelte.js +59 -0
  501. package/dist/assistant/prefs.d.ts +14 -0
  502. package/dist/assistant/prefs.js +32 -0
  503. package/dist/assistant/prompt.d.ts +23 -0
  504. package/dist/assistant/prompt.js +163 -0
  505. package/dist/assistant/session.svelte.d.ts +74 -0
  506. package/dist/assistant/session.svelte.js +181 -0
  507. package/dist/assistant/theme-undo.svelte.d.ts +38 -0
  508. package/dist/assistant/theme-undo.svelte.js +50 -0
  509. package/dist/assistant/transport.d.ts +73 -0
  510. package/dist/assistant/transport.js +231 -0
  511. package/dist/assistant/voice-host.d.ts +10 -0
  512. package/dist/assistant/voice-host.js +17 -0
  513. package/dist/assistant/voice.svelte.d.ts +107 -0
  514. package/dist/assistant/voice.svelte.js +261 -0
  515. package/dist/catalog/catalog.json +89663 -0
  516. package/dist/catalog/generate/build.d.ts +33 -0
  517. package/dist/catalog/generate/build.js +131 -0
  518. package/dist/catalog/generate/exclusions.d.ts +18 -0
  519. package/dist/catalog/generate/exclusions.js +33 -0
  520. package/dist/catalog/generate/extract.d.ts +90 -0
  521. package/dist/catalog/generate/extract.js +326 -0
  522. package/dist/catalog/generate/local.d.ts +8 -0
  523. package/dist/catalog/generate/local.js +45 -0
  524. package/dist/catalog/generate/recipe-demo.d.ts +11 -0
  525. package/dist/catalog/generate/recipe-demo.js +29 -0
  526. package/dist/catalog/generate/recipe-metadata.d.ts +12 -0
  527. package/dist/catalog/generate/recipe-metadata.js +138 -0
  528. package/dist/catalog/generate/registry.d.ts +14 -0
  529. package/dist/catalog/generate/registry.js +83 -0
  530. package/dist/catalog/index.d.ts +21 -0
  531. package/dist/catalog/index.js +53 -0
  532. package/dist/catalog/types.d.ts +141 -0
  533. package/dist/catalog/types.js +8 -0
  534. package/dist/components/AiSetup.svelte +528 -0
  535. package/dist/components/AiSetup.svelte.d.ts +8 -0
  536. package/dist/components/AiStatusIcons.svelte +86 -0
  537. package/dist/components/AiStatusIcons.svelte.d.ts +18 -0
  538. package/dist/components/AppSettings.svelte +100 -0
  539. package/dist/components/AppSettings.svelte.d.ts +10 -0
  540. package/dist/components/BrowserAssistant.svelte +318 -0
  541. package/dist/components/BrowserAssistant.svelte.d.ts +8 -0
  542. package/dist/components/ChildRecords.svelte +331 -0
  543. package/dist/components/ChildRecords.svelte.d.ts +15 -0
  544. package/dist/components/ConnectTools.svelte +145 -0
  545. package/dist/components/ConnectTools.svelte.d.ts +8 -0
  546. package/dist/components/CookbooksPanel.svelte +308 -0
  547. package/dist/components/CookbooksPanel.svelte.d.ts +3 -0
  548. package/dist/components/ExportPanel.svelte +217 -0
  549. package/dist/components/ExportPanel.svelte.d.ts +3 -0
  550. package/dist/components/FeatureCard.svelte +197 -0
  551. package/dist/components/FeatureCard.svelte.d.ts +13 -0
  552. package/dist/components/FeaturesPanel.svelte +155 -0
  553. package/dist/components/FeaturesPanel.svelte.d.ts +3 -0
  554. package/dist/components/FieldInput.svelte +307 -0
  555. package/dist/components/FieldInput.svelte.d.ts +24 -0
  556. package/dist/components/FieldMapForm.svelte +173 -0
  557. package/dist/components/FieldMapForm.svelte.d.ts +18 -0
  558. package/dist/components/FormWorkspace.svelte +274 -0
  559. package/dist/components/FormWorkspace.svelte.d.ts +19 -0
  560. package/dist/components/HelpView.svelte +129 -0
  561. package/dist/components/HelpView.svelte.d.ts +12 -0
  562. package/dist/components/ModelOptions.svelte +239 -0
  563. package/dist/components/ModelOptions.svelte.d.ts +12 -0
  564. package/dist/components/ModelPage.svelte +295 -0
  565. package/dist/components/ModelPage.svelte.d.ts +9 -0
  566. package/dist/components/ModelWorkspace.svelte +488 -0
  567. package/dist/components/ModelWorkspace.svelte.d.ts +32 -0
  568. package/dist/components/PlannerEditBridge.svelte +36 -0
  569. package/dist/components/PlannerEditBridge.svelte.d.ts +3 -0
  570. package/dist/components/PlannerPalette.svelte +38 -0
  571. package/dist/components/PlannerPalette.svelte.d.ts +18 -0
  572. package/dist/components/RecipeCards.svelte +145 -0
  573. package/dist/components/RecipeCards.svelte.d.ts +3 -0
  574. package/dist/components/RecipeHelp.svelte +54 -0
  575. package/dist/components/RecipeHelp.svelte.d.ts +9 -0
  576. package/dist/components/RecipeOptions.svelte +160 -0
  577. package/dist/components/RecipeOptions.svelte.d.ts +9 -0
  578. package/dist/components/RecordFeatures.svelte +240 -0
  579. package/dist/components/RecordFeatures.svelte.d.ts +3 -0
  580. package/dist/components/RelationField.svelte +175 -0
  581. package/dist/components/RelationField.svelte.d.ts +16 -0
  582. package/dist/components/SectionActions.svelte +91 -0
  583. package/dist/components/SectionActions.svelte.d.ts +12 -0
  584. package/dist/components/SectionIcons.svelte +98 -0
  585. package/dist/components/SectionIcons.svelte.d.ts +15 -0
  586. package/dist/components/SectionOverview.svelte +65 -0
  587. package/dist/components/SectionOverview.svelte.d.ts +14 -0
  588. package/dist/components/SectionPage.svelte +230 -0
  589. package/dist/components/SectionPage.svelte.d.ts +7 -0
  590. package/dist/components/SettingsPanel.svelte +60 -0
  591. package/dist/components/SettingsPanel.svelte.d.ts +7 -0
  592. package/dist/components/ThemeBridge.svelte +56 -0
  593. package/dist/components/ThemeBridge.svelte.d.ts +3 -0
  594. package/dist/components/ThemeSection.svelte +167 -0
  595. package/dist/components/ThemeSection.svelte.d.ts +11 -0
  596. package/dist/components/VariantGridForm.svelte +309 -0
  597. package/dist/components/VariantGridForm.svelte.d.ts +12 -0
  598. package/dist/components/VoiceTyping.svelte +108 -0
  599. package/dist/components/VoiceTyping.svelte.d.ts +7 -0
  600. package/dist/cookbook/assemble.d.ts +16 -0
  601. package/dist/cookbook/assemble.js +29 -0
  602. package/dist/cookbook/file.d.ts +7 -0
  603. package/dist/cookbook/file.js +25 -0
  604. package/dist/cookbook/legacy.d.ts +9 -0
  605. package/dist/cookbook/legacy.js +87 -0
  606. package/dist/cookbook/migrate.d.ts +22 -0
  607. package/dist/cookbook/migrate.js +106 -0
  608. package/dist/cookbook/parse.d.ts +16 -0
  609. package/dist/cookbook/parse.js +246 -0
  610. package/dist/cookbook/storage.d.ts +45 -0
  611. package/dist/cookbook/storage.js +98 -0
  612. package/dist/cookbook/store.svelte.d.ts +94 -0
  613. package/dist/cookbook/store.svelte.js +231 -0
  614. package/dist/cookbook/types.d.ts +76 -0
  615. package/dist/cookbook/types.js +11 -0
  616. package/dist/cookbook/validate.d.ts +14 -0
  617. package/dist/cookbook/validate.js +29 -0
  618. package/dist/core/app.d.ts +37 -0
  619. package/dist/core/app.js +119 -0
  620. package/dist/core/catalog.d.ts +19 -0
  621. package/dist/core/catalog.js +9 -0
  622. package/dist/core/headless.d.ts +52 -0
  623. package/dist/core/headless.js +39 -0
  624. package/dist/core/index.d.ts +28 -0
  625. package/dist/core/index.js +28 -0
  626. package/dist/core/prompt.d.ts +38 -0
  627. package/dist/core/prompt.js +95 -0
  628. package/dist/core/reply.d.ts +60 -0
  629. package/dist/core/reply.js +89 -0
  630. package/dist/core/request.d.ts +15 -0
  631. package/dist/core/request.js +55 -0
  632. package/dist/data/children.d.ts +20 -0
  633. package/dist/data/children.js +80 -0
  634. package/dist/data/columns.d.ts +56 -0
  635. package/dist/data/columns.js +150 -0
  636. package/dist/data/context.d.ts +8 -0
  637. package/dist/data/context.js +19 -0
  638. package/dist/data/derived.d.ts +79 -0
  639. package/dist/data/derived.js +139 -0
  640. package/dist/data/display.d.ts +23 -0
  641. package/dist/data/display.js +84 -0
  642. package/dist/data/fakes.d.ts +52 -0
  643. package/dist/data/fakes.js +443 -0
  644. package/dist/data/format.d.ts +48 -0
  645. package/dist/data/format.js +121 -0
  646. package/dist/data/labels.d.ts +45 -0
  647. package/dist/data/labels.js +179 -0
  648. package/dist/data/packs.d.ts +95 -0
  649. package/dist/data/packs.js +830 -0
  650. package/dist/data/payments.d.ts +17 -0
  651. package/dist/data/payments.js +60 -0
  652. package/dist/data/planner-source.d.ts +7 -0
  653. package/dist/data/planner-source.js +32 -0
  654. package/dist/data/source.d.ts +119 -0
  655. package/dist/data/source.js +432 -0
  656. package/dist/features/catalogue.d.ts +96 -0
  657. package/dist/features/catalogue.js +225 -0
  658. package/dist/features/demo.d.ts +36 -0
  659. package/dist/features/demo.js +66 -0
  660. package/dist/features/palette.d.ts +39 -0
  661. package/dist/features/palette.js +53 -0
  662. package/dist/fields/address.d.ts +23 -0
  663. package/dist/fields/address.js +39 -0
  664. package/dist/fields/invalid.d.ts +2 -0
  665. package/dist/fields/invalid.js +8 -0
  666. package/dist/fields/modal.d.ts +7 -0
  667. package/dist/fields/modal.js +14 -0
  668. package/dist/fields/percent.d.ts +8 -0
  669. package/dist/fields/percent.js +16 -0
  670. package/dist/fields/renderer.d.ts +17 -0
  671. package/dist/fields/renderer.js +43 -0
  672. package/dist/forms/active.d.ts +16 -0
  673. package/dist/forms/active.js +24 -0
  674. package/dist/forms/fieldMap.d.ts +44 -0
  675. package/dist/forms/fieldMap.js +134 -0
  676. package/dist/forms/shared.d.ts +41 -0
  677. package/dist/forms/shared.js +138 -0
  678. package/dist/forms/stock.d.ts +28 -0
  679. package/dist/forms/stock.js +104 -0
  680. package/dist/forms/variantGrid.d.ts +83 -0
  681. package/dist/forms/variantGrid.js +283 -0
  682. package/dist/index.d.ts +17 -0
  683. package/dist/index.js +16 -0
  684. package/dist/inference/byo.svelte.d.ts +90 -0
  685. package/dist/inference/byo.svelte.js +295 -0
  686. package/dist/inference/config.d.ts +77 -0
  687. package/dist/inference/config.js +205 -0
  688. package/dist/inference/host.d.ts +40 -0
  689. package/dist/inference/host.js +57 -0
  690. package/dist/inference/openai.d.ts +59 -0
  691. package/dist/inference/openai.js +207 -0
  692. package/dist/inference/presets.d.ts +5 -0
  693. package/dist/inference/presets.js +46 -0
  694. package/dist/kitchen/client.d.ts +39 -0
  695. package/dist/kitchen/client.js +115 -0
  696. package/dist/kitchen/fragment.d.ts +30 -0
  697. package/dist/kitchen/fragment.js +49 -0
  698. package/dist/kitchen/state.svelte.d.ts +26 -0
  699. package/dist/kitchen/state.svelte.js +45 -0
  700. package/dist/library/apply.d.ts +17 -0
  701. package/dist/library/apply.js +32 -0
  702. package/dist/library/document.d.ts +12 -0
  703. package/dist/library/document.js +27 -0
  704. package/dist/library/icons.d.ts +6 -0
  705. package/dist/library/icons.js +26 -0
  706. package/dist/library/index.d.ts +8 -0
  707. package/dist/library/index.js +12 -0
  708. package/dist/library/library.json +788 -0
  709. package/dist/library/menu.d.ts +18 -0
  710. package/dist/library/menu.js +72 -0
  711. package/dist/library/state.svelte.d.ts +10 -0
  712. package/dist/library/state.svelte.js +28 -0
  713. package/dist/library/types.d.ts +57 -0
  714. package/dist/library/types.js +1 -0
  715. package/dist/overviews/definitions.d.ts +24 -0
  716. package/dist/overviews/definitions.js +97 -0
  717. package/dist/overviews/page.d.ts +21 -0
  718. package/dist/overviews/page.js +36 -0
  719. package/dist/overviews/registry.d.ts +44 -0
  720. package/dist/overviews/registry.js +191 -0
  721. package/dist/overviews/validate.d.ts +32 -0
  722. package/dist/overviews/validate.js +91 -0
  723. package/dist/planner/Planner.svelte +204 -0
  724. package/dist/planner/Planner.svelte.d.ts +4 -0
  725. package/dist/planner/app.svelte.d.ts +6 -0
  726. package/dist/planner/app.svelte.js +23 -0
  727. package/dist/planner/assistant.d.ts +46 -0
  728. package/dist/planner/assistant.js +122 -0
  729. package/dist/planner/commands/adapter.d.ts +121 -0
  730. package/dist/planner/commands/adapter.js +597 -0
  731. package/dist/planner/commands/catalog.d.ts +19 -0
  732. package/dist/planner/commands/catalog.js +54 -0
  733. package/dist/planner/commands/controller.svelte.d.ts +13 -0
  734. package/dist/planner/commands/controller.svelte.js +77 -0
  735. package/dist/planner/commands/index.d.ts +15 -0
  736. package/dist/planner/commands/index.js +15 -0
  737. package/dist/planner/commands/schemas.d.ts +25 -0
  738. package/dist/planner/commands/schemas.js +67 -0
  739. package/dist/planner/commands/slices.d.ts +18 -0
  740. package/dist/planner/commands/slices.js +49 -0
  741. package/dist/planner/commands/types.d.ts +80 -0
  742. package/dist/planner/commands/types.js +18 -0
  743. package/dist/planner/create.d.ts +4 -0
  744. package/dist/planner/create.js +22 -0
  745. package/dist/planner/instance.d.ts +15 -0
  746. package/dist/planner/instance.js +22 -0
  747. package/dist/planner/query.d.ts +16 -0
  748. package/dist/planner/query.js +28 -0
  749. package/dist/planner/selection.d.ts +15 -0
  750. package/dist/planner/selection.js +38 -0
  751. package/dist/planner/selection.svelte.d.ts +29 -0
  752. package/dist/planner/selection.svelte.js +54 -0
  753. package/dist/planner/tab.svelte.d.ts +11 -0
  754. package/dist/planner/tab.svelte.js +22 -0
  755. package/dist/planner/types.d.ts +41 -0
  756. package/dist/planner/types.js +1 -0
  757. package/dist/recipes/cards.d.ts +55 -0
  758. package/dist/recipes/cards.js +80 -0
  759. package/dist/recipes/features.d.ts +53 -0
  760. package/dist/recipes/features.js +97 -0
  761. package/dist/recipes/help/descriptions.json +373 -0
  762. package/dist/recipes/help.d.ts +121 -0
  763. package/dist/recipes/help.js +262 -0
  764. package/dist/recipes/index.d.ts +65 -0
  765. package/dist/recipes/index.js +95 -0
  766. package/dist/recipes/merge.d.ts +26 -0
  767. package/dist/recipes/merge.js +21 -0
  768. package/dist/recipes/overlay.json +409 -0
  769. package/dist/recipes/plan-data.d.ts +41 -0
  770. package/dist/recipes/plan-data.js +97 -0
  771. package/dist/recipes/plumbing.d.ts +70 -0
  772. package/dist/recipes/plumbing.js +185 -0
  773. package/dist/recipes/policy.d.ts +118 -0
  774. package/dist/recipes/policy.js +268 -0
  775. package/dist/recipes/resolve.d.ts +19 -0
  776. package/dist/recipes/resolve.js +65 -0
  777. package/dist/recipes/scope.d.ts +25 -0
  778. package/dist/recipes/scope.js +31 -0
  779. package/dist/recipes/sections.d.ts +49 -0
  780. package/dist/recipes/sections.js +84 -0
  781. package/dist/recipes/state.svelte.d.ts +67 -0
  782. package/dist/recipes/state.svelte.js +112 -0
  783. package/dist/recipes/types.d.ts +322 -0
  784. package/dist/recipes/types.js +8 -0
  785. package/dist/sections/entries.d.ts +30 -0
  786. package/dist/sections/entries.js +57 -0
  787. package/dist/sections/info.d.ts +16 -0
  788. package/dist/sections/info.js +39 -0
  789. package/dist/sections/path.d.ts +12 -0
  790. package/dist/sections/path.js +18 -0
  791. package/dist/settings/app-settings.d.ts +44 -0
  792. package/dist/settings/app-settings.js +138 -0
  793. package/dist/settings/currencies.d.ts +2 -0
  794. package/dist/settings/currencies.js +8 -0
  795. package/dist/theme/runtime.d.ts +14 -0
  796. package/dist/theme/runtime.js +27 -0
  797. package/dist/theme/theme.d.ts +47 -0
  798. package/dist/theme/theme.js +122 -0
  799. package/dist/upstream/CustomerSelect.svelte +60 -0
  800. package/dist/upstream/CustomerSelect.svelte.d.ts +17 -0
  801. package/dist/upstream/VendorSelect.svelte +60 -0
  802. package/dist/upstream/VendorSelect.svelte.d.ts +17 -0
  803. package/dist/upstream/overlay.d.ts +10 -0
  804. package/dist/upstream/overlay.js +49 -0
  805. package/dist/upstream/partySelect.d.ts +8 -0
  806. package/dist/upstream/partySelect.js +21 -0
  807. package/dist/upstream/partyTypes.d.ts +64 -0
  808. package/dist/upstream/partyTypes.js +8 -0
  809. package/dist/upstream/relations.d.ts +2 -0
  810. package/dist/upstream/relations.js +24 -0
  811. package/dist/upstream/selects.d.ts +26 -0
  812. package/dist/upstream/selects.js +20 -0
  813. package/dist/upstream/widgets.d.ts +20 -0
  814. package/dist/upstream/widgets.js +30 -0
  815. package/package.json +81 -3
@@ -0,0 +1,443 @@
1
+ import { isLineModel } from "./derived.js";
2
+ import { GENERIC_PACK, getSamplePack, getSampleTaxRate, } from "./packs.js";
3
+ /** Deterministic PRNG (mulberry32): the same seed always yields the same run. */
4
+ export function createRandom(seed) {
5
+ let state = seed >>> 0;
6
+ return () => {
7
+ state = (state + 0x6d2b79f5) >>> 0;
8
+ let t = state;
9
+ t = Math.imul(t ^ (t >>> 15), t | 1);
10
+ t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
11
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
12
+ };
13
+ }
14
+ /** FNV-1a hash of a string, for seeding. */
15
+ export function hashString(value) {
16
+ let hash = 0x811c9dc5;
17
+ for (let i = 0; i < value.length; i++) {
18
+ hash ^= value.charCodeAt(i);
19
+ hash = Math.imul(hash, 0x01000193);
20
+ }
21
+ return hash >>> 0;
22
+ }
23
+ const MONEY_NAME = /(price|amount|cost|total|balance|fee|tax|revenue|budget|salary|wage|subtotal|discount|spend|payout|commission|credit|debit|charge|refund|fare|rent)/i;
24
+ const NOT_MONEY_NAME = /(count|quantity|qty|percent|ratio|level)/i;
25
+ /**
26
+ * Money is stored as integer minor units (cents). A field is money when it is
27
+ * an integer whose name says so; everything else numeric is a plain number.
28
+ */
29
+ export function isMoneyField(field) {
30
+ return (field.type === 'integer' &&
31
+ MONEY_NAME.test(field.name) &&
32
+ !NOT_MONEY_NAME.test(field.name));
33
+ }
34
+ const WORDS = [
35
+ 'Harbor',
36
+ 'Maple',
37
+ 'Summit',
38
+ 'Cedar',
39
+ 'Willow',
40
+ 'Copper',
41
+ 'Juniper',
42
+ 'Atlas',
43
+ 'Meadow',
44
+ 'Granite',
45
+ 'Lantern',
46
+ 'Orchard',
47
+ 'Saffron',
48
+ 'Timber',
49
+ 'Velvet',
50
+ 'Beacon',
51
+ ];
52
+ const NOUNS = [
53
+ 'Goods',
54
+ 'Supply',
55
+ 'Studio',
56
+ 'Works',
57
+ 'Market',
58
+ 'Collective',
59
+ 'Trading',
60
+ 'Labs',
61
+ ];
62
+ /**
63
+ * Things a shop sells, with a price in cents. Sample products and SKUs take
64
+ * their names from here by row index, and a line item pointing at product `n`
65
+ * reads as that product, so a picked product and a sample line agree.
66
+ */
67
+ export const PRODUCT_CATALOG = GENERIC_PACK.products;
68
+ const FIRST = ['Ada', 'Grace', 'Alan', 'Linus', 'Mae', 'Jun', 'Priya', 'Omar'];
69
+ const LAST = ['Nguyen', 'Garcia', 'Okafor', 'Silva', 'Kim', 'Haddad', 'Rossi'];
70
+ const SENTENCES = [
71
+ 'Reviewed and approved by the team.',
72
+ 'Waiting on a reply from the customer.',
73
+ 'Imported from the previous system.',
74
+ 'Scheduled for the next cycle.',
75
+ 'Flagged for follow-up next week.',
76
+ ];
77
+ /** Fixed clock so seeded timestamps never change between runs. */
78
+ export const EPOCH = Date.UTC(2026, 0, 1);
79
+ const YEAR = 365 * 24 * 60 * 60 * 1000;
80
+ function pick(random, list) {
81
+ return list[Math.floor(random() * list.length)];
82
+ }
83
+ /** Pick by weight; values without a weight count 0, and all-zero falls back to uniform. */
84
+ function pickWeighted(random, values, weights) {
85
+ const total = values.reduce((sum, v) => sum + (weights[v] ?? 0), 0);
86
+ if (total <= 0)
87
+ return pick(random, values);
88
+ let at = random() * total;
89
+ for (const value of values) {
90
+ at -= weights[value] ?? 0;
91
+ if (at < 0)
92
+ return value;
93
+ }
94
+ return values[values.length - 1];
95
+ }
96
+ /** A UUID-shaped id derived from a seed string. */
97
+ export function fakeId(seed) {
98
+ const random = createRandom(hashString(seed));
99
+ const hex = (n) => Array.from({ length: n }, () => Math.floor(random() * 16).toString(16)).join('');
100
+ return `${hex(8)}-${hex(4)}-4${hex(3)}-a${hex(3)}-${hex(12)}`;
101
+ }
102
+ const TERMS = [
103
+ 'Net 30',
104
+ 'Net 15',
105
+ 'Net 60',
106
+ 'Due on receipt',
107
+ '50% deposit, balance on delivery',
108
+ ];
109
+ const CHANNELS = ['web', 'retail', 'phone', 'marketplace', 'wholesale'];
110
+ const PERIODS = ['monthly', 'quarterly', 'annual'];
111
+ /** Fractions a tax rate takes: 0%, 5%, 8.25%, 13% and 20%. */
112
+ export const TAX_RATES = [0, 0.05, 0.0825, 0.13, 0.2];
113
+ function fakeText(field, random, modelName = '') {
114
+ const name = field.name.toLowerCase();
115
+ if (/terms/.test(name))
116
+ return pick(random, getSamplePack().terms ?? TERMS);
117
+ if (/channel/.test(name))
118
+ return pick(random, CHANNELS);
119
+ if (/period/.test(name))
120
+ return pick(random, PERIODS);
121
+ if (/^(unit|uom)$/.test(name))
122
+ return pick(random, ['each', 'hour', 'box']);
123
+ if (/email/.test(name)) {
124
+ return `${pick(random, FIRST).toLowerCase()}@example.com`;
125
+ }
126
+ if (/(^|_)(url|link|website|href)/.test(name) || /url$/.test(name)) {
127
+ return `https://example.com/${pick(random, WORDS).toLowerCase()}`;
128
+ }
129
+ if (/phone/.test(name)) {
130
+ return `+1-555-01${Math.floor(random() * 90 + 10)}`;
131
+ }
132
+ // Notes are about a person or a job; a description says what a thing is.
133
+ // Each has its own vocabulary: a class is never described by a member's note.
134
+ if (/(notes?|comment|message)/.test(name)) {
135
+ const pack = getSamplePack();
136
+ const own = modelName === 'Customer'
137
+ ? pack.customerNotes
138
+ : modelName === 'Vendor'
139
+ ? pack.vendorNotes
140
+ : undefined;
141
+ return pick(random, own ?? pack.notes ?? SENTENCES);
142
+ }
143
+ if (/(description|summary|body|content|bio)/.test(name)) {
144
+ return pick(random, getSamplePack().descriptions?.[modelName] ?? SENTENCES);
145
+ }
146
+ if (/(firstname|first_name)/.test(name))
147
+ return pick(random, FIRST);
148
+ if (/(lastname|last_name|surname)/.test(name))
149
+ return pick(random, LAST);
150
+ // Tax and business registration numbers are identifiers, never names.
151
+ if (/(tax_?id|vat|^ein$|abn|gst|registration)/.test(name)) {
152
+ return `${Math.floor(random() * 90 + 10)}-${Math.floor(random() * 9_000_000 + 1_000_000)}`;
153
+ }
154
+ if (/(code|sku|barcode|number|reference)/.test(name)) {
155
+ return `${pick(random, WORDS).slice(0, 3).toUpperCase()}-${Math.floor(random() * 9000 + 1000)}`;
156
+ }
157
+ if (/(status|state|stage)/.test(name)) {
158
+ return pick(random, ['active', 'pending', 'archived', 'draft']);
159
+ }
160
+ if (/(currency)/.test(name))
161
+ return 'USD';
162
+ if (/(person|owner|author|contact|assignee|worker)/.test(name)) {
163
+ return `${pick(random, FIRST)} ${pick(random, LAST)}`;
164
+ }
165
+ return `${pick(random, WORDS)} ${pick(random, NOUNS)}`;
166
+ }
167
+ /**
168
+ * Sample rows per model where the default count does not fit: every Customer
169
+ * and Vendor gets its own Profile, so the lists show different names.
170
+ * Customers use Profiles 0-7, Vendors 8-12 and the pack's instructors 13 on
171
+ * (`sampleRowCount` adds them).
172
+ */
173
+ const PROFILE_MODEL = '@happyvertical/smrt-profiles:Profile';
174
+ export const SAMPLE_ROW_COUNTS = {
175
+ '@happyvertical/smrt-profiles:Profile': 13,
176
+ '@happyvertical/smrt-commerce:Vendor': 5,
177
+ };
178
+ /** Sample rows for a model: the pack's count, else the shared one, else `fallback`. */
179
+ export function sampleRowCount(modelId, fallback) {
180
+ // Profiles: customers, then vendors, then the pack's instructors.
181
+ if (modelId === PROFILE_MODEL) {
182
+ return ((getSamplePack().rowCounts?.[modelId] ??
183
+ SAMPLE_ROW_COUNTS[modelId] ??
184
+ fallback) + (getSamplePack().instructors?.length ?? 0));
185
+ }
186
+ return (getSamplePack().rowCounts?.[modelId] ??
187
+ SAMPLE_ROW_COUNTS[modelId] ??
188
+ fallback);
189
+ }
190
+ /**
191
+ * Which row of the target a sample relation points at. Rows are seeded with
192
+ * ids from `(model, index)`, so pointing at index `n` points at a real row.
193
+ */
194
+ function relatedIndex(field, context) {
195
+ const instructors = getSamplePack().instructors;
196
+ if (field.name === 'organizerId' && instructors?.length) {
197
+ // Organizers lead classes and jobs; they are staff, never customers.
198
+ return 13 + (context.index % instructors.length);
199
+ }
200
+ if (field.name === 'profileId') {
201
+ if (context.modelId.endsWith(':Vendor'))
202
+ return 8 + (context.index % 5);
203
+ // Sign-ups and the like point at a customer's Profile, whatever their
204
+ // own row index (child rows are numbered up to 996).
205
+ return context.modelId.endsWith(':Customer')
206
+ ? context.index
207
+ : context.index % 8;
208
+ }
209
+ return context.index % 5;
210
+ }
211
+ /** One fake value for a field. Money is an integer number of minor units. */
212
+ export function fakeValue(field, random, context) {
213
+ // A declared enumeration: only its values are valid.
214
+ if (field.enum && field.enum.length > 0) {
215
+ const weights = getSamplePack().weights?.[`${context.modelId.split(':').pop()}.${field.name}`];
216
+ return weights
217
+ ? pickWeighted(random, field.enum, weights)
218
+ : pick(random, field.enum);
219
+ }
220
+ switch (field.type) {
221
+ case 'boolean':
222
+ return random() < 0.7;
223
+ case 'integer': {
224
+ if (isMoneyField(field))
225
+ return (Math.floor(random() * 4950) + 50) * 10;
226
+ if (/(quantity|qty|count|stock|on_?hand)/i.test(field.name)) {
227
+ return Math.floor(random() * 200);
228
+ }
229
+ if (/(level|sortorder|position|order)/i.test(field.name)) {
230
+ return Math.floor(random() * 5);
231
+ }
232
+ return Math.floor(random() * 100);
233
+ }
234
+ case 'decimal':
235
+ if (/taxrate|vatrate/i.test(field.name)) {
236
+ // A cookbook's default rate (0: untaxed) beats a random one.
237
+ const rate = getSampleTaxRate();
238
+ return rate ?? pick(random, TAX_RATES);
239
+ }
240
+ if (/discountrate/i.test(field.name))
241
+ return pick(random, [0, 0.05, 0.1]);
242
+ if (/(quantity|qty)/i.test(field.name))
243
+ return 1 + Math.floor(random() * 5);
244
+ return Math.round(random() * 10000) / 100;
245
+ case 'datetime':
246
+ return new Date(EPOCH - Math.floor(random() * YEAR)).toISOString();
247
+ case 'json':
248
+ return Array.isArray(field.default) ? [] : {};
249
+ case 'foreignKey':
250
+ case 'crossPackageRef':
251
+ return fakeId(`${field.related ?? field.name}:${relatedIndex(field, context)}`);
252
+ default:
253
+ return fakeText(field, random, context.modelId.split(':').pop());
254
+ }
255
+ }
256
+ /** Fields a person edits: everything the framework does not manage. */
257
+ export function editableFields(model) {
258
+ return model.fields.filter((f) => !f.system);
259
+ }
260
+ export const DAY = 24 * 60 * 60 * 1000;
261
+ function dateStage(name) {
262
+ const n = name.toLowerCase();
263
+ if (/^last/.test(n))
264
+ return null;
265
+ if (/(expir|enddate|endat|endsat|endedat|ends|until|closed|cancel|periodend|effectiveto|windowend|trialends|void|revoked)/.test(n))
266
+ return 'end';
267
+ if (/(due|deadline|schedul|renew|nextrun|estimated|expected|payable)/.test(n))
268
+ return 'due';
269
+ if (/(updated|modified|paid|ship|deliver|settled|resolved|completed|approved|confirmed|received|accepted|reviewed|verified|published|posted|viewed|decided|finalized)/.test(n))
270
+ return 'event';
271
+ if (/(issue|startdate|startat|startsat|startedat|periodstart|effectivedate|effectivefrom|windowstart|sentat|occurredat|requestedat|submittedat|^date$|^timestamp$|publish_date|balancefrom)/.test(n))
272
+ return 'start';
273
+ return null;
274
+ }
275
+ /**
276
+ * Makes a record's dates agree with each other: issued/start first, then what
277
+ * happens to it, then due, then expiry/end. Deterministic, as every offset
278
+ * comes from the record's own random stream.
279
+ */
280
+ function orderDates(model, record, random) {
281
+ const dated = model.fields
282
+ .filter((f) => !f.system && f.type === 'datetime' && !f.enum)
283
+ .flatMap((field) => {
284
+ const stage = dateStage(field.name);
285
+ return stage ? [{ field, stage }] : [];
286
+ });
287
+ if (dated.length === 0)
288
+ return;
289
+ const first = dated.find((d) => d.stage === 'start');
290
+ const anchor = first
291
+ ? Date.parse(String(record[first.field.name]))
292
+ : EPOCH - Math.floor(random() * YEAR);
293
+ const event = Math.min(anchor + (1 + Math.floor(random() * 20)) * DAY, EPOCH);
294
+ const due = Math.max(event, anchor) + (14 + Math.floor(random() * 32)) * DAY;
295
+ const end = due + (30 + Math.floor(random() * 150)) * DAY;
296
+ const at = { start: anchor, event, due, end };
297
+ for (const { field, stage } of dated) {
298
+ record[field.name] = new Date(at[stage]).toISOString();
299
+ }
300
+ }
301
+ const has = (model, name) => model.fields.some((f) => f.name === name);
302
+ /**
303
+ * Products and SKUs are called things ("Canvas tote"), not companies, and a
304
+ * line item describes the item it sells rather than quoting a status.
305
+ */
306
+ function nameThings(model, record, index, random) {
307
+ // Most payments went through; the rest are pending, failed or refunded.
308
+ const status = model.fields.find((f) => f.name === 'status');
309
+ if (model.id.endsWith(':Payment') &&
310
+ status?.enum?.includes('completed') &&
311
+ random() < 0.6) {
312
+ record.status = 'completed';
313
+ }
314
+ const pack = getSamplePack();
315
+ nameFromPack(model, record, index, pack);
316
+ const item = pack.products[index % pack.products.length];
317
+ if (!item)
318
+ return;
319
+ if (/:(Product|Sku)$/.test(model.id)) {
320
+ if (has(model, 'name'))
321
+ record.name = item.name;
322
+ if (has(model, 'price'))
323
+ record.price = item.price;
324
+ if (model.id.endsWith(':Product')) {
325
+ if (has(model, 'description')) {
326
+ // The generic template belongs to the generic pack only.
327
+ const fallback = pack.id === GENERIC_PACK.id
328
+ ? `${item.name}, made in small batches.`
329
+ : item.name;
330
+ record.description = item.description ?? fallback;
331
+ }
332
+ if (item.category && has(model, 'category')) {
333
+ record.category = item.category;
334
+ }
335
+ if (item.productType && has(model, 'productType')) {
336
+ record.productType = item.productType;
337
+ }
338
+ }
339
+ return;
340
+ }
341
+ if (isLineModel(model) && has(model, 'description')) {
342
+ const lines = pack.lines ?? pack.products.map((p) => ({ description: p.name }));
343
+ const line = lines[Math.floor(random() * lines.length)];
344
+ if (line)
345
+ record.description = line.description;
346
+ }
347
+ }
348
+ /**
349
+ * Names a pack supplies for whole models: customers and vendors (their
350
+ * Profiles), events and their types and series, places and their types. Packs without them leave the
351
+ * generic words in place.
352
+ */
353
+ function nameFromPack(model, record, index, pack) {
354
+ const at = (list, i) => list?.length ? list[i % list.length] : undefined;
355
+ if (model.id.endsWith(':Profile') && has(model, 'name')) {
356
+ // Customers use Profiles 0-7, Vendors 8-12, instructors 13 on (see
357
+ // SAMPLE_ROW_COUNTS).
358
+ const name = index < 8
359
+ ? at(pack.customers, index)
360
+ : index < 13
361
+ ? at(pack.vendors, index - 8)
362
+ : at(pack.instructors, index - 13);
363
+ if (name) {
364
+ record.name = name;
365
+ if (has(model, 'email')) {
366
+ const local = name
367
+ .toLowerCase()
368
+ .replace(/[^a-z0-9]+/g, '.')
369
+ .replace(/^\.+|\.+$/g, '');
370
+ record.email = `${local}@example.com`;
371
+ }
372
+ }
373
+ return;
374
+ }
375
+ const short = model.id.split(':').pop() ?? '';
376
+ if (short === 'EventParticipant') {
377
+ // A sign-up points at a member's Profile; every fifth is the instructor.
378
+ const instructors = pack.instructors;
379
+ const teaches = Boolean(instructors?.length) && index % 5 === 0;
380
+ if (has(model, 'profileId')) {
381
+ record.profileId = fakeId(`${PROFILE_MODEL}:${teaches && instructors
382
+ ? 13 + (Math.floor(index / 5) % instructors.length)
383
+ : index % 8}`);
384
+ }
385
+ if (has(model, 'role'))
386
+ record.role = teaches ? 'instructor' : 'attendee';
387
+ return;
388
+ }
389
+ if (has(model, 'allDay') && typeof record.startDate === 'string') {
390
+ // Events happen at a time of day: on the hour, between 6 and 20 h, for an hour.
391
+ const day = Date.parse(record.startDate) - (Date.parse(record.startDate) % DAY);
392
+ const start = day + (6 + (index % 15)) * 60 * 60 * 1000;
393
+ record.startDate = new Date(start).toISOString();
394
+ if (has(model, 'endDate')) {
395
+ record.endDate = new Date(start + 60 * 60 * 1000).toISOString();
396
+ }
397
+ }
398
+ const names = {
399
+ Event: pack.eventNames,
400
+ EventType: pack.eventTypes,
401
+ EventSeries: pack.seriesNames,
402
+ Place: pack.placeNames,
403
+ PlaceType: pack.placeTypes,
404
+ };
405
+ const list = names[short];
406
+ const name = at(list, index);
407
+ if (name && has(model, 'name'))
408
+ record.name = name;
409
+ // A description list lines up with the names: entry n describes name n.
410
+ const description = at(pack.descriptions?.[short], index);
411
+ if (description && list && has(model, 'description')) {
412
+ record.description = description;
413
+ }
414
+ }
415
+ /**
416
+ * The line a sample line item reads as when the pack describes lines apart
417
+ * from products (labour, fabrication, passes); `undefined` for packs whose
418
+ * lines are their products.
419
+ */
420
+ export function packLine(index) {
421
+ const lines = getSamplePack().lines;
422
+ return lines?.length ? lines[index % lines.length] : undefined;
423
+ }
424
+ /** A single seeded record for a model. */
425
+ export function fakeRecord(model, index, seed) {
426
+ const random = createRandom(hashString(`${seed}:${model.id}:${index}`));
427
+ const record = { id: fakeId(`${model.id}:${index}`) };
428
+ for (const field of model.fields) {
429
+ if (field.system)
430
+ continue;
431
+ record[field.name] = fakeValue(field, random, {
432
+ modelId: model.id,
433
+ index,
434
+ });
435
+ }
436
+ orderDates(model, record, createRandom(hashString(`${seed}:${model.id}:${index}:dates`)));
437
+ nameThings(model, record, index, random);
438
+ return record;
439
+ }
440
+ /** `count` seeded records for a model. */
441
+ export function fakeRecords(model, count, seed = 1) {
442
+ return Array.from({ length: count }, (_, i) => fakeRecord(model, i, seed));
443
+ }
@@ -0,0 +1,48 @@
1
+ import type { CatalogField } from '../catalog/types.ts';
2
+ /** Integer minor units (cents) as a display string, e.g. `1999` -> `$19.99`. */
3
+ export declare function formatMoney(minorUnits: number): string;
4
+ /** Key of a related record in the label map a list view loads. */
5
+ export declare const labelKey: (modelId: string, id: unknown) => string;
6
+ /**
7
+ * Display text for one cell of a generated list view. A related record shows
8
+ * its label from `labels` (see `relationLabels`), and only falls back to a
9
+ * short id when the record is gone.
10
+ */
11
+ export declare function formatValue(field: CatalogField & {
12
+ showTime?: boolean;
13
+ }, value: unknown, labels?: ReadonlyMap<string, string>): string;
14
+ /** Parse a money input given in major units (`"19.99"`) to integer cents. */
15
+ export declare function parseMoney(input: string): number;
16
+ /** Humanize `productCount` / `product_count` as `Product count`. */
17
+ export declare function humanize(name: string): string;
18
+ /** English plural of a model's label: "Agreement" -> "Agreements". */
19
+ export declare function pluralize(label: string): string;
20
+ /**
21
+ * Singular of a menu label's last word: "Sales Orders" -> "Sales Order",
22
+ * "Currencies" -> "Currency". A label that is not plural is left as it is.
23
+ */
24
+ export declare function singularize(label: string): string;
25
+ /** What New creates for a menu entry: its declared noun, else the label's singular. */
26
+ export declare function navNoun(label: string, noun?: string): string;
27
+ /**
28
+ * What a New button or form heading names. A page with one way to create a
29
+ * record uses the menu entry's noun ("part", "member"); with several forms
30
+ * (Simple, Clothing) each keeps its own label.
31
+ */
32
+ export declare function createNoun(formLabel: string, noun: string | undefined, onlyForm: boolean): string;
33
+ /** "1 record", "8 records". */
34
+ export declare function recordCount(count: number): string;
35
+ /**
36
+ * A field's label: its humanized name, except a relation, which names the
37
+ * record it points at ("Product", not "Product id").
38
+ */
39
+ export declare function fieldLabel(field: CatalogField): string;
40
+ /** A fraction as a percentage: `0.0825` -> `8.25%`. */
41
+ export declare function formatPercent(fraction: number): string;
42
+ /** Rates stored as fractions (0.05 is 5%); other `*Rate` fields are unknown. */
43
+ export declare const isFractionRate: (field: CatalogField) => boolean;
44
+ /**
45
+ * Text for an enum value: `qc_hold` is "Qc hold", and a short code such as
46
+ * `dtc` stays an acronym ("DTC"). The stored value never changes.
47
+ */
48
+ export declare function enumLabel(value: string): string;
@@ -0,0 +1,121 @@
1
+ import { isMoneyField } from "./fakes.js";
2
+ const currency = new Intl.NumberFormat('en-US', {
3
+ style: 'currency',
4
+ currency: 'USD',
5
+ });
6
+ /** Integer minor units (cents) as a display string, e.g. `1999` -> `$19.99`. */
7
+ export function formatMoney(minorUnits) {
8
+ return currency.format(minorUnits / 100);
9
+ }
10
+ /** Key of a related record in the label map a list view loads. */
11
+ export const labelKey = (modelId, id) => `${modelId}:${String(id)}`;
12
+ /**
13
+ * Display text for one cell of a generated list view. A related record shows
14
+ * its label from `labels` (see `relationLabels`), and only falls back to a
15
+ * short id when the record is gone.
16
+ */
17
+ export function formatValue(field, value, labels) {
18
+ if (value === null || value === undefined || value === '')
19
+ return '';
20
+ if (isMoneyField(field) && typeof value === 'number') {
21
+ return formatMoney(value);
22
+ }
23
+ if (field.enum?.includes(String(value)))
24
+ return enumLabel(String(value));
25
+ if (isFractionRate(field) && typeof value === 'number') {
26
+ return formatPercent(value);
27
+ }
28
+ switch (field.type) {
29
+ case 'boolean':
30
+ return value ? 'Yes' : 'No';
31
+ case 'datetime':
32
+ // A list of things that happen at a time (classes) shows it too.
33
+ return field.showTime
34
+ ? String(value).slice(0, 16).replace('T', ' ')
35
+ : String(value).slice(0, 10);
36
+ case 'foreignKey':
37
+ case 'crossPackageRef':
38
+ return ((field.related && labels?.get(labelKey(field.related, value))) ||
39
+ String(value).slice(0, 8));
40
+ case 'json':
41
+ return JSON.stringify(value);
42
+ default:
43
+ return String(value);
44
+ }
45
+ }
46
+ /** Parse a money input given in major units (`"19.99"`) to integer cents. */
47
+ export function parseMoney(input) {
48
+ const value = Number.parseFloat(input);
49
+ return Number.isFinite(value) ? Math.round(value * 100) : 0;
50
+ }
51
+ /** Humanize `productCount` / `product_count` as `Product count`. */
52
+ export function humanize(name) {
53
+ const spaced = name
54
+ .replace(/_/g, ' ')
55
+ .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
56
+ .toLowerCase();
57
+ return spaced.charAt(0).toUpperCase() + spaced.slice(1);
58
+ }
59
+ /** English plural of a model's label: "Agreement" -> "Agreements". */
60
+ export function pluralize(label) {
61
+ if (/[^aeiou]y$/i.test(label))
62
+ return `${label.slice(0, -1)}ies`;
63
+ if (/(s|x|z|ch|sh)$/i.test(label))
64
+ return `${label}es`;
65
+ return `${label}s`;
66
+ }
67
+ /**
68
+ * Singular of a menu label's last word: "Sales Orders" -> "Sales Order",
69
+ * "Currencies" -> "Currency". A label that is not plural is left as it is.
70
+ */
71
+ export function singularize(label) {
72
+ if (/(series|species)$/i.test(label))
73
+ return label;
74
+ if (/[^aeiou]ies$/i.test(label))
75
+ return `${label.slice(0, -3)}y`;
76
+ if (/(ss|x|z|ch|sh)es$/i.test(label))
77
+ return label.slice(0, -2);
78
+ if (/[^s]s$/i.test(label))
79
+ return label.slice(0, -1);
80
+ return label;
81
+ }
82
+ /** What New creates for a menu entry: its declared noun, else the label's singular. */
83
+ export function navNoun(label, noun) {
84
+ return (noun?.trim() || singularize(label)).toLowerCase();
85
+ }
86
+ /**
87
+ * What a New button or form heading names. A page with one way to create a
88
+ * record uses the menu entry's noun ("part", "member"); with several forms
89
+ * (Simple, Clothing) each keeps its own label.
90
+ */
91
+ export function createNoun(formLabel, noun, onlyForm) {
92
+ return onlyForm && noun?.trim() ? noun.trim() : formLabel.toLowerCase();
93
+ }
94
+ /** "1 record", "8 records". */
95
+ export function recordCount(count) {
96
+ return `${count} ${count === 1 ? 'record' : 'records'}`;
97
+ }
98
+ /**
99
+ * A field's label: its humanized name, except a relation, which names the
100
+ * record it points at ("Product", not "Product id").
101
+ */
102
+ export function fieldLabel(field) {
103
+ const isRelation = field.type === 'foreignKey' || field.type === 'crossPackageRef';
104
+ const name = isRelation && /[a-z]Id$/.test(field.name)
105
+ ? field.name.slice(0, -2)
106
+ : field.name;
107
+ return humanize(name);
108
+ }
109
+ /** A fraction as a percentage: `0.0825` -> `8.25%`. */
110
+ export function formatPercent(fraction) {
111
+ return `${Number((fraction * 100).toFixed(2))}%`;
112
+ }
113
+ /** Rates stored as fractions (0.05 is 5%); other `*Rate` fields are unknown. */
114
+ export const isFractionRate = (field) => field.type === 'decimal' && /^(tax|discount|vat)Rate$/.test(field.name);
115
+ /**
116
+ * Text for an enum value: `qc_hold` is "Qc hold", and a short code such as
117
+ * `dtc` stays an acronym ("DTC"). The stored value never changes.
118
+ */
119
+ export function enumLabel(value) {
120
+ return /^[a-z]{1,3}$/.test(value) ? value.toUpperCase() : humanize(value);
121
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Labels for related records, and the searches the relation selectors run.
3
+ * Everything goes through the `DataSource`, so live collections replace the
4
+ * fakes without touching a view.
5
+ *
6
+ * A record is labelled by its own `display.label` field (the first of `name`,
7
+ * `title`, `label`, `code` when undeclared; see `display.ts`). A
8
+ * Customer or Vendor has none: its name lives on its Profile, so it is joined
9
+ * to one (the "ship a selector instead" case of happyvertical/smrt#3599).
10
+ */
11
+ import type { RelationOption } from '@happyvertical/smrt-svelte/forms';
12
+ import type { CatalogField, CatalogModel } from '../catalog/types.ts';
13
+ import type { CustomerDisplayData, VendorDisplayData } from '../upstream/partyTypes.ts';
14
+ import type { DataSource, ModelRecord } from './source.ts';
15
+ export declare const PROFILE = "@happyvertical/smrt-profiles:Profile";
16
+ export declare const CUSTOMER = "@happyvertical/smrt-commerce:Customer";
17
+ export declare const VENDOR = "@happyvertical/smrt-commerce:Vendor";
18
+ /** The first eight characters of an id: what is left when nothing names it. */
19
+ export declare function shortId(id: unknown): string;
20
+ /** Does the model get its name from a Profile (`profileId` referencing one)? */
21
+ export declare function isProfileLabelled(model: CatalogModel): boolean;
22
+ /** The text that names one record. Never an empty string. */
23
+ export declare function recordLabel(source: DataSource, model: CatalogModel, record: ModelRecord, depth?: number): Promise<string>;
24
+ /**
25
+ * The labels of every record the `fields` of `rows` point at, keyed by
26
+ * {@link labelKey}. A pointer to a record that is gone has no entry, so a view
27
+ * falls back to a short id rather than showing nothing.
28
+ */
29
+ export declare function relationLabels(source: DataSource, fields: readonly CatalogField[], rows: readonly ModelRecord[]): Promise<Map<string, string>>;
30
+ /** Generic relation search: records of `target` whose label matches. */
31
+ export declare function searchRelated(source: DataSource, target: CatalogModel, query: string): Promise<RelationOption[]>;
32
+ /** One related record as an option, or null when it is gone. */
33
+ export declare function resolveRelated(source: DataSource, target: CatalogModel, id: string): Promise<{
34
+ id: string;
35
+ label: string;
36
+ } | null>;
37
+ /** A Customer row joined to its Profile, as the commerce party DTO. */
38
+ export declare function customerData(source: DataSource, record: ModelRecord): Promise<CustomerDisplayData>;
39
+ /** A Vendor row joined to its Profile, as the commerce party DTO. */
40
+ export declare function vendorData(source: DataSource, record: ModelRecord): Promise<VendorDisplayData>;
41
+ /** Customers whose profile name (or email) matches, joined to their Profiles. */
42
+ export declare function searchCustomers(source: DataSource, query: string): Promise<CustomerDisplayData[]>;
43
+ export declare function resolveCustomer(source: DataSource, id: string): Promise<CustomerDisplayData | null>;
44
+ export declare function searchVendors(source: DataSource, query: string): Promise<VendorDisplayData[]>;
45
+ export declare function resolveVendor(source: DataSource, id: string): Promise<VendorDisplayData | null>;