@tansy/theme-storefront 0.0.0-stage → 0.1.1
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.md +24 -0
- package/LICENSE +21 -0
- package/README.md +12 -2
- package/client.d.ts +81 -0
- package/client.js +461 -0
- package/fonts/GeistVF.woff +0 -0
- package/fonts/README.md +1 -0
- package/icons.d.ts +21 -0
- package/icons.js +23 -0
- package/index.d.ts +21 -0
- package/index.js +90 -0
- package/lib.d.ts +11 -0
- package/lib.js +17 -0
- package/messages.d.ts +159 -0
- package/messages.js +159 -0
- package/package.json +35 -4
- package/render.d.ts +4 -0
- package/render.js +274 -0
- package/schema.json +106 -0
- package/styles.css +461 -0
- package/theme.css +2454 -0
package/icons.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Line icons on a 24px grid, drawn in the current colour. Decorative: whatever holds one gives it a name. */
|
|
3
|
+
function Icon({ children, className = "sf:size-5", ...props }) {
|
|
4
|
+
return (_jsx("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", className: className, ...props, children: children }));
|
|
5
|
+
}
|
|
6
|
+
export const ArrowUpRight = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "M7 17 17 7M8 7h9v9" }) });
|
|
7
|
+
export const ChevronLeft = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "m15 18-6-6 6-6" }) });
|
|
8
|
+
export const ChevronRight = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "m9 18 6-6-6-6" }) });
|
|
9
|
+
export const ChevronDown = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
10
|
+
export const Bag = (props) => _jsxs(Icon, { ...props, children: [_jsx("path", { d: "M5 8h14l-1 12H6L5 8Z" }), _jsx("path", { d: "M9 8V6a3 3 0 0 1 6 0v2" })] });
|
|
11
|
+
export const Store = (props) => _jsxs(Icon, { ...props, children: [_jsx("path", { d: "M4 10v10h16V10" }), _jsx("path", { d: "M3 10 5 4h14l2 6c0 1.7-1.3 3-3 3s-3-1.3-3-3c0 1.7-1.3 3-3 3s-3-1.3-3-3c0 1.7-1.3 3-3 3s-3-1.3-3-3Z" }), _jsx("path", { d: "M10 20v-5h4v5" })] });
|
|
12
|
+
export const BookOpen = (props) => _jsxs(Icon, { ...props, children: [_jsx("path", { d: "M12 6.5C10.3 5.2 7.9 4.5 4 4.5v14c3.9 0 6.3.7 8 2 1.7-1.3 4.1-2 8-2v-14c-3.9 0-6.3.7-8 2Z" }), _jsx("path", { d: "M12 6.5v14" })] });
|
|
13
|
+
export const Download = (props) => _jsxs(Icon, { ...props, children: [_jsx("path", { d: "M12 4v11m0 0-4-4m4 4 4-4" }), _jsx("path", { d: "M5 20h14" })] });
|
|
14
|
+
export const Lock = (props) => _jsxs(Icon, { ...props, children: [_jsx("rect", { x: "5", y: "11", width: "14", height: "9", rx: "2" }), _jsx("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })] });
|
|
15
|
+
export const Close = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "M6 6l12 12M18 6 6 18" }) });
|
|
16
|
+
export const User = (props) => _jsxs(Icon, { ...props, children: [_jsx("circle", { cx: "12", cy: "8", r: "4" }), _jsx("path", { d: "M4 21a8 8 0 0 1 16 0" })] });
|
|
17
|
+
export const Search = (props) => _jsxs(Icon, { ...props, children: [_jsx("circle", { cx: "11", cy: "11", r: "7" }), _jsx("path", { d: "m20 20-3.5-3.5" })] });
|
|
18
|
+
export const Send = (props) => _jsxs(Icon, { ...props, children: [_jsx("path", { d: "M21 3 10 14" }), _jsx("path", { d: "m21 3-7 18-4-7-7-4 18-7Z" })] });
|
|
19
|
+
export const Globe = (props) => _jsxs(Icon, { ...props, children: [_jsx("circle", { cx: "12", cy: "12", r: "9" }), _jsx("path", { d: "M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9c-2.5-2.7-3.8-5.7-3.8-9S9.5 5.7 12 3Z" })] });
|
|
20
|
+
export const Bars = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "M4 7h16M4 12h16M4 17h10" }) });
|
|
21
|
+
export const Minus = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "M5 12h14" }) });
|
|
22
|
+
export const Plus = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "M12 5v14M5 12h14" }) });
|
|
23
|
+
export const Check = (props) => _jsx(Icon, { ...props, children: _jsx("path", { d: "m5 12 5 5 9-10" }) });
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface StorefrontOptions {
|
|
2
|
+
/** Replaces the words under the front page's heading. Owners can also change them per language under Languages → Site text. */
|
|
3
|
+
tagline?: string;
|
|
4
|
+
/** The product search box on the front page. It searches products through the records API, as a visitor. */
|
|
5
|
+
search: boolean;
|
|
6
|
+
/** An orders button in the header, for shops whose customers sign in to see their orders. */
|
|
7
|
+
accountLinks: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The members' library: a Library tab and header link, for shops that sell memberships through
|
|
10
|
+
* Payments whose members read digital editions free. Its page is at /library.
|
|
11
|
+
*/
|
|
12
|
+
library: boolean;
|
|
13
|
+
/** "auto" follows the visitor's light or dark setting. "light" always shows the light colours. */
|
|
14
|
+
colorScheme: "auto" | "light";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A storefront look for the shop plugin: soft rounded product cards, a product page with an
|
|
18
|
+
* image stage, option chips and a quantity stepper, and a two-column cart. Checkout, orders
|
|
19
|
+
* and the cart itself are the plugin's parts, so they behave as on the plugin's own pages.
|
|
20
|
+
*/
|
|
21
|
+
export declare const storefront: ({ tagline, search, accountLinks, library, colorScheme }?: Partial<StorefrontOptions>) => import("tansy/theme").ThemeManifest<StorefrontOptions>;
|
package/index.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineTheme } from "tansy/theme";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import schema from "./schema.json";
|
|
4
|
+
const options = z.object({
|
|
5
|
+
tagline: z.string().max(300).optional(),
|
|
6
|
+
search: z.boolean(),
|
|
7
|
+
accountLinks: z.boolean(),
|
|
8
|
+
library: z.boolean(),
|
|
9
|
+
colorScheme: z.enum(["auto", "light"]),
|
|
10
|
+
});
|
|
11
|
+
/** What a card shows. Kept short, as every list here is read on every visit. */
|
|
12
|
+
const CARD_FIELDS = "id,title,summary,price,compareAtPrice,images,stock,categories,format,membership";
|
|
13
|
+
const CARD = { collection: "shop-products", sort: "-createdAt", fields: CARD_FIELDS, urls: "1" };
|
|
14
|
+
const CATEGORIES = { collection: "shop-categories", sort: "name", perPage: 50, fields: "id,name", urls: "1" };
|
|
15
|
+
/** The Shop page, for its currency and its address. Replaces the plugin's `store`, which reads the currency alone. */
|
|
16
|
+
const STORE = { collection: "shop-store", perPage: 1, fields: "id,currency", urls: "1" };
|
|
17
|
+
const PER_PAGE = 12;
|
|
18
|
+
/**
|
|
19
|
+
* Memberships, from Payments: what each access is called, and the published plans that sell it.
|
|
20
|
+
* Both are public, for a pricing page. Only the library files themselves are for members.
|
|
21
|
+
*/
|
|
22
|
+
const ACCESS = { collection: "payments-access", perPage: 50, fields: "id,name,description" };
|
|
23
|
+
const PLANS = { collection: "payments-plans", filter: 'status = "published"', sort: "amount", perPage: 12, fields: "id,name,title,description,amount,annualAmount,currency,featured,includes" };
|
|
24
|
+
/** The library files the signed-in visitor's membership opens, read as them, so the rule decides. Empty for everyone else. */
|
|
25
|
+
const OPEN_FILES = { collection: "library-files", perPage: 200, fields: "id,product,label,file", viewer: true };
|
|
26
|
+
/** The front page, at the site's root and at the shop's own address. `products` replaces the shop plugin's list of the same name, to add summaries and categories. */
|
|
27
|
+
const FRONT = {
|
|
28
|
+
store: STORE,
|
|
29
|
+
products: { ...CARD, perPage: PER_PAGE, paged: true },
|
|
30
|
+
categories: CATEGORIES,
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A storefront look for the shop plugin: soft rounded product cards, a product page with an
|
|
34
|
+
* image stage, option chips and a quantity stepper, and a two-column cart. Checkout, orders
|
|
35
|
+
* and the cart itself are the plugin's parts, so they behave as on the plugin's own pages.
|
|
36
|
+
*/
|
|
37
|
+
export const storefront = ({ tagline, search = true, accountLinks = true, library = false, colorScheme = "auto" } = {}) => defineTheme({
|
|
38
|
+
name: "storefront",
|
|
39
|
+
version: "0.1.1",
|
|
40
|
+
apiVersion: 1,
|
|
41
|
+
render: "@tansy/theme-storefront/render",
|
|
42
|
+
requires: { plugins: ["shop"] },
|
|
43
|
+
options: { schema: options, value: { tagline, search, accountLinks, library, colorScheme } },
|
|
44
|
+
schema,
|
|
45
|
+
tokens: {
|
|
46
|
+
color: {
|
|
47
|
+
page: "#ffffff",
|
|
48
|
+
surface: "#f2f3f2",
|
|
49
|
+
text: "#121413",
|
|
50
|
+
muted: "#6a706d",
|
|
51
|
+
border: "#e6e8e7",
|
|
52
|
+
accent: "#3d8a6e",
|
|
53
|
+
"on-accent": "#ffffff",
|
|
54
|
+
},
|
|
55
|
+
font: { body: "var(--storefront-font), system-ui, sans-serif" },
|
|
56
|
+
size: { measure: "46rem", wide: "80rem" },
|
|
57
|
+
space: { gutter: "1.25rem", gap: "1.5rem", section: "4.5rem" },
|
|
58
|
+
radius: { card: "2rem", control: "999px" },
|
|
59
|
+
shadow: { card: "0 18px 48px rgba(18, 20, 19, 0.08)" },
|
|
60
|
+
},
|
|
61
|
+
singletons: ["site-menu"],
|
|
62
|
+
queries: {
|
|
63
|
+
home: FRONT,
|
|
64
|
+
"shop-store": FRONT,
|
|
65
|
+
"shop-categories": {
|
|
66
|
+
store: STORE,
|
|
67
|
+
products: { ...CARD, filter: "categories ?= @record.id", perPage: PER_PAGE, paged: true },
|
|
68
|
+
categories: CATEGORIES,
|
|
69
|
+
},
|
|
70
|
+
// Beside the plugin's own `variants`, which the buy box reads.
|
|
71
|
+
"shop-products": {
|
|
72
|
+
store: STORE,
|
|
73
|
+
access: ACCESS,
|
|
74
|
+
plans: PLANS,
|
|
75
|
+
files: { ...OPEN_FILES, filter: "product = @record.id" },
|
|
76
|
+
related: { ...CARD, filter: "categories ?= @record.categories && id != @record.id", perPage: 4 },
|
|
77
|
+
latest: { ...CARD, filter: "id != @record.id", perPage: 4 },
|
|
78
|
+
categories: CATEGORIES,
|
|
79
|
+
},
|
|
80
|
+
// The members' library: every product in a membership, the plans, and what the visitor may open.
|
|
81
|
+
library: {
|
|
82
|
+
store: STORE,
|
|
83
|
+
books: { ...CARD, filter: "membership:length > 0", perPage: 48 },
|
|
84
|
+
access: ACCESS,
|
|
85
|
+
plans: PLANS,
|
|
86
|
+
files: OPEN_FILES,
|
|
87
|
+
categories: CATEGORIES,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
package/lib.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TemplateProps } from "tansy/theme";
|
|
2
|
+
/** Joins class names, skipping the empty ones. */
|
|
3
|
+
export declare const cx: (...names: Array<string | false | null | undefined>) => string;
|
|
4
|
+
export declare const text: (value: unknown) => string;
|
|
5
|
+
export declare const num: (value: unknown) => number | null;
|
|
6
|
+
export declare const ids: (value: unknown) => number[];
|
|
7
|
+
export declare const fileIds: (value: unknown) => string[];
|
|
8
|
+
/** A price in the shop's currency, in the page's language. A currency Intl doesn't know still shows the amount. */
|
|
9
|
+
export declare function money(formatNumber: TemplateProps["formatNumber"], amount: number, currency: string): string;
|
|
10
|
+
/** The id of a product's card in a list, which a back arrow returns to. */
|
|
11
|
+
export declare const cardAnchor: (id: number | string) => string;
|
package/lib.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Joins class names, skipping the empty ones. */
|
|
2
|
+
export const cx = (...names) => names.filter(Boolean).join(" ");
|
|
3
|
+
export const text = (value) => (typeof value === "string" ? value : "");
|
|
4
|
+
export const num = (value) => (typeof value === "number" && Number.isFinite(value) ? value : null);
|
|
5
|
+
export const ids = (value) => (Array.isArray(value) ? value.filter((id) => typeof id === "number") : typeof value === "number" ? [value] : []);
|
|
6
|
+
export const fileIds = (value) => (Array.isArray(value) ? value.filter((id) => typeof id === "string") : []);
|
|
7
|
+
/** A price in the shop's currency, in the page's language. A currency Intl doesn't know still shows the amount. */
|
|
8
|
+
export function money(formatNumber, amount, currency) {
|
|
9
|
+
try {
|
|
10
|
+
return formatNumber(amount, { style: "currency", currency: currency.toUpperCase() });
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return `${amount.toFixed(2)} ${currency.toUpperCase()}`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/** The id of a product's card in a list, which a back arrow returns to. */
|
|
17
|
+
export const cardAnchor = (id) => `sf-item-${id}`;
|
package/messages.d.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The theme's words, under `storefront`, so a client part gets only these with `pickWords`.
|
|
3
|
+
* Owners can change any of them per language under Languages → Site text. The cart, checkout
|
|
4
|
+
* and orders speak the shop plugin's words, under `shop`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const messages: {
|
|
7
|
+
en: {
|
|
8
|
+
storefront: {
|
|
9
|
+
kicker: string;
|
|
10
|
+
heroTitle: string;
|
|
11
|
+
heroIntro: string;
|
|
12
|
+
shopNow: string;
|
|
13
|
+
searchLabel: string;
|
|
14
|
+
searchPlaceholder: string;
|
|
15
|
+
searching: string;
|
|
16
|
+
searchFailed: string;
|
|
17
|
+
found: string;
|
|
18
|
+
noResults: string;
|
|
19
|
+
categories: string;
|
|
20
|
+
all: string;
|
|
21
|
+
newArrivals: string;
|
|
22
|
+
products: string;
|
|
23
|
+
pageOf: string;
|
|
24
|
+
previousPage: string;
|
|
25
|
+
nextPage: string;
|
|
26
|
+
noProducts: string;
|
|
27
|
+
emptyCategory: string;
|
|
28
|
+
featured: string;
|
|
29
|
+
soldOut: string;
|
|
30
|
+
sale: string;
|
|
31
|
+
options: string;
|
|
32
|
+
quantity: string;
|
|
33
|
+
decrease: string;
|
|
34
|
+
increase: string;
|
|
35
|
+
onlyLeft: string;
|
|
36
|
+
inStock: string;
|
|
37
|
+
addToCart: string;
|
|
38
|
+
buyNow: string;
|
|
39
|
+
added: string;
|
|
40
|
+
viewCart: string;
|
|
41
|
+
previousImage: string;
|
|
42
|
+
nextImage: string;
|
|
43
|
+
showImage: string;
|
|
44
|
+
images: string;
|
|
45
|
+
share: string;
|
|
46
|
+
copied: string;
|
|
47
|
+
back: string;
|
|
48
|
+
details: string;
|
|
49
|
+
youMayLike: string;
|
|
50
|
+
cart: string;
|
|
51
|
+
orders: string;
|
|
52
|
+
menu: string;
|
|
53
|
+
openMenu: string;
|
|
54
|
+
tabs: string;
|
|
55
|
+
tabShop: string;
|
|
56
|
+
tabSearch: string;
|
|
57
|
+
tabOrders: string;
|
|
58
|
+
formatPhysical: string;
|
|
59
|
+
formatDigital: string;
|
|
60
|
+
formatBoth: string;
|
|
61
|
+
library: string;
|
|
62
|
+
inTheLibrary: string;
|
|
63
|
+
memberships: string;
|
|
64
|
+
perMonth: string;
|
|
65
|
+
perYear: string;
|
|
66
|
+
join: string;
|
|
67
|
+
youAreMember: string;
|
|
68
|
+
membersOnly: string;
|
|
69
|
+
libraryEmpty: string;
|
|
70
|
+
memberRead: string;
|
|
71
|
+
includedIn: string;
|
|
72
|
+
fromPrice: string;
|
|
73
|
+
download: string;
|
|
74
|
+
edition: string;
|
|
75
|
+
zoomIn: string;
|
|
76
|
+
closeZoom: string;
|
|
77
|
+
footerMenu: string;
|
|
78
|
+
language: string;
|
|
79
|
+
skip: string;
|
|
80
|
+
rights: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
ar: {
|
|
84
|
+
storefront: {
|
|
85
|
+
kicker: string;
|
|
86
|
+
heroTitle: string;
|
|
87
|
+
heroIntro: string;
|
|
88
|
+
shopNow: string;
|
|
89
|
+
searchLabel: string;
|
|
90
|
+
searchPlaceholder: string;
|
|
91
|
+
searching: string;
|
|
92
|
+
searchFailed: string;
|
|
93
|
+
found: string;
|
|
94
|
+
noResults: string;
|
|
95
|
+
categories: string;
|
|
96
|
+
all: string;
|
|
97
|
+
newArrivals: string;
|
|
98
|
+
products: string;
|
|
99
|
+
pageOf: string;
|
|
100
|
+
previousPage: string;
|
|
101
|
+
nextPage: string;
|
|
102
|
+
noProducts: string;
|
|
103
|
+
emptyCategory: string;
|
|
104
|
+
featured: string;
|
|
105
|
+
soldOut: string;
|
|
106
|
+
sale: string;
|
|
107
|
+
options: string;
|
|
108
|
+
quantity: string;
|
|
109
|
+
decrease: string;
|
|
110
|
+
increase: string;
|
|
111
|
+
onlyLeft: string;
|
|
112
|
+
inStock: string;
|
|
113
|
+
addToCart: string;
|
|
114
|
+
buyNow: string;
|
|
115
|
+
added: string;
|
|
116
|
+
viewCart: string;
|
|
117
|
+
previousImage: string;
|
|
118
|
+
nextImage: string;
|
|
119
|
+
showImage: string;
|
|
120
|
+
images: string;
|
|
121
|
+
share: string;
|
|
122
|
+
copied: string;
|
|
123
|
+
back: string;
|
|
124
|
+
details: string;
|
|
125
|
+
youMayLike: string;
|
|
126
|
+
cart: string;
|
|
127
|
+
orders: string;
|
|
128
|
+
menu: string;
|
|
129
|
+
openMenu: string;
|
|
130
|
+
tabs: string;
|
|
131
|
+
tabShop: string;
|
|
132
|
+
tabSearch: string;
|
|
133
|
+
tabOrders: string;
|
|
134
|
+
formatPhysical: string;
|
|
135
|
+
formatDigital: string;
|
|
136
|
+
formatBoth: string;
|
|
137
|
+
library: string;
|
|
138
|
+
inTheLibrary: string;
|
|
139
|
+
memberships: string;
|
|
140
|
+
perMonth: string;
|
|
141
|
+
perYear: string;
|
|
142
|
+
join: string;
|
|
143
|
+
youAreMember: string;
|
|
144
|
+
membersOnly: string;
|
|
145
|
+
libraryEmpty: string;
|
|
146
|
+
memberRead: string;
|
|
147
|
+
includedIn: string;
|
|
148
|
+
fromPrice: string;
|
|
149
|
+
download: string;
|
|
150
|
+
edition: string;
|
|
151
|
+
zoomIn: string;
|
|
152
|
+
closeZoom: string;
|
|
153
|
+
footerMenu: string;
|
|
154
|
+
language: string;
|
|
155
|
+
skip: string;
|
|
156
|
+
rights: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
package/messages.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The theme's words, under `storefront`, so a client part gets only these with `pickWords`.
|
|
3
|
+
* Owners can change any of them per language under Languages → Site text. The cart, checkout
|
|
4
|
+
* and orders speak the shop plugin's words, under `shop`.
|
|
5
|
+
*/
|
|
6
|
+
export const messages = {
|
|
7
|
+
en: {
|
|
8
|
+
storefront: {
|
|
9
|
+
kicker: "New season",
|
|
10
|
+
heroTitle: "Experience the difference",
|
|
11
|
+
heroIntro: "Thoughtfully made pieces for every day, picked with care and sent to your door.",
|
|
12
|
+
shopNow: "Shop now",
|
|
13
|
+
searchLabel: "Search products",
|
|
14
|
+
searchPlaceholder: "Search goods",
|
|
15
|
+
searching: "Searching…",
|
|
16
|
+
searchFailed: "Search isn't working right now. Try again in a moment.",
|
|
17
|
+
found: "{count, plural, one {# product found} other {# products found}}",
|
|
18
|
+
noResults: "No products match “{query}”.",
|
|
19
|
+
categories: "Categories",
|
|
20
|
+
all: "All",
|
|
21
|
+
newArrivals: "New arrivals",
|
|
22
|
+
products: "{count, plural, one {# product} other {# products}}",
|
|
23
|
+
pageOf: "Page {page}",
|
|
24
|
+
previousPage: "Previous page",
|
|
25
|
+
nextPage: "Next page",
|
|
26
|
+
noProducts: "No products yet.",
|
|
27
|
+
emptyCategory: "Nothing in this category yet.",
|
|
28
|
+
featured: "Featured",
|
|
29
|
+
soldOut: "Sold out",
|
|
30
|
+
sale: "Sale",
|
|
31
|
+
options: "Options",
|
|
32
|
+
quantity: "Quantity",
|
|
33
|
+
decrease: "One fewer",
|
|
34
|
+
increase: "One more",
|
|
35
|
+
onlyLeft: "Only {count} left",
|
|
36
|
+
inStock: "In stock",
|
|
37
|
+
addToCart: "Add to cart",
|
|
38
|
+
buyNow: "Buy now",
|
|
39
|
+
added: "Added to your cart.",
|
|
40
|
+
viewCart: "View cart",
|
|
41
|
+
previousImage: "Previous image",
|
|
42
|
+
nextImage: "Next image",
|
|
43
|
+
showImage: "Show image {number}",
|
|
44
|
+
images: "Product images",
|
|
45
|
+
share: "Share",
|
|
46
|
+
copied: "Link copied",
|
|
47
|
+
back: "Back to the shop",
|
|
48
|
+
details: "Details",
|
|
49
|
+
youMayLike: "You may also like",
|
|
50
|
+
cart: "Cart",
|
|
51
|
+
orders: "Your orders",
|
|
52
|
+
menu: "Main",
|
|
53
|
+
openMenu: "Menu",
|
|
54
|
+
tabs: "Shop sections",
|
|
55
|
+
tabShop: "Shop",
|
|
56
|
+
tabSearch: "Search",
|
|
57
|
+
tabOrders: "Orders",
|
|
58
|
+
formatPhysical: "Physical",
|
|
59
|
+
formatDigital: "Digital",
|
|
60
|
+
formatBoth: "Physical + digital",
|
|
61
|
+
library: "Library",
|
|
62
|
+
inTheLibrary: "In the library",
|
|
63
|
+
memberships: "Memberships",
|
|
64
|
+
perMonth: "a month",
|
|
65
|
+
perYear: "or {price} a year",
|
|
66
|
+
join: "Join",
|
|
67
|
+
youAreMember: "You're a member. Everything below is yours to read.",
|
|
68
|
+
membersOnly: "Members only",
|
|
69
|
+
libraryEmpty: "Nothing in the library yet.",
|
|
70
|
+
memberRead: "Yours to read with your membership",
|
|
71
|
+
includedIn: "Free to read with {name}",
|
|
72
|
+
fromPrice: "From {price} a month",
|
|
73
|
+
download: "Download {label}",
|
|
74
|
+
edition: "edition",
|
|
75
|
+
zoomIn: "Zoom in",
|
|
76
|
+
closeZoom: "Close",
|
|
77
|
+
footerMenu: "Footer",
|
|
78
|
+
language: "Language",
|
|
79
|
+
skip: "Skip to content",
|
|
80
|
+
rights: "All rights reserved.",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
ar: {
|
|
84
|
+
storefront: {
|
|
85
|
+
kicker: "موسم جديد",
|
|
86
|
+
heroTitle: "عِش الفرق",
|
|
87
|
+
heroIntro: "قطع مصنوعة بعناية لكل يوم، مختارة بحرص وتصلك إلى بابك.",
|
|
88
|
+
shopNow: "تسوّق الآن",
|
|
89
|
+
searchLabel: "ابحث في المنتجات",
|
|
90
|
+
searchPlaceholder: "ابحث عن منتج",
|
|
91
|
+
searching: "جارٍ البحث…",
|
|
92
|
+
searchFailed: "البحث لا يعمل الآن. حاول مجددًا بعد قليل.",
|
|
93
|
+
found: "{count, plural, zero {لا توجد نتائج} one {منتج واحد} two {منتجان} few {# منتجات} many {# منتجًا} other {# منتج}}",
|
|
94
|
+
noResults: "لا توجد منتجات تطابق «{query}».",
|
|
95
|
+
categories: "الفئات",
|
|
96
|
+
all: "الكل",
|
|
97
|
+
newArrivals: "وصل حديثًا",
|
|
98
|
+
products: "{count, plural, zero {لا منتجات} one {منتج واحد} two {منتجان} few {# منتجات} many {# منتجًا} other {# منتج}}",
|
|
99
|
+
pageOf: "الصفحة {page}",
|
|
100
|
+
previousPage: "الصفحة السابقة",
|
|
101
|
+
nextPage: "الصفحة التالية",
|
|
102
|
+
noProducts: "لا توجد منتجات بعد.",
|
|
103
|
+
emptyCategory: "لا يوجد شيء في هذه الفئة بعد.",
|
|
104
|
+
featured: "مميز",
|
|
105
|
+
soldOut: "نفدت الكمية",
|
|
106
|
+
sale: "تخفيض",
|
|
107
|
+
options: "الخيارات",
|
|
108
|
+
quantity: "الكمية",
|
|
109
|
+
decrease: "أنقص واحدًا",
|
|
110
|
+
increase: "زد واحدًا",
|
|
111
|
+
onlyLeft: "بقي {count} فقط",
|
|
112
|
+
inStock: "متوفر",
|
|
113
|
+
addToCart: "أضف إلى السلة",
|
|
114
|
+
buyNow: "اشترِ الآن",
|
|
115
|
+
added: "أُضيف إلى سلتك.",
|
|
116
|
+
viewCart: "اعرض السلة",
|
|
117
|
+
previousImage: "الصورة السابقة",
|
|
118
|
+
nextImage: "الصورة التالية",
|
|
119
|
+
showImage: "اعرض الصورة {number}",
|
|
120
|
+
images: "صور المنتج",
|
|
121
|
+
share: "مشاركة",
|
|
122
|
+
copied: "نُسخ الرابط",
|
|
123
|
+
back: "العودة إلى المتجر",
|
|
124
|
+
details: "التفاصيل",
|
|
125
|
+
youMayLike: "قد يعجبك أيضًا",
|
|
126
|
+
cart: "السلة",
|
|
127
|
+
orders: "طلباتك",
|
|
128
|
+
menu: "القائمة الرئيسية",
|
|
129
|
+
openMenu: "القائمة",
|
|
130
|
+
tabs: "أقسام المتجر",
|
|
131
|
+
tabShop: "المتجر",
|
|
132
|
+
tabSearch: "بحث",
|
|
133
|
+
tabOrders: "الطلبات",
|
|
134
|
+
formatPhysical: "مطبوع",
|
|
135
|
+
formatDigital: "رقمي",
|
|
136
|
+
formatBoth: "مطبوع ورقمي",
|
|
137
|
+
library: "المكتبة",
|
|
138
|
+
inTheLibrary: "في المكتبة",
|
|
139
|
+
memberships: "العضويات",
|
|
140
|
+
perMonth: "شهريًا",
|
|
141
|
+
perYear: "أو {price} سنويًا",
|
|
142
|
+
join: "انضم",
|
|
143
|
+
youAreMember: "أنت عضو. كل ما يلي متاح لك للقراءة.",
|
|
144
|
+
membersOnly: "للأعضاء فقط",
|
|
145
|
+
libraryEmpty: "لا شيء في المكتبة بعد.",
|
|
146
|
+
memberRead: "متاح لك للقراءة بعضويتك",
|
|
147
|
+
includedIn: "اقرأه مجانًا مع {name}",
|
|
148
|
+
fromPrice: "ابتداءً من {price} شهريًا",
|
|
149
|
+
download: "تنزيل {label}",
|
|
150
|
+
edition: "النسخة",
|
|
151
|
+
zoomIn: "تكبير",
|
|
152
|
+
closeZoom: "إغلاق",
|
|
153
|
+
footerMenu: "روابط التذييل",
|
|
154
|
+
language: "اللغة",
|
|
155
|
+
skip: "انتقل إلى المحتوى",
|
|
156
|
+
rights: "جميع الحقوق محفوظة.",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tansy/theme-storefront",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A storefront look for the shop plugin: soft rounded product cards, a product stage with a size picker and quantity stepper, and a two-column cart.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"tansy-theme"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "Mohamed Salah <mohamedsalahsebai@gmail.com>",
|
|
10
|
+
"homepage": "https://github.com/mhmdsalahsebai/tansy",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/mhmdsalahsebai/tansy.git",
|
|
14
|
+
"directory": "themes/storefront"
|
|
15
|
+
},
|
|
16
|
+
"bugs": "https://github.com/mhmdsalahsebai/tansy/issues",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"default": "./index.js"
|
|
21
|
+
},
|
|
22
|
+
"./render": {
|
|
23
|
+
"types": "./render.d.ts",
|
|
24
|
+
"default": "./render.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@tansy/payments": "^0.1.1",
|
|
29
|
+
"@tansy/shop": "^0.1.1",
|
|
30
|
+
"next": "^16.4.6",
|
|
31
|
+
"react": "^19.3.0",
|
|
32
|
+
"tansy": "^0.1.1"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"zod": "^4.6.7"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/render.d.ts
ADDED