@stacksjs/defaults 0.75.611 → 0.75.613
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/ai/skills/stacks-actions/SKILL.md +208 -0
- package/ai/skills/stacks-api/SKILL.md +1 -1
- package/ai/skills/stacks-buddy/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +79 -0
- package/ai/skills/stacks-middleware/SKILL.md +4 -1
- package/ai/skills/stacks-native/CATALOG.md +12 -12
- package/ai/skills/stacks-validation/SKILL.md +7 -0
- package/app/Actions/Storefront/AddToCartAction.ts +12 -15
- package/app/Actions/Storefront/CheckoutContactAction.ts +18 -10
- package/app/Actions/Storefront/CheckoutShippingAction.ts +20 -10
- package/app/Actions/Storefront/PlaceOrderAction.ts +9 -12
- package/app/Actions/Storefront/UpdateCartItemAction.ts +11 -9
- package/app/Middleware/Abilities.ts +4 -3
- package/app/Middleware/Csrf.ts +10 -1
- package/app/Middleware/Throttle.ts +4 -4
- package/ide/vscode/package.json +1 -1
- package/package.json +5 -5
- package/resources/components/Dashboard/Analytics/AnalyticsPageHeader.stx +3 -13
- package/resources/components/Dashboard/App/RequestsOverview.stx +3 -20
- package/resources/components/Dashboard/App/SourceInventory.stx +1 -5
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +11 -28
- package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +9 -9
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +7 -7
- package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +3 -7
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +12 -15
- package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +3 -11
- package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +3 -20
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +4 -4
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +14 -24
- package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +5 -43
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +22 -38
- package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -33
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +16 -30
- package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +14 -12
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +9 -11
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +11 -7
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +14 -8
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +11 -17
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +18 -12
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +5 -5
- package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +2 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +14 -67
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +3 -18
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +23 -69
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +4 -16
- package/resources/components/Dashboard/Content/BlogDashboard.stx +2 -19
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +31 -51
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +1 -1
- package/resources/components/Dashboard/Content/ContentDashboard.stx +1 -11
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +1 -4
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +2 -2
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +8 -17
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +35 -45
- package/resources/components/Dashboard/Content/PostsDashboard.stx +1 -13
- package/resources/components/Dashboard/Content/SeoDashboard.stx +2 -20
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +4 -38
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +8 -15
- package/resources/components/Dashboard/Data/ActivityLog.stx +1 -5
- package/resources/components/Dashboard/Deployments/DeploymentList.stx +2 -11
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +2 -16
- package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +6 -10
- package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -5
- package/resources/components/Dashboard/Jobs/JobHistory.stx +3 -12
- package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +57 -51
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +4 -14
- package/resources/components/Dashboard/Library/DependenciesDashboard.stx +2 -15
- package/resources/components/Dashboard/Library/PackagesDashboard.stx +1 -8
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +1 -12
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +3 -3
- package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +3 -5
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +59 -93
- package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +5 -5
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +12 -26
- package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/RecoveryCampaignDialog.stx +12 -43
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +7 -41
- package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +5 -5
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +7 -23
- package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -12
- package/resources/components/Dashboard/Notifications/NotificationDeliveries.stx +4 -27
- package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +4 -36
- package/resources/components/Dashboard/Operations/RecoveryDestinationDialog.stx +18 -47
- package/resources/components/Dashboard/Operations/RecoveryPolicyDialog.stx +24 -78
- package/resources/components/Dashboard/Operations/RecoveryRestoreDialog.stx +8 -19
- package/resources/components/Dashboard/Queries/QueryDashboard.stx +3 -21
- package/resources/components/Dashboard/Releases/ReleaseDashboard.stx +2 -9
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +1 -11
- package/resources/components/Dashboard/UI/Input.stx +50 -1
- package/resources/components/Dashboard/UI/SearchFilter.stx +27 -17
- package/resources/components/Dashboard/UI/Select.stx +4 -1
- package/resources/components/Dashboard/UI/Textarea.stx +16 -1
- package/resources/views/cart.stx +14 -0
- package/resources/views/checkout/contact.stx +15 -1
- package/resources/views/checkout/payment.stx +7 -0
- package/resources/views/checkout/shipping.stx +39 -5
|
@@ -79,12 +79,31 @@ const ship = {
|
|
|
79
79
|
state: cart?.shipping_state || '',
|
|
80
80
|
zip: cart?.shipping_zip || '',
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
// After a refused submission: each field's message and what was typed, so
|
|
84
|
+
// the form is drawn as it was left. The saved address on a first visit.
|
|
85
|
+
const shipField = (field: string, saved: string): { value: string, error: string } => ({
|
|
86
|
+
value: requestContext.old(field, saved),
|
|
87
|
+
error: requestContext.error(field),
|
|
88
|
+
})
|
|
89
|
+
const shipName = shipField('shipping_name', ship.name)
|
|
90
|
+
const shipAddress = shipField('shipping_address', ship.address)
|
|
91
|
+
const shipCity = shipField('shipping_city', ship.city)
|
|
92
|
+
const shipState = shipField('shipping_state', ship.state)
|
|
93
|
+
const shipZip = shipField('shipping_zip', ship.zip)
|
|
94
|
+
// Why the form this page posted was refused, when it was not about one field
|
|
95
|
+
// ("Your cart is empty."). Shown once (stacksjs/stacks#3311).
|
|
96
|
+
const formError = requestContext.formError()
|
|
82
97
|
</script>
|
|
83
98
|
|
|
84
99
|
@section('content')
|
|
85
100
|
<div class="mx-auto px-6 py-12 max-w-5xl">
|
|
86
101
|
<CheckoutSteps current="shipping" />
|
|
87
102
|
|
|
103
|
+
@if (formError)
|
|
104
|
+
<p role="alert" class="mb-6 px-4 py-3 font-medium text-red-800 text-sm bg-red-50 border border-red-200 rounded-xl">{{ formError }}</p>
|
|
105
|
+
@endif
|
|
106
|
+
|
|
88
107
|
@if (items.length === 0 || !cart?.email)
|
|
89
108
|
<div class="p-12 text-center border border-dashed border-stone-300 rounded-3xl">
|
|
90
109
|
<p class="text-stone-500">Start at the contact step.</p>
|
|
@@ -99,28 +118,43 @@ const ship = {
|
|
|
99
118
|
<form action="/api/checkout/shipping" method="POST" class="mt-8 space-y-5">
|
|
100
119
|
<div>
|
|
101
120
|
<label class="font-semibold text-stone-500 text-xs tracking-wider uppercase">Full name</label>
|
|
102
|
-
<input type="text" name="shipping_name" required autocomplete="name" value="{{
|
|
121
|
+
<input type="text" name="shipping_name" required autocomplete="name" value="{{ shipName.value }}" aria-invalid="{{ shipName.error ? 'true' : 'false' }}" class="mt-1 px-4 py-3 w-full text-sm border border-stone-300 rounded-2xl focus:border-stone-900 focus:outline-none">
|
|
122
|
+
@if (shipName.error)
|
|
123
|
+
<p role="alert" class="mt-2 text-red-700 text-sm">{{ shipName.error }}</p>
|
|
124
|
+
@endif
|
|
103
125
|
</div>
|
|
104
126
|
|
|
105
127
|
<div>
|
|
106
128
|
<label class="font-semibold text-stone-500 text-xs tracking-wider uppercase">Street address</label>
|
|
107
|
-
<input type="text" name="shipping_address" required autocomplete="street-address" value="{{
|
|
129
|
+
<input type="text" name="shipping_address" required autocomplete="street-address" value="{{ shipAddress.value }}" aria-invalid="{{ shipAddress.error ? 'true' : 'false' }}" class="mt-1 px-4 py-3 w-full text-sm border border-stone-300 rounded-2xl focus:border-stone-900 focus:outline-none">
|
|
130
|
+
@if (shipAddress.error)
|
|
131
|
+
<p role="alert" class="mt-2 text-red-700 text-sm">{{ shipAddress.error }}</p>
|
|
132
|
+
@endif
|
|
108
133
|
</div>
|
|
109
134
|
|
|
110
135
|
<div class="grid gap-4 grid-cols-2">
|
|
111
136
|
<div>
|
|
112
137
|
<label class="font-semibold text-stone-500 text-xs tracking-wider uppercase">City</label>
|
|
113
|
-
<input type="text" name="shipping_city" required autocomplete="address-level2" value="{{
|
|
138
|
+
<input type="text" name="shipping_city" required autocomplete="address-level2" value="{{ shipCity.value }}" aria-invalid="{{ shipCity.error ? 'true' : 'false' }}" class="mt-1 px-4 py-3 w-full text-sm border border-stone-300 rounded-2xl focus:border-stone-900 focus:outline-none">
|
|
139
|
+
@if (shipCity.error)
|
|
140
|
+
<p role="alert" class="mt-2 text-red-700 text-sm">{{ shipCity.error }}</p>
|
|
141
|
+
@endif
|
|
114
142
|
</div>
|
|
115
143
|
<div>
|
|
116
144
|
<label class="font-semibold text-stone-500 text-xs tracking-wider uppercase">State</label>
|
|
117
|
-
<input type="text" name="shipping_state" required autocomplete="address-level1" value="{{
|
|
145
|
+
<input type="text" name="shipping_state" required autocomplete="address-level1" value="{{ shipState.value }}" aria-invalid="{{ shipState.error ? 'true' : 'false' }}" class="mt-1 px-4 py-3 w-full text-sm border border-stone-300 rounded-2xl focus:border-stone-900 focus:outline-none">
|
|
146
|
+
@if (shipState.error)
|
|
147
|
+
<p role="alert" class="mt-2 text-red-700 text-sm">{{ shipState.error }}</p>
|
|
148
|
+
@endif
|
|
118
149
|
</div>
|
|
119
150
|
</div>
|
|
120
151
|
|
|
121
152
|
<div class="max-w-[200px]">
|
|
122
153
|
<label class="font-semibold text-stone-500 text-xs tracking-wider uppercase">ZIP / Postal</label>
|
|
123
|
-
<input type="text" name="shipping_zip" required autocomplete="postal-code" value="{{
|
|
154
|
+
<input type="text" name="shipping_zip" required autocomplete="postal-code" value="{{ shipZip.value }}" aria-invalid="{{ shipZip.error ? 'true' : 'false' }}" class="mt-1 px-4 py-3 w-full text-sm border border-stone-300 rounded-2xl focus:border-stone-900 focus:outline-none">
|
|
155
|
+
@if (shipZip.error)
|
|
156
|
+
<p role="alert" class="mt-2 text-red-700 text-sm">{{ shipZip.error }}</p>
|
|
157
|
+
@endif
|
|
124
158
|
</div>
|
|
125
159
|
|
|
126
160
|
<div class="flex gap-4 items-center justify-between pt-2">
|