@callimacus/thamyr-shopify 4.19.0 → 4.21.0
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/CHANGELOG.core.md +14 -0
- package/CHANGELOG.md +28 -0
- package/README.md +32 -2
- package/dist/browser/callimacus.css +38 -0
- package/dist/browser/callimacus.min.js +3 -3
- package/dist/browser/callimacus.min.js.map +1 -1
- package/dist/browser/look-reader.min.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.core.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.21.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.20.0...thamyr-core-v4.21.0) (2026-11-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **core,react,vanilla,shopify,liquid:** onWarning in every wrapper, and a logger switch for the no-code runtimes ([#885](https://github.com/callimacus/thamyr-sdk/issues/885)) ([0508523](https://github.com/callimacus/thamyr-sdk/commit/0508523d79b080c1bd7b5496b9bc6640f3f1a64b))
|
|
12
|
+
|
|
13
|
+
## [4.20.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.19.0...thamyr-core-v4.20.0) (2026-11-03)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **shopify:** the chat's add keeps its reply, offers the option choice, and is one runner with thamyr-react ([#881](https://github.com/callimacus/thamyr-sdk/issues/881)) ([c99096c](https://github.com/callimacus/thamyr-sdk/commit/c99096c294a44a992e7d97f0d4726102df189fb7))
|
|
19
|
+
|
|
6
20
|
## [4.19.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.18.0...thamyr-core-v4.19.0) (2026-11-03)
|
|
7
21
|
|
|
8
22
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.21.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-shopify-v4.20.0...thamyr-shopify-v4.21.0) (2026-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **core,react,vanilla,shopify,liquid:** onWarning in every wrapper, and a logger switch for the no-code runtimes ([#885](https://github.com/callimacus/thamyr-sdk/issues/885)) ([0508523](https://github.com/callimacus/thamyr-sdk/commit/0508523d79b080c1bd7b5496b9bc6640f3f1a64b))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* devDependencies
|
|
15
|
+
* @callimacus/thamyr-core bumped from ^4.20.0 to ^4.21.0
|
|
16
|
+
|
|
17
|
+
## [4.20.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-shopify-v4.19.0...thamyr-shopify-v4.20.0) (2026-11-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **shopify:** the chat's add keeps its reply, offers the option choice, and is one runner with thamyr-react ([#881](https://github.com/callimacus/thamyr-sdk/issues/881)) ([c99096c](https://github.com/callimacus/thamyr-sdk/commit/c99096c294a44a992e7d97f0d4726102df189fb7))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* devDependencies
|
|
29
|
+
* @callimacus/thamyr-core bumped from ^4.19.0 to ^4.20.0
|
|
30
|
+
|
|
3
31
|
## [4.19.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-shopify-v4.18.0...thamyr-shopify-v4.19.0) (2026-11-03)
|
|
4
32
|
|
|
5
33
|
|
package/README.md
CHANGED
|
@@ -224,7 +224,7 @@ window.callimacusRenderers.push({
|
|
|
224
224
|
|
|
225
225
|
| Member | What |
|
|
226
226
|
|---|---|
|
|
227
|
-
| `ctx.chapter` | `{id, index, isFirst, question, done, blocks}` (`blocks` is a frozen copy of the chapter's merged blocks) |
|
|
227
|
+
| `ctx.chapter` | `{id, index, isFirst, question, done, blocks, addedToCart}` (`blocks` is a frozen copy of the chapter's merged blocks; `addedToCart` when the chat added to the bag in that round, so a reply that stands alone is no refusal) |
|
|
228
228
|
| `ctx.final` | `ctx.chapter.done` |
|
|
229
229
|
| `ctx.settings` | The global config |
|
|
230
230
|
| `ctx.text(block)` | First non-empty string of `block.data` (direct or under `text`) |
|
|
@@ -234,7 +234,7 @@ window.callimacusRenderers.push({
|
|
|
234
234
|
| `ctx.url(item)` | The storefront link under `rootUrl`: `products/<handle>`, `collections/<handle>`, `blogs/<blogHandle>/<handle>`, or a page's or policy's `meta.url`; `''` when it has none |
|
|
235
235
|
| `ctx.imageUrl(hit, {width = 800, index = 0})` | Shopify CDN URL with `width`; falls back to image 0 |
|
|
236
236
|
| `ctx.variantId(hit)` | Numeric id of the first orderable variant |
|
|
237
|
-
| `ctx.addToCart(variantId, quantity = 1)` | The theme's cart where the kit knows it, else Shopify's cart API and our confirmation (see Cart). Rejects with a readable `Error` |
|
|
237
|
+
| `ctx.addToCart(variantId, quantity = 1)` | The theme's cart where the kit knows it, else Shopify's cart API and our confirmation (see Cart). Rejects with a readable `Error`: a `CartAddError` whose `code` is `refused` (Shopify's own words), `cart_unavailable` (no cart answered) or `failed` |
|
|
238
238
|
| `ctx.ask(question)` | Continue the thread with a follow-up; queued while a round is in flight |
|
|
239
239
|
| `ctx.remember(kind, value)` | Personalisation memory (`questions`, `viewed`, `added`) |
|
|
240
240
|
|
|
@@ -307,6 +307,26 @@ Cart (`src/browser/embed/kit.ts`, `src/browser/cart.ts`):
|
|
|
307
307
|
- **Any other theme**: `POST {cart_add_url}.js`, our confirmation (`.cal-toast`, "View cart"), and
|
|
308
308
|
the header's cart link redrawn from a fresh copy of its section.
|
|
309
309
|
|
|
310
|
+
The chat's adds to the bag (`src/browser/runtime/index.ts`, `src/browser/runtime/chat-cart.ts`):
|
|
311
|
+
|
|
312
|
+
- Every round says the theme's cart runs here (`context.shopifyCart`), so the chat may answer
|
|
313
|
+
"add the black one in M to my bag" with a `cart-command`. On a product page, a round about that
|
|
314
|
+
product also carries it as an item on screen, so "this one" can mean it; once the shopper removes
|
|
315
|
+
the "About" chip it does not.
|
|
316
|
+
- A command runs only for a Shopify variant, in this tab's story, at most once per round
|
|
317
|
+
(thamyr-core's cart runner, the rounds kept in sessionStorage), and at most 10 of it. It adds
|
|
318
|
+
through `ctx.addToCart`, so the theme's cart redraws as for a card's button.
|
|
319
|
+
- What it came to is a line in the chapter that asked (`.cal-cart-notice`, `role="status"`,
|
|
320
|
+
`data-outcome` `added`, `refused`, `unavailable` or `failed`), below the reply. A chapter whose
|
|
321
|
+
add ran offers no "Ask again", which would add again, and its reply is never taken for a refusal
|
|
322
|
+
when it stands alone. Both, and the line, are kept with the thread, so the next page shows the
|
|
323
|
+
round as this one did. The embed reports no add to Callimacus.
|
|
324
|
+
- The status line says the same for a few seconds, and `callimacus:cart` on `document` tells the theme
|
|
325
|
+
(`{outcome, variantId, quantity, message?}`, `message` when it was not added).
|
|
326
|
+
- When the chat cannot tell which variant to add, it sends the option choice
|
|
327
|
+
(`custom:addToCartResult`): a button per variant with all its options, sold-out ones disabled;
|
|
328
|
+
a tap adds that variant and shows the same line. One add runs at a time.
|
|
329
|
+
|
|
310
330
|
### Page surface and events
|
|
311
331
|
|
|
312
332
|
`window.callimacus = {ask, thread, ctx, timings, state, storyId, reset, style, embed}`: `style` is
|
|
@@ -348,6 +368,16 @@ cart. Events on `document`: `callimacus:ready` `{designMode, off}`, `callimacus:
|
|
|
348
368
|
- Personalisation lives in `callimacus.memory`, kept as the thread is: questions, viewed and added
|
|
349
369
|
products (12 each). The home welcome offers the last questions and "Recently viewed" cards.
|
|
350
370
|
|
|
371
|
+
## Seeing the SDK's warnings
|
|
372
|
+
|
|
373
|
+
The SDK's logger is off, so shoppers' consoles stay quiet. Open a storefront page with
|
|
374
|
+
`?callimacus_debug` in its URL, or run `localStorage.setItem('callimacus:debug', '1')` in the
|
|
375
|
+
console and reload, and the runtime turns the logger on at `warn` when it starts
|
|
376
|
+
(`enableLoggerIfRequested` in core). A block a round did not show because one of its contents
|
|
377
|
+
failed then logs `Block "saga" was not shown: its content "guide" failed (shortfall).` The reason
|
|
378
|
+
stays server-side: `callimacus thamyr probe` shows it. `localStorage.removeItem('callimacus:debug')`
|
|
379
|
+
turns it off again. Nothing in the theme changes.
|
|
380
|
+
|
|
351
381
|
## Styling
|
|
352
382
|
|
|
353
383
|
`dist/browser/callimacus.css` is `src/browser/chrome.css` (dock, chapter frame, slots, skeletons,
|
|
@@ -527,6 +527,15 @@ text-decoration: underline;
|
|
|
527
527
|
text-underline-offset: 3px;
|
|
528
528
|
cursor: pointer;
|
|
529
529
|
}
|
|
530
|
+
:is(html,#callimacus#callimacus) .cal-cart-notice {
|
|
531
|
+
margin: 0;
|
|
532
|
+
padding-block: 8px 16px;
|
|
533
|
+
color: var(--cal-fg);
|
|
534
|
+
font-size: 14px;
|
|
535
|
+
}
|
|
536
|
+
:is(html,#callimacus#callimacus) .cal-cart-notice:not([data-outcome='added']) {
|
|
537
|
+
color: color-mix(in srgb, var(--cal-fg) 75%, transparent);
|
|
538
|
+
}
|
|
530
539
|
:is(html,#callimacus#callimacus) .cal-slot {
|
|
531
540
|
min-width: 0;
|
|
532
541
|
}
|
|
@@ -1164,6 +1173,35 @@ gap: 16px;
|
|
|
1164
1173
|
:is(html,#callimacus#callimacus) .cal-next__title {
|
|
1165
1174
|
margin: 0;
|
|
1166
1175
|
}
|
|
1176
|
+
:is(html,#callimacus#callimacus) .cal-choice .cal-section__inner {
|
|
1177
|
+
display: grid;
|
|
1178
|
+
justify-items: start;
|
|
1179
|
+
gap: 12px;
|
|
1180
|
+
}
|
|
1181
|
+
:is(html,#callimacus#callimacus) .cal-choice__title {
|
|
1182
|
+
margin: 0;
|
|
1183
|
+
}
|
|
1184
|
+
:is(html,#callimacus#callimacus) .cal-choice__options {
|
|
1185
|
+
display: flex;
|
|
1186
|
+
flex-wrap: wrap;
|
|
1187
|
+
gap: 10px;
|
|
1188
|
+
}
|
|
1189
|
+
:is(html,#callimacus#callimacus) button.cal-choice__option {
|
|
1190
|
+
gap: 8px;
|
|
1191
|
+
min-width: 0;
|
|
1192
|
+
max-width: 100%;
|
|
1193
|
+
min-height: 44px;
|
|
1194
|
+
padding: 10px 18px;
|
|
1195
|
+
font-size: 14px;
|
|
1196
|
+
line-height: 1.3;
|
|
1197
|
+
}
|
|
1198
|
+
:is(html,#callimacus#callimacus) .cal-choice__sold-out {
|
|
1199
|
+
color: color-mix(in srgb, currentcolor 70%, transparent);
|
|
1200
|
+
font-size: 12px;
|
|
1201
|
+
}
|
|
1202
|
+
:is(html,#callimacus#callimacus) .cal-choice__status:empty {
|
|
1203
|
+
display: none;
|
|
1204
|
+
}
|
|
1167
1205
|
:is(html,#callimacus#callimacus) .cal-redirect .cal-section__inner {
|
|
1168
1206
|
gap: 24px;
|
|
1169
1207
|
}
|