@usequeek/theme-kit 0.1.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/README.md +37 -0
- package/api/collections.ts +93 -0
- package/api/orders.ts +23 -0
- package/apps/analytics-events.ts +32 -0
- package/apps/apps.css +613 -0
- package/apps/follow-card.tsx +192 -0
- package/apps/gtag.ts +19 -0
- package/apps/subscribe-form.tsx +124 -0
- package/client.ts +52 -0
- package/components/auth/auth-email-login-step.tsx +46 -0
- package/components/auth/auth-email-otp-step.tsx +54 -0
- package/components/auth/auth-email-otp-verify-step.tsx +82 -0
- package/components/auth/auth-email-register-step.tsx +59 -0
- package/components/auth/auth-flow.tsx +26 -0
- package/components/auth/auth-signup-step.tsx +53 -0
- package/components/blog/category-filter.tsx +92 -0
- package/components/blog/index.ts +12 -0
- package/components/blog/pagination.tsx +73 -0
- package/components/blog/post-categories.tsx +42 -0
- package/components/blog/post-meta.tsx +49 -0
- package/components/blog/related-posts.tsx +54 -0
- package/components/blog/share-buttons.tsx +89 -0
- package/components/cart/cart-panel-controller.tsx +67 -0
- package/components/cart/default-cart-shell.tsx +207 -0
- package/components/checkout/checkout-contact.tsx +84 -0
- package/components/checkout/default-checkout-shell.tsx +177 -0
- package/components/checkout/policy-links.tsx +98 -0
- package/components/image.tsx +149 -0
- package/components/markdown.tsx +54 -0
- package/components/product-media-frame.tsx +56 -0
- package/components/variant-picker.css +84 -0
- package/components/variant-picker.tsx +107 -0
- package/design-token-preview.tsx +81 -0
- package/edit-mode-active.tsx +324 -0
- package/edit-mode.tsx +80 -0
- package/hooks/use-address-autocomplete.ts +62 -0
- package/hooks/use-auth-flow.tsx +346 -0
- package/hooks/use-auth.ts +17 -0
- package/hooks/use-cart.ts +14 -0
- package/hooks/use-categories.ts +112 -0
- package/hooks/use-collection-params.ts +67 -0
- package/hooks/use-href.ts +15 -0
- package/hooks/use-posts.ts +75 -0
- package/hooks/use-product-detail.ts +69 -0
- package/hooks/use-product-questions.ts +77 -0
- package/hooks/use-product-sections.ts +165 -0
- package/hooks/use-products.ts +216 -0
- package/hooks/use-related-products.ts +56 -0
- package/hooks/use-resolve-coordinates.ts +48 -0
- package/hooks/use-reviews.ts +167 -0
- package/hooks/use-search.ts +55 -0
- package/hooks/use-shop-cart.ts +31 -0
- package/hooks/use-shop-params.ts +68 -0
- package/hooks/use-shop.ts +186 -0
- package/hooks/use-variant-selection.ts +98 -0
- package/index.ts +49 -0
- package/package.json +41 -0
- package/page-renderer.tsx +365 -0
- package/provider.tsx +91 -0
- package/sdk/client.ts +221 -0
- package/sdk/error-handler.ts +37 -0
- package/sdk/platform.ts +78 -0
- package/sdk/queek-client.ts +104 -0
- package/sdk/reauth-guard.ts +27 -0
- package/sdk/server-store-client.ts +165 -0
- package/shared-blocks/button.tsx +41 -0
- package/shared-blocks/callout.tsx +35 -0
- package/shared-blocks/content-default.tsx +23 -0
- package/shared-blocks/core-blocks.css +1792 -0
- package/shared-blocks/divider.tsx +17 -0
- package/shared-blocks/embed.tsx +40 -0
- package/shared-blocks/faq.tsx +44 -0
- package/shared-blocks/image.tsx +29 -0
- package/shared-blocks/index.ts +24 -0
- package/shared-blocks/manifest.ts +76 -0
- package/shared-blocks/product-qa.tsx +203 -0
- package/shared-blocks/quote.tsx +20 -0
- package/shared-blocks/reviews.tsx +436 -0
- package/shared-blocks/table.tsx +45 -0
- package/shared-blocks/video.tsx +60 -0
- package/stores/address-modal-store.ts +15 -0
- package/stores/auth-modal-store.ts +17 -0
- package/stores/cart-panel-store.ts +17 -0
- package/stores/cart-store.ts +172 -0
- package/stores/checkout-store.ts +167 -0
- package/stores/edit-preview-store.ts +61 -0
- package/stores/location-store.ts +41 -0
- package/stores/orders-sheet-store.ts +21 -0
- package/stores/policy-modal-store.ts +15 -0
- package/stores/product-modal-store.ts +18 -0
- package/stores/search-modal-store.ts +17 -0
- package/stores/toast-store.ts +46 -0
- package/stores/user-store.ts +88 -0
- package/theme-context.tsx +28 -0
- package/theme-variant-resolver.ts +44 -0
- package/types/block.ts +292 -0
- package/types/cart.ts +21 -0
- package/types/media.ts +55 -0
- package/types/menu.ts +27 -0
- package/types/order.ts +119 -0
- package/types/page.ts +86 -0
- package/types/product.ts +279 -0
- package/types/theme.ts +380 -0
- package/types/vendor.ts +243 -0
- package/utils/addon-selection.ts +31 -0
- package/utils/benefit-icon.tsx +145 -0
- package/utils/brand-palette.ts +64 -0
- package/utils/brand.ts +518 -0
- package/utils/contact-location.ts +44 -0
- package/utils/format.ts +64 -0
- package/utils/hero-content.ts +35 -0
- package/utils/image-srcset.ts +157 -0
- package/utils/markdown.tsx +237 -0
- package/utils/match-variant.ts +31 -0
- package/utils/menu-link.ts +41 -0
- package/utils/placeholder-resolver.ts +184 -0
- package/utils/product-media.ts +77 -0
- package/utils/product-normalizer.ts +323 -0
- package/utils/vendor-host.ts +173 -0
- package/utils/video-embed.ts +38 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { CalloutBlockData, CalloutTone } from '../types/block';
|
|
4
|
+
import { Markdown } from '../components/markdown';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Framework-owned callout block. Renders `data.markdown` inside a toned box
|
|
8
|
+
* (info / warn / success / note via `data.tone`). Themes tint via
|
|
9
|
+
* `.core-block-callout[data-tone="…"]` scoped selectors — colours come from
|
|
10
|
+
* brand CSS variables with sensible fallbacks in core-blocks.css.
|
|
11
|
+
*/
|
|
12
|
+
const TONE_ICON: Record<CalloutTone, string> = {
|
|
13
|
+
info: 'ℹ',
|
|
14
|
+
warn: '⚠',
|
|
15
|
+
success: '✓',
|
|
16
|
+
note: '✎',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function CoreCalloutBlock({ markdown, tone = 'info', title }: CalloutBlockData): JSX.Element {
|
|
20
|
+
const resolvedTone: CalloutTone = TONE_ICON[tone as CalloutTone] ? (tone as CalloutTone) : 'info';
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<section className="core-block core-block-callout" data-tone={resolvedTone}>
|
|
24
|
+
<div className="core-block-callout__inner">
|
|
25
|
+
<span className="core-block-callout__icon" aria-hidden="true">
|
|
26
|
+
{TONE_ICON[resolvedTone]}
|
|
27
|
+
</span>
|
|
28
|
+
<div className="core-block-callout__content">
|
|
29
|
+
{title ? <p className="core-block-callout__title">{title}</p> : null}
|
|
30
|
+
<Markdown className="core-block-callout__body">{markdown ?? ''}</Markdown>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</section>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { ContentBlockData } from '../types/block';
|
|
4
|
+
import { Markdown } from '../components/markdown';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Framework-owned default content block. Renders markdown into semantic
|
|
8
|
+
* HTML via the core <Markdown> renderer (react-markdown + remark-gfm) —
|
|
9
|
+
* headings, nested lists, code fences, tables, blockquotes, and inline
|
|
10
|
+
* images (routed through the core <Image>). Themes style via
|
|
11
|
+
* `.core-block-content` — typography, spacing, lists, headings.
|
|
12
|
+
*
|
|
13
|
+
* This block ONLY handles the default "plain markdown" content variant.
|
|
14
|
+
* Structured variants (promo, brand-story, testimonials, marquee) remain
|
|
15
|
+
* theme-owned and are routed separately in page-renderer.
|
|
16
|
+
*/
|
|
17
|
+
export function CoreContentDefaultBlock({ markdown }: ContentBlockData): JSX.Element {
|
|
18
|
+
return (
|
|
19
|
+
<section className="core-block core-block-content">
|
|
20
|
+
<Markdown className="core-block-content__body">{markdown ?? ''}</Markdown>
|
|
21
|
+
</section>
|
|
22
|
+
);
|
|
23
|
+
}
|