@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,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
highlightCode,
|
|
3
|
+
inferSyntaxLanguage,
|
|
4
|
+
maximumSyntaxCharacters,
|
|
5
|
+
resolveSyntaxLanguage,
|
|
6
|
+
syntaxLanguages
|
|
7
|
+
} from "./chunk-he8eznb1.js";
|
|
8
|
+
import"./chunk-5gtx3pza.js";
|
|
9
|
+
export {
|
|
10
|
+
syntaxLanguages,
|
|
11
|
+
resolveSyntaxLanguage,
|
|
12
|
+
maximumSyntaxCharacters,
|
|
13
|
+
inferSyntaxLanguage,
|
|
14
|
+
highlightCode
|
|
15
|
+
};
|
package/dist/testing.js
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import {
|
|
2
|
+
articleAdmissionScore,
|
|
3
|
+
assertArticleAdmissions,
|
|
4
|
+
isArticleIndexable
|
|
5
|
+
} from "./chunk-77391vmq.js";
|
|
6
|
+
import {
|
|
7
|
+
LAUNCH_INTERNAL_WORDS,
|
|
8
|
+
launchCopyProblems
|
|
9
|
+
} from "./chunk-cejpzyfh.js";
|
|
10
|
+
import"./chunk-5gtx3pza.js";
|
|
11
|
+
|
|
12
|
+
// src/testing.ts
|
|
13
|
+
class ConformanceError extends Error {
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = "ConformanceError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function fail(message) {
|
|
20
|
+
throw new ConformanceError(message);
|
|
21
|
+
}
|
|
22
|
+
function htmlText(html) {
|
|
23
|
+
return html.replace(/<(script|style)\b[\s\S]*?<\/\1>/giu, " ").replace(/<[^>]+>/gu, " ").replace(/'|'|'/gu, "'").replace(/"/gu, '"').replace(/</gu, "<").replace(/>/gu, ">").replace(/ /gu, " ").replace(/&/gu, "&").replace(/\s+/gu, " ").trim();
|
|
24
|
+
}
|
|
25
|
+
function stripMockupSamples(html, attributes = []) {
|
|
26
|
+
let result = html.replace(/<span\b[^>]*\sclass="[^"]*\bhkm-sample\b[^"]*"[^>]*>[^<]*<\/span>/gu, " ");
|
|
27
|
+
for (const attribute of attributes) {
|
|
28
|
+
const escaped = attribute.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
29
|
+
result = result.replace(new RegExp(`<(span|p|div)\\b[^>]*\\s${escaped}(=("[^"]*"|'[^']*'))?[^>]*>[^<]*</\\1>`, "gu"), " ");
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
var BLOG_CONFORMANCE_LIMITS = Object.freeze({
|
|
34
|
+
heading: 70,
|
|
35
|
+
descriptionMin: 70,
|
|
36
|
+
descriptionMax: 160,
|
|
37
|
+
dek: 200
|
|
38
|
+
});
|
|
39
|
+
function admissionFor(admissions, post, siteUrl) {
|
|
40
|
+
const found = admissions.find((admission) => admission.href === post.path || admission.href === `${siteUrl}${post.path}`);
|
|
41
|
+
return found ?? fail(`No admission record for ${post.path}.`);
|
|
42
|
+
}
|
|
43
|
+
function blogConformance(config) {
|
|
44
|
+
const limits = config.limits ?? BLOG_CONFORMANCE_LIMITS;
|
|
45
|
+
const sampleAttributes = config.sampleAttributes ?? [];
|
|
46
|
+
const indexable = (post) => isArticleIndexable(admissionFor(config.admissions, post, config.siteUrl));
|
|
47
|
+
const checks = [{
|
|
48
|
+
name: "every post has one admission record that passes the validator",
|
|
49
|
+
run: () => {
|
|
50
|
+
assertArticleAdmissions(config.admissions);
|
|
51
|
+
const paths = config.posts.map((post) => post.path);
|
|
52
|
+
if (new Set(paths).size !== paths.length)
|
|
53
|
+
fail("Two posts share a path.");
|
|
54
|
+
if (config.admissions.length !== config.posts.length)
|
|
55
|
+
fail(`${config.admissions.length} admission records for ${config.posts.length} posts.`);
|
|
56
|
+
for (const post of config.posts)
|
|
57
|
+
admissionFor(config.admissions, post, config.siteUrl);
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
name: "an indexable post has a real assessment, sources, and a review",
|
|
61
|
+
run: () => {
|
|
62
|
+
for (const post of config.posts.filter(indexable)) {
|
|
63
|
+
const admission = admissionFor(config.admissions, post, config.siteUrl);
|
|
64
|
+
if (articleAdmissionScore(admission.scores) < 9)
|
|
65
|
+
fail(`${post.path} scores below 9.`);
|
|
66
|
+
if (Object.values(admission.scores).includes(0))
|
|
67
|
+
fail(`${post.path} has a zero score.`);
|
|
68
|
+
if (admission.review === null)
|
|
69
|
+
fail(`${post.path} is indexable without a review.`);
|
|
70
|
+
if (admission.sources.length === 0)
|
|
71
|
+
fail(`${post.path} is indexable without sources.`);
|
|
72
|
+
if (admission.observations.length < 2)
|
|
73
|
+
fail(`${post.path} needs two observations.`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
name: "headings, descriptions, and deks are unique and within limits",
|
|
78
|
+
run: () => {
|
|
79
|
+
for (const key of ["heading", "description", "dek"]) {
|
|
80
|
+
const values = config.posts.map((post) => post[key]);
|
|
81
|
+
if (new Set(values).size !== values.length)
|
|
82
|
+
fail(`Two posts share a ${key}.`);
|
|
83
|
+
}
|
|
84
|
+
for (const post of config.posts) {
|
|
85
|
+
if (post.heading.length > limits.heading)
|
|
86
|
+
fail(`${post.path} heading is longer than ${limits.heading}.`);
|
|
87
|
+
if (/\.$/u.test(post.heading))
|
|
88
|
+
fail(`${post.path} heading ends with a period.`);
|
|
89
|
+
if (post.description.length < limits.descriptionMin || post.description.length > limits.descriptionMax) {
|
|
90
|
+
fail(`${post.path} description is outside ${limits.descriptionMin} to ${limits.descriptionMax} characters.`);
|
|
91
|
+
}
|
|
92
|
+
if (post.dek.length > limits.dek)
|
|
93
|
+
fail(`${post.path} dek is longer than ${limits.dek}.`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
name: "every post renders with one h1, the article root, and JSON-LD",
|
|
98
|
+
run: async () => {
|
|
99
|
+
for (const post of config.posts) {
|
|
100
|
+
const html = await config.renderPost(post);
|
|
101
|
+
const h1 = html.match(/<h1\b/gu)?.length ?? 0;
|
|
102
|
+
if (h1 !== 1)
|
|
103
|
+
fail(`${post.path} renders ${h1} h1 elements.`);
|
|
104
|
+
if (!html.includes("data-hraness-article"))
|
|
105
|
+
fail(`${post.path} is missing the article root.`);
|
|
106
|
+
if (!html.includes("application/ld+json"))
|
|
107
|
+
fail(`${post.path} is missing JSON-LD.`);
|
|
108
|
+
for (const match of html.matchAll(/href="#([^"]+)"/gu)) {
|
|
109
|
+
if (!html.includes(`id="${match[1] ?? ""}"`))
|
|
110
|
+
fail(`${post.path} links to #${match[1] ?? ""}, which does not exist.`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
name: "public copy follows the article style rules",
|
|
116
|
+
run: async () => {
|
|
117
|
+
for (const post of config.posts) {
|
|
118
|
+
const html = await config.renderPost(post);
|
|
119
|
+
const fields = [post.heading, post.dek, post.description, post.imageAlt ?? ""].join(" ");
|
|
120
|
+
const prose = `${fields} ${htmlText(stripMockupSamples(html, sampleAttributes))}`;
|
|
121
|
+
const problems = launchCopyProblems(prose, post.path).filter((problem) => !problem.includes("internal word") && !problem.includes("ends with a question mark") && !problem.includes("thread marker"));
|
|
122
|
+
if (problems.length > 0)
|
|
123
|
+
fail(problems.join(`
|
|
124
|
+
`));
|
|
125
|
+
const internal = new RegExp(`\\b(${LAUNCH_INTERNAL_WORDS.join("|")})s?\\b`, "iu").exec(fields);
|
|
126
|
+
if (internal !== null)
|
|
127
|
+
fail(`${post.path} uses the internal word "${internal[0]}" in its heading, dek, or description.`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}];
|
|
131
|
+
if (config.robots !== undefined) {
|
|
132
|
+
const robots = config.robots;
|
|
133
|
+
checks.push({
|
|
134
|
+
name: "only indexable posts ask to be indexed",
|
|
135
|
+
run: async () => {
|
|
136
|
+
for (const post of config.posts) {
|
|
137
|
+
const value = await robots(post);
|
|
138
|
+
if (value.index !== indexable(post))
|
|
139
|
+
fail(`${post.path} robots index=${String(value.index)} disagrees with its lifecycle.`);
|
|
140
|
+
if (!value.follow)
|
|
141
|
+
fail(`${post.path} asks crawlers not to follow links.`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (config.renderIndex !== undefined || config.sitemapUrls !== undefined || config.feedXml !== undefined) {
|
|
147
|
+
checks.push({
|
|
148
|
+
name: "the index, sitemap, and feed list exactly the indexable posts",
|
|
149
|
+
run: async () => {
|
|
150
|
+
const index = config.renderIndex === undefined ? null : await config.renderIndex();
|
|
151
|
+
const urls = config.sitemapUrls === undefined ? null : new Set(await config.sitemapUrls());
|
|
152
|
+
const feed = config.feedXml === undefined ? null : await config.feedXml();
|
|
153
|
+
for (const post of config.posts) {
|
|
154
|
+
const shown = indexable(post);
|
|
155
|
+
const absolute = `${config.siteUrl}${post.path}`;
|
|
156
|
+
if (index !== null && index.includes(`href="${post.path}"`) !== shown)
|
|
157
|
+
fail(`The index ${shown ? "omits" : "lists"} ${post.path}.`);
|
|
158
|
+
if (urls !== null && urls.has(absolute) !== shown)
|
|
159
|
+
fail(`The sitemap ${shown ? "omits" : "lists"} ${post.path}.`);
|
|
160
|
+
if (feed !== null && feed.includes(absolute) !== shown)
|
|
161
|
+
fail(`The feed ${shown ? "omits" : "lists"} ${post.path}.`);
|
|
162
|
+
}
|
|
163
|
+
if (feed !== null && /&(?!amp;|lt;|gt;|quot;|apos;|#\d+;|#x[0-9a-f]+;)/iu.test(feed))
|
|
164
|
+
fail("The feed has an unescaped ampersand.");
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
if (config.listedDates !== undefined) {
|
|
169
|
+
const listedDates = config.listedDates;
|
|
170
|
+
checks.push({
|
|
171
|
+
name: "listed posts are newest first",
|
|
172
|
+
run: () => {
|
|
173
|
+
const dates = listedDates();
|
|
174
|
+
const sorted = dates.toSorted().toReversed();
|
|
175
|
+
if (dates.some((date, index) => date !== sorted[index]))
|
|
176
|
+
fail("Listed posts are not newest first.");
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return Object.freeze(checks);
|
|
181
|
+
}
|
|
182
|
+
function renderMatrix(render, cases, options = {}) {
|
|
183
|
+
const entries = Object.entries(cases).map(([name, props]) => Object.freeze({
|
|
184
|
+
name,
|
|
185
|
+
props,
|
|
186
|
+
html: render(props)
|
|
187
|
+
}));
|
|
188
|
+
if (options.allowIdentical !== true) {
|
|
189
|
+
const seen = new Map;
|
|
190
|
+
for (const entry of entries) {
|
|
191
|
+
const previous = seen.get(entry.html);
|
|
192
|
+
if (previous !== undefined)
|
|
193
|
+
fail(`Cases "${previous}" and "${entry.name}" render the same markup.`);
|
|
194
|
+
seen.set(entry.html, entry.name);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return Object.freeze(entries);
|
|
198
|
+
}
|
|
199
|
+
function assertNoHeadings(html, label = "markup") {
|
|
200
|
+
const match = /<h[1-6]\b|role="heading"/iu.exec(html);
|
|
201
|
+
if (match !== null)
|
|
202
|
+
fail(`${label} contains a heading (${match[0]}); mockups must not add to the page outline.`);
|
|
203
|
+
}
|
|
204
|
+
function assertRoleImgWithLabel(html, label = "markup") {
|
|
205
|
+
const root = /^\s*<([a-z][a-z0-9-]*)\b([^>]*)>/iu.exec(html);
|
|
206
|
+
if (root === null)
|
|
207
|
+
fail(`${label} has no root element.`);
|
|
208
|
+
const attributes = root[2] ?? "";
|
|
209
|
+
if (!/\srole="img"/u.test(attributes))
|
|
210
|
+
fail(`${label} root is not role="img".`);
|
|
211
|
+
const aria = /\saria-label="([^"]*)"/u.exec(attributes);
|
|
212
|
+
if (aria === null || (aria[1] ?? "").trim().length === 0)
|
|
213
|
+
fail(`${label} root has no aria-label.`);
|
|
214
|
+
if (!/\sdata-nosnippet(=|\s|>|$)/u.test(attributes) && !attributes.includes("data-nosnippet"))
|
|
215
|
+
fail(`${label} root is missing data-nosnippet.`);
|
|
216
|
+
const inner = html.slice(root[0].length);
|
|
217
|
+
if (/<(a|button|input|select|textarea)\b/iu.test(inner))
|
|
218
|
+
fail(`${label} contains an interactive element inside an image.`);
|
|
219
|
+
if (/\stabindex="(?!-1")/iu.test(inner))
|
|
220
|
+
fail(`${label} contains a focusable element inside an image.`);
|
|
221
|
+
}
|
|
222
|
+
var RESERVED_HOST = /^([a-z0-9-]+\.)*(example\.(com|net|org)|[a-z0-9-]+\.(example|test|invalid|localhost))$/iu;
|
|
223
|
+
function assertFakeHandles(html, allowedHandles, label = "markup") {
|
|
224
|
+
const text = htmlText(html);
|
|
225
|
+
const allowed = new Set(allowedHandles.map((handle) => handle.replace(/^@/u, "").toLowerCase()));
|
|
226
|
+
for (const match of text.matchAll(/(^|[\s(])@([a-z0-9_.]{2,30})\b/giu)) {
|
|
227
|
+
const handle = (match[2] ?? "").toLowerCase();
|
|
228
|
+
if (!allowed.has(handle))
|
|
229
|
+
fail(`${label} shows the handle @${handle}, which is not in the invented list.`);
|
|
230
|
+
}
|
|
231
|
+
for (const match of text.matchAll(/\b[a-z0-9._%+-]+@([a-z0-9.-]+\.[a-z]{2,})\b/giu)) {
|
|
232
|
+
if (!RESERVED_HOST.test(match[1] ?? ""))
|
|
233
|
+
fail(`${label} shows the email ${match[0]}, which is not on a reserved example domain.`);
|
|
234
|
+
}
|
|
235
|
+
for (const match of html.matchAll(/\bhref="https?:\/\/([^/"]+)/giu)) {
|
|
236
|
+
if (!RESERVED_HOST.test(match[1] ?? ""))
|
|
237
|
+
fail(`${label} links to ${match[1] ?? ""}, which is not a reserved example domain.`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export {
|
|
241
|
+
stripMockupSamples,
|
|
242
|
+
renderMatrix,
|
|
243
|
+
htmlText,
|
|
244
|
+
blogConformance,
|
|
245
|
+
assertRoleImgWithLabel,
|
|
246
|
+
assertNoHeadings,
|
|
247
|
+
assertFakeHandles,
|
|
248
|
+
ConformanceError,
|
|
249
|
+
BLOG_CONFORMANCE_LIMITS
|
|
250
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hraness/design-kit",
|
|
3
|
+
"version": "0.31.1",
|
|
4
|
+
"description": "React components and CSS for Hraness apps and product sites: application shells, marketing sections, charts, themes, effects, and syntax highlighting. Built on @hraness/ui.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"./dist/stylex.css",
|
|
9
|
+
"./src/*.css"
|
|
10
|
+
],
|
|
11
|
+
"packageManager": "bun@1.3.14",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/hraness/design-kit.git"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/hraness/design-kit#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/hraness/design-kit/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"react",
|
|
22
|
+
"design-system",
|
|
23
|
+
"charts",
|
|
24
|
+
"stylex",
|
|
25
|
+
"effects",
|
|
26
|
+
"accessibility"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./src/index.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./browser": {
|
|
34
|
+
"types": "./src/browser/index.ts",
|
|
35
|
+
"import": "./dist/browser/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./appearance-menu.css": "./src/appearance-menu.css",
|
|
38
|
+
"./react": {
|
|
39
|
+
"types": "./src/react/index.ts",
|
|
40
|
+
"import": "./dist/react/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./react/server": {
|
|
43
|
+
"types": "./src/react/server.ts",
|
|
44
|
+
"import": "./dist/react/server.js"
|
|
45
|
+
},
|
|
46
|
+
"./charts.css": "./src/charts.css",
|
|
47
|
+
"./compiler-foundation.css": "./src/compiler-foundation.css",
|
|
48
|
+
"./compiler-palettes.css": "./src/compiler-palettes.css",
|
|
49
|
+
"./components.css": "./src/components.css",
|
|
50
|
+
"./design-gallery.css": "./src/design-gallery.css",
|
|
51
|
+
"./effects.css": "./src/effects.css",
|
|
52
|
+
"./fonts.css": "./src/fonts.css",
|
|
53
|
+
"./icons": {
|
|
54
|
+
"types": "./src/icons.ts",
|
|
55
|
+
"import": "./dist/icons.js"
|
|
56
|
+
},
|
|
57
|
+
"./icons/*": "./src/icons/*",
|
|
58
|
+
"./fonts/geist-mono/GeistMono[wght].woff2": "./src/fonts/geist-mono/GeistMono[wght].woff2",
|
|
59
|
+
"./fonts/nebula-sans/*": "./src/fonts/nebula-sans/*",
|
|
60
|
+
"./fonts/nebula-sans/social": {
|
|
61
|
+
"types": "./src/fonts/nebula-sans/social-fonts.generated.ts",
|
|
62
|
+
"import": "./dist/fonts/nebula-sans/social-fonts.generated.js"
|
|
63
|
+
},
|
|
64
|
+
"./lantern-material.css": "./src/lantern-material.css",
|
|
65
|
+
"./plain-publication.css": "./src/plain-publication.css",
|
|
66
|
+
"./status-page.css": "./src/status-page.css",
|
|
67
|
+
"./reading.css": "./src/reading.css",
|
|
68
|
+
"./plain-site.css": "./src/plain-site.css",
|
|
69
|
+
"./marketing-forced-colors.css": "./src/marketing-forced-colors.css",
|
|
70
|
+
"./product-marketing.css": "./src/product-marketing.css",
|
|
71
|
+
"./reset.css": "./src/reset.css",
|
|
72
|
+
"./styles.css": "./src/styles.css",
|
|
73
|
+
"./site-shell.css": "./src/site-shell.css",
|
|
74
|
+
"./stylex.css": "./dist/stylex.css",
|
|
75
|
+
"./stylex-manifest.json": "./dist/stylex-manifest.json",
|
|
76
|
+
"./syntax-highlighting": {
|
|
77
|
+
"types": "./src/syntax-highlighting.ts",
|
|
78
|
+
"import": "./dist/syntax-highlighting.js"
|
|
79
|
+
},
|
|
80
|
+
"./syntax-highlighting.css": "./src/syntax-highlighting.css",
|
|
81
|
+
"./tokens.css": "./src/tokens.css",
|
|
82
|
+
"./typography.css": "./src/typography.css",
|
|
83
|
+
"./vendor/evilcharts/LICENSE": "./vendor/evilcharts/LICENSE",
|
|
84
|
+
"./vendor/evilcharts/UPSTREAM.md": "./vendor/evilcharts/UPSTREAM.md",
|
|
85
|
+
"./vendor/provider-marks/LICENSE": "./vendor/provider-marks/LICENSE",
|
|
86
|
+
"./vendor/provider-marks/UPSTREAM.md": "./vendor/provider-marks/UPSTREAM.md",
|
|
87
|
+
"./vendor/platform-marks/LICENSE": "./vendor/platform-marks/LICENSE",
|
|
88
|
+
"./vendor/platform-marks/UPSTREAM.md": "./vendor/platform-marks/UPSTREAM.md",
|
|
89
|
+
"./palettes.css": "./src/palettes.css",
|
|
90
|
+
"./paper-theme.css": "./src/paper-theme.css",
|
|
91
|
+
"./product-marketing-preset.css": "./src/product-marketing-preset.css",
|
|
92
|
+
"./fonts/instrument-serif/*": "./src/fonts/instrument-serif/*",
|
|
93
|
+
"./marketing-assets/*": "./src/marketing-assets/*",
|
|
94
|
+
"./palette-system.css": "./src/palette-system.css",
|
|
95
|
+
"./palette-bridge.css": "./src/palette-bridge.css",
|
|
96
|
+
"./portfolio": {
|
|
97
|
+
"types": "./src/portfolio.ts",
|
|
98
|
+
"import": "./dist/portfolio.js"
|
|
99
|
+
},
|
|
100
|
+
"./provider-marks": {
|
|
101
|
+
"types": "./src/provider-marks.ts",
|
|
102
|
+
"import": "./dist/provider-marks.js"
|
|
103
|
+
},
|
|
104
|
+
"./portfolio.json": "./src/portfolio.generated.json",
|
|
105
|
+
"./react/platform-install": {
|
|
106
|
+
"types": "./src/react/platform-install.tsx",
|
|
107
|
+
"import": "./dist/react/platform-install.js"
|
|
108
|
+
},
|
|
109
|
+
"./react/hero-backdrop": {
|
|
110
|
+
"types": "./src/react/hero-backdrop.tsx",
|
|
111
|
+
"import": "./dist/react/hero-backdrop.js"
|
|
112
|
+
},
|
|
113
|
+
"./launch": {
|
|
114
|
+
"types": "./src/launch.ts",
|
|
115
|
+
"import": "./dist/launch.js"
|
|
116
|
+
},
|
|
117
|
+
"./mockups": {
|
|
118
|
+
"types": "./src/mockups/index.ts",
|
|
119
|
+
"import": "./dist/mockups/index.js"
|
|
120
|
+
},
|
|
121
|
+
"./mockups/client": {
|
|
122
|
+
"types": "./src/mockups/client.tsx",
|
|
123
|
+
"import": "./dist/mockups/client.js"
|
|
124
|
+
},
|
|
125
|
+
"./mockups.css": "./src/mockups.css",
|
|
126
|
+
"./testing": {
|
|
127
|
+
"types": "./src/testing.ts",
|
|
128
|
+
"import": "./dist/testing.js"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"main": "./dist/index.js",
|
|
132
|
+
"types": "./src/index.ts",
|
|
133
|
+
"style": "./src/styles.css",
|
|
134
|
+
"files": [
|
|
135
|
+
"dist",
|
|
136
|
+
"src/appearance-menu.css",
|
|
137
|
+
"src/appearance.ts",
|
|
138
|
+
"src/article-html.ts",
|
|
139
|
+
"src/article.ts",
|
|
140
|
+
"src/browser/appearance-menu.ts",
|
|
141
|
+
"src/browser/artifact-share.ts",
|
|
142
|
+
"src/browser/foil.ts",
|
|
143
|
+
"src/browser/index.ts",
|
|
144
|
+
"src/browser/status-field.ts",
|
|
145
|
+
"src/browser/status-page.ts",
|
|
146
|
+
"src/browser/sticky-offset.ts",
|
|
147
|
+
"src/browser/theme-color-sync.ts",
|
|
148
|
+
"src/charts.css",
|
|
149
|
+
"src/compiler-components.css",
|
|
150
|
+
"src/compiler-foundation.css",
|
|
151
|
+
"src/compiler-palettes.css",
|
|
152
|
+
"src/compiler-tokens.css",
|
|
153
|
+
"src/components.css",
|
|
154
|
+
"src/design-gallery.css",
|
|
155
|
+
"src/effects.css",
|
|
156
|
+
"src/fonts.css",
|
|
157
|
+
"src/fonts/geist-mono",
|
|
158
|
+
"src/fonts/nebula-sans",
|
|
159
|
+
"src/index.ts",
|
|
160
|
+
"src/plain-publication.css",
|
|
161
|
+
"src/status-page.css",
|
|
162
|
+
"src/site-shell.css",
|
|
163
|
+
"src/reading.css",
|
|
164
|
+
"src/relative-time.ts",
|
|
165
|
+
"src/plain-site.css",
|
|
166
|
+
"src/portfolio.generated.json",
|
|
167
|
+
"src/portfolio.generated.ts",
|
|
168
|
+
"src/portfolio.ts",
|
|
169
|
+
"src/status-page-html.ts",
|
|
170
|
+
"src/status-page.ts",
|
|
171
|
+
"src/product-marketing-foundation.css",
|
|
172
|
+
"src/product-marketing.css",
|
|
173
|
+
"src/marketing-forced-colors.css",
|
|
174
|
+
"src/react/animated-rail-stage.stylex.ts",
|
|
175
|
+
"src/react/animated-rail-stage.tsx",
|
|
176
|
+
"src/react/app-shell.stylex.ts",
|
|
177
|
+
"src/react/app-shell.tsx",
|
|
178
|
+
"src/react/article.tsx",
|
|
179
|
+
"src/react/launch-beats.tsx",
|
|
180
|
+
"src/react/social-kit-panel.tsx",
|
|
181
|
+
"src/react/aurora-dots-background.tsx",
|
|
182
|
+
"src/react/charts.stylex.ts",
|
|
183
|
+
"src/react/charts.tsx",
|
|
184
|
+
"src/react/chat.stylex.ts",
|
|
185
|
+
"src/react/chat.tsx",
|
|
186
|
+
"src/react/design-gallery.tsx",
|
|
187
|
+
"src/react/design-theme-context.tsx",
|
|
188
|
+
"src/react/effects.stylex.ts",
|
|
189
|
+
"src/react/fader.tsx",
|
|
190
|
+
"src/react/fader.stylex.ts",
|
|
191
|
+
"src/react/foil-card-math.ts",
|
|
192
|
+
"src/react/foil-mark.tsx",
|
|
193
|
+
"src/react/foil-card-surface.tsx",
|
|
194
|
+
"src/react/foil-card-surface.stylex.ts",
|
|
195
|
+
"src/react/foil.stylex.ts",
|
|
196
|
+
"src/react/haptics.ts",
|
|
197
|
+
"src/react/index.ts",
|
|
198
|
+
"src/react/keyboard-shortcuts.ts",
|
|
199
|
+
"src/react/navigation-rail.stylex.ts",
|
|
200
|
+
"src/react/navigation-rail.tsx",
|
|
201
|
+
"src/react/particle-halo.tsx",
|
|
202
|
+
"src/react/phaser-dots.tsx",
|
|
203
|
+
"src/react/playback-transport.tsx",
|
|
204
|
+
"src/react/playback-transport.stylex.ts",
|
|
205
|
+
"src/react/procedural-backdrop.tsx",
|
|
206
|
+
"src/react/procedural-recipe.ts",
|
|
207
|
+
"src/react/relative-time.tsx",
|
|
208
|
+
"src/react/production-data-preview-notice.tsx",
|
|
209
|
+
"src/react/production-data-preview-notice.stylex.ts",
|
|
210
|
+
"src/react/product-marketing.stylex.ts",
|
|
211
|
+
"src/react/product-marketing.tsx",
|
|
212
|
+
"src/react/route-state.stylex.ts",
|
|
213
|
+
"src/react/route-state.tsx",
|
|
214
|
+
"src/react/server.ts",
|
|
215
|
+
"src/react/sticky-offset.tsx",
|
|
216
|
+
"src/react/surfaces.stylex.ts",
|
|
217
|
+
"src/react/surfaces.tsx",
|
|
218
|
+
"src/react/syntax-code.tsx",
|
|
219
|
+
"src/react/theme-color-sync.ts",
|
|
220
|
+
"src/react/theme-resolution.ts",
|
|
221
|
+
"src/react/theme.stylex.ts",
|
|
222
|
+
"src/react/theme.tsx",
|
|
223
|
+
"src/reset.css",
|
|
224
|
+
"src/styles.css",
|
|
225
|
+
"src/syntax-highlighting.css",
|
|
226
|
+
"src/syntax-highlighting.ts",
|
|
227
|
+
"src/syntax-code-lexers.ts",
|
|
228
|
+
"src/syntax-tokens.ts",
|
|
229
|
+
"src/tokens.css",
|
|
230
|
+
"src/typography.css",
|
|
231
|
+
"vendor/evilcharts/LICENSE",
|
|
232
|
+
"vendor/evilcharts/UPSTREAM.md",
|
|
233
|
+
"portfolio-inventory.json",
|
|
234
|
+
"README.md",
|
|
235
|
+
"LICENSE",
|
|
236
|
+
"PALETTES.md",
|
|
237
|
+
"src/browser/design-palette.ts",
|
|
238
|
+
"src/palette-appearance.ts",
|
|
239
|
+
"src/palette-bridge.css",
|
|
240
|
+
"src/palette-color.ts",
|
|
241
|
+
"src/palette-themes.ts",
|
|
242
|
+
"src/palette-tokens.stylex.ts",
|
|
243
|
+
"src/palettes.css",
|
|
244
|
+
"src/palettes.ts",
|
|
245
|
+
"src/react/design-palette.tsx",
|
|
246
|
+
"src/react/design-palette.stylex.ts",
|
|
247
|
+
"src/paper-theme.css",
|
|
248
|
+
"PAPER_THEME.md",
|
|
249
|
+
"scripts/paper-theme-snapshot.ts",
|
|
250
|
+
"src/product-marketing-preset.css",
|
|
251
|
+
"src/fonts/instrument-serif",
|
|
252
|
+
"src/marketing-assets",
|
|
253
|
+
"MARKETING_PRESET.md",
|
|
254
|
+
"MARKETING_COPY.md",
|
|
255
|
+
"ARTICLE_COPY.md",
|
|
256
|
+
"STATUS_PAGES.md",
|
|
257
|
+
"STYLE.md",
|
|
258
|
+
"WRITING.md",
|
|
259
|
+
"scripts/product-marketing-snapshot.ts",
|
|
260
|
+
"scripts/marketing-textures.ts",
|
|
261
|
+
"scripts/check-marketing-snapshot.mjs",
|
|
262
|
+
"scripts/check-marketing-snapshot.d.mts",
|
|
263
|
+
"src/lantern-material.css",
|
|
264
|
+
"src/react/lantern-material-gallery.tsx",
|
|
265
|
+
"src/react/lantern-material.stylex.ts",
|
|
266
|
+
"LANTERN_MATERIAL.md",
|
|
267
|
+
"scripts/lantern-material-snapshot.ts",
|
|
268
|
+
"scripts/check-lantern-material-snapshot.mjs",
|
|
269
|
+
"scripts/check-lantern-material-snapshot.d.mts",
|
|
270
|
+
"src/browser/hero-light.ts",
|
|
271
|
+
"src/react/hero-backdrop.tsx",
|
|
272
|
+
"src/palette-system.css",
|
|
273
|
+
"HERO_FIELDS.md",
|
|
274
|
+
"src/provider-marks.ts",
|
|
275
|
+
"src/provider-marks.generated.ts",
|
|
276
|
+
"src/react/provider-mark.tsx",
|
|
277
|
+
"src/react/provider-mark.stylex.ts",
|
|
278
|
+
"src/platforms.ts",
|
|
279
|
+
"src/react/platform-icons.tsx",
|
|
280
|
+
"src/react/platform-install.tsx",
|
|
281
|
+
"src/react/platform-install.stylex.ts",
|
|
282
|
+
"vendor/platform-marks",
|
|
283
|
+
"vendor/provider-marks",
|
|
284
|
+
"src/icons.ts",
|
|
285
|
+
"src/icons.generated.ts",
|
|
286
|
+
"src/icons",
|
|
287
|
+
"ICONS.md",
|
|
288
|
+
"src/launch.ts",
|
|
289
|
+
"src/mockups/client.tsx",
|
|
290
|
+
"src/mockups/core.tsx",
|
|
291
|
+
"src/mockups/frames.tsx",
|
|
292
|
+
"src/mockups/index.ts",
|
|
293
|
+
"src/mockups/surfaces.tsx",
|
|
294
|
+
"src/mockups.css",
|
|
295
|
+
"src/testing.ts"
|
|
296
|
+
],
|
|
297
|
+
"scripts": {
|
|
298
|
+
"build": "bun run ./scripts/build.ts",
|
|
299
|
+
"generate:nebula-social-fonts": "bun run ./scripts/generate-nebula-social-fonts.ts",
|
|
300
|
+
"check:stylex-artifacts": "bun run ./scripts/check-stylex-artifacts.ts",
|
|
301
|
+
"check:stylex-determinism": "bun run ./scripts/check-stylex-determinism.ts",
|
|
302
|
+
"check:publication-ready": "bun run ./scripts/package-smoke.ts --publication",
|
|
303
|
+
"lint": "eslint .",
|
|
304
|
+
"typecheck": "tsc --noEmit",
|
|
305
|
+
"test": "bun test --preload ./scripts/register-stylex-test-transform.ts ./src",
|
|
306
|
+
"browser:install": "bun ./node_modules/playwright-core/cli.js install chromium",
|
|
307
|
+
"test:browser": "bun run test:browser:marketing && bun run test:browser:rest",
|
|
308
|
+
"test:browser:marketing": "bun run ./scripts/product-marketing-browser.ts",
|
|
309
|
+
"test:browser:rest": "bun run ./scripts/site-shell-browser.ts && bun run ./scripts/palette-browser.ts && bun run ./scripts/gallery-browser.ts && bun run ./scripts/global-error-browser.ts && bun run ./scripts/security-delivery-browser.ts && bun run ./scripts/paper-theme-browser.ts && bun run ./scripts/product-marketing-preset-browser.ts && bun run ./scripts/lantern-material-browser.ts && bun run ./scripts/foil-browser.ts && bun run ./scripts/hero-light-browser.ts && bun run ./scripts/status-page-browser.ts && bun run ./scripts/platform-install-browser.ts && bun run ./scripts/mockups-browser.ts",
|
|
310
|
+
"test:package": "bun run ./scripts/package-smoke.ts && bun run ./scripts/mockups-import.ts",
|
|
311
|
+
"kb:refresh": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell refresh --root kb",
|
|
312
|
+
"kb:check:lane": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell check --root kb --no-catalog",
|
|
313
|
+
"kb:check": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell check --root kb && bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell agents check --root kb --repo .",
|
|
314
|
+
"kb:catalog": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell catalog --root kb",
|
|
315
|
+
"kb:search": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell search --root kb --mode exact --selected-passage",
|
|
316
|
+
"check": "bun run lint && bun run typecheck && bun run build && bun run check:stylex-artifacts && bun run check:stylex-determinism && bun run test:package && bun run test && bun run test:browser",
|
|
317
|
+
"prepack": "bun run check",
|
|
318
|
+
"release:prepare": "bun run ./scripts/release-prepare.ts",
|
|
319
|
+
"prepublishOnly": "bun run check:publication-ready",
|
|
320
|
+
"sync:portfolio": "bun run ./scripts/sync-portfolio-facts.ts --write",
|
|
321
|
+
"check:portfolio": "bun run ./scripts/sync-portfolio-facts.ts",
|
|
322
|
+
"generate:palettes": "bun run ./scripts/generate-palettes.ts --write",
|
|
323
|
+
"check:palettes": "bun run ./scripts/generate-palettes.ts",
|
|
324
|
+
"test:palettes": "bun run build && bun run ./scripts/palette-browser.ts",
|
|
325
|
+
"generate:paper-theme": "bun run ./scripts/generate-paper-theme.ts --write",
|
|
326
|
+
"check:paper-theme": "bun run ./scripts/generate-paper-theme.ts",
|
|
327
|
+
"test:paper-theme": "bun test --preload ./scripts/register-stylex-test-transform.ts ./src/paper-theme.test.ts ./src/palettes.test.ts ./src/browser/design-palette.test.ts ./src/react/design-palette.test.tsx && bun run ./scripts/paper-theme-browser.ts",
|
|
328
|
+
"check:marketing-textures": "bun run ./scripts/marketing-textures.ts",
|
|
329
|
+
"generate:provider-marks": "bun run ./scripts/generate-provider-marks.ts --write",
|
|
330
|
+
"check:provider-marks": "bun run ./scripts/generate-provider-marks.ts",
|
|
331
|
+
"generate:icons": "bun run ./scripts/generate-icons.ts --write",
|
|
332
|
+
"check:icons": "bun run ./scripts/generate-icons.ts"
|
|
333
|
+
},
|
|
334
|
+
"dependencies": {
|
|
335
|
+
"@hugeicons/core-free-icons": "4.2.3",
|
|
336
|
+
"@stylexjs/stylex": "0.19.0",
|
|
337
|
+
"motion": "12.42.0",
|
|
338
|
+
"next-themes": "0.4.6",
|
|
339
|
+
"react-aria-components": "1.19.0",
|
|
340
|
+
"recharts": "3.8.0",
|
|
341
|
+
"sugar-high": "^1.2.1",
|
|
342
|
+
"web-haptics": "0.0.6"
|
|
343
|
+
},
|
|
344
|
+
"peerDependencies": {
|
|
345
|
+
"@hraness/ui": ">=0.5.16 <0.6.0",
|
|
346
|
+
"react": ">=18 <20",
|
|
347
|
+
"react-dom": ">=18 <20"
|
|
348
|
+
},
|
|
349
|
+
"peerDependenciesMeta": {
|
|
350
|
+
"@hraness/ui": {
|
|
351
|
+
"optional": true
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"devDependencies": {
|
|
355
|
+
"@babel/core": "7.29.7",
|
|
356
|
+
"@eslint/js": "^9.39.2",
|
|
357
|
+
"@hraness/ui": "github:hraness/ui#v0.5.17",
|
|
358
|
+
"@resvg/resvg-js": "2.6.2",
|
|
359
|
+
"@stylexjs/babel-plugin": "0.19.0",
|
|
360
|
+
"@types/babel__core": "7.20.5",
|
|
361
|
+
"@types/bun": "1.3.14",
|
|
362
|
+
"@types/react": "^19.2.14",
|
|
363
|
+
"@types/react-dom": "^19.2.3",
|
|
364
|
+
"eslint": "^9.39.2",
|
|
365
|
+
"fast-check": "^4.8.0",
|
|
366
|
+
"lightningcss": "1.33.0",
|
|
367
|
+
"linkedom": "^0.18.12",
|
|
368
|
+
"playwright-core": "1.62.0",
|
|
369
|
+
"react": "19.2.3",
|
|
370
|
+
"react-dom": "19.2.3",
|
|
371
|
+
"typescript": "^6.0.3",
|
|
372
|
+
"typescript-eslint": "^8.53.0"
|
|
373
|
+
},
|
|
374
|
+
"publishConfig": {
|
|
375
|
+
"access": "public"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"brands": [],
|
|
3
|
+
"components": [
|
|
4
|
+
{
|
|
5
|
+
"kind": "package",
|
|
6
|
+
"name": "@hraness/design-kit",
|
|
7
|
+
"path": ".",
|
|
8
|
+
"visibility": "public",
|
|
9
|
+
"version": "0.31.1"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"contract": "hraness.portfolio-inventory/v1",
|
|
13
|
+
"dependencies": [
|
|
14
|
+
{
|
|
15
|
+
"from": "@hraness/design-kit",
|
|
16
|
+
"scope": "peer",
|
|
17
|
+
"specifier": ">=0.5.16 <0.6.0",
|
|
18
|
+
"to": "@hraness/ui"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"deployments": [],
|
|
22
|
+
"formatVersion": 1,
|
|
23
|
+
"publications": [
|
|
24
|
+
{
|
|
25
|
+
"component": "@hraness/design-kit",
|
|
26
|
+
"packageName": "@hraness/design-kit",
|
|
27
|
+
"repository": "hraness/design-kit"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"repository": "hraness/design-kit"
|
|
31
|
+
}
|