@hraness/design-kit 0.31.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/ARTICLE_COPY.md +208 -0
- package/HERO_FIELDS.md +55 -0
- package/ICONS.md +56 -0
- package/LANTERN_MATERIAL.md +60 -0
- package/LICENSE +21 -0
- package/MARKETING_COPY.md +49 -0
- package/MARKETING_PRESET.md +108 -0
- package/PALETTES.md +90 -0
- package/PAPER_THEME.md +128 -0
- package/README.md +745 -0
- package/STATUS_PAGES.md +67 -0
- package/STYLE.md +245 -0
- package/WRITING.md +72 -0
- package/dist/browser/index.js +2345 -0
- package/dist/chunk-44djxk16.js +6872 -0
- package/dist/chunk-5gtx3pza.js +9 -0
- package/dist/chunk-77391vmq.js +454 -0
- package/dist/chunk-7b1586eb.js +1209 -0
- package/dist/chunk-8834fh4n.js +6 -0
- package/dist/chunk-9t8xyqte.js +870 -0
- package/dist/chunk-cejpzyfh.js +446 -0
- package/dist/chunk-eh71jz57.js +429 -0
- package/dist/chunk-evb02bc1.js +516 -0
- package/dist/chunk-h4k7yv6x.js +368 -0
- package/dist/chunk-he8eznb1.js +760 -0
- package/dist/chunk-mr1vdcjq.js +404 -0
- package/dist/chunk-wzvdn8ey.js +116 -0
- package/dist/fonts/nebula-sans/social-fonts.generated.js +53 -0
- package/dist/icons.js +48 -0
- package/dist/index.js +237 -0
- package/dist/launch.js +41 -0
- package/dist/mockups/client.js +422 -0
- package/dist/mockups/index.js +1850 -0
- package/dist/portfolio.js +1549 -0
- package/dist/provider-marks.js +19 -0
- package/dist/react/charts.js +11 -0
- package/dist/react/hero-backdrop.js +8 -0
- package/dist/react/index.js +7252 -0
- package/dist/react/platform-install.js +10 -0
- package/dist/react/server.js +137 -0
- package/dist/stylex-manifest.json +1 -0
- package/dist/stylex.css +5392 -0
- package/dist/syntax-highlighting.js +15 -0
- package/dist/testing.js +250 -0
- package/package.json +377 -0
- package/portfolio-inventory.json +31 -0
- package/scripts/check-lantern-material-snapshot.d.mts +26 -0
- package/scripts/check-lantern-material-snapshot.mjs +126 -0
- package/scripts/check-marketing-snapshot.d.mts +12 -0
- package/scripts/check-marketing-snapshot.mjs +58 -0
- package/scripts/lantern-material-snapshot.ts +101 -0
- package/scripts/marketing-textures.ts +48 -0
- package/scripts/paper-theme-snapshot.ts +97 -0
- package/scripts/product-marketing-snapshot.ts +149 -0
- package/src/appearance-menu.css +266 -0
- package/src/appearance.ts +32 -0
- package/src/article-html.ts +269 -0
- package/src/article.ts +686 -0
- package/src/browser/appearance-menu.ts +604 -0
- package/src/browser/artifact-share.ts +164 -0
- package/src/browser/design-palette.ts +197 -0
- package/src/browser/foil.ts +124 -0
- package/src/browser/hero-light.ts +11 -0
- package/src/browser/index.ts +29 -0
- package/src/browser/status-field.ts +432 -0
- package/src/browser/status-page.ts +100 -0
- package/src/browser/sticky-offset.ts +82 -0
- package/src/browser/theme-color-sync.ts +213 -0
- package/src/charts.css +7 -0
- package/src/compiler-components.css +34 -0
- package/src/compiler-foundation.css +18 -0
- package/src/compiler-palettes.css +7 -0
- package/src/compiler-tokens.css +342 -0
- package/src/components.css +3 -0
- package/src/design-gallery.css +431 -0
- package/src/effects.css +14 -0
- package/src/fonts/geist-mono/GeistMono[wght].woff2 +0 -0
- package/src/fonts/geist-mono/OFL.txt +93 -0
- package/src/fonts/geist-mono/PROVENANCE.md +12 -0
- package/src/fonts/instrument-serif/OFL.txt +93 -0
- package/src/fonts/instrument-serif/UPSTREAM.md +14 -0
- package/src/fonts/instrument-serif/instrument-serif-latin-400.woff2 +0 -0
- package/src/fonts/nebula-sans/LICENSE.txt +96 -0
- package/src/fonts/nebula-sans/NebulaSans-Black.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-BlackItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Bold.otf +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Bold.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-BoldItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Book.otf +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Book.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-BookItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Light.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-LightItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Medium.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-MediumItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-Semibold.woff2 +0 -0
- package/src/fonts/nebula-sans/NebulaSans-SemiboldItalic.woff2 +0 -0
- package/src/fonts/nebula-sans/PROVENANCE.md +14 -0
- package/src/fonts/nebula-sans/social-fonts.generated.ts +3873 -0
- package/src/fonts.css +106 -0
- package/src/icons/act60/act60.svg +5 -0
- package/src/icons/act60/application.svg +9 -0
- package/src/icons/act60/chapter-compare.svg +3 -0
- package/src/icons/act60/decree-residence.svg +6 -0
- package/src/icons/act60/estimate.svg +7 -0
- package/src/icons/act60/export-services.svg +4 -0
- package/src/icons/act60/investor.svg +13 -0
- package/src/icons/act60/presence.svg +7 -0
- package/src/icons/aicharts/aicharts.svg +6 -0
- package/src/icons/aicharts/cost-compare.svg +4 -0
- package/src/icons/aicharts/task-audio.svg +7 -0
- package/src/icons/aicharts/task-coding.svg +6 -0
- package/src/icons/aicharts/task-images.svg +3 -0
- package/src/icons/aicharts/task-reasoning.svg +9 -0
- package/src/icons/aicharts/task-research.svg +5 -0
- package/src/icons/aicharts/task-video.svg +4 -0
- package/src/icons/manifest.json +1371 -0
- package/src/icons/platonik/conversation.svg +3 -0
- package/src/icons/platonik/creature.svg +7 -0
- package/src/icons/platonik/economy.svg +4 -0
- package/src/icons/platonik/keep-light.svg +6 -0
- package/src/icons/platonik/platonik.svg +7 -0
- package/src/icons/platonik/spark-route.svg +15 -0
- package/src/icons/receipts/act60-retry.receipt.json +888 -0
- package/src/icons/receipts/act60.receipt.json +1366 -0
- package/src/icons/receipts/aicharts.receipt.json +1546 -0
- package/src/icons/receipts/platonik.receipt.json +1011 -0
- package/src/icons/receipts/roughday.receipt.json +770 -0
- package/src/icons/receipts/shared.receipt.json +1296 -0
- package/src/icons/receipts/slopcamera.receipt.json +1495 -0
- package/src/icons/receipts/soundfish-retry.receipt.json +460 -0
- package/src/icons/receipts/soundfish.receipt.json +1709 -0
- package/src/icons/receipts/sponge.receipt.json +1743 -0
- package/src/icons/receipts/stripe-history-retry.receipt.json +145 -0
- package/src/icons/receipts/stripe-history.receipt.json +1202 -0
- package/src/icons/receipts/wordcell.receipt.json +1924 -0
- package/src/icons/roughday/finance.svg +7 -0
- package/src/icons/roughday/roughday.svg +6 -0
- package/src/icons/roughday/technology.svg +4 -0
- package/src/icons/roughday/world.svg +4 -0
- package/src/icons/sets/act60.json +63 -0
- package/src/icons/sets/aicharts.json +63 -0
- package/src/icons/sets/platonik.json +39 -0
- package/src/icons/sets/roughday.json +25 -0
- package/src/icons/sets/shared.json +12 -0
- package/src/icons/sets/slopcamera.json +47 -0
- package/src/icons/sets/soundfish.json +43 -0
- package/src/icons/sets/sponge.json +51 -0
- package/src/icons/sets/stripe-history.json +39 -0
- package/src/icons/sets/wordcell.json +51 -0
- package/src/icons/shared/agent-skill.svg +4 -0
- package/src/icons/shared/cli.svg +5 -0
- package/src/icons/shared/privacy.svg +3 -0
- package/src/icons/shared/research.svg +7 -0
- package/src/icons/shared/sdk.svg +3 -0
- package/src/icons/slopcamera/diagram.svg +3 -0
- package/src/icons/slopcamera/direct-scene.svg +5 -0
- package/src/icons/slopcamera/edit-video.svg +17 -0
- package/src/icons/slopcamera/mcp.svg +3 -0
- package/src/icons/slopcamera/native-world.svg +3 -0
- package/src/icons/slopcamera/slopcamera.svg +11 -0
- package/src/icons/soundfish/agent-ui.svg +7 -0
- package/src/icons/soundfish/collaborate.svg +5 -0
- package/src/icons/soundfish/compose.svg +3 -0
- package/src/icons/soundfish/hear.svg +6 -0
- package/src/icons/soundfish/human-ui.svg +6 -0
- package/src/icons/soundfish/share.svg +3 -0
- package/src/icons/soundfish/soundfish.svg +6 -0
- package/src/icons/sponge/api.svg +3 -0
- package/src/icons/sponge/documents.svg +3 -0
- package/src/icons/sponge/library.svg +3 -0
- package/src/icons/sponge/one-question.svg +5 -0
- package/src/icons/sponge/people-direct.svg +5 -0
- package/src/icons/sponge/read.svg +3 -0
- package/src/icons/sponge/save.svg +4 -0
- package/src/icons/sponge/sponge.svg +7 -0
- package/src/icons/stripe-history/company-history.svg +3 -0
- package/src/icons/stripe-history/evidence.svg +4 -0
- package/src/icons/stripe-history/independence.svg +7 -0
- package/src/icons/stripe-history/publications.svg +11 -0
- package/src/icons/stripe-history/sources.svg +6 -0
- package/src/icons/stripe-history/stripe-history.svg +3 -0
- package/src/icons/wordcell/backlinks.svg +6 -0
- package/src/icons/wordcell/capture.svg +6 -0
- package/src/icons/wordcell/git-provenance.svg +4 -0
- package/src/icons/wordcell/kb.svg +4 -0
- package/src/icons/wordcell/markdown.svg +4 -0
- package/src/icons/wordcell/scopes.svg +3 -0
- package/src/icons/wordcell/search.svg +7 -0
- package/src/icons.generated.ts +734 -0
- package/src/icons.ts +51 -0
- package/src/index.ts +275 -0
- package/src/lantern-material.css +213 -0
- package/src/launch.ts +624 -0
- package/src/marketing-assets/UPSTREAM.md +18 -0
- package/src/marketing-assets/cells.svg +1 -0
- package/src/marketing-assets/grain.svg +1 -0
- package/src/marketing-forced-colors.css +12 -0
- package/src/mockups/client.tsx +415 -0
- package/src/mockups/core.tsx +318 -0
- package/src/mockups/frames.tsx +368 -0
- package/src/mockups/index.ts +14 -0
- package/src/mockups/surfaces.tsx +681 -0
- package/src/mockups.css +2607 -0
- package/src/palette-appearance.ts +45 -0
- package/src/palette-bridge.css +124 -0
- package/src/palette-color.ts +41 -0
- package/src/palette-system.css +721 -0
- package/src/palette-themes.ts +23 -0
- package/src/palette-tokens.stylex.ts +519 -0
- package/src/palettes.css +3 -0
- package/src/palettes.ts +161 -0
- package/src/paper-theme.css +244 -0
- package/src/plain-publication.css +1241 -0
- package/src/plain-site.css +397 -0
- package/src/platforms.ts +151 -0
- package/src/portfolio.generated.json +1595 -0
- package/src/portfolio.generated.ts +1596 -0
- package/src/portfolio.ts +226 -0
- package/src/product-marketing-foundation.css +433 -0
- package/src/product-marketing-preset.css +261 -0
- package/src/product-marketing.css +2186 -0
- package/src/provider-marks.generated.ts +112 -0
- package/src/provider-marks.ts +143 -0
- package/src/react/animated-rail-stage.stylex.ts +15 -0
- package/src/react/animated-rail-stage.tsx +51 -0
- package/src/react/app-shell.stylex.ts +104 -0
- package/src/react/app-shell.tsx +121 -0
- package/src/react/article.tsx +602 -0
- package/src/react/aurora-dots-background.tsx +34 -0
- package/src/react/charts.stylex.ts +563 -0
- package/src/react/charts.tsx +610 -0
- package/src/react/chat.stylex.ts +34 -0
- package/src/react/chat.tsx +155 -0
- package/src/react/design-gallery.tsx +943 -0
- package/src/react/design-palette.stylex.ts +124 -0
- package/src/react/design-palette.tsx +196 -0
- package/src/react/design-theme-context.tsx +41 -0
- package/src/react/effects.stylex.ts +325 -0
- package/src/react/fader.stylex.ts +71 -0
- package/src/react/fader.tsx +151 -0
- package/src/react/foil-card-math.ts +100 -0
- package/src/react/foil-card-surface.stylex.ts +326 -0
- package/src/react/foil-card-surface.tsx +742 -0
- package/src/react/foil-mark.tsx +35 -0
- package/src/react/foil.stylex.ts +163 -0
- package/src/react/haptics.ts +228 -0
- package/src/react/hero-backdrop.tsx +22 -0
- package/src/react/index.ts +38 -0
- package/src/react/keyboard-shortcuts.ts +228 -0
- package/src/react/lantern-material-gallery.tsx +166 -0
- package/src/react/lantern-material.stylex.ts +39 -0
- package/src/react/launch-beats.tsx +73 -0
- package/src/react/navigation-rail.stylex.ts +130 -0
- package/src/react/navigation-rail.tsx +228 -0
- package/src/react/particle-halo.tsx +115 -0
- package/src/react/phaser-dots.tsx +501 -0
- package/src/react/platform-icons.tsx +94 -0
- package/src/react/platform-install.stylex.ts +385 -0
- package/src/react/platform-install.tsx +389 -0
- package/src/react/playback-transport.stylex.ts +14 -0
- package/src/react/playback-transport.tsx +112 -0
- package/src/react/procedural-backdrop.tsx +192 -0
- package/src/react/procedural-recipe.ts +323 -0
- package/src/react/product-marketing.stylex.ts +4469 -0
- package/src/react/product-marketing.tsx +1611 -0
- package/src/react/production-data-preview-notice.stylex.ts +40 -0
- package/src/react/production-data-preview-notice.tsx +34 -0
- package/src/react/provider-mark.stylex.ts +132 -0
- package/src/react/provider-mark.tsx +120 -0
- package/src/react/relative-time.tsx +117 -0
- package/src/react/route-state.stylex.ts +39 -0
- package/src/react/route-state.tsx +350 -0
- package/src/react/server.ts +11 -0
- package/src/react/social-kit-panel.tsx +103 -0
- package/src/react/sticky-offset.tsx +33 -0
- package/src/react/surfaces.stylex.ts +179 -0
- package/src/react/surfaces.tsx +330 -0
- package/src/react/syntax-code.tsx +33 -0
- package/src/react/theme-color-sync.ts +1 -0
- package/src/react/theme-resolution.ts +11 -0
- package/src/react/theme.stylex.ts +276 -0
- package/src/react/theme.tsx +402 -0
- package/src/reading.css +72 -0
- package/src/relative-time.ts +185 -0
- package/src/reset.css +2 -0
- package/src/site-shell.css +16 -0
- package/src/status-page-html.ts +63 -0
- package/src/status-page.css +276 -0
- package/src/status-page.ts +323 -0
- package/src/styles.css +21 -0
- package/src/syntax-code-lexers.ts +303 -0
- package/src/syntax-highlighting.css +78 -0
- package/src/syntax-highlighting.ts +477 -0
- package/src/syntax-tokens.ts +33 -0
- package/src/testing.ts +307 -0
- package/src/tokens.css +3 -0
- package/src/typography.css +86 -0
- package/vendor/evilcharts/LICENSE +21 -0
- package/vendor/evilcharts/UPSTREAM.md +14 -0
- package/vendor/platform-marks/LICENSE +30 -0
- package/vendor/platform-marks/UPSTREAM.md +15 -0
- package/vendor/platform-marks/apple.svg +1 -0
- package/vendor/platform-marks/linux.svg +1 -0
- package/vendor/provider-marks/CRUSH-LICENSE.md +134 -0
- package/vendor/provider-marks/LICENSE +21 -0
- package/vendor/provider-marks/UPSTREAM.md +27 -0
- package/vendor/provider-marks/aider.svg +3 -0
- package/vendor/provider-marks/crush-heartbit.svg +8 -0
- package/vendor/provider-marks/lobehub/alibabacloud-color.svg +1 -0
- package/vendor/provider-marks/lobehub/alibabacloud.svg +1 -0
- package/vendor/provider-marks/lobehub/amp-color.svg +1 -0
- package/vendor/provider-marks/lobehub/amp.svg +1 -0
- package/vendor/provider-marks/lobehub/anthropic.svg +1 -0
- package/vendor/provider-marks/lobehub/claude-color.svg +1 -0
- package/vendor/provider-marks/lobehub/claude.svg +1 -0
- package/vendor/provider-marks/lobehub/claudecode-color.svg +1 -0
- package/vendor/provider-marks/lobehub/claudecode.svg +1 -0
- package/vendor/provider-marks/lobehub/codex-color.svg +1 -0
- package/vendor/provider-marks/lobehub/codex.svg +1 -0
- package/vendor/provider-marks/lobehub/cursor.svg +1 -0
- package/vendor/provider-marks/lobehub/deepseek-color.svg +1 -0
- package/vendor/provider-marks/lobehub/deepseek.svg +1 -0
- package/vendor/provider-marks/lobehub/devin-color.svg +1 -0
- package/vendor/provider-marks/lobehub/devin.svg +1 -0
- package/vendor/provider-marks/lobehub/gemini-color.svg +1 -0
- package/vendor/provider-marks/lobehub/gemini.svg +1 -0
- package/vendor/provider-marks/lobehub/geminicli-color.svg +1 -0
- package/vendor/provider-marks/lobehub/geminicli.svg +1 -0
- package/vendor/provider-marks/lobehub/goose.svg +1 -0
- package/vendor/provider-marks/lobehub/meta-color.svg +1 -0
- package/vendor/provider-marks/lobehub/meta.svg +1 -0
- package/vendor/provider-marks/lobehub/mistral-color.svg +1 -0
- package/vendor/provider-marks/lobehub/mistral.svg +1 -0
- package/vendor/provider-marks/lobehub/moonshot.svg +1 -0
- package/vendor/provider-marks/lobehub/nvidia-color.svg +1 -0
- package/vendor/provider-marks/lobehub/nvidia.svg +1 -0
- package/vendor/provider-marks/lobehub/openai.svg +1 -0
- package/vendor/provider-marks/lobehub/opencode.svg +1 -0
- package/vendor/provider-marks/lobehub/perplexity-color.svg +1 -0
- package/vendor/provider-marks/lobehub/perplexity.svg +1 -0
- package/vendor/provider-marks/lobehub/qwen-color.svg +1 -0
- package/vendor/provider-marks/lobehub/qwen.svg +1 -0
- package/vendor/provider-marks/lobehub/xai.svg +1 -0
- package/vendor/provider-marks/lobehub/zai.svg +1 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
// src/mockups/core.tsx
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
+
function joinMockupClasses(...values) {
|
|
4
|
+
return values.filter((value) => typeof value === "string" && value !== "").join(" ");
|
|
5
|
+
}
|
|
6
|
+
function assertMockupDescription(describe, component) {
|
|
7
|
+
if (typeof describe !== "string" || describe.trim() === "") {
|
|
8
|
+
throw new TypeError(`${component} needs a describe string; it is the illustration's accessible name.`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function optOutAttributes(optOut) {
|
|
12
|
+
if (optOut === undefined)
|
|
13
|
+
return {};
|
|
14
|
+
const attributes = {};
|
|
15
|
+
for (const name of Object.keys(optOut)) {
|
|
16
|
+
if (!/^data-[a-z0-9-]+$/u.test(name))
|
|
17
|
+
throw new TypeError(`Mockup opt-out attribute ${JSON.stringify(name)} must be a lowercase data- attribute.`);
|
|
18
|
+
attributes[name] = "";
|
|
19
|
+
}
|
|
20
|
+
return attributes;
|
|
21
|
+
}
|
|
22
|
+
function MockupRoot({
|
|
23
|
+
children,
|
|
24
|
+
className,
|
|
25
|
+
describe,
|
|
26
|
+
kind,
|
|
27
|
+
optOut,
|
|
28
|
+
style,
|
|
29
|
+
theme
|
|
30
|
+
}) {
|
|
31
|
+
assertMockupDescription(describe, kind);
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
...optOutAttributes(optOut),
|
|
34
|
+
"aria-label": describe.trim(),
|
|
35
|
+
className: joinMockupClasses("hkm-root", `hkm-${kind}`, className),
|
|
36
|
+
"data-hkm-kind": kind,
|
|
37
|
+
"data-hkm-theme": theme,
|
|
38
|
+
"data-nosnippet": "",
|
|
39
|
+
role: "img",
|
|
40
|
+
style,
|
|
41
|
+
children
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function SampleText({
|
|
45
|
+
children,
|
|
46
|
+
optOut
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ jsx("span", {
|
|
49
|
+
...optOutAttributes(optOut),
|
|
50
|
+
className: "hkm-sample",
|
|
51
|
+
children
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function SampleParagraphs({
|
|
55
|
+
className,
|
|
56
|
+
optOut,
|
|
57
|
+
text
|
|
58
|
+
}) {
|
|
59
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
60
|
+
children: text.split(/\n{2,}/u).map((paragraph, index) => /* @__PURE__ */ jsx("p", {
|
|
61
|
+
className,
|
|
62
|
+
children: /* @__PURE__ */ jsx(SampleText, {
|
|
63
|
+
...optOut === undefined ? {} : {
|
|
64
|
+
optOut
|
|
65
|
+
},
|
|
66
|
+
children: paragraph
|
|
67
|
+
})
|
|
68
|
+
}, index))
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function compact(value) {
|
|
72
|
+
if (!Number.isFinite(value))
|
|
73
|
+
throw new RangeError("compact() needs a finite number.");
|
|
74
|
+
const sign = value < 0 ? "-" : "";
|
|
75
|
+
const n = Math.abs(value);
|
|
76
|
+
const scaled = (divisor, suffix) => {
|
|
77
|
+
const quotient = n / divisor;
|
|
78
|
+
const text = quotient < 10 ? (Math.floor(quotient * 10) / 10).toFixed(1).replace(/\.0$/u, "") : String(Math.floor(quotient));
|
|
79
|
+
return `${sign}${text}${suffix}`;
|
|
80
|
+
};
|
|
81
|
+
if (n < 1000)
|
|
82
|
+
return `${sign}${Math.round(n)}`;
|
|
83
|
+
if (n < 1e6)
|
|
84
|
+
return scaled(1000, "K");
|
|
85
|
+
if (n < 1e9)
|
|
86
|
+
return scaled(1e6, "M");
|
|
87
|
+
return scaled(1e9, "B");
|
|
88
|
+
}
|
|
89
|
+
function mockupHash(text) {
|
|
90
|
+
let hash = 2166136261;
|
|
91
|
+
for (let index = 0;index < text.length; index += 1)
|
|
92
|
+
hash = Math.imul(hash ^ text.charCodeAt(index), 16777619);
|
|
93
|
+
return hash >>> 0;
|
|
94
|
+
}
|
|
95
|
+
var GRADIENTS = [["#f6a57b", "#c2556b"], ["#7fb3ff", "#4c5fd7"], ["#8fdcb4", "#2f8f7a"], ["#f7d774", "#e0823d"], ["#c9a2ff", "#7653c8"], ["#ff9fb8", "#c24a86"], ["#9ad8e8", "#3a7fa3"], ["#d6c2a8", "#8a6a4b"]];
|
|
96
|
+
function gradientFor(seed, shift = 0) {
|
|
97
|
+
return GRADIENTS[(mockupHash(seed) >>> shift) % GRADIENTS.length] ?? GRADIENTS[0];
|
|
98
|
+
}
|
|
99
|
+
function mockupInitials(name) {
|
|
100
|
+
const isNameCharacter = (character) => character.toLowerCase() !== character.toUpperCase() || /[0-9]/u.test(character) || (character.codePointAt(0) ?? 0) >= 12288;
|
|
101
|
+
return name.split(/\s+/u).map((word) => Array.from(word).find(isNameCharacter) ?? "").filter(Boolean).slice(0, 2).map((initial) => initial.toUpperCase()).join("");
|
|
102
|
+
}
|
|
103
|
+
function Avatar({
|
|
104
|
+
name,
|
|
105
|
+
size = 40,
|
|
106
|
+
square = false
|
|
107
|
+
}) {
|
|
108
|
+
const [from, to] = gradientFor(name);
|
|
109
|
+
const style = {
|
|
110
|
+
background: `linear-gradient(135deg, ${from}, ${to})`,
|
|
111
|
+
borderRadius: square ? Math.round(size * 0.22) : "50%",
|
|
112
|
+
fontSize: Math.round(size * 0.38),
|
|
113
|
+
height: size,
|
|
114
|
+
width: size
|
|
115
|
+
};
|
|
116
|
+
return /* @__PURE__ */ jsx("span", {
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
className: "hkm-avatar",
|
|
119
|
+
style,
|
|
120
|
+
children: mockupInitials(name)
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function PlaceholderPhoto({
|
|
124
|
+
className,
|
|
125
|
+
ratio = "16 / 9",
|
|
126
|
+
seed
|
|
127
|
+
}) {
|
|
128
|
+
const [a, b] = gradientFor(seed);
|
|
129
|
+
const [c] = gradientFor(seed, 3);
|
|
130
|
+
return /* @__PURE__ */ jsx("span", {
|
|
131
|
+
"aria-hidden": "true",
|
|
132
|
+
className: joinMockupClasses("hkm-photo", className),
|
|
133
|
+
style: {
|
|
134
|
+
aspectRatio: ratio,
|
|
135
|
+
background: `radial-gradient(120% 90% at 20% 15%, ${a}cc, transparent 60%), radial-gradient(90% 80% at 85% 90%, ${c}bb, transparent 65%), linear-gradient(160deg, ${b}, ${a})`
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function ScrollFade({
|
|
140
|
+
children,
|
|
141
|
+
className,
|
|
142
|
+
fadeHeight = 56,
|
|
143
|
+
height
|
|
144
|
+
}) {
|
|
145
|
+
if (!(height > 0))
|
|
146
|
+
throw new RangeError("ScrollFade needs a positive height.");
|
|
147
|
+
return /* @__PURE__ */ jsx("div", {
|
|
148
|
+
className: joinMockupClasses("hkm-scroll-fade", className),
|
|
149
|
+
style: {
|
|
150
|
+
"--hkm-fade-height": `${fadeHeight}px`,
|
|
151
|
+
"--hkm-scroll-height": `${height}px`
|
|
152
|
+
},
|
|
153
|
+
children
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function Hotspot({
|
|
157
|
+
label,
|
|
158
|
+
x,
|
|
159
|
+
y
|
|
160
|
+
}) {
|
|
161
|
+
for (const [axis, value] of [["x", x], ["y", y]]) {
|
|
162
|
+
if (!Number.isFinite(value) || value < 0 || value > 100)
|
|
163
|
+
throw new RangeError(`Hotspot ${axis} must be a percentage from 0 to 100.`);
|
|
164
|
+
}
|
|
165
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
166
|
+
"aria-hidden": "true",
|
|
167
|
+
className: "hkm-hotspot",
|
|
168
|
+
"data-hkm-side": x > 60 ? "start" : "end",
|
|
169
|
+
style: {
|
|
170
|
+
insetBlockStart: `${y}%`,
|
|
171
|
+
insetInlineStart: `${x}%`
|
|
172
|
+
},
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ jsx("span", {
|
|
175
|
+
className: "hkm-hotspot-ring"
|
|
176
|
+
}),
|
|
177
|
+
label === undefined || label === "" ? null : /* @__PURE__ */ jsx("span", {
|
|
178
|
+
className: "hkm-hotspot-label",
|
|
179
|
+
children: label
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
var GLYPHS = {
|
|
185
|
+
archive: /* @__PURE__ */ jsxs(Fragment, {
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ jsx("rect", {
|
|
188
|
+
height: "4",
|
|
189
|
+
rx: "1",
|
|
190
|
+
width: "17",
|
|
191
|
+
x: "3.5",
|
|
192
|
+
y: "4.5"
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ jsx("path", {
|
|
195
|
+
d: "M5 8.5V19a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8.5M10 12.5h4"
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}),
|
|
199
|
+
back: /* @__PURE__ */ jsx("path", {
|
|
200
|
+
d: "m14.5 6-6 6 6 6"
|
|
201
|
+
}),
|
|
202
|
+
bell: /* @__PURE__ */ jsxs(Fragment, {
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ jsx("path", {
|
|
205
|
+
d: "M6 16.5V11a6 6 0 0 1 12 0v5.5l1.5 1.5h-15z"
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ jsx("path", {
|
|
208
|
+
d: "M10 20.5a2.2 2.2 0 0 0 4 0"
|
|
209
|
+
})
|
|
210
|
+
]
|
|
211
|
+
}),
|
|
212
|
+
bookmark: /* @__PURE__ */ jsx("path", {
|
|
213
|
+
d: "M6.5 4h11v16.5L12 16.5l-5.5 4z"
|
|
214
|
+
}),
|
|
215
|
+
chart: /* @__PURE__ */ jsx("path", {
|
|
216
|
+
d: "M5 20V12M10 20V6M15 20v-9M20 20V9"
|
|
217
|
+
}),
|
|
218
|
+
check: /* @__PURE__ */ jsx("path", {
|
|
219
|
+
d: "m6.5 12.5 3.5 3.5 7.5-8"
|
|
220
|
+
}),
|
|
221
|
+
clock: /* @__PURE__ */ jsxs(Fragment, {
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ jsx("circle", {
|
|
224
|
+
cx: "12",
|
|
225
|
+
cy: "12",
|
|
226
|
+
r: "8"
|
|
227
|
+
}),
|
|
228
|
+
/* @__PURE__ */ jsx("path", {
|
|
229
|
+
d: "M12 7.5V12l3 2"
|
|
230
|
+
})
|
|
231
|
+
]
|
|
232
|
+
}),
|
|
233
|
+
comment: /* @__PURE__ */ jsx("path", {
|
|
234
|
+
d: "M4.5 5.5h15v10h-9l-4.5 4v-4h-1.5z"
|
|
235
|
+
}),
|
|
236
|
+
file: /* @__PURE__ */ jsx("path", {
|
|
237
|
+
d: "M6.5 3.5h7l4 4v13h-11zM13.5 3.5v4h4"
|
|
238
|
+
}),
|
|
239
|
+
forward: /* @__PURE__ */ jsx("path", {
|
|
240
|
+
d: "m9.5 6 6 6-6 6"
|
|
241
|
+
}),
|
|
242
|
+
grid: /* @__PURE__ */ jsxs(Fragment, {
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ jsx("rect", {
|
|
245
|
+
height: "6",
|
|
246
|
+
rx: "1.2",
|
|
247
|
+
width: "6",
|
|
248
|
+
x: "4",
|
|
249
|
+
y: "4"
|
|
250
|
+
}),
|
|
251
|
+
/* @__PURE__ */ jsx("rect", {
|
|
252
|
+
height: "6",
|
|
253
|
+
rx: "1.2",
|
|
254
|
+
width: "6",
|
|
255
|
+
x: "14",
|
|
256
|
+
y: "4"
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ jsx("rect", {
|
|
259
|
+
height: "6",
|
|
260
|
+
rx: "1.2",
|
|
261
|
+
width: "6",
|
|
262
|
+
x: "4",
|
|
263
|
+
y: "14"
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ jsx("rect", {
|
|
266
|
+
height: "6",
|
|
267
|
+
rx: "1.2",
|
|
268
|
+
width: "6",
|
|
269
|
+
x: "14",
|
|
270
|
+
y: "14"
|
|
271
|
+
})
|
|
272
|
+
]
|
|
273
|
+
}),
|
|
274
|
+
heart: /* @__PURE__ */ jsx("path", {
|
|
275
|
+
d: "M12 20s-7.5-4.4-7.5-10A4.3 4.3 0 0 1 12 7.3 4.3 4.3 0 0 1 19.5 10c0 5.6-7.5 10-7.5 10z"
|
|
276
|
+
}),
|
|
277
|
+
home: /* @__PURE__ */ jsx("path", {
|
|
278
|
+
d: "M4 10.5 12 4l8 6.5V20a1 1 0 0 1-1 1h-4.5v-6h-5v6H5a1 1 0 0 1-1-1z"
|
|
279
|
+
}),
|
|
280
|
+
inbox: /* @__PURE__ */ jsxs(Fragment, {
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsx("path", {
|
|
283
|
+
d: "M4 13.5 6.5 5h11l2.5 8.5V19H4z"
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ jsx("path", {
|
|
286
|
+
d: "M4 13.5h4.5l1 2h5l1-2H20"
|
|
287
|
+
})
|
|
288
|
+
]
|
|
289
|
+
}),
|
|
290
|
+
lock: /* @__PURE__ */ jsxs(Fragment, {
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ jsx("rect", {
|
|
293
|
+
height: "9",
|
|
294
|
+
rx: "1.5",
|
|
295
|
+
width: "12",
|
|
296
|
+
x: "6",
|
|
297
|
+
y: "10.5"
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ jsx("path", {
|
|
300
|
+
d: "M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5"
|
|
301
|
+
})
|
|
302
|
+
]
|
|
303
|
+
}),
|
|
304
|
+
mail: /* @__PURE__ */ jsxs(Fragment, {
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ jsx("rect", {
|
|
307
|
+
height: "14",
|
|
308
|
+
rx: "2",
|
|
309
|
+
width: "18",
|
|
310
|
+
x: "3",
|
|
311
|
+
y: "5"
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx("path", {
|
|
314
|
+
d: "m3.5 6.5 8.5 6.5 8.5-6.5"
|
|
315
|
+
})
|
|
316
|
+
]
|
|
317
|
+
}),
|
|
318
|
+
menu: /* @__PURE__ */ jsx("path", {
|
|
319
|
+
d: "M4 7h16M4 12h16M4 17h16"
|
|
320
|
+
}),
|
|
321
|
+
more: /* @__PURE__ */ jsxs(Fragment, {
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ jsx("circle", {
|
|
324
|
+
cx: "5.5",
|
|
325
|
+
cy: "12",
|
|
326
|
+
fill: "currentColor",
|
|
327
|
+
r: "1.4",
|
|
328
|
+
stroke: "none"
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ jsx("circle", {
|
|
331
|
+
cx: "12",
|
|
332
|
+
cy: "12",
|
|
333
|
+
fill: "currentColor",
|
|
334
|
+
r: "1.4",
|
|
335
|
+
stroke: "none"
|
|
336
|
+
}),
|
|
337
|
+
/* @__PURE__ */ jsx("circle", {
|
|
338
|
+
cx: "18.5",
|
|
339
|
+
cy: "12",
|
|
340
|
+
fill: "currentColor",
|
|
341
|
+
r: "1.4",
|
|
342
|
+
stroke: "none"
|
|
343
|
+
})
|
|
344
|
+
]
|
|
345
|
+
}),
|
|
346
|
+
pencil: /* @__PURE__ */ jsx("path", {
|
|
347
|
+
d: "M4.5 19.5 5.5 15 15.5 5a2 2 0 0 1 3 3l-10 10zM13.5 7l3 3"
|
|
348
|
+
}),
|
|
349
|
+
people: /* @__PURE__ */ jsxs(Fragment, {
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ jsx("circle", {
|
|
352
|
+
cx: "9",
|
|
353
|
+
cy: "9",
|
|
354
|
+
r: "3.2"
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ jsx("path", {
|
|
357
|
+
d: "M3.5 19c.8-3.3 3-5 5.5-5s4.7 1.7 5.5 5"
|
|
358
|
+
}),
|
|
359
|
+
/* @__PURE__ */ jsx("circle", {
|
|
360
|
+
cx: "16.5",
|
|
361
|
+
cy: "8.5",
|
|
362
|
+
r: "2.6"
|
|
363
|
+
}),
|
|
364
|
+
/* @__PURE__ */ jsx("path", {
|
|
365
|
+
d: "M16 13.6c2.3.1 4 1.6 4.6 4.4"
|
|
366
|
+
})
|
|
367
|
+
]
|
|
368
|
+
}),
|
|
369
|
+
plus: /* @__PURE__ */ jsx("path", {
|
|
370
|
+
d: "M12 5v14M5 12h14"
|
|
371
|
+
}),
|
|
372
|
+
reload: /* @__PURE__ */ jsxs(Fragment, {
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ jsx("path", {
|
|
375
|
+
d: "M19 12a7 7 0 1 1-2.1-5"
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ jsx("path", {
|
|
378
|
+
d: "M17.5 3.5V7.5h-4"
|
|
379
|
+
})
|
|
380
|
+
]
|
|
381
|
+
}),
|
|
382
|
+
reply: /* @__PURE__ */ jsx("path", {
|
|
383
|
+
d: "M12 19.5c4.7 0 8.5-3.2 8.5-7.3S16.7 5 12 5 3.5 8.1 3.5 12.2c0 1.8.7 3.4 2 4.7L5 20.5l3.6-1.6c1 .4 2.2.6 3.4.6z"
|
|
384
|
+
}),
|
|
385
|
+
repost: /* @__PURE__ */ jsxs(Fragment, {
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ jsx("path", {
|
|
388
|
+
d: "M7 5 4 8l3 3"
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ jsx("path", {
|
|
391
|
+
d: "M4 8h11a4 4 0 0 1 4 4v1"
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ jsx("path", {
|
|
394
|
+
d: "m17 19 3-3-3-3"
|
|
395
|
+
}),
|
|
396
|
+
/* @__PURE__ */ jsx("path", {
|
|
397
|
+
d: "M20 16H9a4 4 0 0 1-4-4v-1"
|
|
398
|
+
})
|
|
399
|
+
]
|
|
400
|
+
}),
|
|
401
|
+
search: /* @__PURE__ */ jsxs(Fragment, {
|
|
402
|
+
children: [
|
|
403
|
+
/* @__PURE__ */ jsx("circle", {
|
|
404
|
+
cx: "11",
|
|
405
|
+
cy: "11",
|
|
406
|
+
r: "6.5"
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ jsx("path", {
|
|
409
|
+
d: "m16 16 4.5 4.5"
|
|
410
|
+
})
|
|
411
|
+
]
|
|
412
|
+
}),
|
|
413
|
+
send: /* @__PURE__ */ jsx("path", {
|
|
414
|
+
d: "m20.5 3.5-17 7 7 2.5 2.5 7zM10.5 13l10-9.5"
|
|
415
|
+
}),
|
|
416
|
+
share: /* @__PURE__ */ jsxs(Fragment, {
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ jsx("path", {
|
|
419
|
+
d: "M12 15V4"
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ jsx("path", {
|
|
422
|
+
d: "m7.5 8.5 4.5-4.5 4.5 4.5"
|
|
423
|
+
}),
|
|
424
|
+
/* @__PURE__ */ jsx("path", {
|
|
425
|
+
d: "M5 13v6a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-6"
|
|
426
|
+
})
|
|
427
|
+
]
|
|
428
|
+
}),
|
|
429
|
+
sidebar: /* @__PURE__ */ jsxs(Fragment, {
|
|
430
|
+
children: [
|
|
431
|
+
/* @__PURE__ */ jsx("rect", {
|
|
432
|
+
height: "15",
|
|
433
|
+
rx: "2.5",
|
|
434
|
+
width: "18",
|
|
435
|
+
x: "3",
|
|
436
|
+
y: "4.5"
|
|
437
|
+
}),
|
|
438
|
+
/* @__PURE__ */ jsx("path", {
|
|
439
|
+
d: "M9 4.5v15"
|
|
440
|
+
})
|
|
441
|
+
]
|
|
442
|
+
}),
|
|
443
|
+
sparkle: /* @__PURE__ */ jsx("path", {
|
|
444
|
+
d: "M12 3.5 13.8 10l6.7 2-6.7 2L12 20.5 10.2 14l-6.7-2 6.7-2z"
|
|
445
|
+
}),
|
|
446
|
+
star: /* @__PURE__ */ jsx("path", {
|
|
447
|
+
d: "m12 4 2.4 5 5.4.6-4 3.7 1.1 5.4L12 16l-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z"
|
|
448
|
+
}),
|
|
449
|
+
terminal: /* @__PURE__ */ jsxs(Fragment, {
|
|
450
|
+
children: [
|
|
451
|
+
/* @__PURE__ */ jsx("rect", {
|
|
452
|
+
height: "15",
|
|
453
|
+
rx: "2.5",
|
|
454
|
+
width: "18",
|
|
455
|
+
x: "3",
|
|
456
|
+
y: "4.5"
|
|
457
|
+
}),
|
|
458
|
+
/* @__PURE__ */ jsx("path", {
|
|
459
|
+
d: "m7 9.5 3 2.5-3 2.5M12 15h5"
|
|
460
|
+
})
|
|
461
|
+
]
|
|
462
|
+
}),
|
|
463
|
+
thumb: /* @__PURE__ */ jsx("path", {
|
|
464
|
+
d: "M7.5 10.5v9h-3v-9zM7.5 10.5l3.5-6.5c1.4 0 2.3 1 2 2.4l-.6 3.1h5.1c1.2 0 2 1 1.8 2.2l-1.2 6.2c-.2 1-1 1.6-2 1.6H7.5"
|
|
465
|
+
}),
|
|
466
|
+
trash: /* @__PURE__ */ jsx("path", {
|
|
467
|
+
d: "M5 7h14M9.5 7V4.5h5V7M6.5 7l1 13h9l1-13"
|
|
468
|
+
}),
|
|
469
|
+
user: /* @__PURE__ */ jsxs(Fragment, {
|
|
470
|
+
children: [
|
|
471
|
+
/* @__PURE__ */ jsx("circle", {
|
|
472
|
+
cx: "12",
|
|
473
|
+
cy: "8.5",
|
|
474
|
+
r: "3.8"
|
|
475
|
+
}),
|
|
476
|
+
/* @__PURE__ */ jsx("path", {
|
|
477
|
+
d: "M4.5 20.5c1-4 4-6 7.5-6s6.5 2 7.5 6"
|
|
478
|
+
})
|
|
479
|
+
]
|
|
480
|
+
})
|
|
481
|
+
};
|
|
482
|
+
var mockupGlyphNames = Object.freeze(Object.keys(GLYPHS));
|
|
483
|
+
function MockupGlyph({
|
|
484
|
+
className,
|
|
485
|
+
filled = false,
|
|
486
|
+
name,
|
|
487
|
+
size = 20
|
|
488
|
+
}) {
|
|
489
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
490
|
+
"aria-hidden": "true",
|
|
491
|
+
className: joinMockupClasses("hkm-glyph", className),
|
|
492
|
+
fill: filled ? "currentColor" : "none",
|
|
493
|
+
focusable: "false",
|
|
494
|
+
height: size,
|
|
495
|
+
stroke: "currentColor",
|
|
496
|
+
strokeLinecap: "round",
|
|
497
|
+
strokeLinejoin: "round",
|
|
498
|
+
strokeWidth: 1.75,
|
|
499
|
+
viewBox: "0 0 24 24",
|
|
500
|
+
width: size,
|
|
501
|
+
children: GLYPHS[name]
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
function WindowLights() {
|
|
505
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
506
|
+
"aria-hidden": "true",
|
|
507
|
+
className: "hkm-lights",
|
|
508
|
+
children: [
|
|
509
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
510
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
511
|
+
/* @__PURE__ */ jsx("i", {})
|
|
512
|
+
]
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export { joinMockupClasses, assertMockupDescription, MockupRoot, SampleText, SampleParagraphs, compact, mockupHash, mockupInitials, Avatar, PlaceholderPhoto, ScrollFade, Hotspot, mockupGlyphNames, MockupGlyph, WindowLights };
|