@usequeek/theme-kit 0.5.3 → 0.5.5

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 CHANGED
@@ -560,9 +560,11 @@ export default function Footer() {
560
560
  (`utm_source=powered_by&utm_medium=storefront&utm_campaign=<store slug>`,
561
561
  campaign omitted when the store has no slug); the component reads the slug
562
562
  from the storefront context, so themes pass nothing.
563
- - `hidden` (default false) takes the attribution link's visibility from a prop;
564
- it never hides the cookie preferences button. There is no merchant-facing
565
- toggle for it — always render it visible.
563
+ - A merchant may hide the credit: the component hides itself when
564
+ `config.display.show_powered_by` is `false` (on by default, so a store that
565
+ never saved the setting shows it). A theme places `<PoweredByQueek />` and
566
+ reads nothing. `hidden` (default false) is the same switch from a prop. Neither
567
+ hides the cookie preferences button.
566
568
 
567
569
  ## Cookie consent
568
570
 
@@ -10,9 +10,10 @@ export interface PoweredByQueekProps {
10
10
  /** Extra class so a footer can position the link — styling stays theme-owned. */
11
11
  className?: string;
12
12
  /**
13
- * Lets a caller hide the attribution link from a prop. Defaults to false;
14
- * themes always render it visible — there is no merchant-facing toggle for
15
- * it. It never hides the cookie preferences link, which is not attribution.
13
+ * Lets a caller hide the attribution link from a prop. Defaults to false. The
14
+ * store's own switch (`config.display.show_powered_by`, on by default) hides it
15
+ * the same way, so a theme passes nothing for it. Neither hides the cookie
16
+ * preferences link, which is not attribution.
16
17
  */
17
18
  hidden?: boolean;
18
19
  }
@@ -21,6 +22,10 @@ export interface PoweredByQueekProps {
21
22
  * The storefront attribution link, owned by the kit: themes import and place
22
23
  * it, and never re-implement it.
23
24
  *
25
+ * A merchant may hide the credit (Display, "Show Powered by Queek"): it is on
26
+ * unless `config.display.show_powered_by` is `false`, so a store that never
27
+ * saved the setting, or a payload without it, shows the credit.
28
+ *
24
29
  * Required on every footer variant of every theme (enforced by the
25
30
  * `theme/footer-shows-powered-by` rule of `npm run check`). The link
26
31
  * target (`https://usequeek.com/business`) and `rel` are the contract —
@@ -42,9 +47,10 @@ export interface PoweredByQueekProps {
42
47
  * look).
43
48
  */
44
49
  export function PoweredByQueek({ className, hidden = false }: PoweredByQueekProps): JSX.Element | null {
45
- const vendor = useContext(StorefrontContext)?.vendor;
50
+ const store = useContext(StorefrontContext);
51
+ const vendor = store?.vendor;
46
52
 
47
- if (hidden) return <ConsentPreferencesLink />;
53
+ if (hidden || store?.config?.display?.show_powered_by === false) return <ConsentPreferencesLink />;
48
54
 
49
55
  return (
50
56
  <span className="core-powered-by-group">
package/index.ts CHANGED
@@ -34,6 +34,8 @@ export * from './types/order';
34
34
  export * from './types/page';
35
35
  export * from './types/menu';
36
36
  export * from './types/media';
37
+ // Which image tier a surface renders (`resolveImageSources`) and a store logo's url (`logoSrc`): pure, server-safe.
38
+ export * from './utils/image-srcset';
37
39
  export * from './utils/format';
38
40
  export * from './utils/markdown';
39
41
  export * from './utils/menu-link';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usequeek/theme-kit",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "The runtime a Queek storefront theme is built on: hooks, stores, page renderer, navigation, shared blocks and locale strings.",
package/types/vendor.ts CHANGED
@@ -192,10 +192,13 @@ export interface StorefrontConfig {
192
192
  /**
193
193
  * Store-wide display choices every theme honours. `show_product_counts` (default false): a theme
194
194
  * prints a product count ("6 products") only when the store turns it on; read it through
195
- * `useProductCount()`, never from here.
195
+ * `useProductCount()`, never from here. `show_powered_by` (default true): the footer
196
+ * "Powered by Queek" credit; `PoweredByQueek` hides it when this is `false`, so a theme
197
+ * places the component and reads nothing from here.
196
198
  */
197
199
  display?: {
198
200
  show_product_counts?: boolean;
201
+ show_powered_by?: boolean;
199
202
  };
200
203
  /** Resolved semantic design tokens. Absent for stores that have none. */
201
204
  tokens?: DesignTokens | null;