@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
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { getModelByQualifiedName } from "../catalog/index.js";
|
|
2
2
|
import { recipesById } from "../recipes/index.js";
|
|
3
3
|
import { resolveFields } from "../recipes/policy.js";
|
|
4
|
+
export const TAX_ROUNDINGS = ['line', 'document'];
|
|
4
5
|
export const DEFAULT_SETTINGS = {
|
|
5
6
|
currency: 'USD',
|
|
6
7
|
taxRate: 0,
|
|
7
8
|
paymentTerms: '',
|
|
9
|
+
pricesIncludeTax: false,
|
|
10
|
+
taxRounding: 'line',
|
|
8
11
|
};
|
|
9
12
|
const C = '@happyvertical/smrt-commerce:';
|
|
10
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Which model fields each setting is the default of (the single source). The
|
|
15
|
+
* money settings name the same fields as smrt-core's
|
|
16
|
+
* `COMMERCE_SETTING_TARGETS`: `pricesIncludeTax` is Invoice and Contract
|
|
17
|
+
* `lineAmountType` (`'inclusive'` / `'exclusive'`), `taxRounding` their
|
|
18
|
+
* `taxRoundingScope`.
|
|
19
|
+
*/
|
|
11
20
|
export const SETTING_TARGETS = {
|
|
12
21
|
currency: [
|
|
13
22
|
'Order',
|
|
@@ -16,15 +25,31 @@ export const SETTING_TARGETS = {
|
|
|
16
25
|
'Estimate',
|
|
17
26
|
'Invoice',
|
|
18
27
|
'Agreement',
|
|
28
|
+
'Lease',
|
|
19
29
|
].map((model) => ({ model: `${C}${model}`, field: 'currency' })),
|
|
20
30
|
taxRate: ['InvoiceLineItem', 'ContractLineItem'].map((model) => ({
|
|
21
31
|
model: `${C}${model}`,
|
|
22
32
|
field: 'taxRate',
|
|
23
33
|
})),
|
|
24
34
|
paymentTerms: [
|
|
25
|
-
...[
|
|
35
|
+
...[
|
|
36
|
+
'Order',
|
|
37
|
+
'WholesaleOrder',
|
|
38
|
+
'Estimate',
|
|
39
|
+
'Invoice',
|
|
40
|
+
'Agreement',
|
|
41
|
+
'Lease',
|
|
42
|
+
].map((model) => ({ model: `${C}${model}`, field: 'terms' })),
|
|
26
43
|
{ model: `${C}Customer`, field: 'paymentTerms' },
|
|
27
44
|
],
|
|
45
|
+
pricesIncludeTax: ['Invoice', 'Contract'].map((model) => ({
|
|
46
|
+
model: `${C}${model}`,
|
|
47
|
+
field: 'lineAmountType',
|
|
48
|
+
})),
|
|
49
|
+
taxRounding: ['Invoice', 'Contract'].map((model) => ({
|
|
50
|
+
model: `${C}${model}`,
|
|
51
|
+
field: 'taxRoundingScope',
|
|
52
|
+
})),
|
|
28
53
|
};
|
|
29
54
|
/**
|
|
30
55
|
* A setting's row on a model no added recipe covers yet. Kept (by the store's
|
|
@@ -63,12 +88,20 @@ export function readSettings(cookbook) {
|
|
|
63
88
|
const currency = first('currency', 'string');
|
|
64
89
|
const taxRate = first('taxRate', 'number');
|
|
65
90
|
const paymentTerms = first('paymentTerms', 'string');
|
|
91
|
+
const lineAmountType = first('pricesIncludeTax', 'string');
|
|
92
|
+
const taxRounding = first('taxRounding', 'string');
|
|
66
93
|
if (typeof currency === 'string')
|
|
67
94
|
out.currency = currency;
|
|
68
95
|
if (typeof taxRate === 'number')
|
|
69
96
|
out.taxRate = taxRate;
|
|
70
97
|
if (typeof paymentTerms === 'string')
|
|
71
98
|
out.paymentTerms = paymentTerms;
|
|
99
|
+
if (lineAmountType === 'inclusive' || lineAmountType === 'exclusive') {
|
|
100
|
+
out.pricesIncludeTax = lineAmountType === 'inclusive';
|
|
101
|
+
}
|
|
102
|
+
if (taxRounding === 'line' || taxRounding === 'document') {
|
|
103
|
+
out.taxRounding = taxRounding;
|
|
104
|
+
}
|
|
72
105
|
return out;
|
|
73
106
|
}
|
|
74
107
|
/** Does the cookbook state a tax rate (a row), rather than leave the default? */
|
|
@@ -103,7 +136,11 @@ export function writeSettings(cookbook, settings) {
|
|
|
103
136
|
? String(raw).trim()
|
|
104
137
|
: key === 'currency'
|
|
105
138
|
? String(raw).trim().toUpperCase()
|
|
106
|
-
:
|
|
139
|
+
: key === 'pricesIncludeTax'
|
|
140
|
+
? raw
|
|
141
|
+
? 'inclusive'
|
|
142
|
+
: 'exclusive'
|
|
143
|
+
: raw;
|
|
107
144
|
for (const { model, field } of SETTING_TARGETS[key]) {
|
|
108
145
|
const seed = seedDefault(cookbook, model, field);
|
|
109
146
|
const wanted = !isUnset(value) &&
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Generated by scripts/write-smrt-version.ts from the installed
|
|
2
|
+
// @happyvertical/smrt-core; do not edit. `pnpm version:smrt` refreshes it.
|
|
3
|
+
/** The released smrt line the planner is built against (the `smrt` CLI version its commands name). */
|
|
4
|
+
export const SMRT_VERSION = '0.57.0';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* Planner app-level treatment for generated record forms. */
|
|
2
|
+
.planner-form {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: minmax(0, 1fr);
|
|
6
|
+
gap: var(--smrt-spacing-4);
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
max-inline-size: 58rem;
|
|
9
|
+
min-inline-size: 0;
|
|
10
|
+
margin-block: var(--smrt-spacing-2) var(--smrt-spacing-6);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.planner-form > h3 {
|
|
14
|
+
grid-column: 1 / -1;
|
|
15
|
+
padding-block-end: var(--smrt-spacing-3);
|
|
16
|
+
border-block-end: var(--smrt-hairline);
|
|
17
|
+
font: var(--smrt-typography-title-large-font);
|
|
18
|
+
letter-spacing: var(--smrt-typography-title-large-tracking);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.planner-form > .field,
|
|
22
|
+
.planner-form > .derived {
|
|
23
|
+
min-inline-size: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.planner-form > .field[data-renderer='textarea'],
|
|
27
|
+
.planner-form > .field[data-renderer='address'],
|
|
28
|
+
.planner-form > .field[data-renderer='json'],
|
|
29
|
+
.planner-form > .grid,
|
|
30
|
+
.planner-form > .totals,
|
|
31
|
+
.planner-form > .error,
|
|
32
|
+
.planner-form > .actions {
|
|
33
|
+
grid-column: 1 / -1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.planner-form > .actions {
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
align-items: center;
|
|
39
|
+
padding-block-start: var(--smrt-spacing-4);
|
|
40
|
+
border-block-start: var(--smrt-hairline);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.planner-form :is(input, select, textarea):focus-visible {
|
|
44
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
45
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (min-width: 46rem) {
|
|
49
|
+
.planner-form {
|
|
50
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
51
|
+
column-gap: var(--smrt-spacing-6);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* Planner app-level treatment for generated record tables. */
|
|
2
|
+
.planner-list {
|
|
3
|
+
width: 100%;
|
|
4
|
+
border-collapse: separate;
|
|
5
|
+
border-spacing: 0;
|
|
6
|
+
font-size: 0.875rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.planner-list th {
|
|
10
|
+
background: var(--smrt-surface-sunken);
|
|
11
|
+
color: var(--smrt-color-on-surface-variant);
|
|
12
|
+
font-weight: var(--smrt-typography-weight-semibold);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.planner-list tbody tr:hover {
|
|
16
|
+
background: color-mix(in srgb, currentColor calc(var(--smrt-state-hover) * 100%), transparent);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.planner-list .sort-button {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--smrt-spacing-2);
|
|
23
|
+
padding: var(--smrt-spacing-1) 0;
|
|
24
|
+
border: 0;
|
|
25
|
+
border-radius: 0;
|
|
26
|
+
background: transparent;
|
|
27
|
+
color: inherit;
|
|
28
|
+
font: inherit;
|
|
29
|
+
font-weight: inherit;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.planner-list .sort-button:focus-visible {
|
|
35
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
36
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.planner-list .sort-icon {
|
|
40
|
+
color: var(--smrt-color-primary);
|
|
41
|
+
font-size: 1rem;
|
|
42
|
+
line-height: 1;
|
|
43
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface CssToken {
|
|
2
|
+
text: string;
|
|
3
|
+
kind: 'plain' | 'comment' | 'selector' | 'property' | 'value' | 'punctuation';
|
|
4
|
+
}
|
|
5
|
+
/** Small CSS lexer for the Planner editor. Text is rendered by Svelte, never as HTML. */
|
|
6
|
+
export declare function highlightCss(source: string): CssToken[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Small CSS lexer for the Planner editor. Text is rendered by Svelte, never as HTML. */
|
|
2
|
+
export function highlightCss(source) {
|
|
3
|
+
const result = [];
|
|
4
|
+
const pattern = /(\/\*[\s\S]*?\*\/|\/\*[\s\S]*$|"(?:\\.|[^"\\])*"?|'(?:\\.|[^'\\])*'?|[{}:;]|[^{}:;'"/]+|\/)/g;
|
|
5
|
+
let inBlock = false;
|
|
6
|
+
let afterColon = false;
|
|
7
|
+
for (const match of source.matchAll(pattern)) {
|
|
8
|
+
const text = match[0];
|
|
9
|
+
let kind = 'plain';
|
|
10
|
+
if (text.startsWith('/*'))
|
|
11
|
+
kind = 'comment';
|
|
12
|
+
else if (/^[{}:;]$/.test(text)) {
|
|
13
|
+
kind = 'punctuation';
|
|
14
|
+
if (text === '{') {
|
|
15
|
+
inBlock = true;
|
|
16
|
+
afterColon = false;
|
|
17
|
+
}
|
|
18
|
+
if (text === '}') {
|
|
19
|
+
inBlock = false;
|
|
20
|
+
afterColon = false;
|
|
21
|
+
}
|
|
22
|
+
if (text === ':')
|
|
23
|
+
afterColon = true;
|
|
24
|
+
if (text === ';')
|
|
25
|
+
afterColon = false;
|
|
26
|
+
}
|
|
27
|
+
else if (inBlock)
|
|
28
|
+
kind = afterColon ? 'value' : 'property';
|
|
29
|
+
else
|
|
30
|
+
kind = 'selector';
|
|
31
|
+
result.push({ text, kind });
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom CSS from a cookbook is untrusted: a cookbook can be imported, shared,
|
|
3
|
+
* or written by a host agent. Before it reaches the page it is parsed by the
|
|
4
|
+
* browser, stripped of external loads, and re-serialized inside an `@scope`
|
|
5
|
+
* rooted at this Planner's own app shell, so it can neither style the host
|
|
6
|
+
* page nor fetch anything. It applies only once the visitor approves that
|
|
7
|
+
* exact text.
|
|
8
|
+
*/
|
|
9
|
+
/** The shell class authors write; a leading one is read as this Planner's shell. */
|
|
10
|
+
export declare const SHELL_CLASS = "smrt-admin-shell";
|
|
11
|
+
/** Marks the one shell element a Planner's custom CSS is scoped to. */
|
|
12
|
+
export declare const SCOPE_ATTRIBUTE = "data-smrt-planner-scope";
|
|
13
|
+
/** `?styles=off` turns custom CSS off, whatever it hides. */
|
|
14
|
+
export declare const STYLES_OFF_PARAM = "styles";
|
|
15
|
+
/**
|
|
16
|
+
* The browser's own reading of `css`, without external loads, scoped to the
|
|
17
|
+
* element `scope` selects. Serialized rules are balanced, so nothing can close
|
|
18
|
+
* the scope. Empty outside a browser or when nothing survives.
|
|
19
|
+
*/
|
|
20
|
+
export declare function containCustomCss(css: string, scope: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* The selector for the app shell around `element`, marking that one shell so
|
|
23
|
+
* custom CSS cannot reach another shell on the page (a host's own AppShell or
|
|
24
|
+
* a second Planner). Null when `element` is not inside a shell.
|
|
25
|
+
*/
|
|
26
|
+
export declare function shellScopeOf(element: Element | null): string | null;
|
|
27
|
+
/** SHA-256 of the UTF-8 text, hex. Synchronous so approval checks stay reactive. */
|
|
28
|
+
export declare function sha256(text: string): string;
|
|
29
|
+
/** Remember the visitor's approval of exactly this CSS. */
|
|
30
|
+
export declare function approveCustomCss(css: string): void;
|
|
31
|
+
/** Approved on this page or remembered on this device; reactive to approvals. */
|
|
32
|
+
export declare function customCssApproved(css: string): boolean;
|
|
33
|
+
/** `?styles=off` in the address bar. */
|
|
34
|
+
export declare function customCssDisabled(search: string): boolean;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom CSS from a cookbook is untrusted: a cookbook can be imported, shared,
|
|
3
|
+
* or written by a host agent. Before it reaches the page it is parsed by the
|
|
4
|
+
* browser, stripped of external loads, and re-serialized inside an `@scope`
|
|
5
|
+
* rooted at this Planner's own app shell, so it can neither style the host
|
|
6
|
+
* page nor fetch anything. It applies only once the visitor approves that
|
|
7
|
+
* exact text.
|
|
8
|
+
*/
|
|
9
|
+
/** The shell class authors write; a leading one is read as this Planner's shell. */
|
|
10
|
+
export const SHELL_CLASS = 'smrt-admin-shell';
|
|
11
|
+
/** Marks the one shell element a Planner's custom CSS is scoped to. */
|
|
12
|
+
export const SCOPE_ATTRIBUTE = 'data-smrt-planner-scope';
|
|
13
|
+
/** `?styles=off` turns custom CSS off, whatever it hides. */
|
|
14
|
+
export const STYLES_OFF_PARAM = 'styles';
|
|
15
|
+
const APPROVED_KEY = 'smrt-planner-approved-css-v2';
|
|
16
|
+
const LEGACY_APPROVED_KEY = 'smrt-planner-approved-css';
|
|
17
|
+
const MAX_APPROVED = 20;
|
|
18
|
+
/** Value functions that load something: allowed only as literal `data:` URLs. */
|
|
19
|
+
const LOADS = /\b(?:url|image-set|image|cross-fade|element|src)\s*\(/gi;
|
|
20
|
+
/**
|
|
21
|
+
* Whether a rule's whole declaration text is safe. The text is checked as
|
|
22
|
+
* written out, shorthands and `var()` fallbacks included, because the browser
|
|
23
|
+
* keeps a `var()` value (and a custom property) as raw author text: any escape
|
|
24
|
+
* is refused, and every load must be a literal `url("data:...")`.
|
|
25
|
+
*/
|
|
26
|
+
function safeDeclarations(text) {
|
|
27
|
+
if (text.includes('\\'))
|
|
28
|
+
return false;
|
|
29
|
+
for (const match of text.matchAll(LOADS)) {
|
|
30
|
+
if (!/^url/i.test(match[0]))
|
|
31
|
+
return false;
|
|
32
|
+
const rest = text.slice((match.index ?? 0) + match[0].length).trimStart();
|
|
33
|
+
if (!/^(["']?)data:/i.test(rest))
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
/** Split a selector list on its top-level commas. */
|
|
39
|
+
function selectorList(text) {
|
|
40
|
+
const out = [];
|
|
41
|
+
let depth = 0;
|
|
42
|
+
let start = 0;
|
|
43
|
+
for (let i = 0; i < text.length; i++) {
|
|
44
|
+
const c = text[i];
|
|
45
|
+
if (c === '(' || c === '[')
|
|
46
|
+
depth++;
|
|
47
|
+
else if (c === ')' || c === ']')
|
|
48
|
+
depth--;
|
|
49
|
+
else if (c === ',' && depth === 0) {
|
|
50
|
+
out.push(text.slice(start, i).trim());
|
|
51
|
+
start = i + 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
out.push(text.slice(start).trim());
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
const LEADING_SHELL = new RegExp(`^\\.${SHELL_CLASS}(?![\\w-])`);
|
|
58
|
+
/**
|
|
59
|
+
* Inside `@scope`, a selector without `:scope` is read as a descendant of the
|
|
60
|
+
* root, so `.smrt-admin-shell a` would never match. A leading shell selector
|
|
61
|
+
* becomes `:scope`; the scope limit still keeps every match inside the shell.
|
|
62
|
+
*/
|
|
63
|
+
function shellToScope(rule) {
|
|
64
|
+
const next = selectorList(rule.selectorText)
|
|
65
|
+
.map((selector) => selector.replace(LEADING_SHELL, ':scope'))
|
|
66
|
+
.join(', ');
|
|
67
|
+
if (next !== rule.selectorText)
|
|
68
|
+
rule.selectorText = next;
|
|
69
|
+
}
|
|
70
|
+
/** Rule types that stay inside the scope; every other at-rule is global. */
|
|
71
|
+
const KEPT = [
|
|
72
|
+
'CSSStyleRule',
|
|
73
|
+
'CSSMediaRule',
|
|
74
|
+
'CSSSupportsRule',
|
|
75
|
+
'CSSContainerRule',
|
|
76
|
+
'CSSNestedDeclarations',
|
|
77
|
+
];
|
|
78
|
+
const kept = (rule) => KEPT.some((name) => name in globalThis &&
|
|
79
|
+
rule instanceof
|
|
80
|
+
globalThis[name]);
|
|
81
|
+
/**
|
|
82
|
+
* Keep only scoped style rules, at every depth: `@import`, `@font-face`,
|
|
83
|
+
* `@keyframes`, `@property`, `@layer` and the like register global names that
|
|
84
|
+
* `@scope` does not confine. A rule whose declarations could load anything is
|
|
85
|
+
* dropped whole.
|
|
86
|
+
*/
|
|
87
|
+
function strip(list, remove, nestedInStyle = false) {
|
|
88
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
89
|
+
const rule = list[i];
|
|
90
|
+
const style = rule.style;
|
|
91
|
+
if (!kept(rule) || (style && !safeDeclarations(style.cssText))) {
|
|
92
|
+
remove(i);
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
const isStyle = 'selectorText' in rule;
|
|
96
|
+
if (isStyle && !nestedInStyle)
|
|
97
|
+
shellToScope(rule);
|
|
98
|
+
const group = rule;
|
|
99
|
+
if (group.cssRules && group.deleteRule) {
|
|
100
|
+
const owner = group;
|
|
101
|
+
strip(owner.cssRules, (at) => owner.deleteRule(at), nestedInStyle || isStyle);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The browser's own reading of `css`, without external loads, scoped to the
|
|
107
|
+
* element `scope` selects. Serialized rules are balanced, so nothing can close
|
|
108
|
+
* the scope. Empty outside a browser or when nothing survives.
|
|
109
|
+
*/
|
|
110
|
+
export function containCustomCss(css, scope) {
|
|
111
|
+
if (!css.trim() || typeof CSSStyleSheet === 'undefined')
|
|
112
|
+
return '';
|
|
113
|
+
const sheet = new CSSStyleSheet();
|
|
114
|
+
try {
|
|
115
|
+
sheet.replaceSync(css);
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return '';
|
|
119
|
+
}
|
|
120
|
+
strip(sheet.cssRules, (at) => sheet.deleteRule(at));
|
|
121
|
+
const rules = Array.from(sheet.cssRules, (rule) => rule.cssText);
|
|
122
|
+
return rules.length ? `@scope (${scope}) {\n${rules.join('\n')}\n}` : '';
|
|
123
|
+
}
|
|
124
|
+
let nextScope = 0;
|
|
125
|
+
/**
|
|
126
|
+
* The selector for the app shell around `element`, marking that one shell so
|
|
127
|
+
* custom CSS cannot reach another shell on the page (a host's own AppShell or
|
|
128
|
+
* a second Planner). Null when `element` is not inside a shell.
|
|
129
|
+
*/
|
|
130
|
+
export function shellScopeOf(element) {
|
|
131
|
+
const shell = element?.closest(`.${SHELL_CLASS}`);
|
|
132
|
+
if (!shell)
|
|
133
|
+
return null;
|
|
134
|
+
let id = shell.getAttribute(SCOPE_ATTRIBUTE);
|
|
135
|
+
if (!id) {
|
|
136
|
+
id = `p${++nextScope}`;
|
|
137
|
+
shell.setAttribute(SCOPE_ATTRIBUTE, id);
|
|
138
|
+
}
|
|
139
|
+
return `[${SCOPE_ATTRIBUTE}="${id}"]`;
|
|
140
|
+
}
|
|
141
|
+
const K = new Uint32Array([
|
|
142
|
+
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
|
|
143
|
+
0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
|
144
|
+
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
|
|
145
|
+
0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
|
146
|
+
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
|
|
147
|
+
0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
|
|
148
|
+
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
|
|
149
|
+
0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
|
150
|
+
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
|
|
151
|
+
0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
|
|
152
|
+
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
|
|
153
|
+
]);
|
|
154
|
+
/** SHA-256 of the UTF-8 text, hex. Synchronous so approval checks stay reactive. */
|
|
155
|
+
export function sha256(text) {
|
|
156
|
+
const data = new TextEncoder().encode(text);
|
|
157
|
+
const bits = data.length * 8;
|
|
158
|
+
const padded = new Uint8Array(((data.length + 9 + 63) >> 6) << 6);
|
|
159
|
+
padded.set(data);
|
|
160
|
+
padded[data.length] = 0x80;
|
|
161
|
+
const view = new DataView(padded.buffer);
|
|
162
|
+
view.setUint32(padded.length - 8, Math.floor(bits / 2 ** 32));
|
|
163
|
+
view.setUint32(padded.length - 4, bits >>> 0);
|
|
164
|
+
const h = new Uint32Array([
|
|
165
|
+
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c,
|
|
166
|
+
0x1f83d9ab, 0x5be0cd19,
|
|
167
|
+
]);
|
|
168
|
+
const w = new Uint32Array(64);
|
|
169
|
+
const rotr = (x, n) => (x >>> n) | (x << (32 - n));
|
|
170
|
+
for (let offset = 0; offset < padded.length; offset += 64) {
|
|
171
|
+
for (let i = 0; i < 16; i++)
|
|
172
|
+
w[i] = view.getUint32(offset + i * 4);
|
|
173
|
+
for (let i = 16; i < 64; i++) {
|
|
174
|
+
const s0 = rotr(w[i - 15], 7) ^ rotr(w[i - 15], 18) ^ (w[i - 15] >>> 3);
|
|
175
|
+
const s1 = rotr(w[i - 2], 17) ^ rotr(w[i - 2], 19) ^ (w[i - 2] >>> 10);
|
|
176
|
+
w[i] = (w[i - 16] + s0 + w[i - 7] + s1) >>> 0;
|
|
177
|
+
}
|
|
178
|
+
let [a, b, c, d, e, f, g, k] = h;
|
|
179
|
+
for (let i = 0; i < 64; i++) {
|
|
180
|
+
const t1 = (k +
|
|
181
|
+
(rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)) +
|
|
182
|
+
((e & f) ^ (~e & g)) +
|
|
183
|
+
K[i] +
|
|
184
|
+
w[i]) >>>
|
|
185
|
+
0;
|
|
186
|
+
const t2 = ((rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)) +
|
|
187
|
+
((a & b) ^ (a & c) ^ (b & c))) >>>
|
|
188
|
+
0;
|
|
189
|
+
k = g;
|
|
190
|
+
g = f;
|
|
191
|
+
f = e;
|
|
192
|
+
e = (d + t1) >>> 0;
|
|
193
|
+
d = c;
|
|
194
|
+
c = b;
|
|
195
|
+
b = a;
|
|
196
|
+
a = (t1 + t2) >>> 0;
|
|
197
|
+
}
|
|
198
|
+
h[0] += a;
|
|
199
|
+
h[1] += b;
|
|
200
|
+
h[2] += c;
|
|
201
|
+
h[3] += d;
|
|
202
|
+
h[4] += e;
|
|
203
|
+
h[5] += f;
|
|
204
|
+
h[6] += g;
|
|
205
|
+
h[7] += k;
|
|
206
|
+
}
|
|
207
|
+
return Array.from(h, (x) => x.toString(16).padStart(8, '0')).join('');
|
|
208
|
+
}
|
|
209
|
+
function readApproved() {
|
|
210
|
+
try {
|
|
211
|
+
localStorage.removeItem(LEGACY_APPROVED_KEY);
|
|
212
|
+
const value = JSON.parse(localStorage.getItem(APPROVED_KEY) ?? '[]');
|
|
213
|
+
return Array.isArray(value)
|
|
214
|
+
? value.filter((v) => typeof v === 'string' && /^[0-9a-f]{64}$/.test(v))
|
|
215
|
+
: [];
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
return [];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
const approvedThisPage = new Set();
|
|
222
|
+
// Bumped on each approval so readers re-run.
|
|
223
|
+
const approvals = $state({ version: 0 });
|
|
224
|
+
/** Remember the visitor's approval of exactly this CSS. */
|
|
225
|
+
export function approveCustomCss(css) {
|
|
226
|
+
const id = sha256(css);
|
|
227
|
+
approvedThisPage.add(id);
|
|
228
|
+
const next = [id, ...readApproved().filter((v) => v !== id)].slice(0, MAX_APPROVED);
|
|
229
|
+
try {
|
|
230
|
+
localStorage.setItem(APPROVED_KEY, JSON.stringify(next));
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
// Without storage the approval lasts for this page only.
|
|
234
|
+
}
|
|
235
|
+
approvals.version++;
|
|
236
|
+
}
|
|
237
|
+
/** Approved on this page or remembered on this device; reactive to approvals. */
|
|
238
|
+
export function customCssApproved(css) {
|
|
239
|
+
void approvals.version;
|
|
240
|
+
const id = sha256(css);
|
|
241
|
+
return approvedThisPage.has(id) || readApproved().includes(id);
|
|
242
|
+
}
|
|
243
|
+
/** `?styles=off` in the address bar. */
|
|
244
|
+
export function customCssDisabled(search) {
|
|
245
|
+
return new URLSearchParams(search).get(STYLES_OFF_PARAM) === 'off';
|
|
246
|
+
}
|
package/dist/theme/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createThemeFromColor, registerTheme, } from '@happyvertical/smrt-ui/themes';
|
|
1
|
+
import { createThemeFromColor, getTheme, registerTheme, } from '@happyvertical/smrt-ui/themes';
|
|
2
2
|
import { DEFAULT_COLOR_SCHEME, DEFAULT_PRESET, THEME_FONTS, } from "./theme.js";
|
|
3
3
|
const registered = new Set();
|
|
4
4
|
/** The brand theme's id: unique per colour and font, since a registered id never changes. */
|
|
@@ -13,11 +13,31 @@ export function brandThemeId(primary, fontFamily) {
|
|
|
13
13
|
export function resolveTheme(theme) {
|
|
14
14
|
const colorScheme = theme?.colorScheme ?? DEFAULT_COLOR_SCHEME;
|
|
15
15
|
const custom = theme?.custom;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const fontFamily = theme?.fontFamily ?? custom?.fontFamily;
|
|
17
|
+
const font = fontFamily ? THEME_FONTS[fontFamily] : undefined;
|
|
18
|
+
if (!custom) {
|
|
19
|
+
const basePreset = theme?.preset ?? DEFAULT_PRESET;
|
|
20
|
+
if (!font)
|
|
21
|
+
return { preset: basePreset, colorScheme };
|
|
22
|
+
const id = `planner-preset-${basePreset}-${fontFamily?.toLowerCase().replace(/[^a-z0-9]/g, '')}`;
|
|
23
|
+
if (!registered.has(id)) {
|
|
24
|
+
const base = getTheme(basePreset);
|
|
25
|
+
const typography = Object.fromEntries(Object.entries(base.typography).map(([key, token]) => [
|
|
26
|
+
key,
|
|
27
|
+
{ ...token, fontFamily: 'var(--smrt-font-family)' },
|
|
28
|
+
]));
|
|
29
|
+
registerTheme({
|
|
30
|
+
...base,
|
|
31
|
+
id: id,
|
|
32
|
+
fontFamily: font,
|
|
33
|
+
typography,
|
|
34
|
+
});
|
|
35
|
+
registered.add(id);
|
|
36
|
+
}
|
|
37
|
+
return { preset: id, colorScheme };
|
|
38
|
+
}
|
|
39
|
+
const id = brandThemeId(custom.primary, fontFamily);
|
|
19
40
|
if (!registered.has(id)) {
|
|
20
|
-
const font = custom.fontFamily ? THEME_FONTS[custom.fontFamily] : undefined;
|
|
21
41
|
registerTheme(createThemeFromColor(custom.primary, id, 'Brand colour', {
|
|
22
42
|
...(font ? { fontFamily: font } : {}),
|
|
23
43
|
}));
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The app's look, kept in the app document (smrt#3604): a built-in smrt-ui
|
|
3
3
|
* preset, a light/dark/system choice and optionally a brand colour that
|
|
4
|
-
* `createThemeFromColor` expands into a full theme
|
|
5
|
-
*
|
|
4
|
+
* `createThemeFromColor` expands into a full theme (it replaces the preset;
|
|
5
|
+
* smrt-ui's `primaryColor`, which only tints a preset, is never used), plus
|
|
6
|
+
* corner radius, density and contrast. Custom CSS is saved
|
|
7
|
+
* with the cookbook and applied live by the Planner.
|
|
8
|
+
* Absent means the default (the `glass` preset, following the system scheme).
|
|
6
9
|
*/
|
|
7
10
|
export type ColorSchemeSetting = 'light' | 'dark' | 'system';
|
|
8
11
|
export interface CustomTheme {
|
|
@@ -11,18 +14,38 @@ export interface CustomTheme {
|
|
|
11
14
|
/** A key of `THEME_FONTS`. */
|
|
12
15
|
fontFamily?: string;
|
|
13
16
|
}
|
|
17
|
+
/** Corner radius scale (`ThemeProvider` `borderRadius`); `md` is the preset's own. */
|
|
18
|
+
export type BorderRadiusSetting = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
19
|
+
/** Control size: comfortable, or larger touch targets. */
|
|
20
|
+
export type DensitySetting = 'comfortable' | 'touch';
|
|
21
|
+
/** `auto` follows the device's contrast preference. */
|
|
22
|
+
export type ContrastSetting = 'auto' | 'standard' | 'more';
|
|
14
23
|
export interface ThemeSetting {
|
|
15
24
|
/** A built-in smrt-ui preset; the default when absent. */
|
|
16
25
|
preset?: string;
|
|
17
26
|
colorScheme?: ColorSchemeSetting;
|
|
27
|
+
/** Corner radius; absent keeps the preset's own. */
|
|
28
|
+
borderRadius?: BorderRadiusSetting;
|
|
29
|
+
/** Control density; absent is comfortable. */
|
|
30
|
+
density?: DensitySetting;
|
|
31
|
+
/** Contrast; absent follows the device. */
|
|
32
|
+
contrast?: ContrastSetting;
|
|
33
|
+
/** A font override that preserves the selected preset's palette. */
|
|
34
|
+
fontFamily?: string;
|
|
18
35
|
/** A brand colour theme; wins over `preset` while present. */
|
|
19
36
|
custom?: CustomTheme;
|
|
37
|
+
/** User-authored CSS carried with the cookbook and applied at runtime. */
|
|
38
|
+
customCss?: string;
|
|
20
39
|
}
|
|
21
40
|
/** smrt-ui's built-in presets (its Node-safe `themes/presets` subpath). */
|
|
22
41
|
export declare const THEME_PRESETS: readonly string[];
|
|
23
|
-
export declare const DEFAULT_PRESET = "
|
|
42
|
+
export declare const DEFAULT_PRESET = "glass";
|
|
24
43
|
export declare const DEFAULT_COLOR_SCHEME: ColorSchemeSetting;
|
|
25
44
|
export declare const COLOR_SCHEMES: readonly ColorSchemeSetting[];
|
|
45
|
+
/** The cookbook's `theme.borderRadius` values (smrt-core's cookbook schema). */
|
|
46
|
+
export declare const BORDER_RADII: readonly BorderRadiusSetting[];
|
|
47
|
+
export declare const DENSITIES: readonly DensitySetting[];
|
|
48
|
+
export declare const CONTRASTS: readonly ContrastSetting[];
|
|
26
49
|
/** The fonts a theme may name, each with its CSS stack. A fixed list, never free text. */
|
|
27
50
|
export declare const THEME_FONTS: Readonly<Record<string, string>>;
|
|
28
51
|
/** `#rgb` or `#rrggbb` (with or without `#`) as lowercase `#rrggbb`; else null. */
|