@proveanything/smartlinks 2.1.41 → 2.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +754 -754
- package/dist/README.md +573 -573
- package/dist/adminCardsView.js +55 -55
- package/dist/adminViews.js +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/product.d.ts +2 -1
- package/dist/api/product.js +2 -1
- package/dist/api/subscriptions.d.ts +97 -0
- package/dist/api/subscriptions.js +178 -0
- package/dist/baseline.css +194 -194
- package/dist/docs/API_SUMMARY.md +1135 -832
- package/dist/docs/admin-cards.md +189 -189
- package/dist/docs/admin-views.md +9 -4
- package/dist/docs/agent-tools.md +156 -156
- package/dist/docs/ai-tools-and-skills.md +180 -180
- package/dist/docs/ai.md +1721 -1721
- package/dist/docs/analytics.md +39 -39
- package/dist/docs/app-data-storage.md +277 -277
- package/dist/docs/app-docs.md +73 -73
- package/dist/docs/app-manifest.md +852 -852
- package/dist/docs/app-records-pattern.md +388 -388
- package/dist/docs/appConfig.md +550 -550
- package/dist/docs/assistant-apps.md +172 -172
- package/dist/docs/assistant-context.md +119 -119
- package/dist/docs/bookings.md +442 -442
- package/dist/docs/comms.md +686 -686
- package/dist/docs/connectors.md +340 -340
- package/dist/docs/css-baseline.md +133 -133
- package/dist/docs/customer-guide.md +70 -70
- package/dist/docs/deploying-apps.md +340 -340
- package/dist/docs/entitlements.md +90 -90
- package/dist/docs/files.md +69 -69
- package/dist/docs/host-dependency-contract.md +210 -210
- package/dist/docs/i18n.md +9 -0
- package/dist/docs/integrations.md +322 -322
- package/dist/docs/interactions.md +545 -545
- package/dist/docs/item-context.md +181 -181
- package/dist/docs/knowledge.md +102 -102
- package/dist/docs/lots.md +111 -111
- package/dist/docs/loyalty.md +352 -352
- package/dist/docs/members.md +183 -182
- package/dist/docs/memberships.md +149 -0
- package/dist/docs/mobile-admin-container.md +693 -693
- package/dist/docs/operations.md +281 -281
- package/dist/docs/overview.md +483 -482
- package/dist/docs/proof-comms-triggers.md +142 -142
- package/dist/docs/proof-ownership-transfer.md +155 -155
- package/dist/docs/proof-product-data-scoping.md +462 -462
- package/dist/docs/proof-share-grants.md +305 -305
- package/dist/docs/realtime.md +138 -138
- package/dist/docs/records-admin-pattern.md +304 -304
- package/dist/docs/server-functions.md +1 -0
- package/dist/docs/standard-query.md +187 -187
- package/dist/docs/tag-codes.md +97 -97
- package/dist/docs/theme-tokens.md +252 -252
- package/dist/docs/wallet-passes.md +107 -107
- package/dist/docs/websites.md +123 -123
- package/dist/i18n.d.ts +6 -0
- package/dist/i18n.js +10 -0
- package/dist/openapi.yaml +426 -3
- package/dist/theme-boot.js +82 -78
- package/dist/theme.css +75 -75
- package/dist/types/appManifest.d.ts +32 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/subscriptions.d.ts +195 -0
- package/dist/types/subscriptions.js +9 -0
- package/docs/API_SUMMARY.md +1135 -832
- package/docs/admin-cards.md +189 -189
- package/docs/admin-views.md +9 -4
- package/docs/agent-tools.md +156 -156
- package/docs/ai-tools-and-skills.md +180 -180
- package/docs/ai.md +1721 -1721
- package/docs/analytics.md +39 -39
- package/docs/app-data-storage.md +277 -277
- package/docs/app-docs.md +73 -73
- package/docs/app-manifest.md +852 -852
- package/docs/app-records-pattern.md +388 -388
- package/docs/appConfig.md +550 -550
- package/docs/assistant-apps.md +172 -172
- package/docs/assistant-context.md +119 -119
- package/docs/bookings.md +442 -442
- package/docs/comms.md +686 -686
- package/docs/connectors.md +340 -340
- package/docs/css-baseline.md +133 -133
- package/docs/customer-guide.md +70 -70
- package/docs/deploying-apps.md +340 -340
- package/docs/entitlements.md +90 -90
- package/docs/files.md +69 -69
- package/docs/host-dependency-contract.md +210 -210
- package/docs/i18n.md +9 -0
- package/docs/integrations.md +322 -322
- package/docs/interactions.md +545 -545
- package/docs/item-context.md +181 -181
- package/docs/knowledge.md +102 -102
- package/docs/lots.md +111 -111
- package/docs/loyalty.md +352 -352
- package/docs/members.md +183 -182
- package/docs/memberships.md +149 -0
- package/docs/mobile-admin-container.md +693 -693
- package/docs/operations.md +281 -281
- package/docs/overview.md +483 -482
- package/docs/proof-comms-triggers.md +142 -142
- package/docs/proof-ownership-transfer.md +155 -155
- package/docs/proof-product-data-scoping.md +462 -462
- package/docs/proof-share-grants.md +305 -305
- package/docs/realtime.md +138 -138
- package/docs/server-functions.md +1 -0
- package/docs/standard-query.md +187 -187
- package/docs/tag-codes.md +97 -97
- package/docs/theme-lookbook.v1.json +120 -120
- package/docs/theme-tokens.md +252 -252
- package/docs/wallet-passes.md +107 -107
- package/docs/websites.md +123 -123
- package/openapi.yaml +426 -3
- package/package.json +87 -87
- package/scripts/headless-check.mjs +87 -87
- package/scripts/lib/bare-imports.mjs +57 -57
- package/scripts/lib/keyed-app-data.mjs +21 -21
- package/scripts/publish.mjs +272 -272
- package/scripts/register-release.mjs +91 -91
package/dist/openapi.yaml
CHANGED
|
@@ -6562,7 +6562,7 @@ paths:
|
|
|
6562
6562
|
post:
|
|
6563
6563
|
tags:
|
|
6564
6564
|
- order
|
|
6565
|
-
summary: order.
|
|
6565
|
+
summary: Get comprehensive scan analytics for all tags in an order.
|
|
6566
6566
|
operationId: order_getAnalytics
|
|
6567
6567
|
security:
|
|
6568
6568
|
- bearerAuth: []
|
|
@@ -8475,7 +8475,7 @@ paths:
|
|
|
8475
8475
|
post:
|
|
8476
8476
|
tags:
|
|
8477
8477
|
- proof
|
|
8478
|
-
summary: proof.
|
|
8478
|
+
summary: "The standard query on proofs (admin only): filter, sort, page, count and total a collection's proofs in one call, and follow a proof to its `product` and its `owner` (the owner's contact)."
|
|
8479
8479
|
operationId: proof_query
|
|
8480
8480
|
security:
|
|
8481
8481
|
- bearerAuth: []
|
|
@@ -13949,7 +13949,7 @@ paths:
|
|
|
13949
13949
|
get:
|
|
13950
13950
|
tags:
|
|
13951
13951
|
- product
|
|
13952
|
-
summary:
|
|
13952
|
+
summary: answers 404.
|
|
13953
13953
|
operationId: product_publicFind
|
|
13954
13954
|
security: []
|
|
13955
13955
|
parameters:
|
|
@@ -21624,6 +21624,9 @@ components:
|
|
|
21624
21624
|
messages:
|
|
21625
21625
|
type: object
|
|
21626
21626
|
additionalProperties: true
|
|
21627
|
+
subscriptions:
|
|
21628
|
+
type: object
|
|
21629
|
+
additionalProperties: true
|
|
21627
21630
|
tools:
|
|
21628
21631
|
type: object
|
|
21629
21632
|
additionalProperties: true
|
|
@@ -21651,6 +21654,7 @@ components:
|
|
|
21651
21654
|
- contacts
|
|
21652
21655
|
- interactions
|
|
21653
21656
|
- messages
|
|
21657
|
+
- subscriptions
|
|
21654
21658
|
- tools
|
|
21655
21659
|
- assets
|
|
21656
21660
|
- ai
|
|
@@ -37537,6 +37541,425 @@ components:
|
|
|
37537
37541
|
- partly-refunded
|
|
37538
37542
|
- refunded
|
|
37539
37543
|
- expired
|
|
37544
|
+
PlanLength:
|
|
37545
|
+
type: object
|
|
37546
|
+
properties:
|
|
37547
|
+
unit:
|
|
37548
|
+
type: string
|
|
37549
|
+
enum:
|
|
37550
|
+
- month
|
|
37551
|
+
- year
|
|
37552
|
+
count:
|
|
37553
|
+
type: number
|
|
37554
|
+
required:
|
|
37555
|
+
- unit
|
|
37556
|
+
- count
|
|
37557
|
+
PlanGrants:
|
|
37558
|
+
type: object
|
|
37559
|
+
properties:
|
|
37560
|
+
level:
|
|
37561
|
+
type: string
|
|
37562
|
+
groups:
|
|
37563
|
+
type: array
|
|
37564
|
+
items:
|
|
37565
|
+
type: string
|
|
37566
|
+
rank:
|
|
37567
|
+
type: number
|
|
37568
|
+
PlanIncludes:
|
|
37569
|
+
type: object
|
|
37570
|
+
properties:
|
|
37571
|
+
items:
|
|
37572
|
+
type: array
|
|
37573
|
+
items:
|
|
37574
|
+
type: object
|
|
37575
|
+
additionalProperties: true
|
|
37576
|
+
Plan:
|
|
37577
|
+
type: object
|
|
37578
|
+
properties:
|
|
37579
|
+
id:
|
|
37580
|
+
type: string
|
|
37581
|
+
collectionId:
|
|
37582
|
+
type: string
|
|
37583
|
+
name:
|
|
37584
|
+
type: string
|
|
37585
|
+
description:
|
|
37586
|
+
type: string
|
|
37587
|
+
image:
|
|
37588
|
+
type: string
|
|
37589
|
+
term:
|
|
37590
|
+
$ref: "#/components/schemas/PlanTerm"
|
|
37591
|
+
length:
|
|
37592
|
+
$ref: "#/components/schemas/PlanLength"
|
|
37593
|
+
grants:
|
|
37594
|
+
$ref: "#/components/schemas/PlanGrants"
|
|
37595
|
+
includes:
|
|
37596
|
+
$ref: "#/components/schemas/PlanIncludes"
|
|
37597
|
+
active:
|
|
37598
|
+
type: boolean
|
|
37599
|
+
sort:
|
|
37600
|
+
type: number
|
|
37601
|
+
metadata:
|
|
37602
|
+
type: object
|
|
37603
|
+
additionalProperties: true
|
|
37604
|
+
createdAt:
|
|
37605
|
+
type: string
|
|
37606
|
+
updatedAt:
|
|
37607
|
+
type: string
|
|
37608
|
+
required:
|
|
37609
|
+
- id
|
|
37610
|
+
- collectionId
|
|
37611
|
+
- name
|
|
37612
|
+
- description
|
|
37613
|
+
- image
|
|
37614
|
+
- term
|
|
37615
|
+
- length
|
|
37616
|
+
- grants
|
|
37617
|
+
- includes
|
|
37618
|
+
- active
|
|
37619
|
+
- sort
|
|
37620
|
+
- metadata
|
|
37621
|
+
- createdAt
|
|
37622
|
+
- updatedAt
|
|
37623
|
+
PlanInput:
|
|
37624
|
+
type: object
|
|
37625
|
+
properties:
|
|
37626
|
+
name:
|
|
37627
|
+
type: string
|
|
37628
|
+
description:
|
|
37629
|
+
type: string
|
|
37630
|
+
image:
|
|
37631
|
+
type: string
|
|
37632
|
+
term:
|
|
37633
|
+
$ref: "#/components/schemas/PlanTerm"
|
|
37634
|
+
length:
|
|
37635
|
+
$ref: "#/components/schemas/PlanLength"
|
|
37636
|
+
grants:
|
|
37637
|
+
$ref: "#/components/schemas/PlanGrants"
|
|
37638
|
+
includes:
|
|
37639
|
+
$ref: "#/components/schemas/PlanIncludes"
|
|
37640
|
+
active:
|
|
37641
|
+
type: boolean
|
|
37642
|
+
sort:
|
|
37643
|
+
type: number
|
|
37644
|
+
metadata:
|
|
37645
|
+
type: object
|
|
37646
|
+
additionalProperties: true
|
|
37647
|
+
required:
|
|
37648
|
+
- name
|
|
37649
|
+
PlanPrice:
|
|
37650
|
+
type: object
|
|
37651
|
+
properties:
|
|
37652
|
+
id:
|
|
37653
|
+
type: string
|
|
37654
|
+
planId:
|
|
37655
|
+
type: string
|
|
37656
|
+
currency:
|
|
37657
|
+
type: string
|
|
37658
|
+
amount:
|
|
37659
|
+
type: number
|
|
37660
|
+
compareAtAmount:
|
|
37661
|
+
type: number
|
|
37662
|
+
interval:
|
|
37663
|
+
type: string
|
|
37664
|
+
enum:
|
|
37665
|
+
- month
|
|
37666
|
+
- year
|
|
37667
|
+
intervalCount:
|
|
37668
|
+
type: number
|
|
37669
|
+
trialDays:
|
|
37670
|
+
type: number
|
|
37671
|
+
active:
|
|
37672
|
+
type: boolean
|
|
37673
|
+
sort:
|
|
37674
|
+
type: number
|
|
37675
|
+
required:
|
|
37676
|
+
- id
|
|
37677
|
+
- planId
|
|
37678
|
+
- currency
|
|
37679
|
+
- amount
|
|
37680
|
+
- compareAtAmount
|
|
37681
|
+
- interval
|
|
37682
|
+
- intervalCount
|
|
37683
|
+
- trialDays
|
|
37684
|
+
- active
|
|
37685
|
+
- sort
|
|
37686
|
+
PlanPriceInput:
|
|
37687
|
+
type: object
|
|
37688
|
+
properties:
|
|
37689
|
+
currency:
|
|
37690
|
+
type: string
|
|
37691
|
+
amount:
|
|
37692
|
+
type: number
|
|
37693
|
+
compareAtAmount:
|
|
37694
|
+
type: number
|
|
37695
|
+
interval:
|
|
37696
|
+
type: string
|
|
37697
|
+
enum:
|
|
37698
|
+
- month
|
|
37699
|
+
- year
|
|
37700
|
+
intervalCount:
|
|
37701
|
+
type: number
|
|
37702
|
+
trialDays:
|
|
37703
|
+
type: number
|
|
37704
|
+
active:
|
|
37705
|
+
type: boolean
|
|
37706
|
+
sort:
|
|
37707
|
+
type: number
|
|
37708
|
+
required:
|
|
37709
|
+
- amount
|
|
37710
|
+
PlanWithPrices:
|
|
37711
|
+
type: object
|
|
37712
|
+
properties:
|
|
37713
|
+
prices:
|
|
37714
|
+
type: array
|
|
37715
|
+
items:
|
|
37716
|
+
$ref: "#/components/schemas/PlanPrice"
|
|
37717
|
+
members:
|
|
37718
|
+
type: number
|
|
37719
|
+
required:
|
|
37720
|
+
- prices
|
|
37721
|
+
PublicPlan:
|
|
37722
|
+
type: object
|
|
37723
|
+
properties:
|
|
37724
|
+
id:
|
|
37725
|
+
type: string
|
|
37726
|
+
name:
|
|
37727
|
+
type: string
|
|
37728
|
+
description:
|
|
37729
|
+
type: string
|
|
37730
|
+
image:
|
|
37731
|
+
type: string
|
|
37732
|
+
term:
|
|
37733
|
+
$ref: "#/components/schemas/PlanTerm"
|
|
37734
|
+
length:
|
|
37735
|
+
$ref: "#/components/schemas/PlanLength"
|
|
37736
|
+
level:
|
|
37737
|
+
type: string
|
|
37738
|
+
prices:
|
|
37739
|
+
type: array
|
|
37740
|
+
items:
|
|
37741
|
+
$ref: "#/components/schemas/PlanPrice"
|
|
37742
|
+
required:
|
|
37743
|
+
- id
|
|
37744
|
+
- name
|
|
37745
|
+
- description
|
|
37746
|
+
- image
|
|
37747
|
+
- term
|
|
37748
|
+
- length
|
|
37749
|
+
- level
|
|
37750
|
+
- prices
|
|
37751
|
+
Membership:
|
|
37752
|
+
type: object
|
|
37753
|
+
properties:
|
|
37754
|
+
id:
|
|
37755
|
+
type: string
|
|
37756
|
+
collectionId:
|
|
37757
|
+
type: string
|
|
37758
|
+
contactId:
|
|
37759
|
+
type: string
|
|
37760
|
+
userId:
|
|
37761
|
+
type: string
|
|
37762
|
+
planId:
|
|
37763
|
+
type: string
|
|
37764
|
+
priceId:
|
|
37765
|
+
type: string
|
|
37766
|
+
source:
|
|
37767
|
+
$ref: "#/components/schemas/SubscriptionSource"
|
|
37768
|
+
status:
|
|
37769
|
+
$ref: "#/components/schemas/SubscriptionStatus"
|
|
37770
|
+
live:
|
|
37771
|
+
type: boolean
|
|
37772
|
+
currentPeriodStart:
|
|
37773
|
+
type: string
|
|
37774
|
+
currentPeriodEnd:
|
|
37775
|
+
type: string
|
|
37776
|
+
endsAt:
|
|
37777
|
+
type: string
|
|
37778
|
+
endedAt:
|
|
37779
|
+
type: string
|
|
37780
|
+
cancelReason:
|
|
37781
|
+
type: string
|
|
37782
|
+
enum:
|
|
37783
|
+
- member
|
|
37784
|
+
- staff
|
|
37785
|
+
- payment_failed
|
|
37786
|
+
- expired
|
|
37787
|
+
cancelledBy:
|
|
37788
|
+
type: string
|
|
37789
|
+
pendingPriceId:
|
|
37790
|
+
type: string
|
|
37791
|
+
metadata:
|
|
37792
|
+
type: object
|
|
37793
|
+
additionalProperties: true
|
|
37794
|
+
createdAt:
|
|
37795
|
+
type: string
|
|
37796
|
+
updatedAt:
|
|
37797
|
+
type: string
|
|
37798
|
+
plan:
|
|
37799
|
+
type: object
|
|
37800
|
+
additionalProperties: true
|
|
37801
|
+
required:
|
|
37802
|
+
- id
|
|
37803
|
+
- collectionId
|
|
37804
|
+
- contactId
|
|
37805
|
+
- userId
|
|
37806
|
+
- planId
|
|
37807
|
+
- priceId
|
|
37808
|
+
- source
|
|
37809
|
+
- status
|
|
37810
|
+
- live
|
|
37811
|
+
- currentPeriodStart
|
|
37812
|
+
- currentPeriodEnd
|
|
37813
|
+
- endsAt
|
|
37814
|
+
- endedAt
|
|
37815
|
+
- cancelReason
|
|
37816
|
+
- cancelledBy
|
|
37817
|
+
- pendingPriceId
|
|
37818
|
+
- metadata
|
|
37819
|
+
- createdAt
|
|
37820
|
+
- updatedAt
|
|
37821
|
+
MySubscription:
|
|
37822
|
+
type: object
|
|
37823
|
+
properties:
|
|
37824
|
+
id:
|
|
37825
|
+
type: string
|
|
37826
|
+
planId:
|
|
37827
|
+
type: string
|
|
37828
|
+
priceId:
|
|
37829
|
+
type: string
|
|
37830
|
+
status:
|
|
37831
|
+
$ref: "#/components/schemas/SubscriptionStatus"
|
|
37832
|
+
live:
|
|
37833
|
+
type: boolean
|
|
37834
|
+
source:
|
|
37835
|
+
$ref: "#/components/schemas/SubscriptionSource"
|
|
37836
|
+
currentPeriodEnd:
|
|
37837
|
+
type: string
|
|
37838
|
+
endsAt:
|
|
37839
|
+
type: string
|
|
37840
|
+
pendingPriceId:
|
|
37841
|
+
type: string
|
|
37842
|
+
plan:
|
|
37843
|
+
type: object
|
|
37844
|
+
additionalProperties: true
|
|
37845
|
+
required:
|
|
37846
|
+
- id
|
|
37847
|
+
- planId
|
|
37848
|
+
- priceId
|
|
37849
|
+
- status
|
|
37850
|
+
- live
|
|
37851
|
+
- source
|
|
37852
|
+
- currentPeriodEnd
|
|
37853
|
+
- endsAt
|
|
37854
|
+
- pendingPriceId
|
|
37855
|
+
- plan
|
|
37856
|
+
SubscriptionStartInput:
|
|
37857
|
+
type: object
|
|
37858
|
+
properties:
|
|
37859
|
+
priceId:
|
|
37860
|
+
type: string
|
|
37861
|
+
successUrl:
|
|
37862
|
+
type: string
|
|
37863
|
+
cancelUrl:
|
|
37864
|
+
type: string
|
|
37865
|
+
required:
|
|
37866
|
+
- priceId
|
|
37867
|
+
SubscriptionStartResult:
|
|
37868
|
+
type: object
|
|
37869
|
+
properties:
|
|
37870
|
+
checkoutUrl:
|
|
37871
|
+
type: string
|
|
37872
|
+
sessionId:
|
|
37873
|
+
type: string
|
|
37874
|
+
required:
|
|
37875
|
+
- checkoutUrl
|
|
37876
|
+
- sessionId
|
|
37877
|
+
SubscriptionListParams:
|
|
37878
|
+
type: object
|
|
37879
|
+
properties:
|
|
37880
|
+
status:
|
|
37881
|
+
$ref: "#/components/schemas/SubscriptionStatus"
|
|
37882
|
+
live:
|
|
37883
|
+
type: boolean
|
|
37884
|
+
planId:
|
|
37885
|
+
type: string
|
|
37886
|
+
contactId:
|
|
37887
|
+
type: string
|
|
37888
|
+
userId:
|
|
37889
|
+
type: string
|
|
37890
|
+
limit:
|
|
37891
|
+
type: number
|
|
37892
|
+
offset:
|
|
37893
|
+
type: number
|
|
37894
|
+
SubscriptionGrantInput:
|
|
37895
|
+
type: object
|
|
37896
|
+
properties:
|
|
37897
|
+
planId:
|
|
37898
|
+
type: string
|
|
37899
|
+
contactId:
|
|
37900
|
+
type: string
|
|
37901
|
+
userId:
|
|
37902
|
+
type: string
|
|
37903
|
+
endsAt:
|
|
37904
|
+
type: string
|
|
37905
|
+
note:
|
|
37906
|
+
type: string
|
|
37907
|
+
required:
|
|
37908
|
+
- planId
|
|
37909
|
+
SubscriptionPage:
|
|
37910
|
+
type: object
|
|
37911
|
+
properties:
|
|
37912
|
+
items:
|
|
37913
|
+
type: array
|
|
37914
|
+
items:
|
|
37915
|
+
type: object
|
|
37916
|
+
additionalProperties: true
|
|
37917
|
+
total:
|
|
37918
|
+
type: number
|
|
37919
|
+
limit:
|
|
37920
|
+
type: number
|
|
37921
|
+
offset:
|
|
37922
|
+
type: number
|
|
37923
|
+
required:
|
|
37924
|
+
- items
|
|
37925
|
+
- total
|
|
37926
|
+
- limit
|
|
37927
|
+
- offset
|
|
37928
|
+
MembershipStatus:
|
|
37929
|
+
type: object
|
|
37930
|
+
properties:
|
|
37931
|
+
member:
|
|
37932
|
+
type: boolean
|
|
37933
|
+
level:
|
|
37934
|
+
type: string
|
|
37935
|
+
subscriptions:
|
|
37936
|
+
type: array
|
|
37937
|
+
items:
|
|
37938
|
+
$ref: "#/components/schemas/Membership"
|
|
37939
|
+
required:
|
|
37940
|
+
- member
|
|
37941
|
+
- level
|
|
37942
|
+
- subscriptions
|
|
37943
|
+
PlanTerm:
|
|
37944
|
+
type: string
|
|
37945
|
+
enum:
|
|
37946
|
+
- recurring
|
|
37947
|
+
- fixed
|
|
37948
|
+
PlanUpdate:
|
|
37949
|
+
$ref: "#/components/schemas/PlanInput"
|
|
37950
|
+
SubscriptionStatus:
|
|
37951
|
+
type: string
|
|
37952
|
+
enum:
|
|
37953
|
+
- trialing
|
|
37954
|
+
- active
|
|
37955
|
+
- past_due
|
|
37956
|
+
- cancelling
|
|
37957
|
+
- ended
|
|
37958
|
+
SubscriptionSource:
|
|
37959
|
+
type: string
|
|
37960
|
+
enum:
|
|
37961
|
+
- stripe
|
|
37962
|
+
- manual
|
|
37540
37963
|
Tag:
|
|
37541
37964
|
type: object
|
|
37542
37965
|
properties:
|
package/dist/theme-boot.js
CHANGED
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
/* @proveanything/smartlinks/theme-boot.js — iframe theme + viewer-prefs bootstrap (theme tokens v1)
|
|
2
|
-
*
|
|
3
|
-
* ONLY for iframe / standalone app entries (admin.html, index.html). Container & widget apps do NOT
|
|
4
|
-
* need this — they inherit the host's :root tokens through the DOM. See docs/theme-tokens.md.
|
|
5
|
-
*
|
|
6
|
-
* What it does, and nothing more:
|
|
7
|
-
* 1. BOOT (synchronous, before first paint): reads the initial theme + viewer prefs from the URL
|
|
8
|
-
* (`#slt=<base64url JSON>` plus convenience params ?theme=&contrast=&lang=&fontScale=) and applies
|
|
9
|
-
* them to :root. Put this in <head>, inline, so it runs before the app's stylesheet — no flash.
|
|
10
|
-
* 2. LIVE: applies generic root-state updates the host posts (`smartlinks:root-state`) — viewer /
|
|
11
|
-
* accessibility prefs (dark, contrast, font-scale, lang) and, if the host chooses, editor
|
|
12
|
-
* brand-preview. The app AUTHORS CSS against these root hooks; it never writes a message handler.
|
|
13
|
-
*
|
|
14
|
-
* Root hooks the app styles against:
|
|
15
|
-
* - theme: the `.dark` class (Tailwind/shadcn convention) AND `[data-theme="dark|light"]`
|
|
16
|
-
* - contrast: `[data-contrast="high"]` (also honour @media (prefers-contrast: more) natively)
|
|
17
|
-
* - font size: `--sl-font-scale` (e.g. 1.25) — scale your rem/base type off it
|
|
18
|
-
* - language: `lang` attribute (
|
|
19
|
-
* - brand: the --sl-* theme tokens (see theme.css)
|
|
20
|
-
*
|
|
21
|
-
* Brand THEME changes are expected via iframe reload (rare, operator-driven). Viewer / a11y prefs are
|
|
22
|
-
* applied LIVE here (a reload on an accessibility toggle is itself an accessibility failure).
|
|
23
|
-
*/
|
|
24
|
-
(function () {
|
|
25
|
-
if (typeof document === 'undefined') return;
|
|
26
|
-
var root = document.documentElement;
|
|
27
|
-
|
|
28
|
-
function setVar(k, val) {
|
|
29
|
-
root.style.setProperty(k.charAt(0) === '-' ? k : '--sl-' + k, String(val));
|
|
30
|
-
}
|
|
31
|
-
function applyTheme(mode) { // 'dark' | 'light'
|
|
32
|
-
if (!mode) return;
|
|
33
|
-
root.classList.toggle('dark', mode === 'dark');
|
|
34
|
-
root.setAttribute('data-theme', mode);
|
|
35
|
-
}
|
|
36
|
-
function applyState(s) {
|
|
37
|
-
if (!s || typeof s !== 'object') return;
|
|
38
|
-
var v = s.values || s.vars;
|
|
39
|
-
if (v) for (var k in v) if (Object.prototype.hasOwnProperty.call(v, k)) setVar(k, v[k]);
|
|
40
|
-
if (s.theme) applyTheme(s.theme);
|
|
41
|
-
if (s.contrast != null) {
|
|
42
|
-
if (s.contrast === 'normal' || s.contrast === false) root.removeAttribute('data-contrast');
|
|
43
|
-
else root.setAttribute('data-contrast', String(s.contrast));
|
|
44
|
-
}
|
|
45
|
-
if (s.fontScale != null) setVar('font-scale', s.fontScale);
|
|
46
|
-
if (s.lang)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
/* @proveanything/smartlinks/theme-boot.js — iframe theme + viewer-prefs bootstrap (theme tokens v1)
|
|
2
|
+
*
|
|
3
|
+
* ONLY for iframe / standalone app entries (admin.html, index.html). Container & widget apps do NOT
|
|
4
|
+
* need this — they inherit the host's :root tokens through the DOM. See docs/theme-tokens.md.
|
|
5
|
+
*
|
|
6
|
+
* What it does, and nothing more:
|
|
7
|
+
* 1. BOOT (synchronous, before first paint): reads the initial theme + viewer prefs from the URL
|
|
8
|
+
* (`#slt=<base64url JSON>` plus convenience params ?theme=&contrast=&lang=&fontScale=) and applies
|
|
9
|
+
* them to :root. Put this in <head>, inline, so it runs before the app's stylesheet — no flash.
|
|
10
|
+
* 2. LIVE: applies generic root-state updates the host posts (`smartlinks:root-state`) — viewer /
|
|
11
|
+
* accessibility prefs (dark, contrast, font-scale, lang) and, if the host chooses, editor
|
|
12
|
+
* brand-preview. The app AUTHORS CSS against these root hooks; it never writes a message handler.
|
|
13
|
+
*
|
|
14
|
+
* Root hooks the app styles against:
|
|
15
|
+
* - theme: the `.dark` class (Tailwind/shadcn convention) AND `[data-theme="dark|light"]`
|
|
16
|
+
* - contrast: `[data-contrast="high"]` (also honour @media (prefers-contrast: more) natively)
|
|
17
|
+
* - font size: `--sl-font-scale` (e.g. 1.25) — scale your rem/base type off it
|
|
18
|
+
* - language: `lang` attribute, and `dir` (rtl for Arabic, Hebrew, ...; use start/end CSS so it mirrors)
|
|
19
|
+
* - brand: the --sl-* theme tokens (see theme.css)
|
|
20
|
+
*
|
|
21
|
+
* Brand THEME changes are expected via iframe reload (rare, operator-driven). Viewer / a11y prefs are
|
|
22
|
+
* applied LIVE here (a reload on an accessibility toggle is itself an accessibility failure).
|
|
23
|
+
*/
|
|
24
|
+
(function () {
|
|
25
|
+
if (typeof document === 'undefined') return;
|
|
26
|
+
var root = document.documentElement;
|
|
27
|
+
|
|
28
|
+
function setVar(k, val) {
|
|
29
|
+
root.style.setProperty(k.charAt(0) === '-' ? k : '--sl-' + k, String(val));
|
|
30
|
+
}
|
|
31
|
+
function applyTheme(mode) { // 'dark' | 'light'
|
|
32
|
+
if (!mode) return;
|
|
33
|
+
root.classList.toggle('dark', mode === 'dark');
|
|
34
|
+
root.setAttribute('data-theme', mode);
|
|
35
|
+
}
|
|
36
|
+
function applyState(s) {
|
|
37
|
+
if (!s || typeof s !== 'object') return;
|
|
38
|
+
var v = s.values || s.vars;
|
|
39
|
+
if (v) for (var k in v) if (Object.prototype.hasOwnProperty.call(v, k)) setVar(k, v[k]);
|
|
40
|
+
if (s.theme) applyTheme(s.theme);
|
|
41
|
+
if (s.contrast != null) {
|
|
42
|
+
if (s.contrast === 'normal' || s.contrast === false) root.removeAttribute('data-contrast');
|
|
43
|
+
else root.setAttribute('data-contrast', String(s.contrast));
|
|
44
|
+
}
|
|
45
|
+
if (s.fontScale != null) setVar('font-scale', s.fontScale);
|
|
46
|
+
if (s.lang) {
|
|
47
|
+
root.setAttribute('lang', String(s.lang));
|
|
48
|
+
// Right-to-left languages mirror the page (Arabic, Hebrew, Persian, Urdu, ...); see i18n.textDirection.
|
|
49
|
+
root.setAttribute('dir', /^(ar|he|iw|fa|ur|ps|yi|dv|ckb|sd|ug)(-|$)/i.test(String(s.lang)) ? 'rtl' : 'ltr');
|
|
50
|
+
}
|
|
51
|
+
var a = s.attrs;
|
|
52
|
+
if (a) for (var name in a) if (Object.prototype.hasOwnProperty.call(a, name)) {
|
|
53
|
+
if (a[name] == null || a[name] === false) root.removeAttribute(name);
|
|
54
|
+
else root.setAttribute(name, a[name] === true ? '' : String(a[name]));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 1) BOOT from the URL — synchronous, before paint.
|
|
59
|
+
try {
|
|
60
|
+
var hash = location.hash || '';
|
|
61
|
+
var m = hash.match(/[#&]slt=([^&]+)/);
|
|
62
|
+
if (m) {
|
|
63
|
+
var b64 = m[1].replace(/-/g, '+').replace(/_/g, '/');
|
|
64
|
+
applyState(JSON.parse(decodeURIComponent(escape(atob(b64)))));
|
|
65
|
+
}
|
|
66
|
+
var q = new URLSearchParams(location.search);
|
|
67
|
+
var boot = {};
|
|
68
|
+
if (q.get('theme')) boot.theme = q.get('theme');
|
|
69
|
+
if (q.get('contrast')) boot.contrast = q.get('contrast');
|
|
70
|
+
if (q.get('lang')) boot.lang = q.get('lang');
|
|
71
|
+
if (q.get('fontScale')) boot.fontScale = q.get('fontScale');
|
|
72
|
+
applyState(boot);
|
|
73
|
+
} catch (e) { /* never block the app on a malformed theme payload */ }
|
|
74
|
+
|
|
75
|
+
// 2) LIVE updates — generic; the app never writes this.
|
|
76
|
+
try {
|
|
77
|
+
window.addEventListener('message', function (e) {
|
|
78
|
+
var d = e && e.data;
|
|
79
|
+
if (d && d.type === 'smartlinks:root-state') applyState(d);
|
|
80
|
+
});
|
|
81
|
+
} catch (e) {}
|
|
82
|
+
})();
|