@withpotter/lib 0.13.0-next.101
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/dist/__fixtures__/demo-content-server.json +484 -0
- package/dist/accessibility-context.d.ts +27 -0
- package/dist/accessibility-context.js +107 -0
- package/dist/accessibility-context.js.map +1 -0
- package/dist/active-workspace.d.ts +45 -0
- package/dist/active-workspace.js +34 -0
- package/dist/active-workspace.js.map +1 -0
- package/dist/admin-account-officer-api.d.ts +13 -0
- package/dist/admin-account-officer-api.js +12 -0
- package/dist/admin-account-officer-api.js.map +1 -0
- package/dist/admin-account-types.d.ts +122 -0
- package/dist/admin-account-types.js +1 -0
- package/dist/admin-account-types.js.map +1 -0
- package/dist/admin-adoption-api.d.ts +35 -0
- package/dist/admin-adoption-api.js +16 -0
- package/dist/admin-adoption-api.js.map +1 -0
- package/dist/admin-api.d.ts +1219 -0
- package/dist/admin-api.js +325 -0
- package/dist/admin-api.js.map +1 -0
- package/dist/admin-case-api.d.ts +32 -0
- package/dist/admin-case-api.js +63 -0
- package/dist/admin-case-api.js.map +1 -0
- package/dist/admin-case-types.d.ts +166 -0
- package/dist/admin-case-types.js +1 -0
- package/dist/admin-case-types.js.map +1 -0
- package/dist/admin-compliance-api.d.ts +31 -0
- package/dist/admin-compliance-api.js +20 -0
- package/dist/admin-compliance-api.js.map +1 -0
- package/dist/admin-country-api.d.ts +28 -0
- package/dist/admin-country-api.js +9 -0
- package/dist/admin-country-api.js.map +1 -0
- package/dist/admin-currency-types.d.ts +138 -0
- package/dist/admin-currency-types.js +1 -0
- package/dist/admin-currency-types.js.map +1 -0
- package/dist/admin-feedback-api.d.ts +215 -0
- package/dist/admin-feedback-api.js +63 -0
- package/dist/admin-feedback-api.js.map +1 -0
- package/dist/admin-inbox-seen.d.ts +22 -0
- package/dist/admin-inbox-seen.js +47 -0
- package/dist/admin-inbox-seen.js.map +1 -0
- package/dist/admin-ledger-api.d.ts +85 -0
- package/dist/admin-ledger-api.js +30 -0
- package/dist/admin-ledger-api.js.map +1 -0
- package/dist/admin-money-api.d.ts +127 -0
- package/dist/admin-money-api.js +125 -0
- package/dist/admin-money-api.js.map +1 -0
- package/dist/admin-newsletter-contacts-api.d.ts +70 -0
- package/dist/admin-newsletter-contacts-api.js +20 -0
- package/dist/admin-newsletter-contacts-api.js.map +1 -0
- package/dist/admin-newsletter-deliveries-api.d.ts +47 -0
- package/dist/admin-newsletter-deliveries-api.js +16 -0
- package/dist/admin-newsletter-deliveries-api.js.map +1 -0
- package/dist/admin-newsletters-api.d.ts +118 -0
- package/dist/admin-newsletters-api.js +47 -0
- package/dist/admin-newsletters-api.js.map +1 -0
- package/dist/admin-pos-api.d.ts +16 -0
- package/dist/admin-pos-api.js +35 -0
- package/dist/admin-pos-api.js.map +1 -0
- package/dist/admin-pos-query.d.ts +43 -0
- package/dist/admin-pos-query.js +55 -0
- package/dist/admin-pos-query.js.map +1 -0
- package/dist/admin-pos-types.d.ts +122 -0
- package/dist/admin-pos-types.js +1 -0
- package/dist/admin-pos-types.js.map +1 -0
- package/dist/admin-pricing-api.d.ts +88 -0
- package/dist/admin-pricing-api.js +66 -0
- package/dist/admin-pricing-api.js.map +1 -0
- package/dist/admin-readiness-api.d.ts +25 -0
- package/dist/admin-readiness-api.js +39 -0
- package/dist/admin-readiness-api.js.map +1 -0
- package/dist/admin-sales-api.d.ts +124 -0
- package/dist/admin-sales-api.js +41 -0
- package/dist/admin-sales-api.js.map +1 -0
- package/dist/admin-saved-replies-api.d.ts +35 -0
- package/dist/admin-saved-replies-api.js +70 -0
- package/dist/admin-saved-replies-api.js.map +1 -0
- package/dist/admin-service-operations-api.d.ts +142 -0
- package/dist/admin-service-operations-api.js +52 -0
- package/dist/admin-service-operations-api.js.map +1 -0
- package/dist/admin-signatures-api.d.ts +57 -0
- package/dist/admin-signatures-api.js +15 -0
- package/dist/admin-signatures-api.js.map +1 -0
- package/dist/admin-support-analytics-api.d.ts +36 -0
- package/dist/admin-support-analytics-api.js +71 -0
- package/dist/admin-support-analytics-api.js.map +1 -0
- package/dist/admin-tenant-setup-types.d.ts +85 -0
- package/dist/admin-tenant-setup-types.js +1 -0
- package/dist/admin-tenant-setup-types.js.map +1 -0
- package/dist/admin-tenants-query.d.ts +14 -0
- package/dist/admin-tenants-query.js +17 -0
- package/dist/admin-tenants-query.js.map +1 -0
- package/dist/analytics/PostHogProvider.d.ts +25 -0
- package/dist/analytics/PostHogProvider.js +44 -0
- package/dist/analytics/PostHogProvider.js.map +1 -0
- package/dist/analytics/index.d.ts +1 -0
- package/dist/analytics/index.js +11 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics.d.ts +1 -0
- package/dist/analytics.js +1 -0
- package/dist/api/abandoned-cart.d.ts +18 -0
- package/dist/api/abandoned-cart.js +68 -0
- package/dist/api/abandoned-cart.js.map +1 -0
- package/dist/api/accounts.d.ts +176 -0
- package/dist/api/accounts.js +194 -0
- package/dist/api/accounts.js.map +1 -0
- package/dist/api/analytics-patterns.d.ts +18 -0
- package/dist/api/analytics-patterns.js +52 -0
- package/dist/api/analytics-patterns.js.map +1 -0
- package/dist/api/analytics.d.ts +143 -0
- package/dist/api/analytics.js +379 -0
- package/dist/api/analytics.js.map +1 -0
- package/dist/api/assignee-prefs.d.ts +7 -0
- package/dist/api/assignee-prefs.js +17 -0
- package/dist/api/assignee-prefs.js.map +1 -0
- package/dist/api/automations.d.ts +73 -0
- package/dist/api/automations.js +102 -0
- package/dist/api/automations.js.map +1 -0
- package/dist/api/behaviors.d.ts +15 -0
- package/dist/api/behaviors.js +15 -0
- package/dist/api/behaviors.js.map +1 -0
- package/dist/api/bio.d.ts +7 -0
- package/dist/api/bio.js +17 -0
- package/dist/api/bio.js.map +1 -0
- package/dist/api/booking-calendar.d.ts +14 -0
- package/dist/api/booking-calendar.js +33 -0
- package/dist/api/booking-calendar.js.map +1 -0
- package/dist/api/bookings.d.ts +199 -0
- package/dist/api/bookings.js +284 -0
- package/dist/api/bookings.js.map +1 -0
- package/dist/api/business-devices.d.ts +108 -0
- package/dist/api/business-devices.js +139 -0
- package/dist/api/business-devices.js.map +1 -0
- package/dist/api/business-locations.d.ts +26 -0
- package/dist/api/business-locations.js +39 -0
- package/dist/api/business-locations.js.map +1 -0
- package/dist/api/cache-bus.d.ts +56 -0
- package/dist/api/cache-bus.js +18 -0
- package/dist/api/cache-bus.js.map +1 -0
- package/dist/api/calendar-sync.d.ts +49 -0
- package/dist/api/calendar-sync.js +50 -0
- package/dist/api/calendar-sync.js.map +1 -0
- package/dist/api/campaign-initiatives.d.ts +115 -0
- package/dist/api/campaign-initiatives.js +42 -0
- package/dist/api/campaign-initiatives.js.map +1 -0
- package/dist/api/campaigns.d.ts +89 -0
- package/dist/api/campaigns.js +100 -0
- package/dist/api/campaigns.js.map +1 -0
- package/dist/api/capabilities.d.ts +12 -0
- package/dist/api/capabilities.js +16 -0
- package/dist/api/capabilities.js.map +1 -0
- package/dist/api/commerce.d.ts +19 -0
- package/dist/api/commerce.js +31 -0
- package/dist/api/commerce.js.map +1 -0
- package/dist/api/communications.d.ts +166 -0
- package/dist/api/communications.js +141 -0
- package/dist/api/communications.js.map +1 -0
- package/dist/api/connect.d.ts +72 -0
- package/dist/api/connect.js +50 -0
- package/dist/api/connect.js.map +1 -0
- package/dist/api/content.d.ts +146 -0
- package/dist/api/content.js +187 -0
- package/dist/api/content.js.map +1 -0
- package/dist/api/conversations.d.ts +79 -0
- package/dist/api/conversations.js +41 -0
- package/dist/api/conversations.js.map +1 -0
- package/dist/api/core.d.ts +62 -0
- package/dist/api/core.js +223 -0
- package/dist/api/core.js.map +1 -0
- package/dist/api/credentials.d.ts +65 -0
- package/dist/api/credentials.js +48 -0
- package/dist/api/credentials.js.map +1 -0
- package/dist/api/credits.d.ts +96 -0
- package/dist/api/credits.js +24 -0
- package/dist/api/credits.js.map +1 -0
- package/dist/api/crm-analytics.d.ts +10 -0
- package/dist/api/crm-analytics.js +22 -0
- package/dist/api/crm-analytics.js.map +1 -0
- package/dist/api/crm-segments.d.ts +14 -0
- package/dist/api/crm-segments.js +42 -0
- package/dist/api/crm-segments.js.map +1 -0
- package/dist/api/deliveries.d.ts +99 -0
- package/dist/api/deliveries.js +37 -0
- package/dist/api/deliveries.js.map +1 -0
- package/dist/api/demo-content.d.ts +104 -0
- package/dist/api/demo-content.js +36 -0
- package/dist/api/demo-content.js.map +1 -0
- package/dist/api/device-shifts.d.ts +56 -0
- package/dist/api/device-shifts.js +50 -0
- package/dist/api/device-shifts.js.map +1 -0
- package/dist/api/devices.d.ts +6 -0
- package/dist/api/devices.js +10 -0
- package/dist/api/devices.js.map +1 -0
- package/dist/api/digital-files.d.ts +22 -0
- package/dist/api/digital-files.js +55 -0
- package/dist/api/digital-files.js.map +1 -0
- package/dist/api/discounts.d.ts +29 -0
- package/dist/api/discounts.js +46 -0
- package/dist/api/discounts.js.map +1 -0
- package/dist/api/disputes.d.ts +47 -0
- package/dist/api/disputes.js +42 -0
- package/dist/api/disputes.js.map +1 -0
- package/dist/api/feature-locked.d.ts +11 -0
- package/dist/api/feature-locked.js +18 -0
- package/dist/api/feature-locked.js.map +1 -0
- package/dist/api/feedback-prompts.d.ts +45 -0
- package/dist/api/feedback-prompts.js +85 -0
- package/dist/api/feedback-prompts.js.map +1 -0
- package/dist/api/feedback.d.ts +254 -0
- package/dist/api/feedback.js +108 -0
- package/dist/api/feedback.js.map +1 -0
- package/dist/api/finance.d.ts +199 -0
- package/dist/api/finance.js +203 -0
- package/dist/api/finance.js.map +1 -0
- package/dist/api/gallery.d.ts +30 -0
- package/dist/api/gallery.js +48 -0
- package/dist/api/gallery.js.map +1 -0
- package/dist/api/geo.d.ts +18 -0
- package/dist/api/geo.js +19 -0
- package/dist/api/geo.js.map +1 -0
- package/dist/api/giftcards.d.ts +63 -0
- package/dist/api/giftcards.js +63 -0
- package/dist/api/giftcards.js.map +1 -0
- package/dist/api/hardware-orders.d.ts +40 -0
- package/dist/api/hardware-orders.js +37 -0
- package/dist/api/hardware-orders.js.map +1 -0
- package/dist/api/index.d.ts +71 -0
- package/dist/api/index.js +78 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/inquiries.d.ts +92 -0
- package/dist/api/inquiries.js +129 -0
- package/dist/api/inquiries.js.map +1 -0
- package/dist/api/inventory.d.ts +133 -0
- package/dist/api/inventory.js +203 -0
- package/dist/api/inventory.js.map +1 -0
- package/dist/api/invite-body.d.ts +19 -0
- package/dist/api/invite-body.js +8 -0
- package/dist/api/invite-body.js.map +1 -0
- package/dist/api/invoices.d.ts +19 -0
- package/dist/api/invoices.js +80 -0
- package/dist/api/invoices.js.map +1 -0
- package/dist/api/locations.d.ts +15 -0
- package/dist/api/locations.js +30 -0
- package/dist/api/locations.js.map +1 -0
- package/dist/api/loyalty.d.ts +68 -0
- package/dist/api/loyalty.js +112 -0
- package/dist/api/loyalty.js.map +1 -0
- package/dist/api/marketing-consent.d.ts +36 -0
- package/dist/api/marketing-consent.js +11 -0
- package/dist/api/marketing-consent.js.map +1 -0
- package/dist/api/marketing-suppressions.d.ts +81 -0
- package/dist/api/marketing-suppressions.js +65 -0
- package/dist/api/marketing-suppressions.js.map +1 -0
- package/dist/api/members.d.ts +79 -0
- package/dist/api/members.js +148 -0
- package/dist/api/members.js.map +1 -0
- package/dist/api/merchant-notifications.d.ts +27 -0
- package/dist/api/merchant-notifications.js +41 -0
- package/dist/api/merchant-notifications.js.map +1 -0
- package/dist/api/merchant-referrals.d.ts +23 -0
- package/dist/api/merchant-referrals.js +10 -0
- package/dist/api/merchant-referrals.js.map +1 -0
- package/dist/api/merchant-subscriptions.d.ts +117 -0
- package/dist/api/merchant-subscriptions.js +113 -0
- package/dist/api/merchant-subscriptions.js.map +1 -0
- package/dist/api/misc.d.ts +4 -0
- package/dist/api/misc.js +24 -0
- package/dist/api/misc.js.map +1 -0
- package/dist/api/odoo.d.ts +102 -0
- package/dist/api/odoo.js +36 -0
- package/dist/api/odoo.js.map +1 -0
- package/dist/api/onboarding.d.ts +48 -0
- package/dist/api/onboarding.js +78 -0
- package/dist/api/onboarding.js.map +1 -0
- package/dist/api/orders.d.ts +153 -0
- package/dist/api/orders.js +303 -0
- package/dist/api/orders.js.map +1 -0
- package/dist/api/organizations.d.ts +14 -0
- package/dist/api/organizations.js +19 -0
- package/dist/api/organizations.js.map +1 -0
- package/dist/api/packages.d.ts +16 -0
- package/dist/api/packages.js +25 -0
- package/dist/api/packages.js.map +1 -0
- package/dist/api/pages.d.ts +79 -0
- package/dist/api/pages.js +125 -0
- package/dist/api/pages.js.map +1 -0
- package/dist/api/payables.d.ts +34 -0
- package/dist/api/payables.js +70 -0
- package/dist/api/payables.js.map +1 -0
- package/dist/api/plan-refusal.d.ts +21 -0
- package/dist/api/plan-refusal.js +28 -0
- package/dist/api/plan-refusal.js.map +1 -0
- package/dist/api/pos.d.ts +66 -0
- package/dist/api/pos.js +115 -0
- package/dist/api/pos.js.map +1 -0
- package/dist/api/potter.d.ts +114 -0
- package/dist/api/potter.js +88 -0
- package/dist/api/potter.js.map +1 -0
- package/dist/api/push.d.ts +25 -0
- package/dist/api/push.js +23 -0
- package/dist/api/push.js.map +1 -0
- package/dist/api/referrals.d.ts +10 -0
- package/dist/api/referrals.js +16 -0
- package/dist/api/referrals.js.map +1 -0
- package/dist/api/resource-categories.d.ts +35 -0
- package/dist/api/resource-categories.js +76 -0
- package/dist/api/resource-categories.js.map +1 -0
- package/dist/api/resources.d.ts +54 -0
- package/dist/api/resources.js +92 -0
- package/dist/api/resources.js.map +1 -0
- package/dist/api/reviews.d.ts +18 -0
- package/dist/api/reviews.js +46 -0
- package/dist/api/reviews.js.map +1 -0
- package/dist/api/riders.d.ts +70 -0
- package/dist/api/riders.js +24 -0
- package/dist/api/riders.js.map +1 -0
- package/dist/api/role-permissions.d.ts +25 -0
- package/dist/api/role-permissions.js +47 -0
- package/dist/api/role-permissions.js.map +1 -0
- package/dist/api/sales-channels.d.ts +234 -0
- package/dist/api/sales-channels.js +119 -0
- package/dist/api/sales-channels.js.map +1 -0
- package/dist/api/service-missing.d.ts +10 -0
- package/dist/api/service-missing.js +19 -0
- package/dist/api/service-missing.js.map +1 -0
- package/dist/api/session-refresh.d.ts +18 -0
- package/dist/api/session-refresh.js +37 -0
- package/dist/api/session-refresh.js.map +1 -0
- package/dist/api/session-scope.d.ts +35 -0
- package/dist/api/session-scope.js +53 -0
- package/dist/api/session-scope.js.map +1 -0
- package/dist/api/settlements.d.ts +106 -0
- package/dist/api/settlements.js +114 -0
- package/dist/api/settlements.js.map +1 -0
- package/dist/api/share-links.d.ts +46 -0
- package/dist/api/share-links.js +25 -0
- package/dist/api/share-links.js.map +1 -0
- package/dist/api/shift-notes.d.ts +19 -0
- package/dist/api/shift-notes.js +13 -0
- package/dist/api/shift-notes.js.map +1 -0
- package/dist/api/shipping.d.ts +42 -0
- package/dist/api/shipping.js +53 -0
- package/dist/api/shipping.js.map +1 -0
- package/dist/api/social-sources.d.ts +58 -0
- package/dist/api/social-sources.js +23 -0
- package/dist/api/social-sources.js.map +1 -0
- package/dist/api/tabs.d.ts +14 -0
- package/dist/api/tabs.js +39 -0
- package/dist/api/tabs.js.map +1 -0
- package/dist/api/team.d.ts +112 -0
- package/dist/api/team.js +144 -0
- package/dist/api/team.js.map +1 -0
- package/dist/api/template-settings.d.ts +26 -0
- package/dist/api/template-settings.js +36 -0
- package/dist/api/template-settings.js.map +1 -0
- package/dist/api/templates.d.ts +21 -0
- package/dist/api/templates.js +25 -0
- package/dist/api/templates.js.map +1 -0
- package/dist/api/tenant-slug.d.ts +13 -0
- package/dist/api/tenant-slug.js +18 -0
- package/dist/api/tenant-slug.js.map +1 -0
- package/dist/api/tenant.d.ts +33 -0
- package/dist/api/tenant.js +51 -0
- package/dist/api/tenant.js.map +1 -0
- package/dist/api/types/analytics-attribution.d.ts +43 -0
- package/dist/api/types/analytics-attribution.js +1 -0
- package/dist/api/types/analytics-attribution.js.map +1 -0
- package/dist/api/types/analytics.d.ts +465 -0
- package/dist/api/types/analytics.js +1 -0
- package/dist/api/types/analytics.js.map +1 -0
- package/dist/api/types/auth.d.ts +206 -0
- package/dist/api/types/auth.js +7 -0
- package/dist/api/types/auth.js.map +1 -0
- package/dist/api/types/automation-flow.d.ts +199 -0
- package/dist/api/types/automation-flow.js +1 -0
- package/dist/api/types/automation-flow.js.map +1 -0
- package/dist/api/types/bookings.d.ts +226 -0
- package/dist/api/types/bookings.js +1 -0
- package/dist/api/types/bookings.js.map +1 -0
- package/dist/api/types/campaigns.d.ts +262 -0
- package/dist/api/types/campaigns.js +1 -0
- package/dist/api/types/campaigns.js.map +1 -0
- package/dist/api/types/catalog.d.ts +273 -0
- package/dist/api/types/catalog.js +1 -0
- package/dist/api/types/catalog.js.map +1 -0
- package/dist/api/types/collections.d.ts +189 -0
- package/dist/api/types/collections.js +1 -0
- package/dist/api/types/collections.js.map +1 -0
- package/dist/api/types/crm.d.ts +264 -0
- package/dist/api/types/crm.js +1 -0
- package/dist/api/types/crm.js.map +1 -0
- package/dist/api/types/customers.d.ts +269 -0
- package/dist/api/types/customers.js +1 -0
- package/dist/api/types/customers.js.map +1 -0
- package/dist/api/types/devices.d.ts +390 -0
- package/dist/api/types/devices.js +1 -0
- package/dist/api/types/devices.js.map +1 -0
- package/dist/api/types/discounts.d.ts +237 -0
- package/dist/api/types/discounts.js +1 -0
- package/dist/api/types/discounts.js.map +1 -0
- package/dist/api/types/filters.d.ts +258 -0
- package/dist/api/types/filters.js +1 -0
- package/dist/api/types/filters.js.map +1 -0
- package/dist/api/types/index.d.ts +31 -0
- package/dist/api/types/index.js +25 -0
- package/dist/api/types/index.js.map +1 -0
- package/dist/api/types/inquiries.d.ts +266 -0
- package/dist/api/types/inquiries.js +1 -0
- package/dist/api/types/inquiries.js.map +1 -0
- package/dist/api/types/locations.d.ts +208 -0
- package/dist/api/types/locations.js +1 -0
- package/dist/api/types/locations.js.map +1 -0
- package/dist/api/types/onboarding.d.ts +311 -0
- package/dist/api/types/onboarding.js +1 -0
- package/dist/api/types/onboarding.js.map +1 -0
- package/dist/api/types/operations.d.ts +136 -0
- package/dist/api/types/operations.js +1 -0
- package/dist/api/types/operations.js.map +1 -0
- package/dist/api/types/orders.d.ts +242 -0
- package/dist/api/types/orders.js +1 -0
- package/dist/api/types/orders.js.map +1 -0
- package/dist/api/types/payables.d.ts +140 -0
- package/dist/api/types/payables.js +1 -0
- package/dist/api/types/payables.js.map +1 -0
- package/dist/api/types/pos.d.ts +121 -0
- package/dist/api/types/pos.js +5 -0
- package/dist/api/types/pos.js.map +1 -0
- package/dist/api/types/record-analytics.d.ts +95 -0
- package/dist/api/types/record-analytics.js +1 -0
- package/dist/api/types/record-analytics.js.map +1 -0
- package/dist/api/types/sales-patterns.d.ts +58 -0
- package/dist/api/types/sales-patterns.js +1 -0
- package/dist/api/types/sales-patterns.js.map +1 -0
- package/dist/api/types/tabs.d.ts +210 -0
- package/dist/api/types/tabs.js +1 -0
- package/dist/api/types/tabs.js.map +1 -0
- package/dist/api/types/templates.d.ts +398 -0
- package/dist/api/types/templates.js +1 -0
- package/dist/api/types/templates.js.map +1 -0
- package/dist/api/types/waitlist.d.ts +324 -0
- package/dist/api/types/waitlist.js +1 -0
- package/dist/api/types/waitlist.js.map +1 -0
- package/dist/api/types.d.ts +1 -0
- package/dist/api/types.js +1 -0
- package/dist/api/unserved-routes.d.ts +4 -0
- package/dist/api/unserved-routes.js +15 -0
- package/dist/api/unserved-routes.js.map +1 -0
- package/dist/api/waitlist.d.ts +80 -0
- package/dist/api/waitlist.js +85 -0
- package/dist/api/waitlist.js.map +1 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/app-name.d.ts +29 -0
- package/dist/app-name.js +11 -0
- package/dist/app-name.js.map +1 -0
- package/dist/arrival.d.ts +48 -0
- package/dist/arrival.js +34 -0
- package/dist/arrival.js.map +1 -0
- package/dist/auth-context.d.ts +90 -0
- package/dist/auth-context.js +732 -0
- package/dist/auth-context.js.map +1 -0
- package/dist/auth-session.d.ts +1 -0
- package/dist/auth-session.js +25 -0
- package/dist/auth-session.js.map +1 -0
- package/dist/bank-phone.d.ts +2 -0
- package/dist/bank-phone.js +12 -0
- package/dist/bank-phone.js.map +1 -0
- package/dist/behavior-config-types.d.ts +49 -0
- package/dist/behavior-config-types.js +1 -0
- package/dist/behavior-config-types.js.map +1 -0
- package/dist/behavior-context.d.ts +15 -0
- package/dist/behavior-context.js +38 -0
- package/dist/behavior-context.js.map +1 -0
- package/dist/behavior-fields.d.ts +41 -0
- package/dist/behavior-fields.js +20 -0
- package/dist/behavior-fields.js.map +1 -0
- package/dist/blog/__fixtures__/paste-hygiene.d.ts +7 -0
- package/dist/blog/__fixtures__/paste-hygiene.js +36 -0
- package/dist/blog/__fixtures__/paste-hygiene.js.map +1 -0
- package/dist/blog/density.d.ts +65 -0
- package/dist/blog/density.js +126 -0
- package/dist/blog/density.js.map +1 -0
- package/dist/blog/paste-hygiene.d.ts +3 -0
- package/dist/blog/paste-hygiene.js +168 -0
- package/dist/blog/paste-hygiene.js.map +1 -0
- package/dist/booking-location-label.d.ts +10 -0
- package/dist/booking-location-label.js +24 -0
- package/dist/booking-location-label.js.map +1 -0
- package/dist/booking-meeting-link.d.ts +48 -0
- package/dist/booking-meeting-link.js +40 -0
- package/dist/booking-meeting-link.js.map +1 -0
- package/dist/box-channels.d.ts +22 -0
- package/dist/box-channels.js +16 -0
- package/dist/box-channels.js.map +1 -0
- package/dist/box-delivery.d.ts +10 -0
- package/dist/box-delivery.js +5 -0
- package/dist/box-delivery.js.map +1 -0
- package/dist/box-inbox.d.ts +11 -0
- package/dist/box-inbox.js +5 -0
- package/dist/box-inbox.js.map +1 -0
- package/dist/box-letting.d.ts +14 -0
- package/dist/box-letting.js +7 -0
- package/dist/box-letting.js.map +1 -0
- package/dist/box-mark-paths.d.ts +28 -0
- package/dist/box-mark-paths.js +23 -0
- package/dist/box-mark-paths.js.map +1 -0
- package/dist/box-media.d.ts +9 -0
- package/dist/box-media.js +5 -0
- package/dist/box-media.js.map +1 -0
- package/dist/box-products.d.ts +16 -0
- package/dist/box-products.js +9 -0
- package/dist/box-products.js.map +1 -0
- package/dist/box-splits.d.ts +12 -0
- package/dist/box-splits.js +5 -0
- package/dist/box-splits.js.map +1 -0
- package/dist/brand.d.ts +26 -0
- package/dist/brand.js +22 -0
- package/dist/brand.js.map +1 -0
- package/dist/business-categories.d.ts +50 -0
- package/dist/business-categories.js +378 -0
- package/dist/business-categories.js.map +1 -0
- package/dist/business-intents.d.ts +31 -0
- package/dist/business-intents.js +142 -0
- package/dist/business-intents.js.map +1 -0
- package/dist/capability-context.d.ts +63 -0
- package/dist/capability-context.js +84 -0
- package/dist/capability-context.js.map +1 -0
- package/dist/carriers.d.ts +83 -0
- package/dist/carriers.js +124 -0
- package/dist/carriers.js.map +1 -0
- package/dist/commerce-build/api.d.ts +29 -0
- package/dist/commerce-build/api.js +152 -0
- package/dist/commerce-build/api.js.map +1 -0
- package/dist/commerce-build/contracts-profile.d.ts +83 -0
- package/dist/commerce-build/contracts-profile.js +1 -0
- package/dist/commerce-build/contracts-profile.js.map +1 -0
- package/dist/commerce-build/contracts-spec.d.ts +217 -0
- package/dist/commerce-build/contracts-spec.js +1 -0
- package/dist/commerce-build/contracts-spec.js.map +1 -0
- package/dist/commerce-build/contracts.d.ts +2 -0
- package/dist/commerce-build/contracts.js +1 -0
- package/dist/commerce-build/contracts.js.map +1 -0
- package/dist/commerce-build/launch-state.d.ts +20 -0
- package/dist/commerce-build/launch-state.js +72 -0
- package/dist/commerce-build/launch-state.js.map +1 -0
- package/dist/commerce-build/profile-utils.d.ts +5 -0
- package/dist/commerce-build/profile-utils.js +14 -0
- package/dist/commerce-build/profile-utils.js.map +1 -0
- package/dist/commerce-build/setup-flow.d.ts +10 -0
- package/dist/commerce-build/setup-flow.js +24 -0
- package/dist/commerce-build/setup-flow.js.map +1 -0
- package/dist/commerce-build/setup-session.d.ts +26 -0
- package/dist/commerce-build/setup-session.js +70 -0
- package/dist/commerce-build/setup-session.js.map +1 -0
- package/dist/commerce-build/turn-streaming.d.ts +21 -0
- package/dist/commerce-build/turn-streaming.js +113 -0
- package/dist/commerce-build/turn-streaming.js.map +1 -0
- package/dist/commerce-build/workspace-components.d.ts +23 -0
- package/dist/commerce-build/workspace-components.js +66 -0
- package/dist/commerce-build/workspace-components.js.map +1 -0
- package/dist/commerce-build/workspace-config.d.ts +7 -0
- package/dist/commerce-build/workspace-config.js +74 -0
- package/dist/commerce-build/workspace-config.js.map +1 -0
- package/dist/companion/config.d.ts +31 -0
- package/dist/companion/config.js +59 -0
- package/dist/companion/config.js.map +1 -0
- package/dist/connect/catalog.d.ts +32 -0
- package/dist/connect/catalog.js +268 -0
- package/dist/connect/catalog.js.map +1 -0
- package/dist/connect/fixtures/commands.d.ts +8 -0
- package/dist/connect/fixtures/commands.js +146 -0
- package/dist/connect/fixtures/commands.js.map +1 -0
- package/dist/connect/fixtures/connections.d.ts +21 -0
- package/dist/connect/fixtures/connections.js +370 -0
- package/dist/connect/fixtures/connections.js.map +1 -0
- package/dist/connect/fixtures/identities.d.ts +10 -0
- package/dist/connect/fixtures/identities.js +61 -0
- package/dist/connect/fixtures/identities.js.map +1 -0
- package/dist/connect/fixtures/index.d.ts +11 -0
- package/dist/connect/fixtures/index.js +11 -0
- package/dist/connect/fixtures/index.js.map +1 -0
- package/dist/connect/fixtures/usage.d.ts +2 -0
- package/dist/connect/fixtures/usage.js +21 -0
- package/dist/connect/fixtures/usage.js.map +1 -0
- package/dist/connect/fixtures.d.ts +1 -0
- package/dist/connect/fixtures.js +1 -0
- package/dist/connect/from-notifications.d.ts +3 -0
- package/dist/connect/from-notifications.js +78 -0
- package/dist/connect/from-notifications.js.map +1 -0
- package/dist/connect/identity.d.ts +67 -0
- package/dist/connect/identity.js +24 -0
- package/dist/connect/identity.js.map +1 -0
- package/dist/connect/index.d.ts +13 -0
- package/dist/connect/index.js +22 -0
- package/dist/connect/index.js.map +1 -0
- package/dist/connect/next-up.d.ts +18 -0
- package/dist/connect/next-up.js +45 -0
- package/dist/connect/next-up.js.map +1 -0
- package/dist/connect/types.d.ts +354 -0
- package/dist/connect/types.js +68 -0
- package/dist/connect/types.js.map +1 -0
- package/dist/connect/use-connect.d.ts +51 -0
- package/dist/connect/use-connect.js +85 -0
- package/dist/connect/use-connect.js.map +1 -0
- package/dist/connect.d.ts +1 -0
- package/dist/connect.js +1 -0
- package/dist/converted-tag.d.ts +7 -0
- package/dist/converted-tag.js +9 -0
- package/dist/converted-tag.js.map +1 -0
- package/dist/countries.d.ts +65 -0
- package/dist/countries.js +374 -0
- package/dist/countries.js.map +1 -0
- package/dist/country-regions.d.ts +12 -0
- package/dist/country-regions.js +36 -0
- package/dist/country-regions.js.map +1 -0
- package/dist/csv.d.ts +28 -0
- package/dist/csv.js +91 -0
- package/dist/csv.js.map +1 -0
- package/dist/currency.d.ts +5 -0
- package/dist/currency.js +25 -0
- package/dist/currency.js.map +1 -0
- package/dist/customer-helpers.d.ts +30 -0
- package/dist/customer-helpers.js +66 -0
- package/dist/customer-helpers.js.map +1 -0
- package/dist/customer-stage.d.ts +125 -0
- package/dist/customer-stage.js +113 -0
- package/dist/customer-stage.js.map +1 -0
- package/dist/dashboard-destinations.d.ts +5 -0
- package/dist/dashboard-destinations.js +29 -0
- package/dist/dashboard-destinations.js.map +1 -0
- package/dist/demo-content-mock.d.ts +22 -0
- package/dist/demo-content-mock.js +70 -0
- package/dist/demo-content-mock.js.map +1 -0
- package/dist/demo-content-poller.d.ts +33 -0
- package/dist/demo-content-poller.js +80 -0
- package/dist/demo-content-poller.js.map +1 -0
- package/dist/demo-content.d.ts +43 -0
- package/dist/demo-content.js +78 -0
- package/dist/demo-content.js.map +1 -0
- package/dist/describe-activity.d.ts +44 -0
- package/dist/describe-activity.js +16 -0
- package/dist/describe-activity.js.map +1 -0
- package/dist/describe-invite.d.ts +19 -0
- package/dist/describe-invite.js +46 -0
- package/dist/describe-invite.js.map +1 -0
- package/dist/design-schema.d.ts +76 -0
- package/dist/design-schema.js +47 -0
- package/dist/design-schema.js.map +1 -0
- package/dist/destination-alias.d.ts +43 -0
- package/dist/destination-alias.js +146 -0
- package/dist/destination-alias.js.map +1 -0
- package/dist/document-numbering.d.ts +40 -0
- package/dist/document-numbering.js +48 -0
- package/dist/document-numbering.js.map +1 -0
- package/dist/document-title.d.ts +22 -0
- package/dist/document-title.js +85 -0
- package/dist/document-title.js.map +1 -0
- package/dist/editor/row-ops.d.ts +39 -0
- package/dist/editor/row-ops.js +25 -0
- package/dist/editor/row-ops.js.map +1 -0
- package/dist/editor-agent/apply-proposal.d.ts +12 -0
- package/dist/editor-agent/apply-proposal.js +44 -0
- package/dist/editor-agent/apply-proposal.js.map +1 -0
- package/dist/editor-agent/contracts.d.ts +174 -0
- package/dist/editor-agent/contracts.js +1 -0
- package/dist/editor-agent/contracts.js.map +1 -0
- package/dist/editor-agent/converse.d.ts +34 -0
- package/dist/editor-agent/converse.js +141 -0
- package/dist/editor-agent/converse.js.map +1 -0
- package/dist/editor-agent/flag.d.ts +12 -0
- package/dist/editor-agent/flag.js +19 -0
- package/dist/editor-agent/flag.js.map +1 -0
- package/dist/editor-agent/template-document.d.ts +52 -0
- package/dist/editor-agent/template-document.js +50 -0
- package/dist/editor-agent/template-document.js.map +1 -0
- package/dist/editor-agent/use-converse.d.ts +30 -0
- package/dist/editor-agent/use-converse.js +130 -0
- package/dist/editor-agent/use-converse.js.map +1 -0
- package/dist/effective-module-labels.d.ts +17 -0
- package/dist/effective-module-labels.js +14 -0
- package/dist/effective-module-labels.js.map +1 -0
- package/dist/embedded-frame.d.ts +30 -0
- package/dist/embedded-frame.js +23 -0
- package/dist/embedded-frame.js.map +1 -0
- package/dist/empty-state-copy.d.ts +27 -0
- package/dist/empty-state-copy.js +167 -0
- package/dist/empty-state-copy.js.map +1 -0
- package/dist/end-session.d.ts +23 -0
- package/dist/end-session.js +30 -0
- package/dist/end-session.js.map +1 -0
- package/dist/file-intake.d.ts +65 -0
- package/dist/file-intake.js +162 -0
- package/dist/file-intake.js.map +1 -0
- package/dist/first-run.d.ts +5 -0
- package/dist/first-run.js +13 -0
- package/dist/first-run.js.map +1 -0
- package/dist/form-answers.d.ts +57 -0
- package/dist/form-answers.js +79 -0
- package/dist/form-answers.js.map +1 -0
- package/dist/form-draft.d.ts +30 -0
- package/dist/form-draft.js +73 -0
- package/dist/form-draft.js.map +1 -0
- package/dist/format.d.ts +29 -0
- package/dist/format.js +21 -0
- package/dist/format.js.map +1 -0
- package/dist/fulfilment-nav.d.ts +79 -0
- package/dist/fulfilment-nav.js +18 -0
- package/dist/fulfilment-nav.js.map +1 -0
- package/dist/go-live-gate.d.ts +55 -0
- package/dist/go-live-gate.js +17 -0
- package/dist/go-live-gate.js.map +1 -0
- package/dist/group-activity.d.ts +37 -0
- package/dist/group-activity.js +43 -0
- package/dist/group-activity.js.map +1 -0
- package/dist/haptic.d.ts +5 -0
- package/dist/haptic.js +16 -0
- package/dist/haptic.js.map +1 -0
- package/dist/help-topics.d.ts +77 -0
- package/dist/help-topics.js +308 -0
- package/dist/help-topics.js.map +1 -0
- package/dist/icon-resolver.d.ts +45 -0
- package/dist/icon-resolver.js +40 -0
- package/dist/icon-resolver.js.map +1 -0
- package/dist/icons/commerce.d.ts +9 -0
- package/dist/icons/commerce.js +168 -0
- package/dist/icons/commerce.js.map +1 -0
- package/dist/icons/core.d.ts +9 -0
- package/dist/icons/core.js +173 -0
- package/dist/icons/core.js.map +1 -0
- package/dist/icons/making.d.ts +9 -0
- package/dist/icons/making.js +209 -0
- package/dist/icons/making.js.map +1 -0
- package/dist/icons/places.d.ts +9 -0
- package/dist/icons/places.js +232 -0
- package/dist/icons/places.js.map +1 -0
- package/dist/icons/world.d.ts +9 -0
- package/dist/icons/world.js +87 -0
- package/dist/icons/world.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/industry-configs/beauty.d.ts +2 -0
- package/dist/industry-configs/beauty.js +152 -0
- package/dist/industry-configs/beauty.js.map +1 -0
- package/dist/industry-configs/creative.d.ts +2 -0
- package/dist/industry-configs/creative.js +131 -0
- package/dist/industry-configs/creative.js.map +1 -0
- package/dist/industry-configs/default.d.ts +2 -0
- package/dist/industry-configs/default.js +77 -0
- package/dist/industry-configs/default.js.map +1 -0
- package/dist/industry-configs/education.d.ts +2 -0
- package/dist/industry-configs/education.js +137 -0
- package/dist/industry-configs/education.js.map +1 -0
- package/dist/industry-configs/events.d.ts +2 -0
- package/dist/industry-configs/events.js +118 -0
- package/dist/industry-configs/events.js.map +1 -0
- package/dist/industry-configs/fashion.d.ts +2 -0
- package/dist/industry-configs/fashion.js +128 -0
- package/dist/industry-configs/fashion.js.map +1 -0
- package/dist/industry-configs/fitness.d.ts +2 -0
- package/dist/industry-configs/fitness.js +128 -0
- package/dist/industry-configs/fitness.js.map +1 -0
- package/dist/industry-configs/food.d.ts +2 -0
- package/dist/industry-configs/food.js +138 -0
- package/dist/industry-configs/food.js.map +1 -0
- package/dist/industry-configs/hospitality.d.ts +2 -0
- package/dist/industry-configs/hospitality.js +157 -0
- package/dist/industry-configs/hospitality.js.map +1 -0
- package/dist/industry-configs/index.d.ts +25 -0
- package/dist/industry-configs/index.js +77 -0
- package/dist/industry-configs/index.js.map +1 -0
- package/dist/industry-configs/professional.d.ts +2 -0
- package/dist/industry-configs/professional.js +129 -0
- package/dist/industry-configs/professional.js.map +1 -0
- package/dist/industry-configs/realestate.d.ts +2 -0
- package/dist/industry-configs/realestate.js +146 -0
- package/dist/industry-configs/realestate.js.map +1 -0
- package/dist/industry-configs/retail.d.ts +2 -0
- package/dist/industry-configs/retail.js +108 -0
- package/dist/industry-configs/retail.js.map +1 -0
- package/dist/industry-configs/services.d.ts +2 -0
- package/dist/industry-configs/services.js +120 -0
- package/dist/industry-configs/services.js.map +1 -0
- package/dist/industry-configs/technology.d.ts +2 -0
- package/dist/industry-configs/technology.js +120 -0
- package/dist/industry-configs/technology.js.map +1 -0
- package/dist/industry-configs/types.d.ts +99 -0
- package/dist/industry-configs/types.js +1 -0
- package/dist/industry-configs/types.js.map +1 -0
- package/dist/industry-configs/wellness.d.ts +2 -0
- package/dist/industry-configs/wellness.js +112 -0
- package/dist/industry-configs/wellness.js.map +1 -0
- package/dist/industry-configs.d.ts +1 -0
- package/dist/industry-configs.js +1 -0
- package/dist/intents/analytics-labels.d.ts +70 -0
- package/dist/intents/analytics-labels.js +39 -0
- package/dist/intents/analytics-labels.js.map +1 -0
- package/dist/intents/archetype-flow.d.ts +146 -0
- package/dist/intents/archetype-flow.js +185 -0
- package/dist/intents/archetype-flow.js.map +1 -0
- package/dist/intents/booking-query-style.d.ts +32 -0
- package/dist/intents/booking-query-style.js +22 -0
- package/dist/intents/booking-query-style.js.map +1 -0
- package/dist/intents/capture-leads.config.d.ts +31 -0
- package/dist/intents/capture-leads.config.js +231 -0
- package/dist/intents/capture-leads.config.js.map +1 -0
- package/dist/intents/catalog-stock.d.ts +43 -0
- package/dist/intents/catalog-stock.js +43 -0
- package/dist/intents/catalog-stock.js.map +1 -0
- package/dist/intents/collapse-shared-nav.d.ts +95 -0
- package/dist/intents/collapse-shared-nav.js +171 -0
- package/dist/intents/collapse-shared-nav.js.map +1 -0
- package/dist/intents/default-commerce.config.d.ts +6 -0
- package/dist/intents/default-commerce.config.js +281 -0
- package/dist/intents/default-commerce.config.js.map +1 -0
- package/dist/intents/digital-products.config.d.ts +2 -0
- package/dist/intents/digital-products.config.js +239 -0
- package/dist/intents/digital-products.config.js.map +1 -0
- package/dist/intents/dine-in.config.d.ts +15 -0
- package/dist/intents/dine-in.config.js +331 -0
- package/dist/intents/dine-in.config.js.map +1 -0
- package/dist/intents/event-tickets.config.d.ts +2 -0
- package/dist/intents/event-tickets.config.js +368 -0
- package/dist/intents/event-tickets.config.js.map +1 -0
- package/dist/intents/food-orders.config.d.ts +2 -0
- package/dist/intents/food-orders.config.js +299 -0
- package/dist/intents/food-orders.config.js.map +1 -0
- package/dist/intents/icon-map.d.ts +15 -0
- package/dist/intents/icon-map.js +104 -0
- package/dist/intents/icon-map.js.map +1 -0
- package/dist/intents/index.d.ts +12 -0
- package/dist/intents/index.js +50 -0
- package/dist/intents/index.js.map +1 -0
- package/dist/intents/infer-intents.d.ts +10 -0
- package/dist/intents/infer-intents.js +23 -0
- package/dist/intents/infer-intents.js.map +1 -0
- package/dist/intents/intent-chips.d.ts +47 -0
- package/dist/intents/intent-chips.js +38 -0
- package/dist/intents/intent-chips.js.map +1 -0
- package/dist/intents/intent-nav.d.ts +95 -0
- package/dist/intents/intent-nav.js +423 -0
- package/dist/intents/intent-nav.js.map +1 -0
- package/dist/intents/intent-scope.d.ts +52 -0
- package/dist/intents/intent-scope.js +19 -0
- package/dist/intents/intent-scope.js.map +1 -0
- package/dist/intents/nav-coverage.d.ts +71 -0
- package/dist/intents/nav-coverage.js +132 -0
- package/dist/intents/nav-coverage.js.map +1 -0
- package/dist/intents/operating-shell.d.ts +45 -0
- package/dist/intents/operating-shell.js +142 -0
- package/dist/intents/operating-shell.js.map +1 -0
- package/dist/intents/order-display.d.ts +21 -0
- package/dist/intents/order-display.js +110 -0
- package/dist/intents/order-display.js.map +1 -0
- package/dist/intents/order-intent.d.ts +18 -0
- package/dist/intents/order-intent.js +14 -0
- package/dist/intents/order-intent.js.map +1 -0
- package/dist/intents/order-progress.d.ts +81 -0
- package/dist/intents/order-progress.js +91 -0
- package/dist/intents/order-progress.js.map +1 -0
- package/dist/intents/order-sections.d.ts +173 -0
- package/dist/intents/order-sections.js +188 -0
- package/dist/intents/order-sections.js.map +1 -0
- package/dist/intents/order-stats.d.ts +24 -0
- package/dist/intents/order-stats.js +16 -0
- package/dist/intents/order-stats.js.map +1 -0
- package/dist/intents/order-transitions.d.ts +19 -0
- package/dist/intents/order-transitions.js +66 -0
- package/dist/intents/order-transitions.js.map +1 -0
- package/dist/intents/product-editor-config.d.ts +23 -0
- package/dist/intents/product-editor-config.js +13 -0
- package/dist/intents/product-editor-config.js.map +1 -0
- package/dist/intents/product-intent.d.ts +38 -0
- package/dist/intents/product-intent.js +19 -0
- package/dist/intents/product-intent.js.map +1 -0
- package/dist/intents/registry.d.ts +32 -0
- package/dist/intents/registry.js +41 -0
- package/dist/intents/registry.js.map +1 -0
- package/dist/intents/rent-property.config.d.ts +2 -0
- package/dist/intents/rent-property.config.js +284 -0
- package/dist/intents/rent-property.config.js.map +1 -0
- package/dist/intents/resolve-stats.d.ts +7 -0
- package/dist/intents/resolve-stats.js +29 -0
- package/dist/intents/resolve-stats.js.map +1 -0
- package/dist/intents/resolve-tenant-intents.d.ts +11 -0
- package/dist/intents/resolve-tenant-intents.js +61 -0
- package/dist/intents/resolve-tenant-intents.js.map +1 -0
- package/dist/intents/resolvers.d.ts +52 -0
- package/dist/intents/resolvers.js +177 -0
- package/dist/intents/resolvers.js.map +1 -0
- package/dist/intents/row-identity.d.ts +62 -0
- package/dist/intents/row-identity.js +25 -0
- package/dist/intents/row-identity.js.map +1 -0
- package/dist/intents/sales-verb.d.ts +8 -0
- package/dist/intents/sales-verb.js +12 -0
- package/dist/intents/sales-verb.js.map +1 -0
- package/dist/intents/scoped-config.d.ts +12 -0
- package/dist/intents/scoped-config.js +17 -0
- package/dist/intents/scoped-config.js.map +1 -0
- package/dist/intents/screen-title.d.ts +27 -0
- package/dist/intents/screen-title.js +59 -0
- package/dist/intents/screen-title.js.map +1 -0
- package/dist/intents/section-registry.d.ts +48 -0
- package/dist/intents/section-registry.js +33 -0
- package/dist/intents/section-registry.js.map +1 -0
- package/dist/intents/sell-products.config.d.ts +2 -0
- package/dist/intents/sell-products.config.js +275 -0
- package/dist/intents/sell-products.config.js.map +1 -0
- package/dist/intents/send-invoices.config.d.ts +16 -0
- package/dist/intents/send-invoices.config.js +223 -0
- package/dist/intents/send-invoices.config.js.map +1 -0
- package/dist/intents/subscriptions.config.d.ts +2 -0
- package/dist/intents/subscriptions.config.js +260 -0
- package/dist/intents/subscriptions.config.js.map +1 -0
- package/dist/intents/take-bookings.config.d.ts +2 -0
- package/dist/intents/take-bookings.config.js +298 -0
- package/dist/intents/take-bookings.config.js.map +1 -0
- package/dist/intents/types.d.ts +246 -0
- package/dist/intents/types.js +1 -0
- package/dist/intents/types.js.map +1 -0
- package/dist/intents/use-active-intent.d.ts +27 -0
- package/dist/intents/use-active-intent.js +74 -0
- package/dist/intents/use-active-intent.js.map +1 -0
- package/dist/intents/use-destination-label.d.ts +18 -0
- package/dist/intents/use-destination-label.js +45 -0
- package/dist/intents/use-destination-label.js.map +1 -0
- package/dist/intents/use-entity-label.d.ts +32 -0
- package/dist/intents/use-entity-label.js +75 -0
- package/dist/intents/use-entity-label.js.map +1 -0
- package/dist/intents/use-intent-config.d.ts +20 -0
- package/dist/intents/use-intent-config.js +91 -0
- package/dist/intents/use-intent-config.js.map +1 -0
- package/dist/intents/use-intent-nav-rows.d.ts +26 -0
- package/dist/intents/use-intent-nav-rows.js +49 -0
- package/dist/intents/use-intent-nav-rows.js.map +1 -0
- package/dist/intents/use-resource-label.d.ts +10 -0
- package/dist/intents/use-resource-label.js +9 -0
- package/dist/intents/use-resource-label.js.map +1 -0
- package/dist/intents/use-row-noun.d.ts +19 -0
- package/dist/intents/use-row-noun.js +13 -0
- package/dist/intents/use-row-noun.js.map +1 -0
- package/dist/intents/use-screen-title.d.ts +9 -0
- package/dist/intents/use-screen-title.js +25 -0
- package/dist/intents/use-screen-title.js.map +1 -0
- package/dist/intents/what-it-adds.d.ts +70 -0
- package/dist/intents/what-it-adds.js +29 -0
- package/dist/intents/what-it-adds.js.map +1 -0
- package/dist/intents/workflow-shape.d.ts +66 -0
- package/dist/intents/workflow-shape.js +151 -0
- package/dist/intents/workflow-shape.js.map +1 -0
- package/dist/intents.d.ts +1 -0
- package/dist/intents.js +1 -0
- package/dist/invite-refusal.d.ts +37 -0
- package/dist/invite-refusal.js +26 -0
- package/dist/invite-refusal.js.map +1 -0
- package/dist/invoice-brand.d.ts +28 -0
- package/dist/invoice-brand.js +33 -0
- package/dist/invoice-brand.js.map +1 -0
- package/dist/ios-navigation-context.d.ts +11 -0
- package/dist/ios-navigation-context.js +52 -0
- package/dist/ios-navigation-context.js.map +1 -0
- package/dist/legal-links.d.ts +10 -0
- package/dist/legal-links.js +7 -0
- package/dist/legal-links.js.map +1 -0
- package/dist/letting-policy.d.ts +85 -0
- package/dist/letting-policy.js +47 -0
- package/dist/letting-policy.js.map +1 -0
- package/dist/list-page-size.d.ts +24 -0
- package/dist/list-page-size.js +5 -0
- package/dist/list-page-size.js.map +1 -0
- package/dist/live-events/sse-frames.d.ts +15 -0
- package/dist/live-events/sse-frames.js +37 -0
- package/dist/live-events/sse-frames.js.map +1 -0
- package/dist/location-options.d.ts +16 -0
- package/dist/location-options.js +94 -0
- package/dist/location-options.js.map +1 -0
- package/dist/location-scope-context.d.ts +47 -0
- package/dist/location-scope-context.js +85 -0
- package/dist/location-scope-context.js.map +1 -0
- package/dist/media-service.d.ts +97 -0
- package/dist/media-service.js +282 -0
- package/dist/media-service.js.map +1 -0
- package/dist/media-utils.d.ts +51 -0
- package/dist/media-utils.js +85 -0
- package/dist/media-utils.js.map +1 -0
- package/dist/member-presence.d.ts +40 -0
- package/dist/member-presence.js +77 -0
- package/dist/member-presence.js.map +1 -0
- package/dist/member-subscription-enrollment.d.ts +16 -0
- package/dist/member-subscription-enrollment.js +32 -0
- package/dist/member-subscription-enrollment.js.map +1 -0
- package/dist/membership-freshness.d.ts +31 -0
- package/dist/membership-freshness.js +21 -0
- package/dist/membership-freshness.js.map +1 -0
- package/dist/mobile-header-context.d.ts +32 -0
- package/dist/mobile-header-context.js +59 -0
- package/dist/mobile-header-context.js.map +1 -0
- package/dist/mobile-routes.d.ts +81 -0
- package/dist/mobile-routes.js +406 -0
- package/dist/mobile-routes.js.map +1 -0
- package/dist/mobile-tab-config.d.ts +18 -0
- package/dist/mobile-tab-config.js +43 -0
- package/dist/mobile-tab-config.js.map +1 -0
- package/dist/money-coming-soon.d.ts +16 -0
- package/dist/money-coming-soon.js +22 -0
- package/dist/money-coming-soon.js.map +1 -0
- package/dist/money-minor.d.ts +17 -0
- package/dist/money-minor.js +53 -0
- package/dist/money-minor.js.map +1 -0
- package/dist/money-visibility.d.ts +38 -0
- package/dist/money-visibility.js +13 -0
- package/dist/money-visibility.js.map +1 -0
- package/dist/motion.d.ts +160 -0
- package/dist/motion.js +130 -0
- package/dist/motion.js.map +1 -0
- package/dist/nav-pending.d.ts +42 -0
- package/dist/nav-pending.js +84 -0
- package/dist/nav-pending.js.map +1 -0
- package/dist/navigation-groups.d.ts +52 -0
- package/dist/navigation-groups.js +64 -0
- package/dist/navigation-groups.js.map +1 -0
- package/dist/onboarding-draft.d.ts +23 -0
- package/dist/onboarding-draft.js +35 -0
- package/dist/onboarding-draft.js.map +1 -0
- package/dist/operating-model/index.d.ts +4 -0
- package/dist/operating-model/index.js +13 -0
- package/dist/operating-model/index.js.map +1 -0
- package/dist/operating-model/order-display.d.ts +10 -0
- package/dist/operating-model/order-display.js +24 -0
- package/dist/operating-model/order-display.js.map +1 -0
- package/dist/operating-model/resolver.d.ts +9 -0
- package/dist/operating-model/resolver.js +110 -0
- package/dist/operating-model/resolver.js.map +1 -0
- package/dist/operating-model/types.d.ts +36 -0
- package/dist/operating-model/types.js +1 -0
- package/dist/operating-model/types.js.map +1 -0
- package/dist/operating-model/use-operating-model.d.ts +7 -0
- package/dist/operating-model/use-operating-model.js +65 -0
- package/dist/operating-model/use-operating-model.js.map +1 -0
- package/dist/operating-model.d.ts +1 -0
- package/dist/operating-model.js +1 -0
- package/dist/order-config.d.ts +30 -0
- package/dist/order-config.js +56 -0
- package/dist/order-config.js.map +1 -0
- package/dist/order-discounts.d.ts +25 -0
- package/dist/order-discounts.js +27 -0
- package/dist/order-discounts.js.map +1 -0
- package/dist/order-shipping.d.ts +33 -0
- package/dist/order-shipping.js +49 -0
- package/dist/order-shipping.js.map +1 -0
- package/dist/order-tax.d.ts +28 -0
- package/dist/order-tax.js +21 -0
- package/dist/order-tax.js.map +1 -0
- package/dist/page-intros.d.ts +78 -0
- package/dist/page-intros.js +164 -0
- package/dist/page-intros.js.map +1 -0
- package/dist/page-transition.d.ts +20 -0
- package/dist/page-transition.js +19 -0
- package/dist/page-transition.js.map +1 -0
- package/dist/pages-api-response.d.ts +8 -0
- package/dist/pages-api-response.js +18 -0
- package/dist/pages-api-response.js.map +1 -0
- package/dist/payment-method-label.d.ts +6 -0
- package/dist/payment-method-label.js +14 -0
- package/dist/payment-method-label.js.map +1 -0
- package/dist/permission-aliases.d.ts +18 -0
- package/dist/permission-aliases.js +20 -0
- package/dist/permission-aliases.js.map +1 -0
- package/dist/permission-catalog-fallback.d.ts +17 -0
- package/dist/permission-catalog-fallback.js +147 -0
- package/dist/permission-catalog-fallback.js.map +1 -0
- package/dist/permission-change.d.ts +42 -0
- package/dist/permission-change.js +33 -0
- package/dist/permission-change.js.map +1 -0
- package/dist/phone.d.ts +16 -0
- package/dist/phone.js +20 -0
- package/dist/phone.js.map +1 -0
- package/dist/plan-access.d.ts +39 -0
- package/dist/plan-access.js +57 -0
- package/dist/plan-access.js.map +1 -0
- package/dist/plan-card-api.d.ts +34 -0
- package/dist/plan-card-api.js +30 -0
- package/dist/plan-card-api.js.map +1 -0
- package/dist/plan-price.d.ts +34 -0
- package/dist/plan-price.js +57 -0
- package/dist/plan-price.js.map +1 -0
- package/dist/post-login-target.d.ts +24 -0
- package/dist/post-login-target.js +12 -0
- package/dist/post-login-target.js.map +1 -0
- package/dist/potter-mark-paths.d.ts +21 -0
- package/dist/potter-mark-paths.js +9 -0
- package/dist/potter-mark-paths.js.map +1 -0
- package/dist/pricing-plans-types.d.ts +143 -0
- package/dist/pricing-plans-types.js +1 -0
- package/dist/pricing-plans-types.js.map +1 -0
- package/dist/product-assignees.d.ts +1 -0
- package/dist/product-assignees.js +18 -0
- package/dist/product-assignees.js.map +1 -0
- package/dist/product-collection-sync.d.ts +12 -0
- package/dist/product-collection-sync.js +97 -0
- package/dist/product-collection-sync.js.map +1 -0
- package/dist/product-cost.d.ts +12 -0
- package/dist/product-cost.js +24 -0
- package/dist/product-cost.js.map +1 -0
- package/dist/product-insights-api.d.ts +38 -0
- package/dist/product-insights-api.js +51 -0
- package/dist/product-insights-api.js.map +1 -0
- package/dist/product-types.d.ts +311 -0
- package/dist/product-types.js +38 -0
- package/dist/product-types.js.map +1 -0
- package/dist/promised-day.d.ts +33 -0
- package/dist/promised-day.js +38 -0
- package/dist/promised-day.js.map +1 -0
- package/dist/proposals-api.d.ts +96 -0
- package/dist/proposals-api.js +41 -0
- package/dist/proposals-api.js.map +1 -0
- package/dist/proxy-allowlist.d.ts +15 -0
- package/dist/proxy-allowlist.js +153 -0
- package/dist/proxy-allowlist.js.map +1 -0
- package/dist/public-config-loader.d.ts +27 -0
- package/dist/public-config-loader.js +12 -0
- package/dist/public-config-loader.js.map +1 -0
- package/dist/public-config-provider.d.ts +16 -0
- package/dist/public-config-provider.js +14 -0
- package/dist/public-config-provider.js.map +1 -0
- package/dist/resolve-enabled-behaviors.d.ts +55 -0
- package/dist/resolve-enabled-behaviors.js +134 -0
- package/dist/resolve-enabled-behaviors.js.map +1 -0
- package/dist/resource-types.d.ts +198 -0
- package/dist/resource-types.js +96 -0
- package/dist/resource-types.js.map +1 -0
- package/dist/resume-screen.d.ts +31 -0
- package/dist/resume-screen.js +25 -0
- package/dist/resume-screen.js.map +1 -0
- package/dist/rider-display.d.ts +37 -0
- package/dist/rider-display.js +110 -0
- package/dist/rider-display.js.map +1 -0
- package/dist/rider-view.d.ts +37 -0
- package/dist/rider-view.js +47 -0
- package/dist/rider-view.js.map +1 -0
- package/dist/roster-label.d.ts +27 -0
- package/dist/roster-label.js +8 -0
- package/dist/roster-label.js.map +1 -0
- package/dist/route-pattern.d.ts +11 -0
- package/dist/route-pattern.js +20 -0
- package/dist/route-pattern.js.map +1 -0
- package/dist/route-permission.d.ts +60 -0
- package/dist/route-permission.js +48 -0
- package/dist/route-permission.js.map +1 -0
- package/dist/runtime-config.d.ts +33 -0
- package/dist/runtime-config.js +23 -0
- package/dist/runtime-config.js.map +1 -0
- package/dist/schema-validation.d.ts +172 -0
- package/dist/schema-validation.js +252 -0
- package/dist/schema-validation.js.map +1 -0
- package/dist/service-areas.d.ts +30 -0
- package/dist/service-areas.js +24 -0
- package/dist/service-areas.js.map +1 -0
- package/dist/service-operations-api.d.ts +78 -0
- package/dist/service-operations-api.js +37 -0
- package/dist/service-operations-api.js.map +1 -0
- package/dist/settings-relevance.d.ts +64 -0
- package/dist/settings-relevance.js +25 -0
- package/dist/settings-relevance.js.map +1 -0
- package/dist/singularise.d.ts +16 -0
- package/dist/singularise.js +37 -0
- package/dist/singularise.js.map +1 -0
- package/dist/site-address.d.ts +14 -0
- package/dist/site-address.js +28 -0
- package/dist/site-address.js.map +1 -0
- package/dist/slug.d.ts +26 -0
- package/dist/slug.js +15 -0
- package/dist/slug.js.map +1 -0
- package/dist/sound.d.ts +14 -0
- package/dist/sound.js +166 -0
- package/dist/sound.js.map +1 -0
- package/dist/staff-arrival.d.ts +3 -0
- package/dist/staff-arrival.js +11 -0
- package/dist/staff-arrival.js.map +1 -0
- package/dist/staff-home.d.ts +58 -0
- package/dist/staff-home.js +90 -0
- package/dist/staff-home.js.map +1 -0
- package/dist/staff-landing.d.ts +1 -0
- package/dist/staff-landing.js +15 -0
- package/dist/staff-landing.js.map +1 -0
- package/dist/stat-card-types.d.ts +19 -0
- package/dist/stat-card-types.js +1 -0
- package/dist/stat-card-types.js.map +1 -0
- package/dist/stock-levels.d.ts +32 -0
- package/dist/stock-levels.js +17 -0
- package/dist/stock-levels.js.map +1 -0
- package/dist/stored-token.d.ts +1 -0
- package/dist/stored-token.js +11 -0
- package/dist/stored-token.js.map +1 -0
- package/dist/storefront-url.d.ts +31 -0
- package/dist/storefront-url.js +40 -0
- package/dist/storefront-url.js.map +1 -0
- package/dist/storefront.d.ts +64 -0
- package/dist/storefront.js +51 -0
- package/dist/storefront.js.map +1 -0
- package/dist/subscription-billing-api.d.ts +115 -0
- package/dist/subscription-billing-api.js +27 -0
- package/dist/subscription-billing-api.js.map +1 -0
- package/dist/subscription-billing-model.d.ts +26 -0
- package/dist/subscription-billing-model.js +58 -0
- package/dist/subscription-billing-model.js.map +1 -0
- package/dist/support-case-subject.d.ts +10 -0
- package/dist/support-case-subject.js +13 -0
- package/dist/support-case-subject.js.map +1 -0
- package/dist/support-inbox.d.ts +6 -0
- package/dist/support-inbox.js +5 -0
- package/dist/support-inbox.js.map +1 -0
- package/dist/support.d.ts +7 -0
- package/dist/support.js +16 -0
- package/dist/support.js.map +1 -0
- package/dist/team-page.d.ts +9 -0
- package/dist/team-page.js +5 -0
- package/dist/team-page.js.map +1 -0
- package/dist/team-roles.d.ts +140 -0
- package/dist/team-roles.js +247 -0
- package/dist/team-roles.js.map +1 -0
- package/dist/team-successors.d.ts +20 -0
- package/dist/team-successors.js +13 -0
- package/dist/team-successors.js.map +1 -0
- package/dist/template-asset-url.d.ts +11 -0
- package/dist/template-asset-url.js +8 -0
- package/dist/template-asset-url.js.map +1 -0
- package/dist/template-capabilities.d.ts +2 -0
- package/dist/template-capabilities.js +71 -0
- package/dist/template-capabilities.js.map +1 -0
- package/dist/template-context.d.ts +111 -0
- package/dist/template-context.js +1278 -0
- package/dist/template-context.js.map +1 -0
- package/dist/template-filter.d.ts +29 -0
- package/dist/template-filter.js +41 -0
- package/dist/template-filter.js.map +1 -0
- package/dist/template-preview/preview-author-patch.d.ts +24 -0
- package/dist/template-preview/preview-author-patch.js +78 -0
- package/dist/template-preview/preview-author-patch.js.map +1 -0
- package/dist/template-preview/use-template-document.d.ts +38 -0
- package/dist/template-preview/use-template-document.js +45 -0
- package/dist/template-preview/use-template-document.js.map +1 -0
- package/dist/template-requirements.d.ts +38 -0
- package/dist/template-requirements.js +13 -0
- package/dist/template-requirements.js.map +1 -0
- package/dist/template-types.d.ts +317 -0
- package/dist/template-types.js +1 -0
- package/dist/template-types.js.map +1 -0
- package/dist/templates.d.ts +22 -0
- package/dist/templates.js +1 -0
- package/dist/templates.js.map +1 -0
- package/dist/theme-context.d.ts +58 -0
- package/dist/theme-context.js +283 -0
- package/dist/theme-context.js.map +1 -0
- package/dist/theme-policy.d.ts +41 -0
- package/dist/theme-policy.js +32 -0
- package/dist/theme-policy.js.map +1 -0
- package/dist/ticket-access.d.ts +20 -0
- package/dist/ticket-access.js +39 -0
- package/dist/ticket-access.js.map +1 -0
- package/dist/timeline-copy.d.ts +65 -0
- package/dist/timeline-copy.js +150 -0
- package/dist/timeline-copy.js.map +1 -0
- package/dist/url-params.d.ts +23 -0
- package/dist/url-params.js +43 -0
- package/dist/url-params.js.map +1 -0
- package/dist/use-behaviors.d.ts +13 -0
- package/dist/use-behaviors.js +41 -0
- package/dist/use-behaviors.js.map +1 -0
- package/dist/use-business-locations.d.ts +35 -0
- package/dist/use-business-locations.js +71 -0
- package/dist/use-business-locations.js.map +1 -0
- package/dist/use-currency.d.ts +12 -0
- package/dist/use-currency.js +16 -0
- package/dist/use-currency.js.map +1 -0
- package/dist/use-empty-state-copy.d.ts +12 -0
- package/dist/use-empty-state-copy.js +13 -0
- package/dist/use-empty-state-copy.js.map +1 -0
- package/dist/use-geo-cities.d.ts +1 -0
- package/dist/use-geo-cities.js +42 -0
- package/dist/use-geo-cities.js.map +1 -0
- package/dist/use-has-hardware.d.ts +13 -0
- package/dist/use-has-hardware.js +14 -0
- package/dist/use-has-hardware.js.map +1 -0
- package/dist/use-industry-key.d.ts +10 -0
- package/dist/use-industry-key.js +16 -0
- package/dist/use-industry-key.js.map +1 -0
- package/dist/use-item-links.d.ts +20 -0
- package/dist/use-item-links.js +30 -0
- package/dist/use-item-links.js.map +1 -0
- package/dist/use-job-roles.d.ts +21 -0
- package/dist/use-job-roles.js +76 -0
- package/dist/use-job-roles.js.map +1 -0
- package/dist/use-merchant-plan.d.ts +36 -0
- package/dist/use-merchant-plan.js +78 -0
- package/dist/use-merchant-plan.js.map +1 -0
- package/dist/use-module-label.d.ts +12 -0
- package/dist/use-module-label.js +13 -0
- package/dist/use-module-label.js.map +1 -0
- package/dist/use-money-visibility.d.ts +14 -0
- package/dist/use-money-visibility.js +13 -0
- package/dist/use-money-visibility.js.map +1 -0
- package/dist/use-nav-groups.d.ts +27 -0
- package/dist/use-nav-groups.js +141 -0
- package/dist/use-nav-groups.js.map +1 -0
- package/dist/use-pathname.d.ts +15 -0
- package/dist/use-pathname.js +29 -0
- package/dist/use-pathname.js.map +1 -0
- package/dist/use-permissions.d.ts +43 -0
- package/dist/use-permissions.js +158 -0
- package/dist/use-permissions.js.map +1 -0
- package/dist/use-platform-modules.d.ts +49 -0
- package/dist/use-platform-modules.js +416 -0
- package/dist/use-platform-modules.js.map +1 -0
- package/dist/use-staff-home.d.ts +9 -0
- package/dist/use-staff-home.js +24 -0
- package/dist/use-staff-home.js.map +1 -0
- package/dist/use-workspace-invite.d.ts +37 -0
- package/dist/use-workspace-invite.js +69 -0
- package/dist/use-workspace-invite.js.map +1 -0
- package/dist/utils.d.ts +53 -0
- package/dist/utils.js +161 -0
- package/dist/utils.js.map +1 -0
- package/dist/wallet-format.d.ts +8 -0
- package/dist/wallet-format.js +36 -0
- package/dist/wallet-format.js.map +1 -0
- package/dist/wallet-settlement.d.ts +14 -0
- package/dist/wallet-settlement.js +5 -0
- package/dist/wallet-settlement.js.map +1 -0
- package/dist/web-url.d.ts +1 -0
- package/dist/web-url.js +50 -0
- package/dist/web-url.js.map +1 -0
- package/dist/whats-new.d.ts +59 -0
- package/dist/whats-new.js +77 -0
- package/dist/whats-new.js.map +1 -0
- package/dist/workspace-recents.d.ts +30 -0
- package/dist/workspace-recents.js +37 -0
- package/dist/workspace-recents.js.map +1 -0
- package/dist/workspace-slug.d.ts +1 -0
- package/dist/workspace-slug.js +15 -0
- package/dist/workspace-slug.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a business address may be, as the person typing it sees it.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the API's rules (`shared/tenant-slug.ts`), so most mistakes are
|
|
5
|
+
* caught before a request is made. The API stays the authority: a slug this
|
|
6
|
+
* accepts can still be taken or reserved, which only the server can say.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ADDRESS_MIN_LENGTH = 3;
|
|
9
|
+
export declare const ADDRESS_MAX_LENGTH = 50;
|
|
10
|
+
export type AddressProblem = 'too-short' | 'too-long' | 'format';
|
|
11
|
+
export declare const ADDRESS_PROBLEM_MESSAGES: Record<AddressProblem | 'reserved' | 'taken', string>;
|
|
12
|
+
/** What a person types, tidied the way the API will read it. */
|
|
13
|
+
export declare function normalizeAddress(input: string): string;
|
|
14
|
+
export declare function addressProblem(input: string): AddressProblem | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const ADDRESS_MIN_LENGTH = 3;
|
|
2
|
+
const ADDRESS_MAX_LENGTH = 50;
|
|
3
|
+
const FORMAT = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
4
|
+
const ADDRESS_PROBLEM_MESSAGES = {
|
|
5
|
+
"too-short": `Use at least ${ADDRESS_MIN_LENGTH} characters.`,
|
|
6
|
+
"too-long": `Use at most ${ADDRESS_MAX_LENGTH} characters.`,
|
|
7
|
+
format: "Use only lowercase letters, numbers and hyphens, with no hyphen at the start or end.",
|
|
8
|
+
reserved: "That address is reserved. Try another.",
|
|
9
|
+
taken: "That address is already taken."
|
|
10
|
+
};
|
|
11
|
+
function normalizeAddress(input) {
|
|
12
|
+
return input.trim().toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
function addressProblem(input) {
|
|
15
|
+
const slug = normalizeAddress(input);
|
|
16
|
+
if (slug.length < ADDRESS_MIN_LENGTH) return "too-short";
|
|
17
|
+
if (slug.length > ADDRESS_MAX_LENGTH) return "too-long";
|
|
18
|
+
if (!FORMAT.test(slug)) return "format";
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
ADDRESS_MAX_LENGTH,
|
|
23
|
+
ADDRESS_MIN_LENGTH,
|
|
24
|
+
ADDRESS_PROBLEM_MESSAGES,
|
|
25
|
+
addressProblem,
|
|
26
|
+
normalizeAddress
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=site-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/site-address.ts"],"sourcesContent":["/**\n * What a business address may be, as the person typing it sees it.\n *\n * Mirrors the API's rules (`shared/tenant-slug.ts`), so most mistakes are\n * caught before a request is made. The API stays the authority: a slug this\n * accepts can still be taken or reserved, which only the server can say.\n */\nexport const ADDRESS_MIN_LENGTH = 3;\nexport const ADDRESS_MAX_LENGTH = 50;\n\nconst FORMAT = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;\n\nexport type AddressProblem = 'too-short' | 'too-long' | 'format';\n\nexport const ADDRESS_PROBLEM_MESSAGES: Record<\n AddressProblem | 'reserved' | 'taken',\n string\n> = {\n 'too-short': `Use at least ${ADDRESS_MIN_LENGTH} characters.`,\n 'too-long': `Use at most ${ADDRESS_MAX_LENGTH} characters.`,\n format:\n 'Use only lowercase letters, numbers and hyphens, with no hyphen at the start or end.',\n reserved: 'That address is reserved. Try another.',\n taken: 'That address is already taken.',\n};\n\n/** What a person types, tidied the way the API will read it. */\nexport function normalizeAddress(input: string): string {\n return input.trim().toLowerCase();\n}\n\nexport function addressProblem(input: string): AddressProblem | null {\n const slug = normalizeAddress(input);\n if (slug.length < ADDRESS_MIN_LENGTH) return 'too-short';\n if (slug.length > ADDRESS_MAX_LENGTH) return 'too-long';\n if (!FORMAT.test(slug)) return 'format';\n return null;\n}\n"],"mappings":"AAOO,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAElC,MAAM,SAAS;AAIR,MAAM,2BAGT;AAAA,EACF,aAAa,gBAAgB,kBAAkB;AAAA,EAC/C,YAAY,eAAe,kBAAkB;AAAA,EAC7C,QACE;AAAA,EACF,UAAU;AAAA,EACV,OAAO;AACT;AAGO,SAAS,iBAAiB,OAAuB;AACtD,SAAO,MAAM,KAAK,EAAE,YAAY;AAClC;AAEO,SAAS,eAAe,OAAsC;AACnE,QAAM,OAAO,iBAAiB,KAAK;AACnC,MAAI,KAAK,SAAS,mBAAoB,QAAO;AAC7C,MAAI,KAAK,SAAS,mBAAoB,QAAO;AAC7C,MAAI,CAAC,OAAO,KAAK,IAAI,EAAG,QAAO;AAC/B,SAAO;AACT;","names":[]}
|
package/dist/slug.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The business address, derived from a business name.
|
|
3
|
+
*
|
|
4
|
+
* Moved out of `step-name` when that file crossed the 500-line rule, and the
|
|
5
|
+
* seam is a real one: none of this knows anything about the screen. It is the
|
|
6
|
+
* rule for turning a name people actually type into an address a URL can
|
|
7
|
+
* carry, and the two callers of `sanitizeSlug` — deriving and hand-editing —
|
|
8
|
+
* need the same answer or the field disagrees with itself.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* ACCENTS ARE FOLDED, NOT DROPPED.
|
|
12
|
+
*
|
|
13
|
+
* This used to lowercase and then delete everything outside `a-z0-9`, which on
|
|
14
|
+
* the names this product is actually for takes the letter with the mark on it:
|
|
15
|
+
* "Ìlera Courts" derived `lera-courts`, "Ẹ̀gbẹ́ Nights" loses its first letter
|
|
16
|
+
* too, and "Ụlọma" comes out as `ma`. A Nigerian business typing its own name
|
|
17
|
+
* in its own orthography got an address with the front of the word missing,
|
|
18
|
+
* and nothing on the screen said why.
|
|
19
|
+
*
|
|
20
|
+
* `NFD` splits a marked letter into the base letter plus its combining mark, so
|
|
21
|
+
* stripping the marks leaves the letter behind: Ì → I + ` → i. The dotted-below
|
|
22
|
+
* vowels of Yoruba and Igbo (ẹ, ọ, ụ) decompose the same way.
|
|
23
|
+
*/
|
|
24
|
+
export declare function slugify(input: string): string;
|
|
25
|
+
export declare function sanitizeSlug(input: string): string;
|
|
26
|
+
export declare function isValidSlug(s: string): boolean;
|
package/dist/slug.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function slugify(input) {
|
|
2
|
+
return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
3
|
+
}
|
|
4
|
+
function sanitizeSlug(input) {
|
|
5
|
+
return input.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/-{2,}/g, "-").slice(0, 40);
|
|
6
|
+
}
|
|
7
|
+
function isValidSlug(s) {
|
|
8
|
+
return s.length >= 3 && s.length <= 40 && /^[a-z0-9-]+$/.test(s) && !s.startsWith("-") && !s.endsWith("-");
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
isValidSlug,
|
|
12
|
+
sanitizeSlug,
|
|
13
|
+
slugify
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=slug.js.map
|
package/dist/slug.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/slug.ts"],"sourcesContent":["/**\n * The business address, derived from a business name.\n *\n * Moved out of `step-name` when that file crossed the 500-line rule, and the\n * seam is a real one: none of this knows anything about the screen. It is the\n * rule for turning a name people actually type into an address a URL can\n * carry, and the two callers of `sanitizeSlug` — deriving and hand-editing —\n * need the same answer or the field disagrees with itself.\n */\n\n/**\n * ACCENTS ARE FOLDED, NOT DROPPED.\n *\n * This used to lowercase and then delete everything outside `a-z0-9`, which on\n * the names this product is actually for takes the letter with the mark on it:\n * \"Ìlera Courts\" derived `lera-courts`, \"Ẹ̀gbẹ́ Nights\" loses its first letter\n * too, and \"Ụlọma\" comes out as `ma`. A Nigerian business typing its own name\n * in its own orthography got an address with the front of the word missing,\n * and nothing on the screen said why.\n *\n * `NFD` splits a marked letter into the base letter plus its combining mark, so\n * stripping the marks leaves the letter behind: Ì → I + ` → i. The dotted-below\n * vowels of Yoruba and Igbo (ẹ, ọ, ụ) decompose the same way.\n */\nexport function slugify(input: string): string {\n return input\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 40);\n}\nexport function sanitizeSlug(input: string): string {\n return input\n .toLowerCase()\n .replace(/[^a-z0-9-]+/g, '-')\n .replace(/-{2,}/g, '-')\n .slice(0, 40);\n}\nexport function isValidSlug(s: string): boolean {\n return (\n s.length >= 3 &&\n s.length <= 40 &&\n /^[a-z0-9-]+$/.test(s) &&\n !s.startsWith('-') &&\n !s.endsWith('-')\n );\n}\n"],"mappings":"AAwBO,SAAS,QAAQ,OAAuB;AAC7C,SAAO,MACJ,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE,EAC9B,YAAY,EACZ,QAAQ,eAAe,GAAG,EAC1B,QAAQ,YAAY,EAAE,EACtB,MAAM,GAAG,EAAE;AAChB;AACO,SAAS,aAAa,OAAuB;AAClD,SAAO,MACJ,YAAY,EACZ,QAAQ,gBAAgB,GAAG,EAC3B,QAAQ,UAAU,GAAG,EACrB,MAAM,GAAG,EAAE;AAChB;AACO,SAAS,YAAY,GAAoB;AAC9C,SACE,EAAE,UAAU,KACZ,EAAE,UAAU,MACZ,eAAe,KAAK,CAAC,KACrB,CAAC,EAAE,WAAW,GAAG,KACjB,CAAC,EAAE,SAAS,GAAG;AAEnB;","names":[]}
|
package/dist/sound.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PotterSound = 'record-start' | 'record-stop' | 'potter' | 'send' | 'commit' | 'refuse';
|
|
2
|
+
export declare function soundEnabled(): boolean;
|
|
3
|
+
export declare function setSoundEnabled(on: boolean): void;
|
|
4
|
+
/**
|
|
5
|
+
* For a control that shows the current setting.
|
|
6
|
+
*
|
|
7
|
+
* Pair with `useSyncExternalStore`: the preference lives in localStorage, which
|
|
8
|
+
* is not React state and does not exist during a server render, and this is the
|
|
9
|
+
* shape React provides for exactly that. Reading it into `useState` inside an
|
|
10
|
+
* effect would work and would also render the switch in the wrong position for
|
|
11
|
+
* one frame on every visit.
|
|
12
|
+
*/
|
|
13
|
+
export declare function subscribeSound(onChange: () => void): () => void;
|
|
14
|
+
export declare function playSound(sound: PotterSound): void;
|
package/dist/sound.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const STORAGE_KEY = "potter-sound";
|
|
3
|
+
let ctx = null;
|
|
4
|
+
let noise = null;
|
|
5
|
+
function audioContext() {
|
|
6
|
+
if (typeof window === "undefined") return null;
|
|
7
|
+
const Ctor = window.AudioContext ?? window.webkitAudioContext;
|
|
8
|
+
if (!Ctor) return null;
|
|
9
|
+
if (!ctx) ctx = new Ctor();
|
|
10
|
+
if (ctx.state === "suspended") void ctx.resume();
|
|
11
|
+
return ctx;
|
|
12
|
+
}
|
|
13
|
+
function noiseBuffer(ac) {
|
|
14
|
+
if (noise) return noise;
|
|
15
|
+
const frames = Math.floor(ac.sampleRate * 0.4);
|
|
16
|
+
const buf = ac.createBuffer(1, frames, ac.sampleRate);
|
|
17
|
+
const data = buf.getChannelData(0);
|
|
18
|
+
for (let i = 0; i < frames; i++) data[i] = Math.random() * 2 - 1;
|
|
19
|
+
noise = buf;
|
|
20
|
+
return buf;
|
|
21
|
+
}
|
|
22
|
+
function soundEnabled() {
|
|
23
|
+
if (typeof window === "undefined") return false;
|
|
24
|
+
try {
|
|
25
|
+
return window.localStorage.getItem(STORAGE_KEY) !== "off";
|
|
26
|
+
} catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const CHANGED = "potter:sound-changed";
|
|
31
|
+
function setSoundEnabled(on) {
|
|
32
|
+
try {
|
|
33
|
+
window.localStorage.setItem(STORAGE_KEY, on ? "on" : "off");
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
window.dispatchEvent(new Event(CHANGED));
|
|
37
|
+
}
|
|
38
|
+
function subscribeSound(onChange) {
|
|
39
|
+
window.addEventListener(CHANGED, onChange);
|
|
40
|
+
window.addEventListener("storage", onChange);
|
|
41
|
+
return () => {
|
|
42
|
+
window.removeEventListener(CHANGED, onChange);
|
|
43
|
+
window.removeEventListener("storage", onChange);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function knock(ac, at, freq, peak) {
|
|
47
|
+
const src = ac.createBufferSource();
|
|
48
|
+
src.buffer = noiseBuffer(ac);
|
|
49
|
+
const band = ac.createBiquadFilter();
|
|
50
|
+
band.type = "bandpass";
|
|
51
|
+
band.frequency.setValueAtTime(freq, at);
|
|
52
|
+
band.Q.setValueAtTime(8, at);
|
|
53
|
+
const gain = ac.createGain();
|
|
54
|
+
gain.gain.setValueAtTime(0, at);
|
|
55
|
+
gain.gain.linearRampToValueAtTime(peak, at + 2e-3);
|
|
56
|
+
gain.gain.exponentialRampToValueAtTime(1e-4, at + 0.03);
|
|
57
|
+
src.connect(band).connect(gain).connect(ac.destination);
|
|
58
|
+
src.start(at);
|
|
59
|
+
src.stop(at + 0.06);
|
|
60
|
+
}
|
|
61
|
+
function settle(ac, at, from, to, duration, peak) {
|
|
62
|
+
const osc = ac.createOscillator();
|
|
63
|
+
osc.type = "triangle";
|
|
64
|
+
osc.frequency.setValueAtTime(from, at);
|
|
65
|
+
osc.frequency.exponentialRampToValueAtTime(to, at + duration * 0.35);
|
|
66
|
+
const lp = ac.createBiquadFilter();
|
|
67
|
+
lp.type = "lowpass";
|
|
68
|
+
lp.frequency.setValueAtTime(1800, at);
|
|
69
|
+
const gain = ac.createGain();
|
|
70
|
+
gain.gain.setValueAtTime(0, at);
|
|
71
|
+
gain.gain.linearRampToValueAtTime(peak, at + 8e-3);
|
|
72
|
+
gain.gain.exponentialRampToValueAtTime(1e-4, at + duration);
|
|
73
|
+
osc.connect(lp).connect(gain).connect(ac.destination);
|
|
74
|
+
osc.start(at);
|
|
75
|
+
osc.stop(at + duration + 0.02);
|
|
76
|
+
}
|
|
77
|
+
function breath(ac, at, duration, peak) {
|
|
78
|
+
const src = ac.createBufferSource();
|
|
79
|
+
src.buffer = noiseBuffer(ac);
|
|
80
|
+
src.loop = true;
|
|
81
|
+
const lp = ac.createBiquadFilter();
|
|
82
|
+
lp.type = "lowpass";
|
|
83
|
+
lp.frequency.setValueAtTime(220, at);
|
|
84
|
+
lp.frequency.exponentialRampToValueAtTime(2400, at + duration * 0.45);
|
|
85
|
+
lp.frequency.exponentialRampToValueAtTime(500, at + duration);
|
|
86
|
+
lp.Q.setValueAtTime(2, at);
|
|
87
|
+
const gain = ac.createGain();
|
|
88
|
+
gain.gain.setValueAtTime(0, at);
|
|
89
|
+
gain.gain.linearRampToValueAtTime(peak, at + duration * 0.3);
|
|
90
|
+
gain.gain.exponentialRampToValueAtTime(1e-4, at + duration);
|
|
91
|
+
src.connect(lp).connect(gain).connect(ac.destination);
|
|
92
|
+
src.start(at);
|
|
93
|
+
src.stop(at + duration + 0.05);
|
|
94
|
+
}
|
|
95
|
+
function thud(ac, at, freq, peak) {
|
|
96
|
+
const src = ac.createBufferSource();
|
|
97
|
+
src.buffer = noiseBuffer(ac);
|
|
98
|
+
const band = ac.createBiquadFilter();
|
|
99
|
+
band.type = "bandpass";
|
|
100
|
+
band.frequency.setValueAtTime(freq, at);
|
|
101
|
+
band.Q.setValueAtTime(1.6, at);
|
|
102
|
+
const gain = ac.createGain();
|
|
103
|
+
gain.gain.setValueAtTime(0, at);
|
|
104
|
+
gain.gain.linearRampToValueAtTime(peak, at + 4e-3);
|
|
105
|
+
gain.gain.exponentialRampToValueAtTime(1e-4, at + 0.12);
|
|
106
|
+
src.connect(band).connect(gain).connect(ac.destination);
|
|
107
|
+
src.start(at);
|
|
108
|
+
src.stop(at + 0.16);
|
|
109
|
+
}
|
|
110
|
+
const HAPTICS = {
|
|
111
|
+
"record-start": 12,
|
|
112
|
+
"record-stop": 8,
|
|
113
|
+
send: 6,
|
|
114
|
+
// Land, then seat. The gap is the sound's own gap.
|
|
115
|
+
commit: [12, 60, 18],
|
|
116
|
+
refuse: 28
|
|
117
|
+
};
|
|
118
|
+
function feel(sound) {
|
|
119
|
+
const pattern = HAPTICS[sound];
|
|
120
|
+
if (pattern === void 0) return;
|
|
121
|
+
try {
|
|
122
|
+
navigator.vibrate?.(pattern);
|
|
123
|
+
} catch {
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function playSound(sound) {
|
|
127
|
+
if (!soundEnabled()) return;
|
|
128
|
+
feel(sound);
|
|
129
|
+
const ac = audioContext();
|
|
130
|
+
if (!ac) return;
|
|
131
|
+
const now = ac.currentTime;
|
|
132
|
+
switch (sound) {
|
|
133
|
+
case "record-start":
|
|
134
|
+
knock(ac, now, 900, 0.05);
|
|
135
|
+
settle(ac, now + 0.012, 220, 330, 0.26, 0.05);
|
|
136
|
+
break;
|
|
137
|
+
case "record-stop":
|
|
138
|
+
knock(ac, now, 620, 0.04);
|
|
139
|
+
settle(ac, now + 0.012, 330, 210, 0.2, 0.04);
|
|
140
|
+
break;
|
|
141
|
+
case "send":
|
|
142
|
+
knock(ac, now, 1500, 0.035);
|
|
143
|
+
settle(ac, now + 8e-3, 520, 360, 0.16, 0.035);
|
|
144
|
+
break;
|
|
145
|
+
case "commit":
|
|
146
|
+
knock(ac, now, 1100, 0.045);
|
|
147
|
+
knock(ac, now + 0.07, 520, 0.05);
|
|
148
|
+
settle(ac, now + 0.012, 200, 300, 0.38, 0.045);
|
|
149
|
+
break;
|
|
150
|
+
case "refuse":
|
|
151
|
+
thud(ac, now, 260, 0.055);
|
|
152
|
+
settle(ac, now + 0.01, 200, 120, 0.22, 0.042);
|
|
153
|
+
break;
|
|
154
|
+
case "potter":
|
|
155
|
+
breath(ac, now, 0.55, 0.045);
|
|
156
|
+
settle(ac, now + 0.06, 160, 240, 0.5, 0.03);
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export {
|
|
161
|
+
playSound,
|
|
162
|
+
setSoundEnabled,
|
|
163
|
+
soundEnabled,
|
|
164
|
+
subscribeSound
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=sound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sound.ts"],"sourcesContent":["'use client';\n\n/**\n * Box's voice, as six sounds and five vibrations.\n *\n * THE FIRST VERSION OF THIS WAS A BEEP, and it is worth saying why so it does\n * not come back. It played two sine tones a perfect fifth apart and justified\n * itself with the mark — two interlocking blocks, a 3:2 ratio, small whole\n * numbers. The reasoning was fine and the sound was a notification chime,\n * because what makes a chime a chime is not which NOTES it plays, it is that a\n * clean sine with a soft decay is the timbre of a bell. Changing the interval\n * changes nothing. The timbre is the identity.\n *\n * SO THESE ARE MECHANISMS, NOT NOTES. Every sound here starts with a short\n * burst of band-passed noise — a knock, the sound of something with mass\n * meeting something else — and only then lets a pitched element move. Noise is\n * what physical events have and what synthesised notification sounds never do,\n * which is why a UI can have a hundred chimes that all sound alike and no two\n * doors that do.\n *\n * The pitched half BENDS rather than holding. A tone that slides into place and\n * stops is a latch engaging; a tone that holds a steady frequency is an\n * instrument being played. We want the former — the mark is blocks that\n * interlock, and the sound of interlocking is a knock and a settle.\n *\n * record on knock, then a tone bending UP into place, and staying\n * record off knock, then the same tone bending DOWN and letting go\n * potter breath — noise opening through a filter, no knock at all,\n * because arriving is not a mechanism closing\n * send a light knock and a short tone falling away, with nothing\n * after it: something left your hand and is gone\n * commit TWO knocks, the second lower and a beat behind the first,\n * with a tone settling across both — a latch dropping into a\n * slot. It is the only sound in the set with two impacts,\n * because finishing is the only event that has two parts:\n * the thing arriving and the thing holding\n * refuse one dull knock, damped, with a tone bending DOWN and dying\n * early — a part that does not fit. No second knock: nothing\n * landed\n *\n * WHY EVERY SOUND HAS A BODY. Each begins with band-passed noise, and the noise\n * is not decoration — it is the mass. Two objects meeting make a broadband\n * transient first and a pitch second; skip the transient and you have a\n * notification, no matter what interval follows. A phone that goes \"ding\" tells\n * you the software noticed something. A drawer that goes \"thunk\" tells you\n * something happened. Box is the second kind.\n *\n * Rising for on is the one part that is not a choice: it is the direction every\n * listener already reads, and inverting it to be clever would make the app's\n * two most common sounds mean the wrong thing.\n *\n * IT IS QUIET AND IT CAN BE TURNED OFF. Peak gain is 0.06 — audible in a room,\n * ignorable in an office, never the loudest thing on a call. The preference is\n * read from localStorage on every play rather than cached, so muting takes\n * effect on the next sound rather than the next reload.\n */\n\nconst STORAGE_KEY = 'potter-sound';\n\nexport type PotterSound =\n | 'record-start'\n | 'record-stop'\n | 'potter'\n | 'send'\n | 'commit'\n | 'refuse';\n\n/**\n * One context for the page, made on first use.\n *\n * Browsers refuse to start an AudioContext without a user gesture, and every\n * caller here is inside a click, so the first one succeeds. It is reused\n * because a context per sound leaks audio threads — and resumed each time,\n * because the browser suspends it when the tab goes to the background.\n */\nlet ctx: AudioContext | null = null;\n/** The noise bed, made once. Regenerating it per sound is pure waste. */\nlet noise: AudioBuffer | null = null;\n\nfunction audioContext(): AudioContext | null {\n if (typeof window === 'undefined') return null;\n const Ctor =\n window.AudioContext ??\n (window as unknown as { webkitAudioContext?: typeof AudioContext })\n .webkitAudioContext;\n if (!Ctor) return null;\n if (!ctx) ctx = new Ctor();\n if (ctx.state === 'suspended') void ctx.resume();\n return ctx;\n}\n\nfunction noiseBuffer(ac: AudioContext): AudioBuffer {\n if (noise) return noise;\n const frames = Math.floor(ac.sampleRate * 0.4);\n const buf = ac.createBuffer(1, frames, ac.sampleRate);\n const data = buf.getChannelData(0);\n for (let i = 0; i < frames; i++) data[i] = Math.random() * 2 - 1;\n noise = buf;\n return buf;\n}\n\nexport function soundEnabled(): boolean {\n if (typeof window === 'undefined') return false;\n try {\n // Default ON, so the sound design is what people meet; the key only ever\n // records a decision to turn it off.\n return window.localStorage.getItem(STORAGE_KEY) !== 'off';\n } catch {\n return false;\n }\n}\n\nconst CHANGED = 'potter:sound-changed';\n\nexport function setSoundEnabled(on: boolean) {\n try {\n window.localStorage.setItem(STORAGE_KEY, on ? 'on' : 'off');\n } catch {\n /* private mode: the sound simply stays as it was */\n }\n // So a switch anywhere re-reads rather than holding its own copy of the\n // answer. `storage` fires only in OTHER tabs, which is exactly backwards for\n // the tab doing the switching.\n window.dispatchEvent(new Event(CHANGED));\n}\n\n/**\n * For a control that shows the current setting.\n *\n * Pair with `useSyncExternalStore`: the preference lives in localStorage, which\n * is not React state and does not exist during a server render, and this is the\n * shape React provides for exactly that. Reading it into `useState` inside an\n * effect would work and would also render the switch in the wrong position for\n * one frame on every visit.\n */\nexport function subscribeSound(onChange: () => void): () => void {\n window.addEventListener(CHANGED, onChange);\n window.addEventListener('storage', onChange);\n return () => {\n window.removeEventListener(CHANGED, onChange);\n window.removeEventListener('storage', onChange);\n };\n}\n\n/**\n * The knock. Band-passed noise, 30ms, gone before you can hear it as noise.\n *\n * This is the whole difference between a mechanism and a chime. `Q` is high so\n * the band is narrow — wide-band noise is a hiss, a narrow band is a body\n * resonating at one frequency, which is what a knock on an object actually is.\n */\nfunction knock(ac: AudioContext, at: number, freq: number, peak: number) {\n const src = ac.createBufferSource();\n src.buffer = noiseBuffer(ac);\n\n const band = ac.createBiquadFilter();\n band.type = 'bandpass';\n band.frequency.setValueAtTime(freq, at);\n band.Q.setValueAtTime(8, at);\n\n const gain = ac.createGain();\n gain.gain.setValueAtTime(0, at);\n gain.gain.linearRampToValueAtTime(peak, at + 0.002);\n gain.gain.exponentialRampToValueAtTime(0.0001, at + 0.03);\n\n src.connect(band).connect(gain).connect(ac.destination);\n src.start(at);\n src.stop(at + 0.06);\n}\n\n/**\n * The settle. A tone that arrives at its pitch instead of starting on it.\n *\n * `from` and `to` are the bend. A fifth of a semitone would be a tuning error;\n * these are wide enough to hear as movement and short enough that nothing ever\n * sounds out of tune, because it does not hold long enough to be judged.\n */\nfunction settle(\n ac: AudioContext,\n at: number,\n from: number,\n to: number,\n duration: number,\n peak: number,\n) {\n const osc = ac.createOscillator();\n osc.type = 'triangle';\n osc.frequency.setValueAtTime(from, at);\n osc.frequency.exponentialRampToValueAtTime(to, at + duration * 0.35);\n\n // Rolls the top off so it reads as wooden rather than electronic. A raw\n // triangle is bright enough to sound like a synth patch.\n const lp = ac.createBiquadFilter();\n lp.type = 'lowpass';\n lp.frequency.setValueAtTime(1800, at);\n\n const gain = ac.createGain();\n gain.gain.setValueAtTime(0, at);\n gain.gain.linearRampToValueAtTime(peak, at + 0.008);\n gain.gain.exponentialRampToValueAtTime(0.0001, at + duration);\n\n osc.connect(lp).connect(gain).connect(ac.destination);\n osc.start(at);\n osc.stop(at + duration + 0.02);\n}\n\n/**\n * The breath. Noise opening through a filter that sweeps up, then closes.\n *\n * No knock and no fundamental: nothing is latching, something is arriving. The\n * sweep is what carries it — a static filter would be a hiss, and it is the\n * MOVEMENT of the cutoff that the ear reads as something opening.\n */\nfunction breath(ac: AudioContext, at: number, duration: number, peak: number) {\n const src = ac.createBufferSource();\n src.buffer = noiseBuffer(ac);\n src.loop = true;\n\n const lp = ac.createBiquadFilter();\n lp.type = 'lowpass';\n lp.frequency.setValueAtTime(220, at);\n lp.frequency.exponentialRampToValueAtTime(2400, at + duration * 0.45);\n lp.frequency.exponentialRampToValueAtTime(500, at + duration);\n lp.Q.setValueAtTime(2, at);\n\n const gain = ac.createGain();\n gain.gain.setValueAtTime(0, at);\n gain.gain.linearRampToValueAtTime(peak, at + duration * 0.3);\n gain.gain.exponentialRampToValueAtTime(0.0001, at + duration);\n\n src.connect(lp).connect(gain).connect(ac.destination);\n src.start(at);\n src.stop(at + duration + 0.05);\n}\n\n/**\n * The dull one. A knock with the resonance choked out of it.\n *\n * `Q` low and the band low, so instead of a body ringing at one frequency you\n * get the sound of a body that cannot ring — a part that does not fit, damped\n * by the hand still holding it. It is the same gesture as `knock` with its\n * voice taken away, which is what makes the pair read as related rather than\n * as two different sounds.\n */\nfunction thud(ac: AudioContext, at: number, freq: number, peak: number) {\n const src = ac.createBufferSource();\n src.buffer = noiseBuffer(ac);\n\n const band = ac.createBiquadFilter();\n band.type = 'bandpass';\n band.frequency.setValueAtTime(freq, at);\n band.Q.setValueAtTime(1.6, at);\n\n const gain = ac.createGain();\n gain.gain.setValueAtTime(0, at);\n gain.gain.linearRampToValueAtTime(peak, at + 0.004);\n // 120ms of decay rather than 70. Rendered and measured, the old one was the\n // shortest sound in the set at 0.10s — the briefest, dullest thing in the\n // product marking the one event a merchant must not miss. Weight, not\n // volume: a heavier body that takes longer to stop moving reads as\n // consequence, where a louder click just reads as louder.\n gain.gain.exponentialRampToValueAtTime(0.0001, at + 0.12);\n\n src.connect(band).connect(gain).connect(ac.destination);\n src.start(at);\n src.stop(at + 0.16);\n}\n\n/**\n * The same events, felt rather than heard.\n *\n * HAPTICS FOLLOW IMPACTS, NOT BREATH. Every pattern here is the shape of its\n * own cue: `commit` is two taps 60ms apart because the sound is two knocks\n * 70ms apart, `refuse` is one long dull buzz because the sound is one damped\n * thud, and `potter` has no entry at all — a breath has no impact, and a\n * vibration under it would be the phone claiming something landed when\n * nothing did.\n *\n * They are SHORT. 6–30ms is a tick you feel in the finger rather than a buzz\n * that travels up the arm; anything longer reads as a notification, which is\n * the thing the whole sound design exists not to be.\n *\n * ANDROID ONLY, AND THAT IS NOT A BUG WE CAN FIX. iOS Safari does not\n * implement `navigator.vibrate` at all — there is no web API for the Taptic\n * Engine, only tricks involving hidden switch inputs that Apple has broken\n * before and will again. So this is a no-op on iPhone, deliberately, rather\n * than a hack that works until it does not. Android is most of these\n * merchants' phones anyway.\n */\nconst HAPTICS: Partial<Record<PotterSound, number | number[]>> = {\n 'record-start': 12,\n 'record-stop': 8,\n send: 6,\n // Land, then seat. The gap is the sound's own gap.\n commit: [12, 60, 18],\n refuse: 28,\n};\n\nfunction feel(sound: PotterSound) {\n const pattern = HAPTICS[sound];\n if (pattern === undefined) return;\n try {\n navigator.vibrate?.(pattern);\n } catch {\n /* a browser that refuses to buzz is not a reason to fail a click */\n }\n}\n\nexport function playSound(sound: PotterSound) {\n if (!soundEnabled()) return;\n // Felt before heard, and outside the audio guard: a phone on silent still\n // has a motor, and a merchant who muted the app's chirps in a shop did not\n // ask to lose the confirmation in their hand. It rides the same preference,\n // because both answer the same question — should this app make itself felt.\n feel(sound);\n const ac = audioContext();\n if (!ac) return;\n const now = ac.currentTime;\n\n switch (sound) {\n case 'record-start':\n // Knock, then a tone bending UP and staying: the latch has closed and\n // something is now open.\n knock(ac, now, 900, 0.05);\n settle(ac, now + 0.012, 220, 330, 0.26, 0.05);\n break;\n case 'record-stop':\n // The same knock, lower and duller, and the tone lets go downward.\n // Shorter overall — stopping needs confirming, not announcing.\n knock(ac, now, 620, 0.04);\n settle(ac, now + 0.012, 330, 210, 0.2, 0.04);\n break;\n case 'send':\n // Lighter and higher than the record knock, and the tone falls away with\n // nothing under it. Sending is a release, not an engagement: the hand\n // opens and the thing is somewhere else.\n knock(ac, now, 1500, 0.035);\n settle(ac, now + 0.008, 520, 360, 0.16, 0.035);\n break;\n case 'commit':\n // Two impacts, 70ms apart, the second lower — the sound of a thing\n // landing and then seating. The tone crosses both so they read as one\n // event rather than two clicks, and it bends UP because what just\n // happened is a thing being held rather than let go.\n knock(ac, now, 1100, 0.045);\n knock(ac, now + 0.07, 520, 0.05);\n settle(ac, now + 0.012, 200, 300, 0.38, 0.045);\n break;\n case 'refuse':\n // ONE impact still — nothing landed, so nothing seats, and the second\n // knock that `commit` has would say the opposite of what happened. What\n // changed is its weight: a lower body (260 rather than 320) decaying\n // over 120ms, with the tone sinking further and slower under it.\n // Still the shortest of the pitched cues, because an error should be\n // over before you have finished reading the message it belongs to — but\n // no longer so brief it reads as a tick.\n thud(ac, now, 260, 0.055);\n settle(ac, now + 0.01, 200, 120, 0.22, 0.042);\n break;\n case 'potter':\n // No knock. Nothing is engaging; something is waking up.\n breath(ac, now, 0.55, 0.045);\n // One quiet tone under it so the breath has a floor to open over —\n // without it the sweep reads as a sample loading rather than as a voice.\n settle(ac, now + 0.06, 160, 240, 0.5, 0.03);\n break;\n }\n}\n"],"mappings":";AAyDA,MAAM,cAAc;AAkBpB,IAAI,MAA2B;AAE/B,IAAI,QAA4B;AAEhC,SAAS,eAAoC;AAC3C,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,QAAM,OACJ,OAAO,gBACN,OACE;AACL,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,CAAC,IAAK,OAAM,IAAI,KAAK;AACzB,MAAI,IAAI,UAAU,YAAa,MAAK,IAAI,OAAO;AAC/C,SAAO;AACT;AAEA,SAAS,YAAY,IAA+B;AAClD,MAAI,MAAO,QAAO;AAClB,QAAM,SAAS,KAAK,MAAM,GAAG,aAAa,GAAG;AAC7C,QAAM,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU;AACpD,QAAM,OAAO,IAAI,eAAe,CAAC;AACjC,WAAS,IAAI,GAAG,IAAI,QAAQ,IAAK,MAAK,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI;AAC/D,UAAQ;AACR,SAAO;AACT;AAEO,SAAS,eAAwB;AACtC,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,MAAI;AAGF,WAAO,OAAO,aAAa,QAAQ,WAAW,MAAM;AAAA,EACtD,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,MAAM,UAAU;AAET,SAAS,gBAAgB,IAAa;AAC3C,MAAI;AACF,WAAO,aAAa,QAAQ,aAAa,KAAK,OAAO,KAAK;AAAA,EAC5D,QAAQ;AAAA,EAER;AAIA,SAAO,cAAc,IAAI,MAAM,OAAO,CAAC;AACzC;AAWO,SAAS,eAAe,UAAkC;AAC/D,SAAO,iBAAiB,SAAS,QAAQ;AACzC,SAAO,iBAAiB,WAAW,QAAQ;AAC3C,SAAO,MAAM;AACX,WAAO,oBAAoB,SAAS,QAAQ;AAC5C,WAAO,oBAAoB,WAAW,QAAQ;AAAA,EAChD;AACF;AASA,SAAS,MAAM,IAAkB,IAAY,MAAc,MAAc;AACvE,QAAM,MAAM,GAAG,mBAAmB;AAClC,MAAI,SAAS,YAAY,EAAE;AAE3B,QAAM,OAAO,GAAG,mBAAmB;AACnC,OAAK,OAAO;AACZ,OAAK,UAAU,eAAe,MAAM,EAAE;AACtC,OAAK,EAAE,eAAe,GAAG,EAAE;AAE3B,QAAM,OAAO,GAAG,WAAW;AAC3B,OAAK,KAAK,eAAe,GAAG,EAAE;AAC9B,OAAK,KAAK,wBAAwB,MAAM,KAAK,IAAK;AAClD,OAAK,KAAK,6BAA6B,MAAQ,KAAK,IAAI;AAExD,MAAI,QAAQ,IAAI,EAAE,QAAQ,IAAI,EAAE,QAAQ,GAAG,WAAW;AACtD,MAAI,MAAM,EAAE;AACZ,MAAI,KAAK,KAAK,IAAI;AACpB;AASA,SAAS,OACP,IACA,IACA,MACA,IACA,UACA,MACA;AACA,QAAM,MAAM,GAAG,iBAAiB;AAChC,MAAI,OAAO;AACX,MAAI,UAAU,eAAe,MAAM,EAAE;AACrC,MAAI,UAAU,6BAA6B,IAAI,KAAK,WAAW,IAAI;AAInE,QAAM,KAAK,GAAG,mBAAmB;AACjC,KAAG,OAAO;AACV,KAAG,UAAU,eAAe,MAAM,EAAE;AAEpC,QAAM,OAAO,GAAG,WAAW;AAC3B,OAAK,KAAK,eAAe,GAAG,EAAE;AAC9B,OAAK,KAAK,wBAAwB,MAAM,KAAK,IAAK;AAClD,OAAK,KAAK,6BAA6B,MAAQ,KAAK,QAAQ;AAE5D,MAAI,QAAQ,EAAE,EAAE,QAAQ,IAAI,EAAE,QAAQ,GAAG,WAAW;AACpD,MAAI,MAAM,EAAE;AACZ,MAAI,KAAK,KAAK,WAAW,IAAI;AAC/B;AASA,SAAS,OAAO,IAAkB,IAAY,UAAkB,MAAc;AAC5E,QAAM,MAAM,GAAG,mBAAmB;AAClC,MAAI,SAAS,YAAY,EAAE;AAC3B,MAAI,OAAO;AAEX,QAAM,KAAK,GAAG,mBAAmB;AACjC,KAAG,OAAO;AACV,KAAG,UAAU,eAAe,KAAK,EAAE;AACnC,KAAG,UAAU,6BAA6B,MAAM,KAAK,WAAW,IAAI;AACpE,KAAG,UAAU,6BAA6B,KAAK,KAAK,QAAQ;AAC5D,KAAG,EAAE,eAAe,GAAG,EAAE;AAEzB,QAAM,OAAO,GAAG,WAAW;AAC3B,OAAK,KAAK,eAAe,GAAG,EAAE;AAC9B,OAAK,KAAK,wBAAwB,MAAM,KAAK,WAAW,GAAG;AAC3D,OAAK,KAAK,6BAA6B,MAAQ,KAAK,QAAQ;AAE5D,MAAI,QAAQ,EAAE,EAAE,QAAQ,IAAI,EAAE,QAAQ,GAAG,WAAW;AACpD,MAAI,MAAM,EAAE;AACZ,MAAI,KAAK,KAAK,WAAW,IAAI;AAC/B;AAWA,SAAS,KAAK,IAAkB,IAAY,MAAc,MAAc;AACtE,QAAM,MAAM,GAAG,mBAAmB;AAClC,MAAI,SAAS,YAAY,EAAE;AAE3B,QAAM,OAAO,GAAG,mBAAmB;AACnC,OAAK,OAAO;AACZ,OAAK,UAAU,eAAe,MAAM,EAAE;AACtC,OAAK,EAAE,eAAe,KAAK,EAAE;AAE7B,QAAM,OAAO,GAAG,WAAW;AAC3B,OAAK,KAAK,eAAe,GAAG,EAAE;AAC9B,OAAK,KAAK,wBAAwB,MAAM,KAAK,IAAK;AAMlD,OAAK,KAAK,6BAA6B,MAAQ,KAAK,IAAI;AAExD,MAAI,QAAQ,IAAI,EAAE,QAAQ,IAAI,EAAE,QAAQ,GAAG,WAAW;AACtD,MAAI,MAAM,EAAE;AACZ,MAAI,KAAK,KAAK,IAAI;AACpB;AAuBA,MAAM,UAA2D;AAAA,EAC/D,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,MAAM;AAAA;AAAA,EAEN,QAAQ,CAAC,IAAI,IAAI,EAAE;AAAA,EACnB,QAAQ;AACV;AAEA,SAAS,KAAK,OAAoB;AAChC,QAAM,UAAU,QAAQ,KAAK;AAC7B,MAAI,YAAY,OAAW;AAC3B,MAAI;AACF,cAAU,UAAU,OAAO;AAAA,EAC7B,QAAQ;AAAA,EAER;AACF;AAEO,SAAS,UAAU,OAAoB;AAC5C,MAAI,CAAC,aAAa,EAAG;AAKrB,OAAK,KAAK;AACV,QAAM,KAAK,aAAa;AACxB,MAAI,CAAC,GAAI;AACT,QAAM,MAAM,GAAG;AAEf,UAAQ,OAAO;AAAA,IACb,KAAK;AAGH,YAAM,IAAI,KAAK,KAAK,IAAI;AACxB,aAAO,IAAI,MAAM,OAAO,KAAK,KAAK,MAAM,IAAI;AAC5C;AAAA,IACF,KAAK;AAGH,YAAM,IAAI,KAAK,KAAK,IAAI;AACxB,aAAO,IAAI,MAAM,OAAO,KAAK,KAAK,KAAK,IAAI;AAC3C;AAAA,IACF,KAAK;AAIH,YAAM,IAAI,KAAK,MAAM,KAAK;AAC1B,aAAO,IAAI,MAAM,MAAO,KAAK,KAAK,MAAM,KAAK;AAC7C;AAAA,IACF,KAAK;AAKH,YAAM,IAAI,KAAK,MAAM,KAAK;AAC1B,YAAM,IAAI,MAAM,MAAM,KAAK,IAAI;AAC/B,aAAO,IAAI,MAAM,OAAO,KAAK,KAAK,MAAM,KAAK;AAC7C;AAAA,IACF,KAAK;AAQH,WAAK,IAAI,KAAK,KAAK,KAAK;AACxB,aAAO,IAAI,MAAM,MAAM,KAAK,KAAK,MAAM,KAAK;AAC5C;AAAA,IACF,KAAK;AAEH,aAAO,IAAI,KAAK,MAAM,KAAK;AAG3B,aAAO,IAAI,MAAM,MAAM,KAAK,KAAK,KAAK,IAAI;AAC1C;AAAA,EACJ;AACF;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { makeArrival } from "./arrival";
|
|
2
|
+
const staffArrival = makeArrival("pb_staff_arrival");
|
|
3
|
+
const flagStaffArrival = staffArrival.flag;
|
|
4
|
+
const takeStaffArrival = staffArrival.take;
|
|
5
|
+
const endStaffArrival = staffArrival.end;
|
|
6
|
+
export {
|
|
7
|
+
endStaffArrival,
|
|
8
|
+
flagStaffArrival,
|
|
9
|
+
takeStaffArrival
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=staff-arrival.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/staff-arrival.ts"],"sourcesContent":["/**\n * Remembering that somebody has just joined, so they can be welcomed once.\n *\n * The accept screen redirects and that is the end of it. Twenty seconds earlier\n * this person committed to a job; a moment later they are looking at a work\n * queue with no acknowledgement that anything happened. It is the highest-stakes\n * moment anyone spends in Box and it currently ends in a page load.\n *\n * Stored rather than derived. `joinedAt` looks like the obvious source, but it\n * would greet somebody every time they signed in on their first day — and on a\n * shared counter phone, greet whoever opened it next. A flag written by the\n * accept screen and cleared on read fires exactly once, for the person who was\n * actually there.\n *\n * A plain flag rather than a workspace slug. Accepting clears the stored\n * workspace and does a full reload, so the very next dashboard load IS the\n * business they just joined — carrying a slug would mean adding a field to the\n * peek response to say something the flow already guarantees.\n *\n * sessionStorage, not local: a welcome should not survive into a new tab\n * opened tomorrow.\n */\nimport { makeArrival } from './arrival';\n\n/**\n * The mechanism is `arrival`; this file is only which flag and who reads it.\n * A plain flag rather than a workspace slug: accepting clears the stored\n * workspace and does a full reload, so the very next dashboard load IS the\n * business they just joined.\n */\nconst staffArrival = makeArrival('pb_staff_arrival');\n\nexport const flagStaffArrival = staffArrival.flag;\nexport const takeStaffArrival = staffArrival.take;\nexport const endStaffArrival = staffArrival.end;\n"],"mappings":"AAsBA,SAAS,mBAAmB;AAQ5B,MAAM,eAAe,YAAY,kBAAkB;AAE5C,MAAM,mBAAmB,aAAa;AACtC,MAAM,mBAAmB,aAAa;AACtC,MAAM,kBAAkB,aAAa;","names":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { PermissionKey } from './use-permissions';
|
|
2
|
+
/**
|
|
3
|
+
* Where a person who is not the owner should land.
|
|
4
|
+
*
|
|
5
|
+
* Resolved from PERMISSIONS, deliberately, and not from the job-role preset
|
|
6
|
+
* they were invited with. The preset is expanded into a permission map at invite
|
|
7
|
+
* time — `permissionsForRole` in `team-roles.ts` — and the preset id itself is
|
|
8
|
+
* not what the api stores. Reading permissions instead means this also works for
|
|
9
|
+
* a role somebody hand-edited in the roles manager, which no preset id describes.
|
|
10
|
+
*
|
|
11
|
+
* The order is the claim: earlier entries are more specific statements about
|
|
12
|
+
* what a person's shift starts with. Front desk and Fulfillment both hold the
|
|
13
|
+
* orders grant, so what separates them is the business — a bookable business's
|
|
14
|
+
* order queue IS its arrivals list, and Today is the screen for it.
|
|
15
|
+
*
|
|
16
|
+
* Two rules run through the whole list, and they are the same rule twice:
|
|
17
|
+
*
|
|
18
|
+
* A grant held in order to do the job is not the job. Content & site carries
|
|
19
|
+
* `canViewProducts` to reference a product while editing a page; Support
|
|
20
|
+
* carries `canViewOrders` to answer "where is my order". Neither of them
|
|
21
|
+
* works a product list or an order queue, and ranking on the grant alone
|
|
22
|
+
* sent both of them to somebody else's screen.
|
|
23
|
+
*
|
|
24
|
+
* Reading is not staffing. Every doing-screen here asks for `canManageOrders`
|
|
25
|
+
* rather than either orders grant, because a person who can only look at the
|
|
26
|
+
* queue is not the person working it.
|
|
27
|
+
*/
|
|
28
|
+
export interface StaffHomeCandidate {
|
|
29
|
+
href: string;
|
|
30
|
+
/** Any-of. Empty is never used; the fallback is explicit at the bottom. */
|
|
31
|
+
needs: PermissionKey[];
|
|
32
|
+
/** Any-of. Omitted means the destination suits any business. */
|
|
33
|
+
behaviors?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Any-of, and disqualifying. A candidate can be right for a job and wrong for
|
|
36
|
+
* the business running it, which `behaviors` alone cannot say: "billable"
|
|
37
|
+
* describes both a firm whose product is the invoice and a shop that
|
|
38
|
+
* occasionally bills someone, and only the first one starts its day there.
|
|
39
|
+
*/
|
|
40
|
+
unless?: {
|
|
41
|
+
behaviors?: string[];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const STAFF_HOME_CANDIDATES: StaffHomeCandidate[];
|
|
45
|
+
/** The home every owner gets, and the floor for anyone the list cannot place. */
|
|
46
|
+
export declare const DEFAULT_HOME = "/dashboard";
|
|
47
|
+
/**
|
|
48
|
+
* The first destination this person can actually use.
|
|
49
|
+
*
|
|
50
|
+
* Returns `DEFAULT_HOME` when nothing matches rather than throwing or returning
|
|
51
|
+
* null: a member with an empty permission map is a real state (an invite whose
|
|
52
|
+
* role was later stripped), and the honest response is the ordinary home, which
|
|
53
|
+
* will show them an empty shell rather than a broken route.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveStaffHome({ can, behaviors, }: {
|
|
56
|
+
can: (permission: PermissionKey) => boolean;
|
|
57
|
+
behaviors: readonly string[];
|
|
58
|
+
}): string;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const STAFF_HOME_CANDIDATES = [
|
|
2
|
+
// The day, for a business whose work arrives at a time. Managing, not
|
|
3
|
+
// viewing: Today is a screen you do things on — check people in, take the
|
|
4
|
+
// payment — and somebody who can only read the queue is not running the door.
|
|
5
|
+
{
|
|
6
|
+
// The day board, which is a view of the queue rather than a screen beside
|
|
7
|
+
// it now. Managing, not viewing: this is where people are checked in and
|
|
8
|
+
// paid for, and somebody who can only read the queue is not running the
|
|
9
|
+
// door.
|
|
10
|
+
href: "/dashboard/bookings?view=today",
|
|
11
|
+
needs: ["canManageOrders"],
|
|
12
|
+
behaviors: ["bookable", "rentable"]
|
|
13
|
+
},
|
|
14
|
+
// A shipping business's orders list IS a pack queue, but only once it is
|
|
15
|
+
// narrowed. Unnarrowed it is every order the business has ever taken, which
|
|
16
|
+
// is the owner's list wearing a packer's name.
|
|
17
|
+
{
|
|
18
|
+
href: "/dashboard/orders?fulfillment=unfulfilled",
|
|
19
|
+
needs: ["canManageOrders"],
|
|
20
|
+
behaviors: ["shippable"]
|
|
21
|
+
},
|
|
22
|
+
// For a firm whose product IS the invoice, this is the order queue — the
|
|
23
|
+
// thing they write, send, chase and get paid for. The archetype already
|
|
24
|
+
// points its own Billing nav row here rather than at the Payments hub.
|
|
25
|
+
//
|
|
26
|
+
// Excluded the moment the business sells anything else: then an invoice is a
|
|
27
|
+
// stage of the money pipeline rather than the work, the order list is the
|
|
28
|
+
// work, and the Payments hub is where the stage belongs. Note this reaches
|
|
29
|
+
// people without `canViewFinance` on purpose — chasing what a customer owes
|
|
30
|
+
// is an amount, not the state of the business's money.
|
|
31
|
+
{
|
|
32
|
+
href: "/dashboard/invoices",
|
|
33
|
+
needs: ["canManageOrders"],
|
|
34
|
+
behaviors: ["billable"],
|
|
35
|
+
unless: {
|
|
36
|
+
behaviors: ["sellable", "shippable", "bookable", "rentable", "ticketed"]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// Otherwise the queue of things to do.
|
|
40
|
+
{ href: "/dashboard/orders", needs: ["canManageOrders"] },
|
|
41
|
+
// Nobody with only the messages grant should be dropped on an order list —
|
|
42
|
+
// and neither should Support, whose whole job is this screen and who holds
|
|
43
|
+
// the orders grant only so an answer can cite the order.
|
|
44
|
+
{
|
|
45
|
+
href: "/dashboard/inbox",
|
|
46
|
+
needs: ["canViewCommunications", "canManageCommunications"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
href: "/dashboard/customers",
|
|
50
|
+
needs: ["canViewMembers", "canManageMembers"]
|
|
51
|
+
},
|
|
52
|
+
// Above the catalog on purpose. The Content & site preset carries
|
|
53
|
+
// `canViewProducts` so it can reference products while editing a page, and
|
|
54
|
+
// ranking the catalog first sent someone whose whole job is the website to a
|
|
55
|
+
// product list they are not allowed to change.
|
|
56
|
+
{
|
|
57
|
+
href: "/dashboard/business",
|
|
58
|
+
needs: ["canManageEditor", "canManageBusinessProfile", "canManageBlog"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
href: "/dashboard/catalog",
|
|
62
|
+
needs: ["canViewProducts", "canManageProducts"]
|
|
63
|
+
},
|
|
64
|
+
// Last, and view-only. Somebody whose entire grant is reading orders has one
|
|
65
|
+
// screen, and it is this one; every candidate above wanted a job they cannot
|
|
66
|
+
// do. Reached only after the doing-screens and the answering-screens have
|
|
67
|
+
// all declined, so it never intercepts a person with a real desk.
|
|
68
|
+
{ href: "/dashboard/orders", needs: ["canViewOrders"] }
|
|
69
|
+
];
|
|
70
|
+
const DEFAULT_HOME = "/dashboard";
|
|
71
|
+
function resolveStaffHome({
|
|
72
|
+
can,
|
|
73
|
+
behaviors
|
|
74
|
+
}) {
|
|
75
|
+
const enabled = new Set(behaviors);
|
|
76
|
+
for (const candidate of STAFF_HOME_CANDIDATES) {
|
|
77
|
+
if (candidate.behaviors && !candidate.behaviors.some((b) => enabled.has(b)))
|
|
78
|
+
continue;
|
|
79
|
+
if (candidate.unless?.behaviors?.some((b) => enabled.has(b))) continue;
|
|
80
|
+
if (candidate.needs.some((permission) => can(permission)))
|
|
81
|
+
return candidate.href;
|
|
82
|
+
}
|
|
83
|
+
return DEFAULT_HOME;
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
DEFAULT_HOME,
|
|
87
|
+
STAFF_HOME_CANDIDATES,
|
|
88
|
+
resolveStaffHome
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=staff-home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/staff-home.ts"],"sourcesContent":["import type { PermissionKey } from './use-permissions';\n\n/**\n * Where a person who is not the owner should land.\n *\n * Resolved from PERMISSIONS, deliberately, and not from the job-role preset\n * they were invited with. The preset is expanded into a permission map at invite\n * time — `permissionsForRole` in `team-roles.ts` — and the preset id itself is\n * not what the api stores. Reading permissions instead means this also works for\n * a role somebody hand-edited in the roles manager, which no preset id describes.\n *\n * The order is the claim: earlier entries are more specific statements about\n * what a person's shift starts with. Front desk and Fulfillment both hold the\n * orders grant, so what separates them is the business — a bookable business's\n * order queue IS its arrivals list, and Today is the screen for it.\n *\n * Two rules run through the whole list, and they are the same rule twice:\n *\n * A grant held in order to do the job is not the job. Content & site carries\n * `canViewProducts` to reference a product while editing a page; Support\n * carries `canViewOrders` to answer \"where is my order\". Neither of them\n * works a product list or an order queue, and ranking on the grant alone\n * sent both of them to somebody else's screen.\n *\n * Reading is not staffing. Every doing-screen here asks for `canManageOrders`\n * rather than either orders grant, because a person who can only look at the\n * queue is not the person working it.\n */\nexport interface StaffHomeCandidate {\n href: string;\n /** Any-of. Empty is never used; the fallback is explicit at the bottom. */\n needs: PermissionKey[];\n /** Any-of. Omitted means the destination suits any business. */\n behaviors?: string[];\n /**\n * Any-of, and disqualifying. A candidate can be right for a job and wrong for\n * the business running it, which `behaviors` alone cannot say: \"billable\"\n * describes both a firm whose product is the invoice and a shop that\n * occasionally bills someone, and only the first one starts its day there.\n */\n unless?: { behaviors?: string[] };\n}\n\nexport const STAFF_HOME_CANDIDATES: StaffHomeCandidate[] = [\n // The day, for a business whose work arrives at a time. Managing, not\n // viewing: Today is a screen you do things on — check people in, take the\n // payment — and somebody who can only read the queue is not running the door.\n {\n // The day board, which is a view of the queue rather than a screen beside\n // it now. Managing, not viewing: this is where people are checked in and\n // paid for, and somebody who can only read the queue is not running the\n // door.\n href: '/dashboard/bookings?view=today',\n needs: ['canManageOrders'],\n behaviors: ['bookable', 'rentable'],\n },\n // A shipping business's orders list IS a pack queue, but only once it is\n // narrowed. Unnarrowed it is every order the business has ever taken, which\n // is the owner's list wearing a packer's name.\n {\n href: '/dashboard/orders?fulfillment=unfulfilled',\n needs: ['canManageOrders'],\n behaviors: ['shippable'],\n },\n // For a firm whose product IS the invoice, this is the order queue — the\n // thing they write, send, chase and get paid for. The archetype already\n // points its own Billing nav row here rather than at the Payments hub.\n //\n // Excluded the moment the business sells anything else: then an invoice is a\n // stage of the money pipeline rather than the work, the order list is the\n // work, and the Payments hub is where the stage belongs. Note this reaches\n // people without `canViewFinance` on purpose — chasing what a customer owes\n // is an amount, not the state of the business's money.\n {\n href: '/dashboard/invoices',\n needs: ['canManageOrders'],\n behaviors: ['billable'],\n unless: {\n behaviors: ['sellable', 'shippable', 'bookable', 'rentable', 'ticketed'],\n },\n },\n // Otherwise the queue of things to do.\n { href: '/dashboard/orders', needs: ['canManageOrders'] },\n // Nobody with only the messages grant should be dropped on an order list —\n // and neither should Support, whose whole job is this screen and who holds\n // the orders grant only so an answer can cite the order.\n {\n href: '/dashboard/inbox',\n needs: ['canViewCommunications', 'canManageCommunications'],\n },\n {\n href: '/dashboard/customers',\n needs: ['canViewMembers', 'canManageMembers'],\n },\n // Above the catalog on purpose. The Content & site preset carries\n // `canViewProducts` so it can reference products while editing a page, and\n // ranking the catalog first sent someone whose whole job is the website to a\n // product list they are not allowed to change.\n {\n href: '/dashboard/business',\n needs: ['canManageEditor', 'canManageBusinessProfile', 'canManageBlog'],\n },\n {\n href: '/dashboard/catalog',\n needs: ['canViewProducts', 'canManageProducts'],\n },\n // Last, and view-only. Somebody whose entire grant is reading orders has one\n // screen, and it is this one; every candidate above wanted a job they cannot\n // do. Reached only after the doing-screens and the answering-screens have\n // all declined, so it never intercepts a person with a real desk.\n { href: '/dashboard/orders', needs: ['canViewOrders'] },\n];\n\n/** The home every owner gets, and the floor for anyone the list cannot place. */\nexport const DEFAULT_HOME = '/dashboard';\n\n/**\n * The first destination this person can actually use.\n *\n * Returns `DEFAULT_HOME` when nothing matches rather than throwing or returning\n * null: a member with an empty permission map is a real state (an invite whose\n * role was later stripped), and the honest response is the ordinary home, which\n * will show them an empty shell rather than a broken route.\n */\nexport function resolveStaffHome({\n can,\n behaviors,\n}: {\n can: (permission: PermissionKey) => boolean;\n behaviors: readonly string[];\n}): string {\n const enabled = new Set(behaviors);\n\n for (const candidate of STAFF_HOME_CANDIDATES) {\n if (candidate.behaviors && !candidate.behaviors.some((b) => enabled.has(b)))\n continue;\n if (candidate.unless?.behaviors?.some((b) => enabled.has(b))) continue;\n if (candidate.needs.some((permission) => can(permission)))\n return candidate.href;\n }\n\n return DEFAULT_HOME;\n}\n"],"mappings":"AA2CO,MAAM,wBAA8C;AAAA;AAAA;AAAA;AAAA,EAIzD;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE,MAAM;AAAA,IACN,OAAO,CAAC,iBAAiB;AAAA,IACzB,WAAW,CAAC,YAAY,UAAU;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,iBAAiB;AAAA,IACzB,WAAW,CAAC,WAAW;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,iBAAiB;AAAA,IACzB,WAAW,CAAC,UAAU;AAAA,IACtB,QAAQ;AAAA,MACN,WAAW,CAAC,YAAY,aAAa,YAAY,YAAY,UAAU;AAAA,IACzE;AAAA,EACF;AAAA;AAAA,EAEA,EAAE,MAAM,qBAAqB,OAAO,CAAC,iBAAiB,EAAE;AAAA;AAAA;AAAA;AAAA,EAIxD;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,yBAAyB,yBAAyB;AAAA,EAC5D;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,kBAAkB,kBAAkB;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,mBAAmB,4BAA4B,eAAe;AAAA,EACxE;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,mBAAmB,mBAAmB;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,EAAE,MAAM,qBAAqB,OAAO,CAAC,eAAe,EAAE;AACxD;AAGO,MAAM,eAAe;AAUrB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AACF,GAGW;AACT,QAAM,UAAU,IAAI,IAAI,SAAS;AAEjC,aAAW,aAAa,uBAAuB;AAC7C,QAAI,UAAU,aAAa,CAAC,UAAU,UAAU,KAAK,CAAC,MAAM,QAAQ,IAAI,CAAC,CAAC;AACxE;AACF,QAAI,UAAU,QAAQ,WAAW,KAAK,CAAC,MAAM,QAAQ,IAAI,CAAC,CAAC,EAAG;AAC9D,QAAI,UAAU,MAAM,KAAK,CAAC,eAAe,IAAI,UAAU,CAAC;AACtD,aAAO,UAAU;AAAA,EACrB;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shouldSendStaffHome(): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const KEY = "pb_staff_landed";
|
|
2
|
+
function shouldSendStaffHome() {
|
|
3
|
+
if (typeof window === "undefined") return false;
|
|
4
|
+
try {
|
|
5
|
+
if (window.sessionStorage.getItem(KEY) === "1") return false;
|
|
6
|
+
window.sessionStorage.setItem(KEY, "1");
|
|
7
|
+
return true;
|
|
8
|
+
} catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
shouldSendStaffHome
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=staff-landing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/staff-landing.ts"],"sourcesContent":["/**\n * Sending somebody to their own screen once, rather than every time.\n *\n * The home redirects a non-owner to the surface their permissions describe,\n * which is right on arrival — nobody should be dropped on \"how is the business\n * doing\" as their first frame. It was wrong every time after that: the sidebar\n * offers Home, a staff member clicks it, and the page bounces them straight\n * back to Orders. A row that cannot be opened is a row that should not be\n * there, and the answer is not to take Home away from staff; it is to stop\n * treating a deliberate click as an arrival.\n *\n * One send per tab. A new tab is a new arrival, which is the honest reading:\n * they opened Box, they have not chosen anything yet.\n *\n * sessionStorage, and consumed on read — the same shape as the staff-arrival\n * welcome, for the same reason. Storage that throws (private mode) resolves to\n * \"already sent\", so the failure mode is a merchant seeing the home rather than\n * a redirect they cannot escape.\n */\nconst KEY = 'pb_staff_landed';\n\nexport function shouldSendStaffHome(): boolean {\n if (typeof window === 'undefined') return false;\n try {\n if (window.sessionStorage.getItem(KEY) === '1') return false;\n window.sessionStorage.setItem(KEY, '1');\n return true;\n } catch {\n return false;\n }\n}\n"],"mappings":"AAmBA,MAAM,MAAM;AAEL,SAAS,sBAA+B;AAC7C,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,MAAI;AACF,QAAI,OAAO,eAAe,QAAQ,GAAG,MAAM,IAAK,QAAO;AACvD,WAAO,eAAe,QAAQ,KAAK,GAAG;AACtC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical stat-card type contract, owned by @withpotter/lib so intent/config code
|
|
4
|
+
* can reference it without depending on the @withpotter/ui-kit component. The StatCard
|
|
5
|
+
* component (in @withpotter/ui-kit) implements these props and maps each IconVariant to
|
|
6
|
+
* its theme classes.
|
|
7
|
+
*/
|
|
8
|
+
export type IconVariant = 'default' | 'success' | 'error' | 'warning' | 'info' | 'accent' | 'muted';
|
|
9
|
+
export interface StatCardProps {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string | number;
|
|
12
|
+
subtext?: string;
|
|
13
|
+
icon?: LucideIcon | React.ElementType;
|
|
14
|
+
iconVariant?: IconVariant;
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Percentage change — positive = green ↑, negative = red ↓ */
|
|
17
|
+
change?: number | null;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=stat-card-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What "low on stock" means, in one place.
|
|
3
|
+
*
|
|
4
|
+
* Three screens had their own copy of the arithmetic and they did not agree.
|
|
5
|
+
* The catalogue and the product record both required `trackInventory`, both
|
|
6
|
+
* subtracted `reserved`, and both treated sold-out as a different state. The
|
|
7
|
+
* home's copy required none of it — so a business that does not track stock at
|
|
8
|
+
* all counted every catalogue row as low, because `lowStockThreshold` defaults
|
|
9
|
+
* to 5 and an untracked item sits at quantity 0.
|
|
10
|
+
*
|
|
11
|
+
* The visible result: a spa opened Box to a permanent red blocker reading
|
|
12
|
+
* "10 services low on stock — Restock before it sells out", over services that
|
|
13
|
+
* have no stock to run out of and no way to clear the alert.
|
|
14
|
+
*/
|
|
15
|
+
export interface StockLevel {
|
|
16
|
+
quantity?: number | null;
|
|
17
|
+
reserved?: number | null;
|
|
18
|
+
lowStockThreshold?: number | null;
|
|
19
|
+
trackInventory?: boolean | null;
|
|
20
|
+
}
|
|
21
|
+
/** On hand minus what is already promised to an order. */
|
|
22
|
+
export declare function availableStock(item: StockLevel): number;
|
|
23
|
+
/**
|
|
24
|
+
* Running low, but not yet out.
|
|
25
|
+
*
|
|
26
|
+
* Untracked items are never low: an inventory question asked of something that
|
|
27
|
+
* keeps no inventory has no true answer, and answering it anyway is how the
|
|
28
|
+
* blocker above got written.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isLowStock(item: StockLevel): boolean;
|
|
31
|
+
/** Tracked, and there is none left. */
|
|
32
|
+
export declare function isOutOfStock(item: StockLevel): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function availableStock(item) {
|
|
2
|
+
return (item.quantity || 0) - (item.reserved || 0);
|
|
3
|
+
}
|
|
4
|
+
function isLowStock(item) {
|
|
5
|
+
if (!item.trackInventory) return false;
|
|
6
|
+
const available = availableStock(item);
|
|
7
|
+
return available > 0 && available <= (item.lowStockThreshold || 5);
|
|
8
|
+
}
|
|
9
|
+
function isOutOfStock(item) {
|
|
10
|
+
return Boolean(item.trackInventory) && availableStock(item) <= 0;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
availableStock,
|
|
14
|
+
isLowStock,
|
|
15
|
+
isOutOfStock
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=stock-levels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/stock-levels.ts"],"sourcesContent":["/**\n * What \"low on stock\" means, in one place.\n *\n * Three screens had their own copy of the arithmetic and they did not agree.\n * The catalogue and the product record both required `trackInventory`, both\n * subtracted `reserved`, and both treated sold-out as a different state. The\n * home's copy required none of it — so a business that does not track stock at\n * all counted every catalogue row as low, because `lowStockThreshold` defaults\n * to 5 and an untracked item sits at quantity 0.\n *\n * The visible result: a spa opened Box to a permanent red blocker reading\n * \"10 services low on stock — Restock before it sells out\", over services that\n * have no stock to run out of and no way to clear the alert.\n */\n\nexport interface StockLevel {\n quantity?: number | null;\n reserved?: number | null;\n lowStockThreshold?: number | null;\n trackInventory?: boolean | null;\n}\n\n/** On hand minus what is already promised to an order. */\nexport function availableStock(item: StockLevel): number {\n return (item.quantity || 0) - (item.reserved || 0);\n}\n\n/**\n * Running low, but not yet out.\n *\n * Untracked items are never low: an inventory question asked of something that\n * keeps no inventory has no true answer, and answering it anyway is how the\n * blocker above got written.\n */\nexport function isLowStock(item: StockLevel): boolean {\n if (!item.trackInventory) return false;\n const available = availableStock(item);\n return available > 0 && available <= (item.lowStockThreshold || 5);\n}\n\n/** Tracked, and there is none left. */\nexport function isOutOfStock(item: StockLevel): boolean {\n return Boolean(item.trackInventory) && availableStock(item) <= 0;\n}\n"],"mappings":"AAuBO,SAAS,eAAe,MAA0B;AACvD,UAAQ,KAAK,YAAY,MAAM,KAAK,YAAY;AAClD;AASO,SAAS,WAAW,MAA2B;AACpD,MAAI,CAAC,KAAK,eAAgB,QAAO;AACjC,QAAM,YAAY,eAAe,IAAI;AACrC,SAAO,YAAY,KAAK,cAAc,KAAK,qBAAqB;AAClE;AAGO,SAAS,aAAa,MAA2B;AACtD,SAAO,QAAQ,KAAK,cAAc,KAAK,eAAe,IAAI,KAAK;AACjE;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function removeLegacyToken(): void;
|