@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
|
@@ -5,10 +5,15 @@
|
|
|
5
5
|
// a customised page is saved, exported and imported with the rest of the app.
|
|
6
6
|
// The shell's pencil edits it like the layout; widget data comes from the
|
|
7
7
|
// in-browser sample source. Mount it under `{#key}` on the section id.
|
|
8
|
+
//
|
|
9
|
+
// The widgets are page sections, not cards in a card: the grid's `plain`
|
|
10
|
+
// presentation drops the tile frame (edit mode brings it back with the
|
|
11
|
+
// controls) and each title is drawn as a section heading.
|
|
8
12
|
import {
|
|
9
13
|
type OverviewDefinition,
|
|
10
14
|
OverviewGrid,
|
|
11
15
|
type OverviewModelChoice,
|
|
16
|
+
type OverviewWidget,
|
|
12
17
|
} from '@happyvertical/smrt-svelte/overview';
|
|
13
18
|
import { useShellLayout } from '@happyvertical/smrt-svelte/workspace';
|
|
14
19
|
import { onDestroy, untrack } from 'svelte';
|
|
@@ -26,9 +31,20 @@ interface SectionOverviewProps {
|
|
|
26
31
|
models: readonly OverviewModelChoice[];
|
|
27
32
|
/** Accessible name of the grid. */
|
|
28
33
|
label: string;
|
|
34
|
+
/** Page sections (`plain`, the default) or framed tiles (`card`). */
|
|
35
|
+
presentation?: 'card' | 'plain';
|
|
36
|
+
/** An in-app path with the app query; the standalone page's `appHref`. */
|
|
37
|
+
href?: (path: string) => string;
|
|
29
38
|
}
|
|
30
39
|
|
|
31
|
-
let {
|
|
40
|
+
let {
|
|
41
|
+
definition,
|
|
42
|
+
entries,
|
|
43
|
+
models,
|
|
44
|
+
label,
|
|
45
|
+
presentation = 'plain',
|
|
46
|
+
href = appHref,
|
|
47
|
+
}: SectionOverviewProps = $props();
|
|
32
48
|
|
|
33
49
|
const shell = useShellLayout();
|
|
34
50
|
const source = useDataSource();
|
|
@@ -36,7 +52,7 @@ const source = useDataSource();
|
|
|
36
52
|
const controller = createSectionOverview(
|
|
37
53
|
untrack(() => definition),
|
|
38
54
|
cookbookStore,
|
|
39
|
-
() => ({ source, sections: shell.sections, entries, href
|
|
55
|
+
() => ({ source, sections: shell.sections, entryIndex: entries, href }),
|
|
40
56
|
);
|
|
41
57
|
|
|
42
58
|
function reloadAll() {
|
|
@@ -62,4 +78,18 @@ $effect(() => source.onReset?.(() => reloadAll()));
|
|
|
62
78
|
onDestroy(() => controller.destroy());
|
|
63
79
|
</script>
|
|
64
80
|
|
|
65
|
-
|
|
81
|
+
{#snippet heading(_widget: OverviewWidget, title: string)}
|
|
82
|
+
<span class="section-heading">{title}</span>
|
|
83
|
+
{/snippet}
|
|
84
|
+
|
|
85
|
+
<OverviewGrid {controller} {models} {label} {presentation} {heading} />
|
|
86
|
+
|
|
87
|
+
<style>
|
|
88
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
89
|
+
@layer smrt.theme {
|
|
90
|
+
.section-heading {
|
|
91
|
+
font-size: var(--smrt-typography-title-medium-size, 1rem);
|
|
92
|
+
font-weight: var(--smrt-typography-title-medium-weight, 600);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -8,6 +8,10 @@ interface SectionOverviewProps {
|
|
|
8
8
|
models: readonly OverviewModelChoice[];
|
|
9
9
|
/** Accessible name of the grid. */
|
|
10
10
|
label: string;
|
|
11
|
+
/** Page sections (`plain`, the default) or framed tiles (`card`). */
|
|
12
|
+
presentation?: 'card' | 'plain';
|
|
13
|
+
/** An in-app path with the app query; the standalone page's `appHref`. */
|
|
14
|
+
href?: (path: string) => string;
|
|
11
15
|
}
|
|
12
16
|
declare const SectionOverview: import("svelte").Component<SectionOverviewProps, {}, "">;
|
|
13
17
|
type SectionOverview = ReturnType<typeof SectionOverview>;
|
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// layout edit mode the widgets get the overview chrome (add, move, resize,
|
|
7
|
-
// configure, remove, reset) and the entries are listed below with grips,
|
|
8
|
-
// rename and hide controls. A section id no overview can have shows the menu.
|
|
2
|
+
// The static app's section route: the shared `SectionView` plus what only the
|
|
3
|
+
// static app has pages for (the Help and Options icons, which open
|
|
4
|
+
// `/recipes/<id>/`) and the New buttons (which ask the entry page to open its
|
|
5
|
+
// create form through `planner/create.ts`).
|
|
9
6
|
import {
|
|
10
|
-
ShellSectionIcon,
|
|
11
|
-
ShellSectionMenu,
|
|
12
7
|
type ShellSectionMenuEntry,
|
|
13
8
|
useShellLayout,
|
|
14
9
|
} from '@happyvertical/smrt-svelte/workspace';
|
|
15
10
|
import { page } from '$app/state';
|
|
16
|
-
import {
|
|
17
|
-
import { useDataSource } from '../data/context.js';
|
|
18
|
-
import { humanize, navNoun, pluralize, recordCount } from '../data/format.js';
|
|
19
|
-
import { sectionOverview } from '../overviews/definitions.js';
|
|
20
|
-
import { appHref } from '../planner/app.svelte.js';
|
|
11
|
+
import { navNoun } from '../data/format.js';
|
|
21
12
|
import { requestCreate } from '../planner/create.js';
|
|
22
|
-
import {
|
|
23
|
-
import { inScope } from '../recipes/scope.js';
|
|
13
|
+
import { recipesById } from '../recipes/index.js';
|
|
24
14
|
import { recipeState } from '../recipes/state.svelte.js';
|
|
25
15
|
import { entryIndex, optionGroups } from '../sections/entries.js';
|
|
26
|
-
import {
|
|
27
|
-
DEFAULT_SECTION_ICON,
|
|
28
|
-
sectionInfo,
|
|
29
|
-
sectionTitle,
|
|
30
|
-
} from '../sections/info.js';
|
|
16
|
+
import { sectionTitle } from '../sections/info.js';
|
|
31
17
|
import SectionActions from './SectionActions.svelte';
|
|
32
18
|
import SectionIcons from './SectionIcons.svelte';
|
|
33
|
-
import
|
|
19
|
+
import SectionView from './SectionView.svelte';
|
|
34
20
|
|
|
35
21
|
interface SectionPageProps {
|
|
36
22
|
/** The layout id: `section:<id>`, `custom:<id>` or `package:<id>`. */
|
|
@@ -40,13 +26,9 @@ interface SectionPageProps {
|
|
|
40
26
|
let { sectionId }: SectionPageProps = $props();
|
|
41
27
|
|
|
42
28
|
const shell = useShellLayout();
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const title = $derived(sectionTitle(section?.heading));
|
|
47
|
-
const icon = $derived(section?.icon ?? DEFAULT_SECTION_ICON);
|
|
48
|
-
const description = $derived(sectionInfo(sectionId).description);
|
|
49
|
-
const itemIds = $derived(section?.items.map((entry) => entry.id) ?? []);
|
|
29
|
+
const title = $derived(
|
|
30
|
+
sectionTitle(shell.sections.find((s) => s.id === sectionId)?.heading),
|
|
31
|
+
);
|
|
50
32
|
|
|
51
33
|
const added = $derived(
|
|
52
34
|
recipeState.ids.flatMap((id) => {
|
|
@@ -55,49 +37,6 @@ const added = $derived(
|
|
|
55
37
|
}),
|
|
56
38
|
);
|
|
57
39
|
const index = $derived(entryIndex(added, recipeState.features));
|
|
58
|
-
const groups = $derived(optionGroups(itemIds, added));
|
|
59
|
-
const overview = $derived(sectionOverview(sectionId));
|
|
60
|
-
// The option editor offers the app's models: the added recipes' and features'.
|
|
61
|
-
const models = $derived.by(() => {
|
|
62
|
-
const ids = new Set<string>();
|
|
63
|
-
const choices: { value: string; label: string }[] = [];
|
|
64
|
-
const offer = (id: string, name: string) => {
|
|
65
|
-
if (ids.has(id)) return;
|
|
66
|
-
ids.add(id);
|
|
67
|
-
choices.push({ value: id, label: pluralize(humanize(name)) });
|
|
68
|
-
};
|
|
69
|
-
for (const recipe of added) {
|
|
70
|
-
for (const { model } of recipeModels(recipe)) offer(model.id, model.name);
|
|
71
|
-
}
|
|
72
|
-
for (const entry of index.values()) offer(entry.model.id, entry.model.name);
|
|
73
|
-
return choices;
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
let counts = $state(new Map<string, number>());
|
|
77
|
-
let generation = 0;
|
|
78
|
-
|
|
79
|
-
async function loadCounts() {
|
|
80
|
-
const run = ++generation;
|
|
81
|
-
const next = new Map<string, number>();
|
|
82
|
-
await Promise.all(
|
|
83
|
-
itemIds.map(async (id) => {
|
|
84
|
-
const entry = index.get(id);
|
|
85
|
-
if (!entry) return;
|
|
86
|
-
const rows = await source.list(entry.model);
|
|
87
|
-
next.set(id, rows.filter((row) => inScope(entry.scope, row)).length);
|
|
88
|
-
}),
|
|
89
|
-
);
|
|
90
|
-
// A newer run (the section or the data changed meanwhile) wins.
|
|
91
|
-
if (run === generation) counts = next;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
$effect(() => {
|
|
95
|
-
void itemIds;
|
|
96
|
-
void index;
|
|
97
|
-
void loadCounts();
|
|
98
|
-
});
|
|
99
|
-
// A reset (a cookbook applied, the app reset) swaps the rows underneath.
|
|
100
|
-
$effect(() => source.onReset?.(() => void loadCounts()));
|
|
101
40
|
|
|
102
41
|
const newNoun = (entry: ShellSectionMenuEntry) => {
|
|
103
42
|
const target = index.get(entry.id);
|
|
@@ -113,110 +52,30 @@ function startNew(entry: ShellSectionMenuEntry) {
|
|
|
113
52
|
<title>{title} · smrt planner</title>
|
|
114
53
|
</svelte:head>
|
|
115
54
|
|
|
116
|
-
{#snippet
|
|
117
|
-
{
|
|
55
|
+
{#snippet headerActions({ title: heading, itemIds }: { title: string; itemIds: readonly string[] })}
|
|
56
|
+
{@const groups = optionGroups(itemIds, added)}
|
|
57
|
+
{#if groups.length === 1}
|
|
58
|
+
<SectionIcons section={groups[0].id} label={groups[0].label} />
|
|
59
|
+
{:else if groups.length > 1}
|
|
60
|
+
<SectionActions label={heading} {groups} />
|
|
61
|
+
{/if}
|
|
118
62
|
{/snippet}
|
|
119
63
|
|
|
120
|
-
{#snippet
|
|
64
|
+
{#snippet menuActions(entry: ShellSectionMenuEntry)}
|
|
121
65
|
{@const noun = newNoun(entry)}
|
|
122
66
|
{#if noun}
|
|
123
67
|
<a class="new" href={entry.href} onclick={() => startNew(entry)}>New {noun}</a>
|
|
124
68
|
{/if}
|
|
125
69
|
{/snippet}
|
|
126
70
|
|
|
127
|
-
{
|
|
128
|
-
<main>
|
|
129
|
-
{#if section}
|
|
130
|
-
<header>
|
|
131
|
-
<span class="mark"><ShellSectionIcon name={icon} size={28} /></span>
|
|
132
|
-
<div class="heading">
|
|
133
|
-
<h1>{title}</h1>
|
|
134
|
-
{#if description}<p>{description}</p>{/if}
|
|
135
|
-
</div>
|
|
136
|
-
{#if groups.length === 1}
|
|
137
|
-
<SectionIcons section={groups[0].id} label={groups[0].label} />
|
|
138
|
-
{:else if groups.length > 1}
|
|
139
|
-
<SectionActions label={title} {groups} />
|
|
140
|
-
{/if}
|
|
141
|
-
</header>
|
|
142
|
-
{#if overview}
|
|
143
|
-
{#key sectionId}
|
|
144
|
-
<SectionOverview
|
|
145
|
-
definition={overview}
|
|
146
|
-
entries={index}
|
|
147
|
-
{models}
|
|
148
|
-
label={`${title} overview`}
|
|
149
|
-
/>
|
|
150
|
-
{/key}
|
|
151
|
-
{#if shell.editing}
|
|
152
|
-
<section class="entries" aria-labelledby="section-entries">
|
|
153
|
-
<h2 id="section-entries">Menu entries</h2>
|
|
154
|
-
<ShellSectionMenu {sectionId} {meta} />
|
|
155
|
-
</section>
|
|
156
|
-
{/if}
|
|
157
|
-
{:else}
|
|
158
|
-
<ShellSectionMenu {sectionId} layout="cards" {meta} {actions} />
|
|
159
|
-
{/if}
|
|
160
|
-
{:else}
|
|
161
|
-
<h1>Section not found</h1>
|
|
162
|
-
<p>This section is not in your app. <a href={appHref('/')}>Back to the Planner</a></p>
|
|
163
|
-
{/if}
|
|
164
|
-
</main>
|
|
165
|
-
{/if}
|
|
71
|
+
<SectionView {sectionId} {headerActions} {menuActions} />
|
|
166
72
|
|
|
167
73
|
<style>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
gap: var(--smrt-spacing-6);
|
|
171
|
-
width: min(100%, 64rem);
|
|
172
|
-
margin-inline: auto;
|
|
173
|
-
padding: var(--smrt-spacing-6);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
header {
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
gap: var(--smrt-spacing-4);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.mark {
|
|
183
|
-
display: inline-grid;
|
|
184
|
-
place-items: center;
|
|
185
|
-
flex: 0 0 auto;
|
|
186
|
-
inline-size: 3rem;
|
|
187
|
-
block-size: 3rem;
|
|
188
|
-
border-radius: var(--smrt-radius-large, 0.75rem);
|
|
189
|
-
background: var(--smrt-color-primary-container);
|
|
190
|
-
color: var(--smrt-color-on-primary-container);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.heading {
|
|
194
|
-
flex: 1 1 auto;
|
|
195
|
-
min-inline-size: 0;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
h1 {
|
|
199
|
-
margin: 0;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.heading p {
|
|
203
|
-
margin: var(--smrt-spacing-1) 0 0;
|
|
204
|
-
color: var(--smrt-color-on-surface-variant);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.entries {
|
|
208
|
-
display: grid;
|
|
209
|
-
gap: var(--smrt-spacing-3);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.entries h2 {
|
|
213
|
-
margin: 0;
|
|
214
|
-
font-size: 1rem;
|
|
215
|
-
}
|
|
216
|
-
|
|
74
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
75
|
+
@layer smrt.theme {
|
|
217
76
|
.new {
|
|
218
77
|
padding: var(--smrt-spacing-1) var(--smrt-spacing-3);
|
|
219
|
-
border:
|
|
78
|
+
border: var(--smrt-hairline);
|
|
220
79
|
border-radius: var(--smrt-radius-full, 999px);
|
|
221
80
|
color: var(--smrt-color-primary);
|
|
222
81
|
text-decoration: none;
|
|
@@ -225,6 +84,7 @@ function startNew(entry: ShellSectionMenuEntry) {
|
|
|
225
84
|
|
|
226
85
|
.new:hover,
|
|
227
86
|
.new:focus-visible {
|
|
228
|
-
background: var(--smrt-
|
|
87
|
+
background: color-mix(in srgb, currentColor calc(var(--smrt-state-hover) * 100%), transparent);
|
|
229
88
|
}
|
|
89
|
+
}
|
|
230
90
|
</style>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// A navigation section's page body for the static app's section route
|
|
3
|
+
// (`SectionPage.svelte`, which adds the Help/Options icons and the New
|
|
4
|
+
// buttons). The static app's shell is a plain `AppShell`, not `CookbookApp`,
|
|
5
|
+
// so it cannot use the framework's `CookbookSectionPage` (the mounted
|
|
6
|
+
// `Planner` does, with the same `SectionHeading`). It needs no `$app`
|
|
7
|
+
// import: the shell's layout context gives it the section, the cookbook store
|
|
8
|
+
// its overview and the data source its counts.
|
|
9
|
+
//
|
|
10
|
+
// The page is an editable overview (smrt#3727): by default the entries as
|
|
11
|
+
// shortcut cards (with record counts), then the section's lead model as a
|
|
12
|
+
// count and its latest records, drawn as plain page sections. In the shell's
|
|
13
|
+
// layout edit mode the widgets get the overview chrome (add, move, resize,
|
|
14
|
+
// configure, remove, reset) and the entries are listed below with grips,
|
|
15
|
+
// rename and hide controls. A section id no overview can have shows the menu.
|
|
16
|
+
import { tryGetCookbookContext } from '@happyvertical/smrt-svelte/cookbook';
|
|
17
|
+
import {
|
|
18
|
+
ShellSectionMenu,
|
|
19
|
+
type ShellSectionMenuEntry,
|
|
20
|
+
useShellLayout,
|
|
21
|
+
} from '@happyvertical/smrt-svelte/workspace';
|
|
22
|
+
import type { Snippet } from 'svelte';
|
|
23
|
+
import { cookbookStore } from '../cookbook/store.svelte.js';
|
|
24
|
+
import { useDataSource } from '../data/context.js';
|
|
25
|
+
import { recordCount } from '../data/format.js';
|
|
26
|
+
import { sectionOverview } from '../overviews/definitions.js';
|
|
27
|
+
import { overviewModelChoices } from '../overviews/models.js';
|
|
28
|
+
import { appHref } from '../planner/app.svelte.js';
|
|
29
|
+
import { recipesById } from '../recipes/index.js';
|
|
30
|
+
import { inScope } from '../recipes/scope.js';
|
|
31
|
+
import { recipeState } from '../recipes/state.svelte.js';
|
|
32
|
+
import { entryIndex } from '../sections/entries.js';
|
|
33
|
+
import {
|
|
34
|
+
DEFAULT_SECTION_ICON,
|
|
35
|
+
sectionInfo,
|
|
36
|
+
sectionTitle,
|
|
37
|
+
} from '../sections/info.js';
|
|
38
|
+
import SectionHeading from './SectionHeading.svelte';
|
|
39
|
+
import SectionOverview from './SectionOverview.svelte';
|
|
40
|
+
|
|
41
|
+
interface SectionViewProps {
|
|
42
|
+
/** The layout id: `section:<id>`, `custom:<id>` or `package:<id>`. */
|
|
43
|
+
sectionId: string;
|
|
44
|
+
/** An in-app path with the app query; the planner's `appHref` by default. */
|
|
45
|
+
href?: (path: string) => string;
|
|
46
|
+
/** Controls after the heading (the standalone page's Help and Options icons). */
|
|
47
|
+
headerActions?: Snippet<[{ title: string; itemIds: readonly string[] }]>;
|
|
48
|
+
/** Per-entry controls on the menu cards a section without an overview shows. */
|
|
49
|
+
menuActions?: Snippet<[ShellSectionMenuEntry]>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let {
|
|
53
|
+
sectionId,
|
|
54
|
+
href = appHref,
|
|
55
|
+
headerActions,
|
|
56
|
+
menuActions,
|
|
57
|
+
}: SectionViewProps = $props();
|
|
58
|
+
|
|
59
|
+
const shell = useShellLayout();
|
|
60
|
+
const source = useDataSource();
|
|
61
|
+
// Under a `CookbookApp` the shell's own suggestion (label, icon, description)
|
|
62
|
+
// is the fallback; the static app has none and reads the planner's data.
|
|
63
|
+
const cookbook = tryGetCookbookContext();
|
|
64
|
+
|
|
65
|
+
const section = $derived(shell.sections.find((s) => s.id === sectionId));
|
|
66
|
+
const suggested = $derived(
|
|
67
|
+
cookbook?.shell.sections.find((s) => s.id === sectionId),
|
|
68
|
+
);
|
|
69
|
+
const title = $derived(sectionTitle(section?.heading || suggested?.label));
|
|
70
|
+
const icon = $derived(section?.icon ?? suggested?.icon ?? DEFAULT_SECTION_ICON);
|
|
71
|
+
const description = $derived(
|
|
72
|
+
sectionInfo(sectionId).description ?? suggested?.description,
|
|
73
|
+
);
|
|
74
|
+
const itemIds = $derived(section?.items.map((entry) => entry.id) ?? []);
|
|
75
|
+
|
|
76
|
+
const added = $derived(
|
|
77
|
+
recipeState.ids.flatMap((id) => {
|
|
78
|
+
const recipe = recipesById.get(id);
|
|
79
|
+
return recipe ? [recipe] : [];
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
const index = $derived(entryIndex(added, recipeState.features));
|
|
83
|
+
const overview = $derived(sectionOverview(sectionId));
|
|
84
|
+
// The option editor offers the app's models: the added recipes' and features'.
|
|
85
|
+
const models = $derived(overviewModelChoices(added, index));
|
|
86
|
+
|
|
87
|
+
let counts = $state(new Map<string, number>());
|
|
88
|
+
let generation = 0;
|
|
89
|
+
|
|
90
|
+
async function loadCounts() {
|
|
91
|
+
const run = ++generation;
|
|
92
|
+
const next = new Map<string, number>();
|
|
93
|
+
await Promise.all(
|
|
94
|
+
itemIds.map(async (id) => {
|
|
95
|
+
const entry = index.get(id);
|
|
96
|
+
if (!entry) return;
|
|
97
|
+
const rows = await source.list(entry.model);
|
|
98
|
+
next.set(id, rows.filter((row) => inScope(entry.scope, row)).length);
|
|
99
|
+
}),
|
|
100
|
+
);
|
|
101
|
+
// A newer run (the section or the data changed meanwhile) wins.
|
|
102
|
+
if (run === generation) counts = next;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
$effect(() => {
|
|
106
|
+
void itemIds;
|
|
107
|
+
void index;
|
|
108
|
+
void loadCounts();
|
|
109
|
+
});
|
|
110
|
+
// A reset (a cookbook applied, the app reset) swaps the rows underneath.
|
|
111
|
+
$effect(() => source.onReset?.(() => void loadCounts()));
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
{#snippet meta(entry: ShellSectionMenuEntry)}
|
|
115
|
+
{#if counts.has(entry.id)}{recordCount(counts.get(entry.id) ?? 0)}{/if}
|
|
116
|
+
{/snippet}
|
|
117
|
+
|
|
118
|
+
{#if cookbookStore.loaded}
|
|
119
|
+
<main class="section-view">
|
|
120
|
+
{#if section}
|
|
121
|
+
<SectionHeading {icon} {title} {description}>
|
|
122
|
+
{#snippet actions()}{@render headerActions?.({ title, itemIds })}{/snippet}
|
|
123
|
+
</SectionHeading>
|
|
124
|
+
{#if overview}
|
|
125
|
+
{#key sectionId}
|
|
126
|
+
<SectionOverview
|
|
127
|
+
definition={overview}
|
|
128
|
+
entries={index}
|
|
129
|
+
{models}
|
|
130
|
+
{href}
|
|
131
|
+
label={`${title} overview`}
|
|
132
|
+
/>
|
|
133
|
+
{/key}
|
|
134
|
+
{#if shell.editing}
|
|
135
|
+
<section class="entries" aria-labelledby="section-entries">
|
|
136
|
+
<h2 id="section-entries">Menu entries</h2>
|
|
137
|
+
<ShellSectionMenu {sectionId} {meta} />
|
|
138
|
+
</section>
|
|
139
|
+
{/if}
|
|
140
|
+
{:else}
|
|
141
|
+
<ShellSectionMenu {sectionId} layout="cards" {meta} actions={menuActions} />
|
|
142
|
+
{/if}
|
|
143
|
+
{:else}
|
|
144
|
+
<h1>Section not found</h1>
|
|
145
|
+
<p>This section is not in your app. <a href={href('/')}>Back to the Planner</a></p>
|
|
146
|
+
{/if}
|
|
147
|
+
</main>
|
|
148
|
+
{/if}
|
|
149
|
+
|
|
150
|
+
<style>
|
|
151
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
152
|
+
@layer smrt.theme {
|
|
153
|
+
main {
|
|
154
|
+
display: grid;
|
|
155
|
+
gap: var(--smrt-spacing-6);
|
|
156
|
+
width: min(100%, 64rem);
|
|
157
|
+
margin-inline: auto;
|
|
158
|
+
padding: var(--smrt-spacing-6);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.entries {
|
|
162
|
+
display: grid;
|
|
163
|
+
gap: var(--smrt-spacing-3);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.entries h2 {
|
|
167
|
+
margin: 0;
|
|
168
|
+
font: var(--smrt-typography-title-medium-font);
|
|
169
|
+
letter-spacing: var(--smrt-typography-title-medium-tracking);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ShellSectionMenuEntry } from '@happyvertical/smrt-svelte/workspace';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
interface SectionViewProps {
|
|
4
|
+
/** The layout id: `section:<id>`, `custom:<id>` or `package:<id>`. */
|
|
5
|
+
sectionId: string;
|
|
6
|
+
/** An in-app path with the app query; the planner's `appHref` by default. */
|
|
7
|
+
href?: (path: string) => string;
|
|
8
|
+
/** Controls after the heading (the standalone page's Help and Options icons). */
|
|
9
|
+
headerActions?: Snippet<[{
|
|
10
|
+
title: string;
|
|
11
|
+
itemIds: readonly string[];
|
|
12
|
+
}]>;
|
|
13
|
+
/** Per-entry controls on the menu cards a section without an overview shows. */
|
|
14
|
+
menuActions?: Snippet<[ShellSectionMenuEntry]>;
|
|
15
|
+
}
|
|
16
|
+
declare const SectionView: import("svelte").Component<SectionViewProps, {}, "">;
|
|
17
|
+
type SectionView = ReturnType<typeof SectionView>;
|
|
18
|
+
export default SectionView;
|
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
import { cookbookStore } from '../cookbook/store.svelte.js';
|
|
3
3
|
import type { AppSettings as Settings } from '../settings/app-settings.js';
|
|
4
4
|
import AppSettings from './AppSettings.svelte';
|
|
5
|
-
import ThemeSection from './ThemeSection.svelte';
|
|
6
|
-
|
|
7
|
-
interface SettingsPanelProps {
|
|
8
|
-
/** Show the theme preset and light/dark controls (they need a theme provider). */
|
|
9
|
-
themeControls?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
let { themeControls = true }: SettingsPanelProps = $props();
|
|
13
5
|
|
|
14
6
|
// The editor holds its own copy so typing is never fought by the store;
|
|
15
7
|
// changes reach the cookbook after a short pause (and its save follows).
|
|
@@ -42,12 +34,13 @@ $effect(() => {
|
|
|
42
34
|
keep their values.
|
|
43
35
|
</p>
|
|
44
36
|
<AppSettings value={draft} onchange={change} idPrefix="app-settings-tab" />
|
|
45
|
-
<ThemeSection provider={themeControls} />
|
|
46
37
|
</div>
|
|
47
38
|
|
|
48
39
|
<svelte:window onpagehide={commit} />
|
|
49
40
|
|
|
50
41
|
<style>
|
|
42
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
43
|
+
@layer smrt.theme {
|
|
51
44
|
.pane {
|
|
52
45
|
display: grid;
|
|
53
46
|
gap: var(--smrt-spacing-4);
|
|
@@ -57,4 +50,5 @@ $effect(() => {
|
|
|
57
50
|
margin: 0;
|
|
58
51
|
color: var(--smrt-color-on-surface-variant);
|
|
59
52
|
}
|
|
53
|
+
}
|
|
60
54
|
</style>
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
/** Show the theme preset and light/dark controls (they need a theme provider). */
|
|
3
|
-
themeControls?: boolean;
|
|
4
|
-
}
|
|
5
|
-
declare const SettingsPanel: import("svelte").Component<SettingsPanelProps, {}, "">;
|
|
1
|
+
declare const SettingsPanel: import("svelte").Component<Record<string, never>, {}, "">;
|
|
6
2
|
type SettingsPanel = ReturnType<typeof SettingsPanel>;
|
|
7
3
|
export default SettingsPanel;
|
|
@@ -3,15 +3,39 @@ import {
|
|
|
3
3
|
getThemeContext,
|
|
4
4
|
type ThemePreset,
|
|
5
5
|
} from '@happyvertical/smrt-ui/themes';
|
|
6
|
+
import { onMount } from 'svelte';
|
|
6
7
|
import { cookbookStore } from '../cookbook/store.svelte.js';
|
|
8
|
+
import {
|
|
9
|
+
containCustomCss,
|
|
10
|
+
customCssApproved,
|
|
11
|
+
customCssDisabled,
|
|
12
|
+
shellScopeOf,
|
|
13
|
+
} from '../theme/custom-css.svelte.js';
|
|
7
14
|
import { resolveTheme } from '../theme/runtime.js';
|
|
8
15
|
import type { ColorSchemeSetting } from '../theme/theme.js';
|
|
9
16
|
|
|
10
17
|
// The app document owns the theme. This applies it to the shell's
|
|
11
|
-
// ThemeProvider once the saved document is read, and reads back a
|
|
12
|
-
// through the provider's own controls (ThemeSwitcher,
|
|
13
|
-
// that it is saved with the document.
|
|
18
|
+
// ThemeProvider once the saved document is read, and reads back a preset or
|
|
19
|
+
// scheme change made through the provider's own controls (ThemeSwitcher,
|
|
20
|
+
// ColorSchemeToggle) so that it is saved with the document.
|
|
14
21
|
const context = getThemeContext();
|
|
22
|
+
let {
|
|
23
|
+
deferInitial = false,
|
|
24
|
+
presetOverride,
|
|
25
|
+
}: { deferInitial?: boolean; presetOverride?: string } = $props();
|
|
26
|
+
// A hosted shell's own provider reads browser-local preferences on mount;
|
|
27
|
+
// deferring the first apply lets the plan's theme win over them.
|
|
28
|
+
let ready = $state(false);
|
|
29
|
+
onMount(() => {
|
|
30
|
+
if (!deferInitial) {
|
|
31
|
+
ready = true;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const timer = setTimeout(() => {
|
|
35
|
+
ready = true;
|
|
36
|
+
}, 0);
|
|
37
|
+
return () => clearTimeout(timer);
|
|
38
|
+
});
|
|
15
39
|
|
|
16
40
|
// What this bridge last told the provider, to tell its own writes from a
|
|
17
41
|
// person's. Null until the document has been applied once.
|
|
@@ -19,8 +43,9 @@ let applied: { preset: string; colorScheme: ColorSchemeSetting } | null = null;
|
|
|
19
43
|
|
|
20
44
|
// Document -> provider.
|
|
21
45
|
$effect(() => {
|
|
22
|
-
if (!cookbookStore.loaded) return;
|
|
46
|
+
if (!cookbookStore.loaded || !ready) return;
|
|
23
47
|
const wanted = resolveTheme(cookbookStore.theme);
|
|
48
|
+
if (presetOverride) wanted.preset = presetOverride;
|
|
24
49
|
if (
|
|
25
50
|
applied?.preset === wanted.preset &&
|
|
26
51
|
applied.colorScheme === wanted.colorScheme
|
|
@@ -35,6 +60,30 @@ $effect(() => {
|
|
|
35
60
|
}
|
|
36
61
|
});
|
|
37
62
|
|
|
63
|
+
// Document -> provider: corner radius, density and contrast. The cookbook is
|
|
64
|
+
// the visitor's own choice here (the Theme tab edits it), so it is applied over
|
|
65
|
+
// a preference the provider read from browser storage, as the preset is.
|
|
66
|
+
// Absent values are the provider's defaults: the preset's own radius, no
|
|
67
|
+
// density override, contrast following the device.
|
|
68
|
+
$effect(() => {
|
|
69
|
+
if (!cookbookStore.loaded || !ready) return;
|
|
70
|
+
const theme = cookbookStore.theme;
|
|
71
|
+
const wanted = {
|
|
72
|
+
borderRadius: theme?.borderRadius ?? 'md',
|
|
73
|
+
density: theme?.density,
|
|
74
|
+
contrast: theme?.contrast ?? 'auto',
|
|
75
|
+
} as const;
|
|
76
|
+
const { borderRadius, density, contrast } = context.state.config;
|
|
77
|
+
if (
|
|
78
|
+
borderRadius === wanted.borderRadius &&
|
|
79
|
+
density === wanted.density &&
|
|
80
|
+
(contrast ?? 'auto') === wanted.contrast
|
|
81
|
+
) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
context.updateConfig(wanted);
|
|
85
|
+
});
|
|
86
|
+
|
|
38
87
|
// Provider -> document.
|
|
39
88
|
$effect(() => {
|
|
40
89
|
const { preset, colorScheme } = context.state;
|
|
@@ -45,6 +94,9 @@ $effect(() => {
|
|
|
45
94
|
cookbookStore.setTheme({
|
|
46
95
|
...cookbookStore.theme,
|
|
47
96
|
preset,
|
|
97
|
+
fontFamily:
|
|
98
|
+
cookbookStore.theme?.fontFamily ??
|
|
99
|
+
cookbookStore.theme?.custom?.fontFamily,
|
|
48
100
|
custom: undefined,
|
|
49
101
|
});
|
|
50
102
|
}
|
|
@@ -53,4 +105,28 @@ $effect(() => {
|
|
|
53
105
|
cookbookStore.setTheme({ ...cookbookStore.theme, colorScheme });
|
|
54
106
|
}
|
|
55
107
|
});
|
|
108
|
+
|
|
109
|
+
// Marks where this bridge sits, to find the one shell its CSS may style.
|
|
110
|
+
let anchor = $state<HTMLElement | null>(null);
|
|
111
|
+
|
|
112
|
+
// Each mounted Planner owns its own style element. Cookbook CSS is untrusted:
|
|
113
|
+
// it applies only once approved, contained to the app shell without external
|
|
114
|
+
// loads (see theme/custom-css), and `?styles=off` switches it off.
|
|
115
|
+
$effect(() => {
|
|
116
|
+
if (typeof document === 'undefined' || !cookbookStore.loaded) return;
|
|
117
|
+
const css = cookbookStore.theme?.customCss;
|
|
118
|
+
if (!css || customCssDisabled(location.search) || !customCssApproved(css))
|
|
119
|
+
return;
|
|
120
|
+
const scope = shellScopeOf(anchor);
|
|
121
|
+
if (!scope) return;
|
|
122
|
+
const contained = containCustomCss(css, scope);
|
|
123
|
+
if (!contained) return;
|
|
124
|
+
const style = document.createElement('style');
|
|
125
|
+
style.dataset.smrtPlannerCustom = '';
|
|
126
|
+
style.textContent = contained;
|
|
127
|
+
document.head.append(style);
|
|
128
|
+
return () => style.remove();
|
|
129
|
+
});
|
|
56
130
|
</script>
|
|
131
|
+
|
|
132
|
+
<span bind:this={anchor} hidden data-smrt-planner-anchor></span>
|