@happyvertical/smrt-planner 0.0.2 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -8
- package/app/404.html +42 -49
- package/app/_app/immutable/assets/0.DUow1OzM.css +1 -0
- package/app/_app/immutable/assets/10.CdYxvH4G.css +1 -0
- package/app/_app/immutable/assets/11.nOT5Z4Fv.css +1 -0
- package/app/_app/immutable/assets/12.F7A7zP4J.css +1 -0
- package/app/_app/immutable/assets/13.JoySu8W5.css +1 -0
- package/app/_app/immutable/assets/14.nsp62-4b.css +1 -0
- package/app/_app/immutable/assets/2.CbPiqdz5.css +1 -0
- package/app/_app/immutable/assets/3.D518dbB5.css +1 -0
- package/app/_app/immutable/assets/4.B3vt1gMJ.css +1 -0
- package/app/_app/immutable/assets/AiSetup.4fXjMpTZ.css +1 -0
- package/app/_app/immutable/assets/AppShell.DOvXbUZo.css +1 -0
- package/app/_app/immutable/assets/ConnectTools.DTleL8YA.css +1 -0
- package/app/_app/immutable/assets/FieldMapForm.C8SZ3t4N.css +1 -0
- package/app/_app/immutable/assets/ModelPage.DbXvPbHE.css +1 -0
- package/app/_app/immutable/assets/SectionActions.BE1CPmxk.css +1 -0
- package/app/_app/immutable/assets/SectionIcons.BGFcFuOf.css +1 -0
- package/app/_app/immutable/assets/SegmentedControl.BkyuoCEJ.css +1 -0
- package/app/_app/immutable/assets/app.eM0k786r.css +1 -0
- package/app/_app/immutable/assets/currency-metadata.DDyu8_ub.css +1 -0
- package/app/_app/immutable/assets/data.bGq43K60.css +1 -0
- package/app/_app/immutable/assets/feedback.xBpOq9ef.css +1 -0
- package/app/_app/immutable/assets/forms.B3_bbIMe.css +1 -0
- package/app/_app/immutable/assets/labels.BiuUjqHs.css +1 -0
- package/app/_app/immutable/assets/percent.DbwvwMhf.css +1 -0
- package/app/_app/immutable/assets/state.CJipYvSU.css +1 -0
- package/app/_app/immutable/assets/webmcp-ui-context.BnR-DUfO.css +1 -0
- package/app/_app/immutable/assets/workspace.B5Xq-5pJ.css +1 -0
- package/app/_app/immutable/chunks/1ElZWh_R.js +10 -0
- package/app/_app/immutable/chunks/B-CpwO-j.js +1 -0
- package/app/_app/immutable/chunks/{BnRri03M.js → B7KB-rhH.js} +1 -1
- package/app/_app/immutable/chunks/BUhghcIm.js +1 -0
- package/app/_app/immutable/chunks/BV3NwM01.js +1 -0
- package/app/_app/immutable/chunks/BZVZZ6VY.js +1 -0
- package/app/_app/immutable/chunks/Ba1g71Sq.js +1 -0
- package/app/_app/immutable/chunks/BeJD7_hy.js +1 -0
- package/app/_app/immutable/chunks/BiO_bqNH.js +2 -0
- package/app/_app/immutable/chunks/{DkR8_Ws6.js → BqBuCJB_.js} +2 -2
- package/app/_app/immutable/chunks/BsJoBmTA.js +1 -0
- package/app/_app/immutable/chunks/Bxbz6_Mb.js +1 -0
- package/app/_app/immutable/chunks/Bz5uCkjV.js +2 -0
- package/app/_app/immutable/chunks/BzMfoxBk.js +1 -0
- package/app/_app/immutable/chunks/CF6zSg_o.js +2 -0
- package/app/_app/immutable/chunks/CFL0B6dk.js +1 -0
- package/app/_app/immutable/chunks/CRu55ZTy.js +4 -0
- package/app/_app/immutable/chunks/{CyUMm_Wp.js → Cv2EcCr0.js} +1 -1
- package/app/_app/immutable/chunks/D-3Ri0zJ.js +1 -0
- package/app/_app/immutable/chunks/{BWPhGFHl.js → D0FW0z6R.js} +1 -1
- package/app/_app/immutable/chunks/D7d5GssF.js +1 -0
- package/app/_app/immutable/chunks/DCsSRJsN.js +1 -0
- package/app/_app/immutable/chunks/DGqV6_5v.js +1 -0
- package/app/_app/immutable/chunks/DNSRTkf6.js +11 -0
- package/app/_app/immutable/chunks/DQNX_XPY.js +1 -0
- package/app/_app/immutable/chunks/DSyIMN4M.js +1 -0
- package/app/_app/immutable/chunks/DUTtmM1Y.js +1 -0
- package/app/_app/immutable/chunks/DYuawOB3.js +980 -0
- package/app/_app/immutable/chunks/DfCLzLZc.js +1 -0
- package/app/_app/immutable/chunks/Dh5fne6n.js +1 -0
- package/app/_app/immutable/chunks/LruoUXGC.js +1 -0
- package/app/_app/immutable/chunks/ZLqixH7j.js +9 -0
- package/app/_app/immutable/chunks/_pYwB_Eb.js +4 -0
- package/app/_app/immutable/chunks/aoU3lIZI.js +1 -0
- package/app/_app/immutable/chunks/c57ZlocB.js +24 -0
- package/app/_app/immutable/chunks/h8ppmjOm.js +1 -0
- package/app/_app/immutable/chunks/jhcy_jeO.js +1 -0
- package/app/_app/immutable/chunks/vNEnXNLV.js +3 -0
- package/app/_app/immutable/chunks/vwntRvfV.js +1 -0
- package/app/_app/immutable/entry/app.D5LoTsNA.js +2 -0
- package/app/_app/immutable/entry/start.Sb_s0NGC.js +1 -0
- package/app/_app/immutable/nodes/0.Cuo9-RQc.js +9 -0
- package/app/_app/immutable/nodes/1.BW8Ar5T3.js +1 -0
- package/app/_app/immutable/nodes/10.CpLYjN7r.js +3 -0
- package/app/_app/immutable/nodes/11.BMPKD4M3.js +1 -0
- package/app/_app/immutable/nodes/12.WYpy0AHE.js +4 -0
- package/app/_app/immutable/nodes/13.BYo05X9B.js +1 -0
- package/app/_app/immutable/nodes/14.DN0MT3KB.js +1 -0
- package/app/_app/immutable/nodes/2.DM6k_pqu.js +24 -0
- package/app/_app/immutable/nodes/3.YgEwJ-vF.js +1 -0
- package/app/_app/immutable/nodes/4.A3Y6Lax0.js +1 -0
- package/app/_app/immutable/nodes/5.D9Vd85hG.js +1 -0
- package/app/_app/immutable/nodes/6.C5c56bSW.js +1 -0
- package/app/_app/immutable/nodes/7.CDBMbYlD.js +1 -0
- package/app/_app/immutable/nodes/8.8olDkDou.js +1 -0
- package/app/_app/immutable/nodes/9.CWgx__8Z.js +1 -0
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +84 -0
- package/app/ai/index.html +60 -52
- package/app/blueprint/index.html +46 -53
- package/app/cookbook/index.html +46 -53
- package/app/index.html +92 -64
- package/app/m/ads/AdDeliveryTier/index.html +52 -59
- package/app/m/ads/AdEvent/index.html +52 -59
- package/app/m/ads/AdFormat/index.html +52 -59
- package/app/m/ads/AdGroup/index.html +52 -59
- package/app/m/ads/AdVariation/index.html +52 -59
- package/app/m/analytics/AnalyticsDataStream/index.html +52 -59
- package/app/m/analytics/AnalyticsEvent/index.html +52 -59
- package/app/m/analytics/AnalyticsProperty/index.html +52 -59
- package/app/m/analytics/AnalyticsReport/index.html +52 -59
- package/app/m/approvals/ApprovalEvent/index.html +52 -59
- package/app/m/approvals/ApprovalPolicy/index.html +52 -59
- package/app/m/approvals/ApprovalRequest/index.html +52 -59
- package/app/m/assets/Asset/attachments/index.html +91 -0
- package/app/m/assets/Asset/index.html +52 -59
- package/app/m/assets/AssetAssociation/index.html +53 -60
- package/app/m/assets/AssetMetafield/index.html +52 -59
- package/app/m/assets/AssetStatus/index.html +52 -59
- package/app/m/assets/AssetType/index.html +52 -59
- package/app/m/assets/Folder/index.html +52 -59
- package/app/m/chat/AgentSession/index.html +52 -59
- package/app/m/chat/ChatMessage/index.html +53 -60
- package/app/m/chat/ChatParticipant/index.html +53 -60
- package/app/m/chat/ChatReaction/index.html +52 -59
- package/app/m/chat/ChatRoom/index.html +52 -59
- package/app/m/chat/ChatThread/index.html +53 -60
- package/app/m/chat/VoiceGatewayTurn/index.html +52 -59
- package/app/m/chat/VoiceSession/index.html +52 -59
- package/app/m/commerce/Agreement/index.html +52 -59
- package/app/m/commerce/Cart/index.html +52 -59
- package/app/m/commerce/Contract/index.html +52 -59
- package/app/m/commerce/ContractLineItem/index.html +53 -60
- package/app/m/commerce/Customer/index.html +52 -59
- package/app/m/commerce/DocumentTax/index.html +89 -0
- package/app/m/commerce/Estimate/index.html +52 -59
- package/app/m/commerce/Fulfillment/index.html +52 -59
- package/app/m/commerce/FulfillmentLineItem/index.html +53 -60
- package/app/m/commerce/Invoice/index.html +52 -59
- package/app/m/commerce/InvoiceLineItem/index.html +53 -60
- package/app/m/commerce/Lease/index.html +52 -59
- package/app/m/commerce/LicenseSale/index.html +52 -59
- package/app/m/commerce/Order/index.html +52 -59
- package/app/m/commerce/Payment/index.html +52 -59
- package/app/m/commerce/PaymentAllocation/index.html +53 -60
- package/app/m/commerce/PaymentInstrument/index.html +52 -59
- package/app/m/commerce/PaymentIntent/index.html +52 -59
- package/app/m/commerce/Payout/index.html +52 -59
- package/app/m/commerce/ProductionOrder/index.html +52 -59
- package/app/m/commerce/PurchaseContract/index.html +89 -0
- package/app/m/commerce/PurchaseOrder/index.html +52 -59
- package/app/m/commerce/SalesContract/index.html +89 -0
- package/app/m/commerce/SupplierQuote/index.html +89 -0
- package/app/m/commerce/TaxCode/index.html +89 -0
- package/app/m/commerce/TaxComponent/index.html +89 -0
- package/app/m/commerce/TaxSettings/index.html +89 -0
- package/app/m/commerce/TaxSummaryReport/index.html +89 -0
- package/app/m/commerce/Vendor/index.html +52 -59
- package/app/m/commerce/WholesaleOrder/index.html +52 -59
- package/app/m/content/Content/index.html +52 -59
- package/app/m/content/ContentContribution/index.html +52 -59
- package/app/m/content/ContentContributionAttachment/index.html +52 -59
- package/app/m/content/ContentContributionRevision/index.html +52 -59
- package/app/m/content/ContentContributionType/index.html +52 -59
- package/app/m/content/ContentContributor/index.html +52 -59
- package/app/m/content/ContentCorrection/index.html +52 -59
- package/app/m/content/ContentFeedSource/index.html +52 -59
- package/app/m/content/ContentGovernanceAssignment/index.html +52 -59
- package/app/m/content/ContentGovernancePolicy/index.html +52 -59
- package/app/m/content/ContentGovernanceProfile/index.html +52 -59
- package/app/m/content/ContentReference/index.html +52 -59
- package/app/m/content/ContentReview/index.html +52 -59
- package/app/m/content/ContentVersion/index.html +52 -59
- package/app/m/events/Event/index.html +52 -59
- package/app/m/events/EventParticipant/index.html +53 -60
- package/app/m/events/EventSeries/index.html +52 -59
- package/app/m/events/EventType/index.html +52 -59
- package/app/m/expenses/Expense/index.html +89 -0
- package/app/m/facts/Fact/index.html +52 -59
- package/app/m/facts/FactContent/index.html +52 -59
- package/app/m/facts/FactEvidence/index.html +52 -59
- package/app/m/facts/FactSource/index.html +52 -59
- package/app/m/facts/FactSubject/index.html +52 -59
- package/app/m/facts/FactTag/index.html +52 -59
- package/app/m/fields/FieldPolicy/index.html +52 -59
- package/app/m/fields/FieldPolicySuggestion/index.html +52 -59
- package/app/m/fields/FieldUsageCounter/index.html +52 -59
- package/app/m/images/Image/index.html +52 -59
- package/app/m/inventory/InventoryLocation/index.html +52 -59
- package/app/m/inventory/StockLevel/index.html +52 -59
- package/app/m/inventory/StockMovement/index.html +52 -59
- package/app/m/ledgers/Account/index.html +52 -59
- package/app/m/ledgers/Journal/index.html +52 -59
- package/app/m/ledgers/JournalEntry/index.html +53 -60
- package/app/m/manufacturing/Assembly/index.html +52 -59
- package/app/m/manufacturing/BillOfMaterials/index.html +52 -59
- package/app/m/manufacturing/BomLine/index.html +52 -59
- package/app/m/manufacturing/Operation/index.html +52 -59
- package/app/m/manufacturing/ProductionRun/index.html +52 -59
- package/app/m/manufacturing/ProductionRunCompletion/index.html +52 -59
- package/app/m/manufacturing/RoutingStep/index.html +52 -59
- package/app/m/marketing/Campaign/index.html +52 -59
- package/app/m/marketing/CampaignChannel/index.html +52 -59
- package/app/m/marketing/CampaignMetricSnapshot/index.html +52 -59
- package/app/m/messages/Account/index.html +52 -59
- package/app/m/messages/Attachment/index.html +52 -59
- package/app/m/messages/Blacklist/index.html +52 -59
- package/app/m/messages/Email/failed-sends/index.html +54 -59
- package/app/m/messages/Email/index.html +52 -59
- package/app/m/messages/Email/mailbox/index.html +54 -59
- package/app/m/messages/EmailAccount/index.html +52 -59
- package/app/m/messages/EmailAttachment/index.html +89 -0
- package/app/m/messages/EmailFolder/index.html +52 -59
- package/app/m/messages/Message/index.html +52 -59
- package/app/m/messages/MessagingEndpoint/index.html +52 -59
- package/app/m/messages/PersonaMessageRoute/index.html +52 -59
- package/app/m/messages/SlackAccount/index.html +52 -59
- package/app/m/messages/SlackMessage/index.html +52 -59
- package/app/m/messages/TelegramAccount/index.html +52 -59
- package/app/m/messages/Tweet/index.html +52 -59
- package/app/m/messages/TwitterAccount/index.html +52 -59
- package/app/m/messages/Whitelist/index.html +52 -59
- package/app/m/messages/ZulipAccount/index.html +52 -59
- package/app/m/places/Place/index.html +52 -59
- package/app/m/places/PlaceType/index.html +52 -59
- package/app/m/products/Category/index.html +52 -59
- package/app/m/products/Material/index.html +52 -59
- package/app/m/products/Product/index.html +52 -59
- package/app/m/products/Product/ingredients/index.html +54 -59
- package/app/m/products/ProductVariant/index.html +53 -60
- package/app/m/products/Sku/index.html +53 -60
- package/app/m/profiles/ApiKey/index.html +52 -59
- package/app/m/profiles/Bot/index.html +52 -59
- package/app/m/profiles/MagicLinkToken/index.html +52 -59
- package/app/m/profiles/NostrIdentity/index.html +52 -59
- package/app/m/profiles/OidcIdentity/index.html +52 -59
- package/app/m/profiles/Organization/index.html +52 -59
- package/app/m/profiles/Person/index.html +52 -59
- package/app/m/profiles/Profile/index.html +52 -59
- package/app/m/profiles/ProfileMetadata/index.html +52 -59
- package/app/m/profiles/ProfileMetafield/index.html +52 -59
- package/app/m/profiles/ProfileRelationship/index.html +52 -59
- package/app/m/profiles/ProfileRelationshipTerm/index.html +52 -59
- package/app/m/profiles/ProfileRelationshipType/index.html +52 -59
- package/app/m/profiles/ProfileType/index.html +52 -59
- package/app/m/projects/Comment/index.html +53 -60
- package/app/m/projects/Issue/index.html +52 -59
- package/app/m/projects/Label/index.html +52 -59
- package/app/m/projects/Project/index.html +52 -59
- package/app/m/projects/ProjectIntegration/index.html +52 -59
- package/app/m/projects/PullRequest/index.html +52 -59
- package/app/m/projects/Repository/index.html +52 -59
- package/app/m/properties/Property/index.html +52 -59
- package/app/m/properties/Zone/index.html +52 -59
- package/app/m/reports/RuntimeReport/index.html +52 -59
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +52 -59
- package/app/m/reports/SmrtReportLock/index.html +52 -59
- package/app/m/reports/SmrtReportRefreshTask/index.html +52 -59
- package/app/m/reports/SmrtReportRun/index.html +52 -59
- package/app/m/reports/SmrtReportSchedule/index.html +52 -59
- package/app/m/reports/SmrtReportWatermark/index.html +52 -59
- package/app/m/sales/AttributionException/index.html +52 -59
- package/app/m/sales/AttributionPolicy/index.html +52 -59
- package/app/m/sales/Commission/index.html +52 -59
- package/app/m/sales/CommissionAdjustment/index.html +52 -59
- package/app/m/sales/CommissionPayout/index.html +52 -59
- package/app/m/sales/CommissionPlan/index.html +52 -59
- package/app/m/sales/Earner/index.html +52 -59
- package/app/m/sales/EarnerSourceAttribution/index.html +52 -59
- package/app/m/sales/EarningEvent/index.html +52 -59
- package/app/m/sales/ExecutedAgreement/index.html +52 -59
- package/app/m/sales/Lead/index.html +52 -59
- package/app/m/sales/Opportunity/index.html +52 -59
- package/app/m/sales/OpportunityConversion/index.html +52 -59
- package/app/m/sales/PipelineDefinition/index.html +52 -59
- package/app/m/sales/PipelineStage/index.html +53 -60
- package/app/m/sales/Referral/index.html +52 -59
- package/app/m/sales/ReferralAgreement/index.html +52 -59
- package/app/m/sales/ReferralLink/index.html +52 -59
- package/app/m/sales/ReferralProgram/index.html +52 -59
- package/app/m/sales/ReferralTermSnapshot/index.html +52 -59
- package/app/m/sales/ReferralTouch/index.html +52 -59
- package/app/m/sales/Referrer/index.html +52 -59
- package/app/m/sales/SalesActivity/index.html +52 -59
- package/app/m/sales/SalesRepresentative/index.html +52 -59
- package/app/m/sites/Site/index.html +52 -59
- package/app/m/sites/SiteAgentBinding/index.html +52 -59
- package/app/m/social/OAuthState/index.html +52 -59
- package/app/m/social/SocialAccount/index.html +52 -59
- package/app/m/social/SocialPost/index.html +52 -59
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +52 -59
- package/app/m/subscriptions/BillingAdjustment/index.html +52 -59
- package/app/m/subscriptions/ClientCharge/index.html +52 -59
- package/app/m/subscriptions/CreditGrant/index.html +52 -59
- package/app/m/subscriptions/PricingRule/index.html +52 -59
- package/app/m/subscriptions/RetailCharge/index.html +52 -59
- package/app/m/subscriptions/SpendingPolicy/index.html +52 -59
- package/app/m/subscriptions/SubscriptionPlan/index.html +52 -59
- package/app/m/subscriptions/TenantSubscription/index.html +52 -59
- package/app/m/subscriptions/TenantUsageMetric/index.html +52 -59
- package/app/m/support/ServiceTimeEntry/index.html +52 -59
- package/app/m/support/SupportAiRun/index.html +52 -59
- package/app/m/support/SupportAvailability/index.html +52 -59
- package/app/m/support/SupportCase/index.html +52 -59
- package/app/m/support/SupportCaseEvent/index.html +52 -59
- package/app/m/support/SupportChannelBinding/index.html +52 -59
- package/app/m/support/SupportCharge/index.html +52 -59
- package/app/m/support/SupportCompensation/index.html +52 -59
- package/app/m/support/SupportCompensationPlan/index.html +52 -59
- package/app/m/support/SupportEscalation/index.html +52 -59
- package/app/m/support/SupportInteraction/index.html +52 -59
- package/app/m/support/SupportPlan/index.html +52 -59
- package/app/m/support/SupportPolicy/index.html +52 -59
- package/app/m/support/SupportQualification/index.html +52 -59
- package/app/m/support/SupportServiceTarget/index.html +52 -59
- package/app/m/support/SupportSpecialist/index.html +52 -59
- package/app/m/support/SupportWorkLink/index.html +52 -59
- package/app/m/tags/Tag/index.html +52 -59
- package/app/m/tags/TagAlias/index.html +52 -59
- package/app/m/timesheets/AttendanceBreak/index.html +52 -59
- package/app/m/timesheets/AttendancePunch/index.html +52 -59
- package/app/m/timesheets/AttendanceSegment/index.html +89 -0
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +52 -59
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +52 -59
- package/app/m/timesheets/ServiceTimeEntry/index.html +52 -59
- package/app/m/users/Group/index.html +52 -59
- package/app/m/users/GroupMember/index.html +52 -59
- package/app/m/users/GroupRole/index.html +52 -59
- package/app/m/users/Membership/index.html +53 -60
- package/app/m/users/MembershipOverride/index.html +52 -59
- package/app/m/users/Permission/index.html +52 -59
- package/app/m/users/Role/index.html +52 -59
- package/app/m/users/RolePermission/index.html +52 -59
- package/app/m/users/Session/index.html +52 -59
- package/app/m/users/Tenant/index.html +52 -59
- package/app/m/users/TenantIntegration/index.html +52 -59
- package/app/m/users/TenantPermissionOverride/index.html +52 -59
- package/app/m/users/User/index.html +52 -59
- package/app/m/video/Character/index.html +52 -59
- package/app/m/video/CharacterAsset/index.html +52 -59
- package/app/m/video/CompositeJob/index.html +52 -59
- package/app/m/video/Performer/index.html +52 -59
- package/app/m/video/PerformerAsset/index.html +52 -59
- package/app/m/video/Scene/index.html +52 -59
- package/app/m/video/SceneAsset/index.html +52 -59
- package/app/m/video/VideoComposition/index.html +52 -59
- package/app/m/video/VideoCompositionAsset/index.html +52 -59
- package/app/m/video/VideoSequence/index.html +52 -59
- package/app/m/video/VideoSequenceAsset/index.html +52 -59
- package/app/m/video/VideoShot/index.html +52 -59
- package/app/m/video/VideoShotAsset/index.html +52 -59
- package/app/m/video/VideoShotCharacter/index.html +52 -59
- package/app/m/video/VideoWorkflow/index.html +52 -59
- package/app/m/voice/VoiceOutput/index.html +52 -59
- package/app/m/voice/VoiceProfile/index.html +52 -59
- package/app/m/voice/VoiceSample/index.html +52 -59
- package/app/packages/ads/index.html +50 -57
- package/app/packages/analytics/index.html +50 -57
- package/app/packages/approvals/index.html +50 -57
- package/app/packages/assets/index.html +50 -57
- package/app/packages/chat/index.html +50 -57
- package/app/packages/comments/index.html +50 -57
- package/app/packages/commerce/index.html +50 -57
- package/app/packages/content/index.html +50 -57
- package/app/packages/events/index.html +50 -57
- package/app/packages/expenses/index.html +50 -57
- package/app/packages/facts/index.html +50 -57
- package/app/packages/fields/index.html +50 -57
- package/app/packages/human-resources/index.html +50 -57
- package/app/packages/images/index.html +50 -57
- package/app/packages/index.html +49 -55
- package/app/packages/ingestion/index.html +85 -0
- package/app/packages/inventory/index.html +50 -57
- package/app/packages/ledgers/index.html +50 -57
- package/app/packages/manufacturing/index.html +50 -57
- package/app/packages/marketing/index.html +50 -57
- package/app/packages/messages/index.html +50 -57
- package/app/packages/places/index.html +50 -57
- package/app/packages/preferences/index.html +50 -57
- package/app/packages/products/index.html +50 -57
- package/app/packages/profiles/index.html +50 -57
- package/app/packages/projects/index.html +50 -57
- package/app/packages/properties/index.html +50 -57
- package/app/packages/reports/index.html +50 -57
- package/app/packages/sales/index.html +50 -57
- package/app/packages/sites/index.html +50 -57
- package/app/packages/social/index.html +50 -57
- package/app/packages/subscriptions/index.html +50 -57
- package/app/packages/support/index.html +50 -57
- package/app/packages/tags/index.html +50 -57
- package/app/packages/timesheets/index.html +50 -57
- package/app/packages/users/index.html +50 -57
- package/app/packages/video/index.html +50 -57
- package/app/packages/voice/index.html +50 -57
- package/app/packages/webhooks/index.html +85 -0
- package/app/recipes/account-access/help/index.html +52 -57
- package/app/recipes/account-access/index.html +57 -59
- package/app/recipes/activity/help/index.html +52 -57
- package/app/recipes/activity/index.html +57 -59
- package/app/recipes/agreements/help/index.html +52 -57
- package/app/recipes/agreements/index.html +57 -59
- package/app/recipes/analytics.reports/help/index.html +52 -57
- package/app/recipes/analytics.reports/index.html +57 -59
- package/app/recipes/assets/help/index.html +52 -57
- package/app/recipes/assets/index.html +57 -59
- package/app/recipes/billing/help/index.html +52 -57
- package/app/recipes/billing/index.html +57 -59
- package/app/recipes/chat.assistant/help/index.html +52 -57
- package/app/recipes/chat.assistant/index.html +57 -59
- package/app/recipes/comments/help/index.html +52 -57
- package/app/recipes/comments/index.html +57 -59
- package/app/recipes/commerce.customers/help/index.html +52 -57
- package/app/recipes/commerce.customers/index.html +57 -59
- package/app/recipes/commerce.estimates/help/index.html +52 -57
- package/app/recipes/commerce.estimates/index.html +57 -59
- package/app/recipes/commerce.purchases/help/index.html +52 -57
- package/app/recipes/commerce.purchases/index.html +57 -59
- package/app/recipes/commerce.sales/help/index.html +52 -57
- package/app/recipes/commerce.sales/index.html +57 -59
- package/app/recipes/commerce.vendors/help/index.html +52 -57
- package/app/recipes/commerce.vendors/index.html +57 -59
- package/app/recipes/commerce.wholesale/help/index.html +52 -57
- package/app/recipes/commerce.wholesale/index.html +57 -59
- package/app/recipes/events.calendar/help/index.html +52 -57
- package/app/recipes/events.calendar/index.html +57 -59
- package/app/recipes/expenses.tracking/help/index.html +88 -0
- package/app/recipes/expenses.tracking/index.html +92 -0
- package/app/recipes/fields.form-customization/help/index.html +52 -57
- package/app/recipes/fields.form-customization/index.html +57 -59
- package/app/recipes/ingestion/help/index.html +88 -0
- package/app/recipes/ingestion/index.html +93 -0
- package/app/recipes/integrations/help/index.html +88 -0
- package/app/recipes/integrations/index.html +92 -0
- package/app/recipes/inventory.stock/help/index.html +52 -57
- package/app/recipes/inventory.stock/index.html +57 -59
- package/app/recipes/ledgers.bookkeeping/help/index.html +52 -57
- package/app/recipes/ledgers.bookkeeping/index.html +57 -59
- package/app/recipes/messages/help/index.html +52 -57
- package/app/recipes/messages/index.html +57 -59
- package/app/recipes/products/help/index.html +52 -57
- package/app/recipes/products/index.html +57 -59
- package/app/recipes/projects.tracker/help/index.html +52 -57
- package/app/recipes/projects.tracker/index.html +57 -59
- package/app/recipes/reports.materialized/help/index.html +52 -57
- package/app/recipes/reports.materialized/index.html +57 -59
- package/app/recipes/reports.runtime/help/index.html +88 -0
- package/app/recipes/reports.runtime/index.html +92 -0
- package/app/recipes/sales.pipeline/help/index.html +52 -57
- package/app/recipes/sales.pipeline/index.html +57 -59
- package/app/recipes/tags.taxonomy/help/index.html +52 -57
- package/app/recipes/tags.taxonomy/index.html +57 -59
- package/app/recipes/team-collaboration/help/index.html +52 -57
- package/app/recipes/team-collaboration/index.html +57 -59
- package/app/recipes/timesheets.time-entries/help/index.html +88 -0
- package/app/recipes/timesheets.time-entries/index.html +92 -0
- package/app/s/custom-accounts/index.html +82 -0
- package/app/s/custom-appointments/index.html +82 -0
- package/app/s/custom-billing/index.html +47 -54
- package/app/s/custom-buying/index.html +47 -54
- package/app/s/custom-checkout/index.html +82 -0
- package/app/s/custom-classes/index.html +47 -54
- package/app/s/custom-clients/index.html +82 -0
- package/app/s/custom-events/index.html +82 -0
- package/app/s/custom-fleet/index.html +82 -0
- package/app/s/custom-giving/index.html +82 -0
- package/app/s/custom-jobs/index.html +47 -54
- package/app/s/custom-kitchen/index.html +47 -54
- package/app/s/custom-material/index.html +47 -54
- package/app/s/custom-meetings/index.html +82 -0
- package/app/s/custom-members/index.html +47 -54
- package/app/s/custom-parts/index.html +47 -54
- package/app/s/custom-rentals/index.html +82 -0
- package/app/s/custom-roastery/index.html +82 -0
- package/app/s/custom-schedule/index.html +47 -54
- package/app/s/custom-shelf/index.html +82 -0
- package/app/s/custom-shop/index.html +47 -54
- package/app/s/custom-wholesale/index.html +47 -54
- package/app/s/custom-work/index.html +82 -0
- package/app/s/custom-yard/index.html +82 -0
- package/app/s/section-access-control/index.html +47 -54
- package/app/s/section-account-security/index.html +47 -54
- package/app/s/section-accounting/index.html +47 -54
- package/app/s/section-activity/index.html +47 -54
- package/app/s/section-agreements/index.html +47 -54
- package/app/s/section-analytics/index.html +47 -54
- package/app/s/section-assets/index.html +47 -54
- package/app/s/section-billing/index.html +47 -54
- package/app/s/section-calendar/index.html +47 -54
- package/app/s/section-catalog/index.html +47 -54
- package/app/s/section-chat.assistant/index.html +47 -54
- package/app/s/section-comments/index.html +47 -54
- package/app/s/section-fields.form-customization/index.html +47 -54
- package/app/s/section-ingestion/index.html +82 -0
- package/app/s/section-integrations/index.html +82 -0
- package/app/s/section-messages/index.html +47 -54
- package/app/s/section-more/index.html +47 -54
- package/app/s/section-operations/index.html +47 -54
- package/app/s/section-projects/index.html +47 -54
- package/app/s/section-purchasing/index.html +47 -54
- package/app/s/section-reports.materialized/index.html +47 -54
- package/app/s/section-reports.runtime/index.html +82 -0
- package/app/s/section-sales/index.html +47 -54
- package/app/s/section-taxonomy/index.html +47 -54
- package/app/s/section-team/index.html +47 -54
- package/app/s/section-work/index.html +82 -0
- package/dist/ai/state.svelte.d.ts +13 -0
- package/dist/ai/state.svelte.js +33 -0
- package/dist/assistant/change.d.ts +14 -3
- package/dist/assistant/change.js +26 -3
- package/dist/assistant/engine.js +5 -1
- package/dist/assistant/prompt.js +7 -3
- package/dist/catalog/catalog.json +11263 -14455
- package/dist/catalog/generate/exclusions.d.ts +2 -0
- package/dist/catalog/generate/exclusions.js +14 -0
- package/dist/catalog/generate/extract.js +28 -7
- package/dist/catalog/types.d.ts +7 -0
- package/dist/components/AdvancedStyles.svelte +138 -0
- package/dist/components/AdvancedStyles.svelte.d.ts +6 -0
- package/dist/components/AiModelsPage.svelte +40 -0
- package/dist/components/AiModelsPage.svelte.d.ts +7 -0
- package/dist/components/AiSetup.svelte +9 -6
- package/dist/components/AiStatusIcons.svelte +8 -5
- package/dist/components/AppSettings.svelte +105 -1
- package/dist/components/BrowserAssistant.svelte +16 -17
- package/dist/components/BrowserAssistant.svelte.d.ts +2 -0
- package/dist/components/ChildRecords.svelte +61 -14
- package/dist/components/ChildRecords.svelte.d.ts +1 -0
- package/dist/components/ConnectTools.svelte +5 -2
- package/dist/components/CookbooksPanel.svelte +56 -33
- package/dist/components/CopyButton.svelte +65 -0
- package/dist/components/CopyButton.svelte.d.ts +24 -0
- package/dist/components/ExportPanel.svelte +292 -57
- package/dist/components/ExportPanel.svelte.d.ts +10 -1
- package/dist/components/FeatureCard.svelte +21 -10
- package/dist/components/FeaturesPanel.svelte +4 -1
- package/dist/components/FieldInput.svelte +6 -3
- package/dist/components/FieldMapForm.svelte +6 -10
- package/dist/components/FieldMapForm.svelte.d.ts +1 -0
- package/dist/components/FormWorkspace.svelte +80 -9
- package/dist/components/FormWorkspace.svelte.d.ts +1 -0
- package/dist/components/HeaderIconLink.svelte +86 -0
- package/dist/components/HeaderIconLink.svelte.d.ts +14 -0
- package/dist/components/HelpView.svelte +3 -0
- package/dist/components/ModelOptions.svelte +13 -2
- package/dist/components/ModelPage.svelte +33 -5
- package/dist/components/ModelPage.svelte.d.ts +4 -0
- package/dist/components/ModelWorkspace.svelte +148 -50
- package/dist/components/ModelWorkspace.svelte.d.ts +4 -0
- package/dist/components/PackagePage.svelte +96 -0
- package/dist/components/PackagePage.svelte.d.ts +9 -0
- package/dist/components/ProductMedia.svelte +95 -0
- package/dist/components/ProductMedia.svelte.d.ts +10 -0
- package/dist/components/RecipeCards.svelte +13 -1
- package/dist/components/RecipeHelp.svelte +3 -0
- package/dist/components/RecipeOptions.svelte +13 -1
- package/dist/components/RecordFeatures.svelte +22 -8
- package/dist/components/RecordView.svelte +354 -0
- package/dist/components/RecordView.svelte.d.ts +14 -0
- package/dist/components/RelationField.svelte +5 -2
- package/dist/components/SectionActions.svelte +8 -5
- package/dist/components/SectionHeading.svelte +63 -0
- package/dist/components/SectionHeading.svelte.d.ts +11 -0
- package/dist/components/SectionIcons.svelte +15 -3
- package/dist/components/SectionOverview.svelte +33 -3
- package/dist/components/SectionOverview.svelte.d.ts +4 -0
- package/dist/components/SectionPage.svelte +25 -165
- package/dist/components/SectionView.svelte +172 -0
- package/dist/components/SectionView.svelte.d.ts +18 -0
- package/dist/components/SettingsPanel.svelte +3 -9
- package/dist/components/SettingsPanel.svelte.d.ts +1 -5
- package/dist/components/ThemeBridge.svelte +80 -4
- package/dist/components/ThemeBridge.svelte.d.ts +5 -1
- package/dist/components/ThemeSection.svelte +208 -117
- package/dist/components/ThemeSection.svelte.d.ts +3 -7
- package/dist/components/VariantGridForm.svelte +9 -13
- package/dist/components/VariantGridForm.svelte.d.ts +1 -0
- package/dist/components/VoiceTyping.svelte +3 -0
- package/dist/cookbook/describe.d.ts +29 -0
- package/dist/cookbook/describe.js +164 -0
- package/dist/cookbook/file.d.ts +6 -0
- package/dist/cookbook/file.js +18 -4
- package/dist/cookbook/prompt.d.ts +49 -0
- package/dist/cookbook/prompt.js +96 -0
- package/dist/cookbook/store.svelte.d.ts +13 -0
- package/dist/cookbook/store.svelte.js +36 -8
- package/dist/core/prompt.js +10 -1
- package/dist/core/reply.d.ts +6 -1
- package/dist/data/children.d.ts +50 -6
- package/dist/data/children.js +146 -16
- package/dist/data/derived.d.ts +37 -29
- package/dist/data/derived.js +49 -30
- package/dist/data/display.d.ts +21 -8
- package/dist/data/display.js +74 -11
- package/dist/data/fakes.d.ts +48 -9
- package/dist/data/fakes.js +146 -22
- package/dist/data/labels.d.ts +7 -2
- package/dist/data/labels.js +12 -2
- package/dist/data/list-sort.d.ts +8 -0
- package/dist/data/list-sort.js +45 -0
- package/dist/data/money.d.ts +225 -0
- package/dist/data/money.js +411 -0
- package/dist/data/packs.d.ts +13 -0
- package/dist/data/packs.js +1224 -0
- package/dist/data/planner-source.js +120 -3
- package/dist/data/source.d.ts +13 -2
- package/dist/data/source.js +274 -40
- package/dist/features/palette.d.ts +2 -0
- package/dist/features/palette.js +1 -1
- package/dist/forms/stock.d.ts +1 -1
- package/dist/forms/stock.js +3 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -1
- package/dist/kitchen/LiveKitchenBridge.svelte +73 -0
- package/dist/kitchen/LiveKitchenBridge.svelte.d.ts +8 -0
- package/dist/kitchen/live.d.ts +7 -0
- package/dist/kitchen/live.js +51 -0
- package/dist/library/icons.js +34 -0
- package/dist/library/library.json +1546 -15
- package/dist/library/pending.json +5 -0
- package/dist/library/types.d.ts +4 -0
- package/dist/motion/tokens.d.ts +6 -0
- package/dist/motion/tokens.js +32 -0
- package/dist/motion/view-transition.d.ts +13 -0
- package/dist/motion/view-transition.js +17 -0
- package/dist/overviews/definitions.d.ts +41 -2
- package/dist/overviews/definitions.js +111 -4
- package/dist/overviews/models.d.ts +10 -0
- package/dist/overviews/models.js +19 -0
- package/dist/overviews/registry.d.ts +92 -5
- package/dist/overviews/registry.js +468 -58
- package/dist/overviews/validate.js +2 -2
- package/dist/planner/Planner.svelte +374 -166
- package/dist/planner/PlannerControls.svelte +255 -0
- package/dist/planner/PlannerControls.svelte.d.ts +17 -0
- package/dist/planner/PlannerLifecycle.svelte +73 -0
- package/dist/planner/PlannerLifecycle.svelte.d.ts +9 -0
- package/dist/planner/app.svelte.d.ts +12 -2
- package/dist/planner/app.svelte.js +13 -3
- package/dist/planner/assistant.js +20 -2
- package/dist/planner/commands/adapter.js +9 -2
- package/dist/planner/commands/types.d.ts +1 -1
- package/dist/planner/commands/types.js +1 -0
- package/dist/planner/header-icons.d.ts +12 -0
- package/dist/planner/header-icons.js +12 -0
- package/dist/planner/host/HostPlanner.svelte +70 -0
- package/dist/planner/host/HostPlanner.svelte.d.ts +17 -0
- package/dist/planner/host/session.svelte.d.ts +28 -0
- package/dist/planner/host/session.svelte.js +186 -0
- package/dist/planner/routes.d.ts +49 -0
- package/dist/planner/routes.js +64 -0
- package/dist/planner/shell.d.ts +40 -0
- package/dist/planner/shell.js +56 -0
- package/dist/planner/tab.svelte.d.ts +6 -3
- package/dist/planner/tab.svelte.js +11 -4
- package/dist/planner/title.d.ts +15 -0
- package/dist/planner/title.js +21 -0
- package/dist/planner/title.svelte.d.ts +6 -0
- package/dist/planner/title.svelte.js +11 -0
- package/dist/planner/types.d.ts +39 -7
- package/dist/products/media.d.ts +20 -0
- package/dist/products/media.js +65 -0
- package/dist/recipes/help/descriptions.json +1 -3
- package/dist/recipes/index.d.ts +2 -0
- package/dist/recipes/index.js +6 -0
- package/dist/recipes/plumbing.d.ts +35 -1
- package/dist/recipes/plumbing.js +74 -0
- package/dist/screens/definition.d.ts +35 -0
- package/dist/screens/definition.js +132 -0
- package/dist/screens/relations.d.ts +17 -0
- package/dist/screens/relations.js +98 -0
- package/dist/screens/totals.d.ts +37 -0
- package/dist/screens/totals.js +65 -0
- package/dist/sections/info.d.ts +1 -1
- package/dist/sections/info.js +2 -2
- package/dist/settings/app-settings.d.ts +17 -1
- package/dist/settings/app-settings.js +40 -3
- package/dist/smrt-version.d.ts +2 -0
- package/dist/smrt-version.js +4 -0
- package/dist/styles/planner-forms.css +53 -0
- package/dist/styles/planner-lists.css +43 -0
- package/dist/theme/css-highlight.d.ts +6 -0
- package/dist/theme/css-highlight.js +34 -0
- package/dist/theme/custom-css.svelte.d.ts +34 -0
- package/dist/theme/custom-css.svelte.js +246 -0
- package/dist/theme/runtime.js +25 -5
- package/dist/theme/theme.d.ts +26 -3
- package/dist/theme/theme.js +70 -2
- package/dist/upstream/overlay.d.ts +14 -5
- package/dist/upstream/overlay.js +20 -2
- package/package.json +12 -6
- package/app/_app/immutable/assets/0.B5zXkXe_.css +0 -1
- package/app/_app/immutable/assets/10.hpcnxvK1.css +0 -1
- package/app/_app/immutable/assets/11.D7zoXfVV.css +0 -1
- package/app/_app/immutable/assets/12.CPobm1ED.css +0 -1
- package/app/_app/immutable/assets/2.CyaWdRdI.css +0 -1
- package/app/_app/immutable/assets/3.BlPQOes8.css +0 -1
- package/app/_app/immutable/assets/8.2gQeKBp_.css +0 -1
- package/app/_app/immutable/assets/9.HOPT4xtg.css +0 -1
- package/app/_app/immutable/assets/AiSetup.Cb22AigN.css +0 -1
- package/app/_app/immutable/assets/Button.DkP0qkG9.css +0 -1
- package/app/_app/immutable/assets/ConnectTools.BgIJOOGW.css +0 -1
- package/app/_app/immutable/assets/FieldMapForm.BCU-4pO4.css +0 -1
- package/app/_app/immutable/assets/ModelPage.Dd3LcMta.css +0 -1
- package/app/_app/immutable/assets/SectionActions.CTkVuNMF.css +0 -1
- package/app/_app/immutable/assets/SectionIcons.5Udq9vN-.css +0 -1
- package/app/_app/immutable/assets/SegmentedControl.B8SrQacd.css +0 -1
- package/app/_app/immutable/assets/dist.C5nHBk_O.css +0 -1
- package/app/_app/immutable/assets/feedback.BVKAwFck.css +0 -1
- package/app/_app/immutable/assets/forms.BChZ2RWM.css +0 -1
- package/app/_app/immutable/assets/percent.LH0z-ozZ.css +0 -1
- package/app/_app/immutable/assets/store.CGDwHkkF.css +0 -1
- package/app/_app/immutable/assets/ui.B1A1Zl2p.css +0 -1
- package/app/_app/immutable/assets/workspace.BIMkuZDb.css +0 -1
- package/app/_app/immutable/chunks/1okeBSoq.js +0 -1
- package/app/_app/immutable/chunks/2jFBkS1C.js +0 -1
- package/app/_app/immutable/chunks/6P9zxrzU.js +0 -1
- package/app/_app/immutable/chunks/B32EWqI8.js +0 -9
- package/app/_app/immutable/chunks/B4Kevpe0.js +0 -1
- package/app/_app/immutable/chunks/BKwRT_1p.js +0 -1
- package/app/_app/immutable/chunks/BS4h9ES-.js +0 -1
- package/app/_app/immutable/chunks/CMhpRMKg.js +0 -1
- package/app/_app/immutable/chunks/CPRHZZeW.js +0 -1
- package/app/_app/immutable/chunks/CRQ1Pmzr.js +0 -1
- package/app/_app/immutable/chunks/CWtfVMDz.js +0 -1
- package/app/_app/immutable/chunks/Chyo8rdT.js +0 -3
- package/app/_app/immutable/chunks/Ci0DUht6.js +0 -34
- package/app/_app/immutable/chunks/CmmuWmp6.js +0 -2
- package/app/_app/immutable/chunks/CrFNLK0f.js +0 -1
- package/app/_app/immutable/chunks/CsprTb3f.js +0 -2
- package/app/_app/immutable/chunks/CygC84VT.js +0 -2
- package/app/_app/immutable/chunks/D0VgZnk1.js +0 -1
- package/app/_app/immutable/chunks/DD7gpKb2.js +0 -1
- package/app/_app/immutable/chunks/DNRgqfTx.js +0 -1
- package/app/_app/immutable/chunks/DVRKjN-E.js +0 -1
- package/app/_app/immutable/chunks/D_J_XtJy.js +0 -846
- package/app/_app/immutable/chunks/Dp9GVO-9.js +0 -1
- package/app/_app/immutable/chunks/DqcD-WtP.js +0 -1
- package/app/_app/immutable/chunks/QukgIHDX.js +0 -1
- package/app/_app/immutable/chunks/WxSPP8QW.js +0 -4
- package/app/_app/immutable/chunks/Xp1g1t4n.js +0 -3
- package/app/_app/immutable/chunks/leQCwW2d.js +0 -1
- package/app/_app/immutable/chunks/p6bgzXiY.js +0 -1
- package/app/_app/immutable/entry/app.IZIJXhgq.js +0 -2
- package/app/_app/immutable/entry/start.BuaYHD1N.js +0 -1
- package/app/_app/immutable/nodes/0.m_U8WC7E.js +0 -10
- package/app/_app/immutable/nodes/1.Crw8ULhB.js +0 -1
- package/app/_app/immutable/nodes/10.1nQxyH9H.js +0 -4
- package/app/_app/immutable/nodes/11.Cw0JnQF3.js +0 -1
- package/app/_app/immutable/nodes/12.BIocA1aI.js +0 -1
- package/app/_app/immutable/nodes/2.CR5BwGnt.js +0 -17
- package/app/_app/immutable/nodes/3.1B56hgAG.js +0 -1
- package/app/_app/immutable/nodes/4.SSIC7sUh.js +0 -1
- package/app/_app/immutable/nodes/5.DgdwleDQ.js +0 -1
- package/app/_app/immutable/nodes/6.DmD9rqLU.js +0 -1
- package/app/_app/immutable/nodes/7.DdngsBmo.js +0 -1
- package/app/_app/immutable/nodes/8.D2Mszsua.js +0 -3
- package/app/_app/immutable/nodes/9.CLYsywul.js +0 -1
- package/app/m/content/Contents/index.html +0 -96
- package/app/m/preferences/UiPreferenceRecord/index.html +0 -96
- package/app/m/users/AccessRequest/index.html +0 -96
- package/app/m/users/ResourceGrant/index.html +0 -96
- package/app/m/users/UsersCliAuthRequest/index.html +0 -96
- package/app/m/users/UsersMagicLinkToken/index.html +0 -96
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { getThemeName, isValidPreset, } from '@happyvertical/smrt-ui/themes/presets';
|
|
2
|
+
import { humanize } from "../data/format.js";
|
|
3
|
+
import { FEATURE_SECTION } from "../recipes/features.js";
|
|
4
|
+
import { buildNavSections, recipes, recipesById } from "../recipes/index.js";
|
|
5
|
+
import { DEFAULT_PRESET } from "../theme/theme.js";
|
|
6
|
+
const plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
7
|
+
const NAV_SECTION_LABELS = new Map(buildNavSections(recipes).map((section) => [section.id, section.label]));
|
|
8
|
+
/** The last segment of a qualified model name, humanized: `@scope/pkg:StockLevel` -> `Stock level`. */
|
|
9
|
+
export function modelLabel(qualified) {
|
|
10
|
+
return humanize(qualified.slice(qualified.lastIndexOf(':') + 1));
|
|
11
|
+
}
|
|
12
|
+
/** Saved options grouped by model: `Customer: payment terms, currency`. */
|
|
13
|
+
export function describeOptions(policies) {
|
|
14
|
+
const byModel = new Map();
|
|
15
|
+
for (const row of policies) {
|
|
16
|
+
const model = modelLabel(row.objectRef);
|
|
17
|
+
const fields = byModel.get(model) ?? [];
|
|
18
|
+
const field = humanize(row.fieldName).toLowerCase();
|
|
19
|
+
if (!fields.includes(field))
|
|
20
|
+
fields.push(field);
|
|
21
|
+
byModel.set(model, fields);
|
|
22
|
+
}
|
|
23
|
+
return [...byModel].map(([model, fields]) => `${model}: ${fields.join(', ')}`);
|
|
24
|
+
}
|
|
25
|
+
/** The theme as a few words: preset or brand colour, then what differs from the defaults. */
|
|
26
|
+
export function describeTheme(theme) {
|
|
27
|
+
const parts = [];
|
|
28
|
+
if (theme.custom)
|
|
29
|
+
parts.push(`brand colour ${theme.custom.primary}`);
|
|
30
|
+
else if (theme.preset && theme.preset !== DEFAULT_PRESET) {
|
|
31
|
+
parts.push(`${isValidPreset(theme.preset) ? getThemeName(theme.preset) : theme.preset} preset`);
|
|
32
|
+
}
|
|
33
|
+
if (theme.colorScheme && theme.colorScheme !== 'system') {
|
|
34
|
+
parts.push(`${theme.colorScheme} scheme`);
|
|
35
|
+
}
|
|
36
|
+
const font = theme.fontFamily ?? theme.custom?.fontFamily;
|
|
37
|
+
if (font)
|
|
38
|
+
parts.push(`${font} font`);
|
|
39
|
+
if (theme.borderRadius)
|
|
40
|
+
parts.push(`${theme.borderRadius} corners`);
|
|
41
|
+
if (theme.density === 'touch')
|
|
42
|
+
parts.push('touch density');
|
|
43
|
+
if (theme.contrast && theme.contrast !== 'auto') {
|
|
44
|
+
parts.push(`${theme.contrast} contrast`);
|
|
45
|
+
}
|
|
46
|
+
if (theme.customCss?.trim())
|
|
47
|
+
parts.push('custom CSS');
|
|
48
|
+
return parts;
|
|
49
|
+
}
|
|
50
|
+
/** The layout delta in counts: custom sections by name, then hidden, renamed, moved, reordered. */
|
|
51
|
+
export function describeLayout(layout) {
|
|
52
|
+
const parts = [];
|
|
53
|
+
const custom = layout.customSections ?? [];
|
|
54
|
+
if (custom.length) {
|
|
55
|
+
const names = custom.map((section) => section.label).filter(Boolean);
|
|
56
|
+
parts.push(`${plural(custom.length, 'custom section')}${names.length && names.length <= 4 ? ` (${names.join(', ')})` : ''}`);
|
|
57
|
+
}
|
|
58
|
+
const hidden = layout.hidden?.length ?? 0;
|
|
59
|
+
if (hidden)
|
|
60
|
+
parts.push(`${hidden} hidden`);
|
|
61
|
+
const renamed = Object.values(layout.items ?? {}).filter((item) => item.label).length +
|
|
62
|
+
Object.values(layout.sections ?? {}).filter((section) => section.label || section.icon || section.showTitle === false).length;
|
|
63
|
+
if (renamed)
|
|
64
|
+
parts.push(`${renamed} renamed or restyled`);
|
|
65
|
+
const moved = Object.keys(layout.moved ?? {}).length;
|
|
66
|
+
if (moved)
|
|
67
|
+
parts.push(`${moved} moved`);
|
|
68
|
+
if (layout.sectionOrder?.length ||
|
|
69
|
+
Object.keys(layout.itemOrder ?? {}).length) {
|
|
70
|
+
parts.push('reordered');
|
|
71
|
+
}
|
|
72
|
+
const placed = Object.keys(layout.placements ?? {}).length;
|
|
73
|
+
if (placed)
|
|
74
|
+
parts.push(`${plural(placed, 'shell item')} placed`);
|
|
75
|
+
if (Object.keys(layout.panels ?? {}).length)
|
|
76
|
+
parts.push('panel settings');
|
|
77
|
+
return parts;
|
|
78
|
+
}
|
|
79
|
+
/** A customised page's name from its overview id. */
|
|
80
|
+
export function pageLabel(id, layout) {
|
|
81
|
+
if (id === `section:${FEATURE_SECTION.id}`)
|
|
82
|
+
return FEATURE_SECTION.label;
|
|
83
|
+
if (id.startsWith('section:')) {
|
|
84
|
+
const key = id.slice('section:'.length);
|
|
85
|
+
return (layout?.sections?.[id]?.label ??
|
|
86
|
+
NAV_SECTION_LABELS.get(key) ??
|
|
87
|
+
humanize(key));
|
|
88
|
+
}
|
|
89
|
+
if (id.startsWith('custom:')) {
|
|
90
|
+
return (layout?.customSections?.find((section) => section.id === id)?.label ??
|
|
91
|
+
humanize(id.slice('custom:'.length)));
|
|
92
|
+
}
|
|
93
|
+
if (id.startsWith('detail:')) {
|
|
94
|
+
const model = id.slice(id.lastIndexOf('.') + 1);
|
|
95
|
+
return `${humanize(model)} record`;
|
|
96
|
+
}
|
|
97
|
+
return humanize(id);
|
|
98
|
+
}
|
|
99
|
+
/** Every line with content, in display order; empty for an empty cookbook. */
|
|
100
|
+
export function describeCookbook(cookbook) {
|
|
101
|
+
const lines = [];
|
|
102
|
+
if (cookbook.recipes.length) {
|
|
103
|
+
lines.push({
|
|
104
|
+
id: 'recipes',
|
|
105
|
+
label: plural(cookbook.recipes.length, 'recipe'),
|
|
106
|
+
chips: cookbook.recipes.map((id) => recipesById.get(id)?.label ?? id),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (cookbook.features.length) {
|
|
110
|
+
lines.push({
|
|
111
|
+
id: 'features',
|
|
112
|
+
label: plural(cookbook.features.length, 'feature'),
|
|
113
|
+
chips: cookbook.features.map(modelLabel),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (cookbook.policies.length) {
|
|
117
|
+
lines.push({
|
|
118
|
+
id: 'options',
|
|
119
|
+
label: plural(cookbook.policies.length, 'saved option'),
|
|
120
|
+
chips: describeOptions(cookbook.policies),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const narrowed = Object.entries(cookbook.exposure ?? {}).filter(([, surfaces]) => surfaces.length);
|
|
124
|
+
if (narrowed.length) {
|
|
125
|
+
lines.push({
|
|
126
|
+
id: 'exposure',
|
|
127
|
+
label: 'Surfaces switched off',
|
|
128
|
+
chips: narrowed.map(([model, surfaces]) => `${modelLabel(model)}: ${surfaces.join(', ')}`),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
const theme = cookbook.theme ? describeTheme(cookbook.theme) : [];
|
|
132
|
+
if (theme.length) {
|
|
133
|
+
lines.push({ id: 'theme', label: 'Theme', text: theme.join(', ') });
|
|
134
|
+
}
|
|
135
|
+
const layout = cookbook.layout ? describeLayout(cookbook.layout) : [];
|
|
136
|
+
if (layout.length) {
|
|
137
|
+
lines.push({ id: 'layout', label: 'Layout', text: layout.join(', ') });
|
|
138
|
+
}
|
|
139
|
+
const pages = Object.keys(cookbook.overviews ?? {});
|
|
140
|
+
if (pages.length) {
|
|
141
|
+
lines.push({
|
|
142
|
+
id: 'pages',
|
|
143
|
+
label: plural(pages.length, 'customised page'),
|
|
144
|
+
chips: pages.map((id) => pageLabel(id, cookbook.layout)),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return lines;
|
|
148
|
+
}
|
|
149
|
+
/** One sentence for confirm dialogs: "3 recipes, 2 saved options, a theme and a layout". */
|
|
150
|
+
export function summarizeCookbook(cookbook) {
|
|
151
|
+
const lines = describeCookbook(cookbook);
|
|
152
|
+
if (!lines.length)
|
|
153
|
+
return 'an empty cookbook';
|
|
154
|
+
const words = lines.map((line) => line.id === 'theme'
|
|
155
|
+
? 'a theme'
|
|
156
|
+
: line.id === 'layout'
|
|
157
|
+
? 'a layout'
|
|
158
|
+
: line.id === 'exposure'
|
|
159
|
+
? 'narrowed surfaces'
|
|
160
|
+
: line.label);
|
|
161
|
+
return words.length === 1
|
|
162
|
+
? words[0]
|
|
163
|
+
: `${words.slice(0, -1).join(', ')} and ${words.at(-1)}`;
|
|
164
|
+
}
|
package/dist/cookbook/file.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { Cookbook } from './types.ts';
|
|
2
2
|
export declare const DEFAULT_EXPORT_NAME = "my-app";
|
|
3
|
+
/** A name reduced to a file- and directory-safe slug; empty when nothing survives. */
|
|
4
|
+
export declare function slugify(name?: string): string;
|
|
3
5
|
/** `<name>.cookbook.json`, with the name reduced to a safe slug. */
|
|
4
6
|
export declare function exportFileName(name?: string): string;
|
|
7
|
+
/** The bytes of the file `downloadCookbook` writes. */
|
|
8
|
+
export declare function exportFileSize(cookbook: Cookbook): number;
|
|
9
|
+
/** "3.6 KB" / "12 KB" / "640 bytes", for a note beside a file or a prompt. */
|
|
10
|
+
export declare function formatSize(bytes: number): string;
|
|
5
11
|
export declare function serializeCookbook(cookbook: Cookbook): string;
|
|
6
12
|
/** Offer the cookbook as a `<name>.cookbook.json` download. */
|
|
7
13
|
export declare function downloadCookbook(cookbook: Cookbook, name?: string): void;
|
package/dist/cookbook/file.js
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
export const DEFAULT_EXPORT_NAME = 'my-app';
|
|
2
|
-
/**
|
|
3
|
-
export function
|
|
4
|
-
|
|
2
|
+
/** A name reduced to a file- and directory-safe slug; empty when nothing survives. */
|
|
3
|
+
export function slugify(name) {
|
|
4
|
+
return (name ?? '')
|
|
5
5
|
.normalize('NFD')
|
|
6
6
|
.replace(/\p{M}/gu, '')
|
|
7
7
|
.toLowerCase()
|
|
8
8
|
.replace(/[^a-z0-9]+/g, '-')
|
|
9
9
|
.replace(/^-+|-+$/g, '');
|
|
10
|
-
|
|
10
|
+
}
|
|
11
|
+
/** `<name>.cookbook.json`, with the name reduced to a safe slug. */
|
|
12
|
+
export function exportFileName(name) {
|
|
13
|
+
return `${slugify(name) || DEFAULT_EXPORT_NAME}.cookbook.json`;
|
|
14
|
+
}
|
|
15
|
+
/** The bytes of the file `downloadCookbook` writes. */
|
|
16
|
+
export function exportFileSize(cookbook) {
|
|
17
|
+
return new TextEncoder().encode(serializeCookbook(cookbook)).length;
|
|
18
|
+
}
|
|
19
|
+
/** "3.6 KB" / "12 KB" / "640 bytes", for a note beside a file or a prompt. */
|
|
20
|
+
export function formatSize(bytes) {
|
|
21
|
+
if (bytes < 1000)
|
|
22
|
+
return `${bytes} bytes`;
|
|
23
|
+
const kb = bytes / 1024;
|
|
24
|
+
return `${kb < 10 ? kb.toFixed(1) : Math.round(kb)} KB`;
|
|
11
25
|
}
|
|
12
26
|
export function serializeCookbook(cookbook) {
|
|
13
27
|
return `${JSON.stringify(cookbook, null, 2)}\n`;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Cookbook } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The Export page's "Copy prompt for your coding agent": one block of text a
|
|
4
|
+
* person pastes into a coding agent (Claude Code, Codex, …) to get a working
|
|
5
|
+
* app from the cookbook. The cookbook travels inside it as plain minified
|
|
6
|
+
* JSON in a quoted heredoc, so the agent writes the file byte for byte and
|
|
7
|
+
* nothing in it is expanded by the shell.
|
|
8
|
+
*
|
|
9
|
+
* Every command here is the released CLI's (`smrt cookbook validate`,
|
|
10
|
+
* `cookbook apply <file> <dir>`, `--into` for a second apply, `smrt app
|
|
11
|
+
* install` / `app doctor`); keep them in step with `smrt --help`. It needs no
|
|
12
|
+
* registry override: every @happyvertical package is on npmjs at the released
|
|
13
|
+
* version, and the app the CLI makes ships its own `.npmrc`.
|
|
14
|
+
*/
|
|
15
|
+
/** What `@happyvertical/smrt-core`, the CLI and the smrt-start template require. */
|
|
16
|
+
export declare const NODE_REQUIREMENT = "Node 26 or newer";
|
|
17
|
+
export declare const PNPM_REQUIREMENT = "pnpm 11";
|
|
18
|
+
export declare const COOKBOOK_FILE = "cookbook.json";
|
|
19
|
+
/** `npx -y @happyvertical/smrt-cli@<version>`, the CLI without a global install. */
|
|
20
|
+
export declare function cliCommand(version?: string): string;
|
|
21
|
+
/** The app directory `cookbook apply` creates: the cookbook's name as a slug, else the export name, else `my-app`. */
|
|
22
|
+
export declare function appNameFor(cookbook: Cookbook, fallbackName?: string): string;
|
|
23
|
+
/** `… cookbook apply <file> <app>`, the one command the downloaded file needs. */
|
|
24
|
+
export declare function applyCommand(fileName: string, appName: string, version?: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* A heredoc delimiter no line of `body` equals. Minified JSON is one line
|
|
27
|
+
* starting with `{`, so the base is normally fine; a body that does carry
|
|
28
|
+
* the delimiter on a line of its own gets a numbered one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function heredocDelimiter(body: string, base?: string): string;
|
|
31
|
+
/** `cat > <file> <<'<delimiter>'` … `<delimiter>`, quoted so nothing expands. */
|
|
32
|
+
export declare function heredoc(file: string, body: string): string;
|
|
33
|
+
/** The body of the quoted heredoc that writes `file` in `text`; undefined when there is none. */
|
|
34
|
+
export declare function heredocBody(text: string, file: string): string | undefined;
|
|
35
|
+
export interface AgentPrompt {
|
|
36
|
+
text: string;
|
|
37
|
+
/** UTF-8 bytes of `text`. */
|
|
38
|
+
bytes: number;
|
|
39
|
+
appName: string;
|
|
40
|
+
version: string;
|
|
41
|
+
delimiter: string;
|
|
42
|
+
}
|
|
43
|
+
export interface AgentPromptOptions {
|
|
44
|
+
/** Names the app when the cookbook has no `name` (the library cookbook applied). */
|
|
45
|
+
fallbackName?: string;
|
|
46
|
+
version?: string;
|
|
47
|
+
}
|
|
48
|
+
/** The whole prompt for one cookbook. Pure; the page only copies it. */
|
|
49
|
+
export declare function buildAgentPrompt(cookbook: Cookbook, options?: AgentPromptOptions): AgentPrompt;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { SMRT_VERSION } from "../smrt-version.js";
|
|
2
|
+
import { DEFAULT_EXPORT_NAME, slugify } from "./file.js";
|
|
3
|
+
/**
|
|
4
|
+
* The Export page's "Copy prompt for your coding agent": one block of text a
|
|
5
|
+
* person pastes into a coding agent (Claude Code, Codex, …) to get a working
|
|
6
|
+
* app from the cookbook. The cookbook travels inside it as plain minified
|
|
7
|
+
* JSON in a quoted heredoc, so the agent writes the file byte for byte and
|
|
8
|
+
* nothing in it is expanded by the shell.
|
|
9
|
+
*
|
|
10
|
+
* Every command here is the released CLI's (`smrt cookbook validate`,
|
|
11
|
+
* `cookbook apply <file> <dir>`, `--into` for a second apply, `smrt app
|
|
12
|
+
* install` / `app doctor`); keep them in step with `smrt --help`. It needs no
|
|
13
|
+
* registry override: every @happyvertical package is on npmjs at the released
|
|
14
|
+
* version, and the app the CLI makes ships its own `.npmrc`.
|
|
15
|
+
*/
|
|
16
|
+
/** What `@happyvertical/smrt-core`, the CLI and the smrt-start template require. */
|
|
17
|
+
export const NODE_REQUIREMENT = 'Node 26 or newer';
|
|
18
|
+
export const PNPM_REQUIREMENT = 'pnpm 11';
|
|
19
|
+
export const COOKBOOK_FILE = 'cookbook.json';
|
|
20
|
+
const DELIMITER_BASE = 'COOKBOOK_EOF';
|
|
21
|
+
/** `npx -y @happyvertical/smrt-cli@<version>`, the CLI without a global install. */
|
|
22
|
+
export function cliCommand(version = SMRT_VERSION) {
|
|
23
|
+
return `npx -y @happyvertical/smrt-cli@${version}`;
|
|
24
|
+
}
|
|
25
|
+
/** The app directory `cookbook apply` creates: the cookbook's name as a slug, else the export name, else `my-app`. */
|
|
26
|
+
export function appNameFor(cookbook, fallbackName) {
|
|
27
|
+
return slugify(cookbook.name) || slugify(fallbackName) || DEFAULT_EXPORT_NAME;
|
|
28
|
+
}
|
|
29
|
+
/** `… cookbook apply <file> <app>`, the one command the downloaded file needs. */
|
|
30
|
+
export function applyCommand(fileName, appName, version = SMRT_VERSION) {
|
|
31
|
+
return `${cliCommand(version)} cookbook apply ${fileName} ${appName}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A heredoc delimiter no line of `body` equals. Minified JSON is one line
|
|
35
|
+
* starting with `{`, so the base is normally fine; a body that does carry
|
|
36
|
+
* the delimiter on a line of its own gets a numbered one.
|
|
37
|
+
*/
|
|
38
|
+
export function heredocDelimiter(body, base = DELIMITER_BASE) {
|
|
39
|
+
const lines = new Set(body.split('\n'));
|
|
40
|
+
let delimiter = base;
|
|
41
|
+
for (let n = 1; lines.has(delimiter); n++)
|
|
42
|
+
delimiter = `${base}_${n}`;
|
|
43
|
+
return delimiter;
|
|
44
|
+
}
|
|
45
|
+
/** `cat > <file> <<'<delimiter>'` … `<delimiter>`, quoted so nothing expands. */
|
|
46
|
+
export function heredoc(file, body) {
|
|
47
|
+
const delimiter = heredocDelimiter(body);
|
|
48
|
+
return `cat > ${file} <<'${delimiter}'\n${body}\n${delimiter}`;
|
|
49
|
+
}
|
|
50
|
+
/** The body of the quoted heredoc that writes `file` in `text`; undefined when there is none. */
|
|
51
|
+
export function heredocBody(text, file) {
|
|
52
|
+
const lines = text.split('\n');
|
|
53
|
+
const prefix = `cat > ${file} <<'`;
|
|
54
|
+
const start = lines.findIndex((line) => line.startsWith(prefix) && line.endsWith("'"));
|
|
55
|
+
if (start < 0)
|
|
56
|
+
return undefined;
|
|
57
|
+
const delimiter = lines[start].slice(prefix.length, -1);
|
|
58
|
+
const end = lines.indexOf(delimiter, start + 1);
|
|
59
|
+
return end < 0 ? undefined : lines.slice(start + 1, end).join('\n');
|
|
60
|
+
}
|
|
61
|
+
/** The whole prompt for one cookbook. Pure; the page only copies it. */
|
|
62
|
+
export function buildAgentPrompt(cookbook, options = {}) {
|
|
63
|
+
const version = options.version ?? SMRT_VERSION;
|
|
64
|
+
const appName = appNameFor(cookbook, options.fallbackName);
|
|
65
|
+
const json = JSON.stringify(cookbook);
|
|
66
|
+
const delimiter = heredocDelimiter(json);
|
|
67
|
+
const cli = cliCommand(version);
|
|
68
|
+
const text = [
|
|
69
|
+
`Create a new s-m-r-t app from the cookbook below. Work in a new, empty directory outside any existing project, run the steps in order, and when you finish report what you ran and what happened, including anything that failed.`,
|
|
70
|
+
'',
|
|
71
|
+
`1. Prerequisites: ${NODE_REQUIREMENT} (\`node --version\`), git, and ${PNPM_REQUIREMENT} or newer (\`npm install -g pnpm\` if missing).`,
|
|
72
|
+
'',
|
|
73
|
+
`2. Write the cookbook exactly as given, without reformatting or editing it:`,
|
|
74
|
+
'',
|
|
75
|
+
`cat > ${COOKBOOK_FILE} <<'${delimiter}'\n${json}\n${delimiter}`,
|
|
76
|
+
'',
|
|
77
|
+
`3. Validate it, then create the app in ./${appName}:`,
|
|
78
|
+
'',
|
|
79
|
+
`${cli} cookbook validate ${COOKBOOK_FILE}`,
|
|
80
|
+
`${cli} cookbook apply ${COOKBOOK_FILE} ${appName}`,
|
|
81
|
+
'',
|
|
82
|
+
`4. Set it up (in a subshell, so the commands below still run from this directory):`,
|
|
83
|
+
'',
|
|
84
|
+
`(cd ${appName} && pnpm exec smrt app install)`,
|
|
85
|
+
'',
|
|
86
|
+
`If any step fails, run \`pnpm exec smrt app doctor\` inside ${appName} and include its findings in your report. Do not hand-edit the app's smrt.cookbook.json: change ${COOKBOOK_FILE} and run \`${cli} cookbook apply ${COOKBOOK_FILE} --into ${appName}\` instead.`,
|
|
87
|
+
'',
|
|
88
|
+
].join('\n');
|
|
89
|
+
return {
|
|
90
|
+
text,
|
|
91
|
+
bytes: new TextEncoder().encode(text).length,
|
|
92
|
+
appName,
|
|
93
|
+
version,
|
|
94
|
+
delimiter,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -8,6 +8,11 @@ export declare const SHELL_STORAGE_KEY = "smrt-planner:shell";
|
|
|
8
8
|
export declare const SAVE_DELAY_MS = 300;
|
|
9
9
|
/** `ok`: saved. `memory`: storage unavailable or refusing, working in memory. */
|
|
10
10
|
export type PersistState = 'unknown' | 'ok' | 'memory';
|
|
11
|
+
/**
|
|
12
|
+
* Sample documents follow the app's money settings (tax rate, prices with or
|
|
13
|
+
* without tax, rounding, currency) the next time sample rows are generated.
|
|
14
|
+
*/
|
|
15
|
+
export declare function followSettings(cookbook: Pick<Cookbook, 'policies'>): void;
|
|
11
16
|
/**
|
|
12
17
|
* The single source of truth for what a visitor has built. Recipes and
|
|
13
18
|
* options stay in `recipeState` (the one store views read); this adds the
|
|
@@ -30,6 +35,8 @@ export declare class CookbookStore {
|
|
|
30
35
|
persist: PersistState;
|
|
31
36
|
/** False until the saved cookbook has been read; nothing saves before. */
|
|
32
37
|
loaded: boolean;
|
|
38
|
+
/** Host-backed preview writes through Kitchen instead of browser storage. */
|
|
39
|
+
hostManaged: boolean;
|
|
33
40
|
/** Why the saved cookbook was not used, if it was not. */
|
|
34
41
|
loadNotice: string;
|
|
35
42
|
/**
|
|
@@ -47,6 +54,12 @@ export declare class CookbookStore {
|
|
|
47
54
|
private previousKept;
|
|
48
55
|
private storage;
|
|
49
56
|
private timer;
|
|
57
|
+
/**
|
|
58
|
+
* Plain data only: the `$state` fields are unwrapped with `$state.snapshot`
|
|
59
|
+
* because the document reaches smrt-core's cookbook engine, whose
|
|
60
|
+
* `structuredClone` throws on a `$state` proxy (#53: a saved layout then
|
|
61
|
+
* made the plan unreadable on reload).
|
|
62
|
+
*/
|
|
50
63
|
snapshot(): Cookbook;
|
|
51
64
|
/** A page's stored override, or `null` when it is on its defaults. */
|
|
52
65
|
overview(id: string): OverviewOverride | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isShellLayoutEmpty, } from '@happyvertical/smrt-svelte/workspace/layout';
|
|
2
|
-
import { setSampleTaxRate } from "../data/packs.js";
|
|
2
|
+
import { setSamplePricing, setSampleTaxRate } from "../data/packs.js";
|
|
3
3
|
import { recipeState } from "../recipes/state.svelte.js";
|
|
4
|
-
import { hasTaxRateRow, readSettings, writeSettings, } from "../settings/app-settings.js";
|
|
4
|
+
import { hasTaxRateRow, isSettingRow, readSettings, writeSettings, } from "../settings/app-settings.js";
|
|
5
5
|
import { compactTheme } from "../theme/theme.js";
|
|
6
6
|
import { assembleCookbook } from "./assemble.js";
|
|
7
7
|
import { cookbookFromLegacySearch, hasLegacyState } from "./legacy.js";
|
|
@@ -10,6 +10,23 @@ import { parseCookbookText } from "./validate.js";
|
|
|
10
10
|
/** Where the planner's AppShell keeps its own settings (panel states, sizes). */
|
|
11
11
|
export const SHELL_STORAGE_KEY = 'smrt-planner:shell';
|
|
12
12
|
export const SAVE_DELAY_MS = 300;
|
|
13
|
+
/**
|
|
14
|
+
* Sample documents follow the app's money settings (tax rate, prices with or
|
|
15
|
+
* without tax, rounding, currency) the next time sample rows are generated.
|
|
16
|
+
*/
|
|
17
|
+
export function followSettings(cookbook) {
|
|
18
|
+
const settings = readSettings(cookbook);
|
|
19
|
+
// Once the app states any setting (a cookbook or the Settings tab did), its
|
|
20
|
+
// tax rate is what it says, 0 included, as an exported cookbook means; a
|
|
21
|
+
// fresh app keeps the sample pack's rate.
|
|
22
|
+
const stated = cookbook.policies.some((row) => row.defaultValue !== undefined && isSettingRow(row));
|
|
23
|
+
setSampleTaxRate(hasTaxRateRow(cookbook) || stated ? settings.taxRate : undefined);
|
|
24
|
+
setSamplePricing({
|
|
25
|
+
pricesIncludeTax: settings.pricesIncludeTax,
|
|
26
|
+
taxRounding: settings.taxRounding,
|
|
27
|
+
currency: settings.currency,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
13
30
|
/**
|
|
14
31
|
* The single source of truth for what a visitor has built. Recipes and
|
|
15
32
|
* options stay in `recipeState` (the one store views read); this adds the
|
|
@@ -32,6 +49,8 @@ export class CookbookStore {
|
|
|
32
49
|
persist = $state('unknown');
|
|
33
50
|
/** False until the saved cookbook has been read; nothing saves before. */
|
|
34
51
|
loaded = $state(false);
|
|
52
|
+
/** Host-backed preview writes through Kitchen instead of browser storage. */
|
|
53
|
+
hostManaged = false;
|
|
35
54
|
/** Why the saved cookbook was not used, if it was not. */
|
|
36
55
|
loadNotice = $state('');
|
|
37
56
|
/**
|
|
@@ -49,11 +68,17 @@ export class CookbookStore {
|
|
|
49
68
|
previousKept = false;
|
|
50
69
|
storage = null;
|
|
51
70
|
timer;
|
|
71
|
+
/**
|
|
72
|
+
* Plain data only: the `$state` fields are unwrapped with `$state.snapshot`
|
|
73
|
+
* because the document reaches smrt-core's cookbook engine, whose
|
|
74
|
+
* `structuredClone` throws on a `$state` proxy (#53: a saved layout then
|
|
75
|
+
* made the plan unreadable on reload).
|
|
76
|
+
*/
|
|
52
77
|
snapshot() {
|
|
53
|
-
return assembleCookbook(recipeState.data, {
|
|
54
|
-
layout: this.layout,
|
|
78
|
+
return assembleCookbook($state.snapshot(recipeState.data), {
|
|
79
|
+
layout: $state.snapshot(this.layout),
|
|
55
80
|
theme: $state.snapshot(this.theme),
|
|
56
|
-
overviews: this.overviews,
|
|
81
|
+
overviews: $state.snapshot(this.overviews),
|
|
57
82
|
name: this.name,
|
|
58
83
|
description: this.description,
|
|
59
84
|
});
|
|
@@ -84,7 +109,7 @@ export class CookbookStore {
|
|
|
84
109
|
this.name = cookbook.name;
|
|
85
110
|
this.description = cookbook.description;
|
|
86
111
|
this.overviews = { ...(cookbook.overviews ?? {}) };
|
|
87
|
-
|
|
112
|
+
followSettings(cookbook);
|
|
88
113
|
}
|
|
89
114
|
/**
|
|
90
115
|
* A sentence naming recipes and features the loaded cookbook has that this
|
|
@@ -117,7 +142,7 @@ export class CookbookStore {
|
|
|
117
142
|
setSettings(settings) {
|
|
118
143
|
const next = writeSettings(this.snapshot(), settings);
|
|
119
144
|
recipeState.rows = next.policies.map((row) => ({ ...row }));
|
|
120
|
-
|
|
145
|
+
followSettings(next);
|
|
121
146
|
}
|
|
122
147
|
/** Replace on the visitor's say-so (an import): saving is allowed again. */
|
|
123
148
|
replace(cookbook) {
|
|
@@ -130,6 +155,7 @@ export class CookbookStore {
|
|
|
130
155
|
/** Back to an empty cookbook, and the shell's own settings to defaults. */
|
|
131
156
|
reset() {
|
|
132
157
|
recipeState.clear();
|
|
158
|
+
followSettings({ policies: [] });
|
|
133
159
|
this.layout = undefined;
|
|
134
160
|
this.theme = undefined;
|
|
135
161
|
this.name = undefined;
|
|
@@ -201,6 +227,8 @@ export class CookbookStore {
|
|
|
201
227
|
this.timer = undefined;
|
|
202
228
|
if (!this.loaded)
|
|
203
229
|
return false;
|
|
230
|
+
if (this.hostManaged)
|
|
231
|
+
return true;
|
|
204
232
|
if (this.saveBlocked) {
|
|
205
233
|
this.persist = 'memory';
|
|
206
234
|
return false;
|
|
@@ -217,7 +245,7 @@ export class CookbookStore {
|
|
|
217
245
|
}
|
|
218
246
|
/** Save soon; many quick edits make one write. */
|
|
219
247
|
scheduleSave() {
|
|
220
|
-
if (!this.loaded)
|
|
248
|
+
if (!this.loaded || this.hostManaged)
|
|
221
249
|
return;
|
|
222
250
|
clearTimeout(this.timer);
|
|
223
251
|
this.timer = setTimeout(() => this.save(), SAVE_DELAY_MS);
|
package/dist/core/prompt.js
CHANGED
|
@@ -16,7 +16,7 @@ function indexOf(catalog) {
|
|
|
16
16
|
}
|
|
17
17
|
/** The snapshot's theme as the setting the prompt describes. */
|
|
18
18
|
function themeOf(snapshot) {
|
|
19
|
-
const { preset, primary, colorScheme } = snapshot.theme;
|
|
19
|
+
const { preset, primary, colorScheme, borderRadius, density, contrast } = snapshot.theme;
|
|
20
20
|
const theme = {};
|
|
21
21
|
if (preset)
|
|
22
22
|
theme.preset = preset;
|
|
@@ -25,6 +25,13 @@ function themeOf(snapshot) {
|
|
|
25
25
|
if (colorScheme && colorScheme !== 'system') {
|
|
26
26
|
theme.colorScheme = colorScheme;
|
|
27
27
|
}
|
|
28
|
+
if (borderRadius) {
|
|
29
|
+
theme.borderRadius = borderRadius;
|
|
30
|
+
}
|
|
31
|
+
if (density)
|
|
32
|
+
theme.density = density;
|
|
33
|
+
if (contrast)
|
|
34
|
+
theme.contrast = contrast;
|
|
28
35
|
return Object.keys(theme).length ? theme : undefined;
|
|
29
36
|
}
|
|
30
37
|
/** `rename_item(id, label)`: required inputs bare, optional ones with `?`. */
|
|
@@ -80,6 +87,8 @@ export function buildHostPrompt(input) {
|
|
|
80
87
|
currency: snapshot.settings.currency,
|
|
81
88
|
taxRate: Number((snapshot.settings.taxRate / 100).toFixed(6)),
|
|
82
89
|
paymentTerms: snapshot.settings.paymentTerms,
|
|
90
|
+
pricesIncludeTax: snapshot.settings.pricesIncludeTax,
|
|
91
|
+
taxRounding: snapshot.settings.taxRounding,
|
|
83
92
|
}, matchText(indexOf(catalog), message), { current: themeOf(snapshot) }),
|
|
84
93
|
...commandSection(snapshot),
|
|
85
94
|
].join('\n');
|
package/dist/core/reply.d.ts
CHANGED
|
@@ -18,12 +18,17 @@ export interface HostReply {
|
|
|
18
18
|
currency?: string;
|
|
19
19
|
taxRate?: number;
|
|
20
20
|
paymentTerms?: string;
|
|
21
|
+
pricesIncludeTax?: boolean;
|
|
22
|
+
taxRounding?: 'line' | 'document';
|
|
21
23
|
};
|
|
22
|
-
/** Theme tokens: a preset or `#rrggbb`,
|
|
24
|
+
/** Theme tokens: a preset or `#rrggbb`, light or dark, corner radius, density and contrast. */
|
|
23
25
|
theme?: {
|
|
24
26
|
preset?: string;
|
|
25
27
|
primary?: string;
|
|
26
28
|
colorScheme?: string;
|
|
29
|
+
borderRadius?: string;
|
|
30
|
+
density?: string;
|
|
31
|
+
contrast?: string;
|
|
27
32
|
};
|
|
28
33
|
/** Up to 8 planner commands, run in order by the planner. */
|
|
29
34
|
commands?: {
|
package/dist/data/children.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CatalogModel } from '../catalog/types.ts';
|
|
2
2
|
import { type ModelRecord } from './fakes.ts';
|
|
3
|
+
import { type MoneyContext } from './money.ts';
|
|
3
4
|
/** A child model and the field holding its parent's id (see `childLinks`). */
|
|
4
5
|
export interface ChildOf {
|
|
5
6
|
model: CatalogModel;
|
|
@@ -9,12 +10,55 @@ export interface ChildOf {
|
|
|
9
10
|
* Sample child rows for one parent record: one to four (journals, an even
|
|
10
11
|
* number of balanced entries), each pointing at the parent through `fk`. Ids
|
|
11
12
|
* and values are seeded from the parent's id, so the same parent always gets
|
|
12
|
-
* the same children. A line
|
|
13
|
-
*
|
|
13
|
+
* the same children. A line's money (`amount`, `taxAmount`, its tax code's
|
|
14
|
+
* snapshot) is settled with its document's other lines (`settleSample`).
|
|
14
15
|
*/
|
|
15
|
-
export declare function fakeChildrenOf(child: CatalogModel, fk: string, parent: ModelRecord, seed: number): ModelRecord[];
|
|
16
|
+
export declare function fakeChildrenOf(child: CatalogModel, fk: string, parent: ModelRecord, seed: number, rows?: number): ModelRecord[];
|
|
17
|
+
/** Does a sample document give a discount (about one in three, by its id)? */
|
|
18
|
+
export declare function discounted(parent: {
|
|
19
|
+
id: string;
|
|
20
|
+
}): boolean;
|
|
16
21
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
22
|
+
* Does a sample line carry its own tax code (`taxMode: 'override'`), about one
|
|
23
|
+
* line in seven by its document and position, never a document's first line?
|
|
19
24
|
*/
|
|
20
|
-
export declare function
|
|
25
|
+
export declare function overridesTax(parent: {
|
|
26
|
+
id: string;
|
|
27
|
+
}, index: number): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The code an overriding sample line chooses, by line: in an app whose
|
|
30
|
+
* currency an example-pack code names, that code half the time (BC GST + PST
|
|
31
|
+
* for CAD, so its components show apart); otherwise exempt or zero-rated.
|
|
32
|
+
*/
|
|
33
|
+
export declare function overrideTaxCode(parent: {
|
|
34
|
+
id: string;
|
|
35
|
+
}, index: number, currency?: string): import("./money.ts").SampleTaxCode | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* A sample line once the app's hidden fields' values are applied (`carried`):
|
|
38
|
+
* where the app hides the line's `discount`, an amount discount could not be
|
|
39
|
+
* seen or entered, so the line takes its tenth off as a percentage instead,
|
|
40
|
+
* and where it hides `discountRate` too, the line has no discount.
|
|
41
|
+
*/
|
|
42
|
+
export declare function withCarried(item: ModelRecord, carried: Readonly<Record<string, unknown>>): ModelRecord;
|
|
43
|
+
/**
|
|
44
|
+
* The sample documents whose stored totals deliberately disagree with their
|
|
45
|
+
* lines, so the record page's mismatch flag has something to show: the third
|
|
46
|
+
* Order and the third Invoice (row index 2), drafts whose subtotal and total
|
|
47
|
+
* were left stale by an edit made elsewhere. Only a draft's totals are read
|
|
48
|
+
* against its lines (an issued document shows its frozen figures as they
|
|
49
|
+
* are), so these two are drafts. Their own fields stay authoritative; the
|
|
50
|
+
* page only flags the difference. Editing a line recomputes the totals and
|
|
51
|
+
* clears it.
|
|
52
|
+
*/
|
|
53
|
+
export declare const MISMATCH_MODELS: readonly string[];
|
|
54
|
+
export declare const MISMATCH_ROW = 2;
|
|
55
|
+
/** What the stale total is off by, in minor units. */
|
|
56
|
+
export declare const MISMATCH_AMOUNT = 2500;
|
|
57
|
+
/** Leave one document's total stale (see {@link MISMATCH_MODELS}). */
|
|
58
|
+
export declare function seedMismatch(parent: ModelRecord, parentModel: CatalogModel, index: number): void;
|
|
59
|
+
/**
|
|
60
|
+
* Settle the line items just generated for a parent with it (see
|
|
61
|
+
* `settleWithLines`): the parent's totals are set in place and the settled
|
|
62
|
+
* lines returned.
|
|
63
|
+
*/
|
|
64
|
+
export declare function settleSample(parent: ModelRecord, parentModel: CatalogModel, items: readonly ModelRecord[], context: MoneyContext): ModelRecord[];
|