@praxical/storefront 0.0.0-stage → 0.11.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Praxical
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
- # Temporary Holding Version
1
+ # @praxical/storefront
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Optional storefront presentation for [Praxical Signal](https://gitgud.io/praxical/signal), an MIT-licensed UI system: catalog cards, discovery, product pages, Markdown and a screenshot gallery. The consumer supplies links, data and actions.
4
+
5
+ ```sh
6
+ npm install --save-exact @praxical/storefront@0.11.0 @praxical/ui@0.11.0 @praxical/tokens@0.11.0
7
+ ```
8
+
9
+ Storefront depends on exactly matching `@praxical/design` and `@praxical/ui`, which npm installs with it. Import the token and UI stylesheets, use `SignalProvider` for the shared ImageViewer, and use `scoped.css` under `.signal-storefront` for new islands; `presentation.css` remains a global compatibility export. Screenshot carousel props and media-path checks are preserved.
10
+
11
+ ESM only, with TypeScript declarations. See [installation and API](https://gitgud.io/praxical/signal/-/blob/master/docs/USAGE.md) and the [changelog](https://gitgud.io/praxical/signal/-/blob/master/CHANGELOG.md).
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from "react";
2
+ export type CardApp = {
3
+ slug: string;
4
+ name: string;
5
+ tagline: string;
6
+ icon: string;
7
+ icon_url?: string;
8
+ accent: string;
9
+ };
10
+ export type CardLinkProps = {
11
+ href: string;
12
+ className: string;
13
+ children: ReactNode;
14
+ };
15
+ /** Presentation only. Routing, prices, access and account actions belong to the consumer.
16
+ * @deprecated Legacy catalog card: the price is plain text and the name is not a heading. Compose from `@praxical/ui` instead (Pane, ServiceRow or Tiles with AppIcon, Badge for the price, PageHeader with `media`); kept through 0.8.x and removed no earlier than 0.9. */
17
+ export declare function AppCardView({ app, category, price, compact, renderLink, }: {
18
+ app: CardApp;
19
+ category: string;
20
+ price?: string;
21
+ compact?: boolean;
22
+ renderLink?: (props: CardLinkProps) => ReactNode;
23
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import {
3
+ AppCardView
4
+ } from "./chunk-KLXMWVYU.js";
5
+ export {
6
+ AppCardView
7
+ };
@@ -0,0 +1,8 @@
1
+ export declare const categories: {
2
+ id: string;
3
+ name: string;
4
+ icon: import("lucide-react").LucideIcon;
5
+ accent: string;
6
+ description: string;
7
+ }[];
8
+ export declare function categoryName(id: string): string;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import {
3
+ categories,
4
+ categoryName
5
+ } from "./chunk-2S25ONSZ.js";
6
+ export {
7
+ categories,
8
+ categoryName
9
+ };
@@ -0,0 +1,79 @@
1
+ 'use client';
2
+
3
+ // packages/storefront/src/categories.ts
4
+ import {
5
+ AudioLines,
6
+ BookOpen,
7
+ Code2,
8
+ Gamepad2,
9
+ Grid2X2,
10
+ Paintbrush,
11
+ Sparkles,
12
+ Wrench
13
+ } from "lucide-react";
14
+ var categories = [
15
+ {
16
+ id: "",
17
+ name: "All apps",
18
+ icon: Grid2X2,
19
+ accent: "jade",
20
+ description: "A little bit of everything."
21
+ },
22
+ {
23
+ id: "productivity",
24
+ name: "Productivity",
25
+ icon: BookOpen,
26
+ accent: "coral",
27
+ description: "Make room for your best work."
28
+ },
29
+ {
30
+ id: "creativity",
31
+ name: "Creativity",
32
+ icon: Paintbrush,
33
+ accent: "lilac",
34
+ description: "Bring an idea to life."
35
+ },
36
+ {
37
+ id: "audio-video",
38
+ name: "Audio & video",
39
+ icon: AudioLines,
40
+ accent: "gold",
41
+ description: "Something worth watching. Or hearing."
42
+ },
43
+ {
44
+ id: "development",
45
+ name: "Development",
46
+ icon: Code2,
47
+ accent: "jade",
48
+ description: "Tools for the things you build."
49
+ },
50
+ {
51
+ id: "utilities",
52
+ name: "Utilities",
53
+ icon: Wrench,
54
+ accent: "blue",
55
+ description: "Small helpers. A better desktop."
56
+ },
57
+ {
58
+ id: "games",
59
+ name: "Games",
60
+ icon: Gamepad2,
61
+ accent: "rose",
62
+ description: "Take a well-earned break."
63
+ },
64
+ {
65
+ id: "education",
66
+ name: "Education",
67
+ icon: Sparkles,
68
+ accent: "gold",
69
+ description: "Follow your curiosity."
70
+ }
71
+ ];
72
+ function categoryName(id) {
73
+ return categories.find((item) => item.id === id)?.name ?? id;
74
+ }
75
+
76
+ export {
77
+ categories,
78
+ categoryName
79
+ };
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+
3
+ // packages/storefront/src/links.tsx
4
+ import { jsx } from "react/jsx-runtime";
5
+ var browserLink = (props) => /* @__PURE__ */ jsx("a", { ...props, rel: "noreferrer noopener" });
6
+
7
+ export {
8
+ browserLink
9
+ };
@@ -0,0 +1,76 @@
1
+ 'use client';
2
+ import {
3
+ categoryName
4
+ } from "./chunk-2S25ONSZ.js";
5
+ import {
6
+ browserLink
7
+ } from "./chunk-3VUJFWN2.js";
8
+
9
+ // packages/storefront/src/discovery.tsx
10
+ import { ArrowUpRight, Leaf, ShieldCheck } from "lucide-react";
11
+ import { AppIcon } from "@praxical/design";
12
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
+ function FeaturedApps({
14
+ apps,
15
+ pickedIDs = [],
16
+ variant = "lined",
17
+ renderLink = browserLink
18
+ }) {
19
+ return /* @__PURE__ */ jsx("div", { className: "featured-app-grid", "data-card-variant": variant, children: apps.map((app) => /* @__PURE__ */ jsx("article", { className: "featured-app-card", children: renderLink({
20
+ href: `/apps/${app.slug}`,
21
+ className: "featured-app-link",
22
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
23
+ /* @__PURE__ */ jsx(
24
+ AppIcon,
25
+ {
26
+ name: app.icon,
27
+ imageURL: app.icon_url,
28
+ accent: app.accent
29
+ }
30
+ ),
31
+ /* @__PURE__ */ jsxs("div", { children: [
32
+ /* @__PURE__ */ jsx("span", { className: "featured-app-label", children: pickedIDs.includes(app.id) ? /* @__PURE__ */ jsxs(Fragment, { children: [
33
+ /* @__PURE__ */ jsx(ShieldCheck, { size: 13 }),
34
+ " Staff Pick"
35
+ ] }) : categoryName(app.category) }),
36
+ /* @__PURE__ */ jsx("h3", { children: app.name }),
37
+ /* @__PURE__ */ jsx("p", { children: app.tagline })
38
+ ] }),
39
+ /* @__PURE__ */ jsx(ArrowUpRight, { size: 17 })
40
+ ] })
41
+ }) }, app.id)) });
42
+ }
43
+ function FoliumFeature({
44
+ artwork,
45
+ renderLink = browserLink
46
+ }) {
47
+ return /* @__PURE__ */ jsxs("div", { className: "feature-hero tone-coral", children: [
48
+ /* @__PURE__ */ jsxs("div", { className: "hero-copy", children: [
49
+ /* @__PURE__ */ jsxs("span", { className: "small-label", children: [
50
+ /* @__PURE__ */ jsx(Leaf, { size: 15 }),
51
+ " MEET FOLIUM"
52
+ ] }),
53
+ /* @__PURE__ */ jsxs("h2", { children: [
54
+ "A fresh page.",
55
+ /* @__PURE__ */ jsx("br", {}),
56
+ " A little possibility."
57
+ ] }),
58
+ /* @__PURE__ */ jsx("p", { children: "Gather your thoughts in a quieter corner of your desktop." }),
59
+ renderLink({
60
+ href: "/apps/folium",
61
+ className: "button button-ink",
62
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
63
+ "Explore Folium ",
64
+ /* @__PURE__ */ jsx(ArrowUpRight, { size: 18 })
65
+ ] })
66
+ }),
67
+ /* @__PURE__ */ jsx("span", { className: "hero-caption", children: "Simple notes, close to home." })
68
+ ] }),
69
+ artwork
70
+ ] });
71
+ }
72
+
73
+ export {
74
+ FeaturedApps,
75
+ FoliumFeature
76
+ };
@@ -0,0 +1,126 @@
1
+ 'use client';
2
+ import {
3
+ Markdown
4
+ } from "./chunk-MA2HFZ3M.js";
5
+ import {
6
+ browserLink
7
+ } from "./chunk-3VUJFWN2.js";
8
+
9
+ // packages/storefront/src/product.tsx
10
+ import { AppIcon } from "@praxical/design";
11
+ import {
12
+ Check,
13
+ ChevronDown,
14
+ Code2,
15
+ ExternalLink,
16
+ ShieldCheck
17
+ } from "lucide-react";
18
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
+ function ProductHeader({
20
+ app,
21
+ publisher,
22
+ actions
23
+ }) {
24
+ return /* @__PURE__ */ jsxs("section", { className: "product-heading", children: [
25
+ /* @__PURE__ */ jsx(
26
+ AppIcon,
27
+ {
28
+ name: app.icon,
29
+ imageURL: app.icon_url,
30
+ accent: app.accent,
31
+ size: "hero"
32
+ }
33
+ ),
34
+ /* @__PURE__ */ jsxs("div", { className: "product-title", children: [
35
+ /* @__PURE__ */ jsxs("div", { className: "product-name-row", children: [
36
+ /* @__PURE__ */ jsx("h1", { children: app.name }),
37
+ app.preview && /* @__PURE__ */ jsx("span", { className: "subtle-badge", children: "Sample app" })
38
+ ] }),
39
+ /* @__PURE__ */ jsx("p", { children: app.tagline }),
40
+ publisher
41
+ ] }),
42
+ /* @__PURE__ */ jsx("div", { className: "product-actions", children: actions })
43
+ ] });
44
+ }
45
+ function ProductOverview({
46
+ app,
47
+ renderLink = browserLink,
48
+ developerLink
49
+ }) {
50
+ return /* @__PURE__ */ jsxs("section", { className: "product-description", children: [
51
+ /* @__PURE__ */ jsxs("h2", { children: [
52
+ "A little more about ",
53
+ app.name,
54
+ "."
55
+ ] }),
56
+ /* @__PURE__ */ jsx(Markdown, { renderLink, children: app.description }),
57
+ app.features.length > 0 && /* @__PURE__ */ jsx("div", { className: "feature-list", children: app.features.map((feature, index) => /* @__PURE__ */ jsxs("div", { children: [
58
+ /* @__PURE__ */ jsx(Check, { size: 18 }),
59
+ /* @__PURE__ */ jsx("span", { children: feature })
60
+ ] }, index)) }),
61
+ /* @__PURE__ */ jsxs("details", { className: "disclosure", children: [
62
+ /* @__PURE__ */ jsxs("summary", { children: [
63
+ /* @__PURE__ */ jsxs("span", { children: [
64
+ /* @__PURE__ */ jsx(ShieldCheck, { size: 19 }),
65
+ " What this app can access"
66
+ ] }),
67
+ /* @__PURE__ */ jsx(ChevronDown, { size: 18 })
68
+ ] }),
69
+ /* @__PURE__ */ jsx("div", { className: "disclosure-body", children: app.permissions.length ? app.permissions.map((permission, index) => /* @__PURE__ */ jsxs("div", { className: "permission", children: [
70
+ /* @__PURE__ */ jsx("strong", { children: permission.name }),
71
+ /* @__PURE__ */ jsx("p", { children: permission.description })
72
+ ] }, index)) : /* @__PURE__ */ jsx("p", { children: "No permission information is listed yet." }) })
73
+ ] }),
74
+ /* @__PURE__ */ jsxs("details", { className: "disclosure", children: [
75
+ /* @__PURE__ */ jsxs("summary", { children: [
76
+ /* @__PURE__ */ jsxs("span", { children: [
77
+ /* @__PURE__ */ jsx(Code2, { size: 19 }),
78
+ " Source, license & developer links"
79
+ ] }),
80
+ /* @__PURE__ */ jsx(ChevronDown, { size: 18 })
81
+ ] }),
82
+ /* @__PURE__ */ jsxs("div", { className: "disclosure-body", children: [
83
+ /* @__PURE__ */ jsxs("dl", { className: "detail-list", children: [
84
+ /* @__PURE__ */ jsxs("div", { children: [
85
+ /* @__PURE__ */ jsx("dt", { children: "License" }),
86
+ /* @__PURE__ */ jsx("dd", { children: app.license || "Not listed" })
87
+ ] }),
88
+ /* @__PURE__ */ jsxs("div", { children: [
89
+ /* @__PURE__ */ jsx("dt", { children: "Source code" }),
90
+ /* @__PURE__ */ jsx("dd", { children: app.source_url ? renderLink({
91
+ href: app.source_url,
92
+ target: "_blank",
93
+ className: "text-link",
94
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
95
+ "View source ",
96
+ /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
97
+ ] })
98
+ }) : "No public repository linked yet" })
99
+ ] }),
100
+ app.homepage_url && /* @__PURE__ */ jsxs("div", { children: [
101
+ /* @__PURE__ */ jsx("dt", { children: "Website" }),
102
+ /* @__PURE__ */ jsx("dd", { children: renderLink({
103
+ href: app.homepage_url,
104
+ target: "_blank",
105
+ children: "Developer website \u2197"
106
+ }) })
107
+ ] }),
108
+ app.support_url && /* @__PURE__ */ jsxs("div", { children: [
109
+ /* @__PURE__ */ jsx("dt", { children: "Support" }),
110
+ /* @__PURE__ */ jsx("dd", { children: renderLink({
111
+ href: app.support_url,
112
+ target: "_blank",
113
+ children: "Get help \u2197"
114
+ }) })
115
+ ] })
116
+ ] }),
117
+ developerLink
118
+ ] })
119
+ ] })
120
+ ] });
121
+ }
122
+
123
+ export {
124
+ ProductHeader,
125
+ ProductOverview
126
+ };
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+
3
+ // packages/storefront/src/app-card.tsx
4
+ import { AppIcon } from "@praxical/design";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ function AppCardView({
7
+ app,
8
+ category,
9
+ price,
10
+ compact = false,
11
+ renderLink = (props) => /* @__PURE__ */ jsx("a", { ...props })
12
+ }) {
13
+ return /* @__PURE__ */ jsxs("article", { className: `app-card ${compact ? "app-card-compact" : ""}`, children: [
14
+ renderLink({
15
+ href: `/apps/${app.slug}`,
16
+ className: "app-card-main",
17
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
18
+ /* @__PURE__ */ jsx(
19
+ AppIcon,
20
+ {
21
+ name: app.icon,
22
+ imageURL: app.icon_url,
23
+ accent: app.accent
24
+ }
25
+ ),
26
+ /* @__PURE__ */ jsxs("div", { className: "app-card-copy", children: [
27
+ /* @__PURE__ */ jsx("h3", { children: app.name }),
28
+ /* @__PURE__ */ jsx("p", { children: app.tagline }),
29
+ /* @__PURE__ */ jsx("span", { className: "app-category", children: category })
30
+ ] })
31
+ ] })
32
+ }),
33
+ price !== void 0 && /* @__PURE__ */ jsx("span", { className: "price-label", children: price })
34
+ ] });
35
+ }
36
+
37
+ export {
38
+ AppCardView
39
+ };
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import {
3
+ browserLink
4
+ } from "./chunk-3VUJFWN2.js";
5
+
6
+ // packages/storefront/src/markdown.tsx
7
+ import ReactMarkdown from "react-markdown";
8
+ import remarkGfm from "remark-gfm";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function Markdown({
11
+ children,
12
+ renderLink = browserLink
13
+ }) {
14
+ return /* @__PURE__ */ jsx("div", { className: "markdown-copy", children: /* @__PURE__ */ jsx(
15
+ ReactMarkdown,
16
+ {
17
+ remarkPlugins: [remarkGfm],
18
+ skipHtml: true,
19
+ components: {
20
+ a: ({ node, ...props }) => renderLink({ ...props, className: "text-link" }),
21
+ img: ({ alt }) => /* @__PURE__ */ jsx("span", { className: "muted", children: alt ? `[Image: ${alt}]` : "[Image]" }),
22
+ table: ({ node, ...props }) => /* @__PURE__ */ jsx("div", { className: "markdown-table", children: /* @__PURE__ */ jsx("table", { ...props }) })
23
+ },
24
+ children
25
+ }
26
+ ) });
27
+ }
28
+
29
+ export {
30
+ Markdown
31
+ };