@krizaka/ui 2.5.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -5
- package/dist/action-bar.d.ts +38 -0
- package/dist/action-bar.js +52 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/argument-card.d.ts +67 -0
- package/dist/argument-card.js +69 -0
- package/dist/argument-card.js.map +1 -0
- package/dist/audio-player.js +1 -1
- package/dist/block-link-BAg4eoZk.d.ts +12 -0
- package/dist/blocks.css +529 -0
- package/dist/button.js +5 -94
- package/dist/button.js.map +1 -1
- package/dist/card-grid.d.ts +42 -0
- package/dist/card-grid.js +47 -0
- package/dist/card-grid.js.map +1 -0
- package/dist/chunk-2AGSO3WH.js +20 -0
- package/dist/chunk-2AGSO3WH.js.map +1 -0
- package/dist/chunk-AB5D3KBG.js +37 -0
- package/dist/chunk-AB5D3KBG.js.map +1 -0
- package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
- package/dist/chunk-CPA5CF35.js.map +1 -0
- package/dist/chunk-K3SWZXYT.js +92 -0
- package/dist/chunk-K3SWZXYT.js.map +1 -0
- package/dist/chunk-NOVUREEC.js +274 -0
- package/dist/chunk-NOVUREEC.js.map +1 -0
- package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
- package/dist/chunk-XCBVFMNV.js +41 -0
- package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
- package/dist/chunk-XVLWVTQA.js +28 -0
- package/dist/chunk-XVLWVTQA.js.map +1 -0
- package/dist/chunk-Z6FUPB3Q.js +102 -0
- package/dist/chunk-Z6FUPB3Q.js.map +1 -0
- package/dist/code-block.d.ts +42 -0
- package/dist/code-block.js +202 -0
- package/dist/code-block.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/cta-panel.d.ts +23 -0
- package/dist/cta-panel.js +20 -0
- package/dist/cta-panel.js.map +1 -0
- package/dist/data-table.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/decision-list.d.ts +34 -0
- package/dist/decision-list.js +67 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/file-upload.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/geometry-CXrAW34x.d.ts +19 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +86 -4
- package/dist/index.js.map +1 -1
- package/dist/link-card.d.ts +35 -0
- package/dist/link-card.js +46 -0
- package/dist/link-card.js.map +1 -0
- package/dist/mascot-quote.d.ts +43 -0
- package/dist/mascot-quote.js +287 -0
- package/dist/mascot-quote.js.map +1 -0
- package/dist/mascot-state.d.ts +128 -0
- package/dist/mascot-state.js +95 -0
- package/dist/mascot-state.js.map +1 -0
- package/dist/mascots.d.ts +5 -20
- package/dist/mascots.js +5 -246
- package/dist/mascots.js.map +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/motion.css +25 -1
- package/dist/native.d.ts +54 -7
- package/dist/native.js +334 -166
- package/dist/native.js.map +1 -1
- package/dist/page-hero.d.ts +44 -0
- package/dist/page-hero.js +41 -0
- package/dist/page-hero.js.map +1 -0
- package/dist/page.d.ts +116 -0
- package/dist/page.js +17 -0
- package/dist/page.js.map +1 -0
- package/dist/pagination.js +25 -44
- package/dist/pagination.js.map +1 -1
- package/dist/pointer-light.d.ts +20 -0
- package/dist/pointer-light.js +12 -0
- package/dist/pointer-light.js.map +1 -0
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.js +4 -22
- package/dist/section-backdrop.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/terminal-replay.d.ts +68 -0
- package/dist/terminal-replay.js +231 -0
- package/dist/terminal-replay.js.map +1 -0
- package/dist/toc.d.ts +23 -0
- package/dist/toc.js +39 -0
- package/dist/toc.js.map +1 -0
- package/dist/video-player.js +1 -1
- package/package.json +208 -8
- package/registry/action-bar.json +205 -0
- package/registry/alert.json +1 -1
- package/registry/argument-card.json +327 -0
- package/registry/audio-player.json +2 -2
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +221 -0
- package/registry/card.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/code-block.json +262 -0
- package/registry/combobox.json +2 -2
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +3 -3
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +154 -0
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +144 -0
- package/registry/dialog.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/action-bar/buttons.d.ts +4 -0
- package/registry/examples/action-bar/buttons.js +22 -0
- package/registry/examples/action-bar/buttons.tsx +17 -0
- package/registry/examples/action-bar/icons.d.ts +4 -0
- package/registry/examples/action-bar/icons.js +24 -0
- package/registry/examples/action-bar/icons.tsx +23 -0
- package/registry/examples/argument-card/building-block.d.ts +4 -0
- package/registry/examples/argument-card/building-block.js +29 -0
- package/registry/examples/argument-card/building-block.tsx +29 -0
- package/registry/examples/argument-card/grid.d.ts +4 -0
- package/registry/examples/argument-card/grid.js +17 -0
- package/registry/examples/argument-card/grid.tsx +19 -0
- package/registry/examples/argument-card/unfold.d.ts +4 -0
- package/registry/examples/argument-card/unfold.js +26 -0
- package/registry/examples/argument-card/unfold.tsx +21 -0
- package/registry/examples/card-grid/products.d.ts +4 -0
- package/registry/examples/card-grid/products.js +16 -0
- package/registry/examples/card-grid/products.tsx +13 -0
- package/registry/examples/card-grid/reveal.d.ts +4 -0
- package/registry/examples/card-grid/reveal.js +13 -0
- package/registry/examples/card-grid/reveal.tsx +16 -0
- package/registry/examples/code-block/build-tools.d.ts +4 -0
- package/registry/examples/code-block/build-tools.js +30 -0
- package/registry/examples/code-block/build-tools.tsx +25 -0
- package/registry/examples/code-block/file.d.ts +4 -0
- package/registry/examples/code-block/file.js +17 -0
- package/registry/examples/code-block/file.tsx +13 -0
- package/registry/examples/cta-panel/discuss.d.ts +4 -0
- package/registry/examples/cta-panel/discuss.js +31 -0
- package/registry/examples/cta-panel/discuss.tsx +23 -0
- package/registry/examples/decision-list/product.d.ts +4 -0
- package/registry/examples/decision-list/product.js +35 -0
- package/registry/examples/decision-list/product.tsx +30 -0
- package/registry/examples/link-card/docs-hub.d.ts +4 -0
- package/registry/examples/link-card/docs-hub.js +18 -0
- package/registry/examples/link-card/docs-hub.tsx +20 -0
- package/registry/examples/link-card/external.d.ts +4 -0
- package/registry/examples/link-card/external.js +22 -0
- package/registry/examples/link-card/external.tsx +16 -0
- package/registry/examples/link-card/stack.d.ts +4 -0
- package/registry/examples/link-card/stack.js +26 -0
- package/registry/examples/link-card/stack.tsx +21 -0
- package/registry/examples/mascot-quote/callout.d.ts +4 -0
- package/registry/examples/mascot-quote/callout.js +11 -0
- package/registry/examples/mascot-quote/callout.tsx +10 -0
- package/registry/examples/mascot-quote/inline.d.ts +4 -0
- package/registry/examples/mascot-quote/inline.js +11 -0
- package/registry/examples/mascot-quote/inline.tsx +10 -0
- package/registry/examples/mascot-state/empty.d.ts +4 -0
- package/registry/examples/mascot-state/empty.js +22 -0
- package/registry/examples/mascot-state/empty.tsx +20 -0
- package/registry/examples/mascot-state/error.d.ts +4 -0
- package/registry/examples/mascot-state/error.js +23 -0
- package/registry/examples/mascot-state/error.tsx +21 -0
- package/registry/examples/mascot-state/loading.d.ts +4 -0
- package/registry/examples/mascot-state/loading.js +22 -0
- package/registry/examples/mascot-state/loading.tsx +16 -0
- package/registry/examples/mascot-state/native/default.d.ts +4 -0
- package/registry/examples/mascot-state/native/default.dark.png +0 -0
- package/registry/examples/mascot-state/native/default.js +25 -0
- package/registry/examples/mascot-state/native/default.light.png +0 -0
- package/registry/examples/mascot-state/native/default.tsx +19 -0
- package/registry/examples/mascot-state/success.d.ts +4 -0
- package/registry/examples/mascot-state/success.js +21 -0
- package/registry/examples/mascot-state/success.tsx +19 -0
- package/registry/examples/mascot-state/welcome.d.ts +4 -0
- package/registry/examples/mascot-state/welcome.js +21 -0
- package/registry/examples/mascot-state/welcome.tsx +19 -0
- package/registry/examples/mascots/flock.tsx +1 -1
- package/registry/examples/mascots/lovebird.d.ts +4 -0
- package/registry/examples/mascots/lovebird.js +19 -0
- package/registry/examples/mascots/lovebird.tsx +18 -0
- package/registry/examples/mascots/native/lovebird.d.ts +4 -0
- package/registry/examples/mascots/native/lovebird.dark.png +0 -0
- package/registry/examples/mascots/native/lovebird.js +21 -0
- package/registry/examples/mascots/native/lovebird.light.png +0 -0
- package/registry/examples/mascots/native/lovebird.tsx +18 -0
- package/registry/examples/page/backdrop.d.ts +4 -0
- package/registry/examples/page/backdrop.js +23 -0
- package/registry/examples/page/backdrop.tsx +18 -0
- package/registry/examples/page/facts.d.ts +4 -0
- package/registry/examples/page/facts.js +24 -0
- package/registry/examples/page/facts.tsx +21 -0
- package/registry/examples/page/frame.d.ts +4 -0
- package/registry/examples/page/frame.js +15 -0
- package/registry/examples/page/frame.tsx +17 -0
- package/registry/examples/page/sections.d.ts +4 -0
- package/registry/examples/page/sections.js +14 -0
- package/registry/examples/page/sections.tsx +15 -0
- package/registry/examples/page-hero/building-block.d.ts +4 -0
- package/registry/examples/page-hero/building-block.js +24 -0
- package/registry/examples/page-hero/building-block.tsx +20 -0
- package/registry/examples/page-hero/hub.d.ts +4 -0
- package/registry/examples/page-hero/hub.js +21 -0
- package/registry/examples/page-hero/hub.tsx +15 -0
- package/registry/examples/pointer-light/list.d.ts +4 -0
- package/registry/examples/pointer-light/list.js +16 -0
- package/registry/examples/pointer-light/list.tsx +14 -0
- package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
- package/registry/examples/terminal-replay/at-rest.js +32 -0
- package/registry/examples/terminal-replay/at-rest.tsx +26 -0
- package/registry/examples/terminal-replay/session.d.ts +4 -0
- package/registry/examples/terminal-replay/session.js +34 -0
- package/registry/examples/terminal-replay/session.tsx +28 -0
- package/registry/examples/toc/reading-page.d.ts +4 -0
- package/registry/examples/toc/reading-page.js +21 -0
- package/registry/examples/toc/reading-page.tsx +21 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +2 -2
- package/registry/glow-card.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +265 -5
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/link-card.json +279 -0
- package/registry/loader.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +191 -0
- package/registry/mascot-state.json +1249 -0
- package/registry/mascots.json +41 -21
- package/registry/media-capture.json +4 -4
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +254 -0
- package/registry/page.json +497 -0
- package/registry/pagination.json +2 -2
- package/registry/pointer-light.json +119 -0
- package/registry/popover.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/search-field.json +2 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +3 -3
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +317 -0
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +157 -0
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +4 -4
- package/registry/video-trimmer.json +3 -3
- /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
"path": "meta.ts",
|
|
179
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"alert\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"data-table\"\n | \"date-picker\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"loader\"\n | \"marquee\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page-header\"\n | \"pagination\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"theme\"\n | \"toast\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n
|
|
179
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"action-bar\"\n | \"alert\"\n | \"argument-card\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"cta-panel\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"link-card\"\n | \"loader\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
180
180
|
}
|
|
181
181
|
],
|
|
182
182
|
"dependencies": [
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/action-bar/buttons.tsx
|
|
4
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function ActionBarButtons() {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
ActionBar,
|
|
9
|
+
{
|
|
10
|
+
label: "What next",
|
|
11
|
+
primaryFirst: true,
|
|
12
|
+
actions: [
|
|
13
|
+
{ href: "#docs", label: "Read the documentation" },
|
|
14
|
+
{ href: "https://github.com/krizaka/krizaka-java", label: "See the code" },
|
|
15
|
+
{ href: "https://github.com/krizaka/krizaka-java/discussions", label: "Discuss" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
ActionBarButtons as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
2
|
+
|
|
3
|
+
// `buttons`: the actions of the end of a page, with their words. The first one is the page's action (`primaryFirst`);
|
|
4
|
+
// an absolute address opens in a new tab and wears the external mark.
|
|
5
|
+
export default function ActionBarButtons() {
|
|
6
|
+
return (
|
|
7
|
+
<ActionBar
|
|
8
|
+
label="What next"
|
|
9
|
+
primaryFirst
|
|
10
|
+
actions={[
|
|
11
|
+
{ href: "#docs", label: "Read the documentation" },
|
|
12
|
+
{ href: "https://github.com/krizaka/krizaka-java", label: "See the code" },
|
|
13
|
+
{ href: "https://github.com/krizaka/krizaka-java/discussions", label: "Discuss" },
|
|
14
|
+
]}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/action-bar/icons.tsx
|
|
4
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var glyph = (d) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "17", height: "17", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d }) });
|
|
7
|
+
var repo = "https://github.com/krizaka/krizaka-java";
|
|
8
|
+
function ActionBarIcons() {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
ActionBar,
|
|
11
|
+
{
|
|
12
|
+
variant: "icons",
|
|
13
|
+
label: "Talk about Krizaka Java",
|
|
14
|
+
actions: [
|
|
15
|
+
{ href: `${repo}/discussions`, label: "Discuss", icon: glyph("M4 5h16v11H9l-5 4V5Z") },
|
|
16
|
+
{ href: `${repo}/issues/new?template=idea.yml`, label: "Propose", icon: glyph("M12 3v4M5 12H3m18 0h-2M8 17h8m-6 4h4M12 7a5 5 0 0 0-3 9h6a5 5 0 0 0-3-9Z") },
|
|
17
|
+
{ href: `${repo}/issues/new?template=bug.yml`, label: "Report a problem", icon: glyph("M12 4 2.5 20h19L12 4Zm0 6v4m0 3v.1") }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
ActionBarIcons as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
2
|
+
|
|
3
|
+
const glyph = (d: string) => (
|
|
4
|
+
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" aria-hidden>
|
|
5
|
+
<path d={d} />
|
|
6
|
+
</svg>
|
|
7
|
+
);
|
|
8
|
+
const repo = "https://github.com/krizaka/krizaka-java";
|
|
9
|
+
|
|
10
|
+
// `icons`: where room is short (the foot of a card) — the words are the accessible name and a tooltip on hover and focus.
|
|
11
|
+
export default function ActionBarIcons() {
|
|
12
|
+
return (
|
|
13
|
+
<ActionBar
|
|
14
|
+
variant="icons"
|
|
15
|
+
label="Talk about Krizaka Java"
|
|
16
|
+
actions={[
|
|
17
|
+
{ href: `${repo}/discussions`, label: "Discuss", icon: glyph("M4 5h16v11H9l-5 4V5Z") },
|
|
18
|
+
{ href: `${repo}/issues/new?template=idea.yml`, label: "Propose", icon: glyph("M12 3v4M5 12H3m18 0h-2M8 17h8m-6 4h4M12 7a5 5 0 0 0-3 9h6a5 5 0 0 0-3-9Z") },
|
|
19
|
+
{ href: `${repo}/issues/new?template=bug.yml`, label: "Report a problem", icon: glyph("M12 4 2.5 20h19L12 4Zm0 6v4m0 3v.1") },
|
|
20
|
+
]}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/argument-card/building-block.tsx
|
|
4
|
+
import { ProductLogo } from "@krizaka/ui";
|
|
5
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
6
|
+
import { ArgumentCard } from "@krizaka/ui/argument-card";
|
|
7
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var talk = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "17", height: "17", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4 5h16v11H9l-5 4V5Z" }) });
|
|
10
|
+
function ArgumentCardBuildingBlock() {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
ArgumentCard,
|
|
13
|
+
{
|
|
14
|
+
className: "max-w-md",
|
|
15
|
+
id: "krizaka-java",
|
|
16
|
+
icon: /* @__PURE__ */ jsx(ProductLogo, { id: "krizaka", size: 22, animated: false }),
|
|
17
|
+
title: "Krizaka Java",
|
|
18
|
+
meta: "krizaka/krizaka-java",
|
|
19
|
+
mark: /* @__PURE__ */ jsx(Mascot, { bird: "duck", mood: "thinking", size: 40, animated: false }),
|
|
20
|
+
hook: { label: "The trap", text: "Every service pins its own versions, and drifts." },
|
|
21
|
+
facts: [{ label: "Maven Central 0.1.0", tone: "ok" }, { label: "Gradle plugin", tone: "wip" }],
|
|
22
|
+
more: { href: "#krizaka-java", label: "Details" },
|
|
23
|
+
actions: /* @__PURE__ */ jsx(ActionBar, { variant: "icons", size: "sm", label: "Talk about Krizaka Java", actions: [{ href: "https://github.com/krizaka", label: "Discuss", icon: talk }] })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
ArgumentCardBuildingBlock as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ProductLogo } from "@krizaka/ui";
|
|
2
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
3
|
+
import { ArgumentCard } from "@krizaka/ui/argument-card";
|
|
4
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
5
|
+
|
|
6
|
+
const talk = (
|
|
7
|
+
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden>
|
|
8
|
+
<path d="M4 5h16v11H9l-5 4V5Z" />
|
|
9
|
+
</svg>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
// A building block, compact: who (the duck in the corner: its rule is on the detail page), the trap in one line,
|
|
13
|
+
// the facts, one short action — and discreet icon actions.
|
|
14
|
+
export default function ArgumentCardBuildingBlock() {
|
|
15
|
+
return (
|
|
16
|
+
<ArgumentCard
|
|
17
|
+
className="max-w-md"
|
|
18
|
+
id="krizaka-java"
|
|
19
|
+
icon={<ProductLogo id="krizaka" size={22} animated={false} />}
|
|
20
|
+
title="Krizaka Java"
|
|
21
|
+
meta="krizaka/krizaka-java"
|
|
22
|
+
mark={<Mascot bird="duck" mood="thinking" size={40} animated={false} />}
|
|
23
|
+
hook={{ label: "The trap", text: "Every service pins its own versions, and drifts." }}
|
|
24
|
+
facts={[{ label: "Maven Central 0.1.0", tone: "ok" }, { label: "Gradle plugin", tone: "wip" }]}
|
|
25
|
+
more={{ href: "#krizaka-java", label: "Details" }}
|
|
26
|
+
actions={<ActionBar variant="icons" size="sm" label="Talk about Krizaka Java" actions={[{ href: "https://github.com/krizaka", label: "Discuss", icon: talk }]} />}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/argument-card/grid.tsx
|
|
4
|
+
import { ArgumentCard } from "@krizaka/ui/argument-card";
|
|
5
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var reasons = [
|
|
8
|
+
{ id: "local", title: "Local inference", hook: "Elsewhere, every prompt crosses the ocean." },
|
|
9
|
+
{ id: "pipeline", title: "One pipeline", hook: "Elsewhere, each feature guards itself \u2014 or forgets." },
|
|
10
|
+
{ id: "telemetry", title: "Zero telemetry", hook: "Elsewhere, usage data is the price of the free tier." }
|
|
11
|
+
];
|
|
12
|
+
function ArgumentCardGrid() {
|
|
13
|
+
return /* @__PURE__ */ jsx(CardGrid, { className: "w-full max-w-5xl", min: 260, reveal: false, children: reasons.map((r) => /* @__PURE__ */ jsx(ArgumentCard, { id: `why-${r.id}`, title: r.title, hook: { label: "The trap elsewhere", text: r.hook }, more: { href: `#${r.id}`, label: "Details" } }, r.id)) });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
ArgumentCardGrid as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ArgumentCard } from "@krizaka/ui/argument-card";
|
|
2
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
3
|
+
|
|
4
|
+
const reasons = [
|
|
5
|
+
{ id: "local", title: "Local inference", hook: "Elsewhere, every prompt crosses the ocean." },
|
|
6
|
+
{ id: "pipeline", title: "One pipeline", hook: "Elsewhere, each feature guards itself — or forgets." },
|
|
7
|
+
{ id: "telemetry", title: "Zero telemetry", hook: "Elsewhere, usage data is the price of the free tier." },
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
// A product page's reasons, side by side: each card the same height, the hook at the same place on every card.
|
|
11
|
+
export default function ArgumentCardGrid() {
|
|
12
|
+
return (
|
|
13
|
+
<CardGrid className="w-full max-w-5xl" min={260} reveal={false}>
|
|
14
|
+
{reasons.map((r) => (
|
|
15
|
+
<ArgumentCard key={r.id} id={`why-${r.id}`} title={r.title} hook={{ label: "The trap elsewhere", text: r.hook }} more={{ href: `#${r.id}`, label: "Details" }} />
|
|
16
|
+
))}
|
|
17
|
+
</CardGrid>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/argument-card/unfold.tsx
|
|
4
|
+
import { ArgumentCard } from "@krizaka/ui/argument-card";
|
|
5
|
+
import { MascotQuote } from "@krizaka/ui/mascot-quote";
|
|
6
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function ArgumentCardUnfold() {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
ArgumentCard,
|
|
11
|
+
{
|
|
12
|
+
className: "max-w-md",
|
|
13
|
+
id: "escrow",
|
|
14
|
+
title: "Pledges in escrow",
|
|
15
|
+
mark: /* @__PURE__ */ jsx(Mascot, { bird: "pigeon", size: 40, animated: false }),
|
|
16
|
+
hook: { label: "The trap", text: "Elsewhere, fans pay for a video that never comes." },
|
|
17
|
+
panelLabel: "Details",
|
|
18
|
+
points: { label: "What it does", items: ["Credits wait on a ledger.", "The creator is paid when the video is out."] },
|
|
19
|
+
details: [{ label: "What it costs you", text: "Payouts wait for the delivery, not the pledge." }],
|
|
20
|
+
rule: /* @__PURE__ */ jsx(MascotQuote, { bird: "pigeon", label: "The pigeon's rule", children: "Nothing is paid that was not delivered." })
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
ArgumentCardUnfold as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ArgumentCard } from "@krizaka/ui/argument-card";
|
|
2
|
+
import { MascotQuote } from "@krizaka/ui/mascot-quote";
|
|
3
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
4
|
+
|
|
5
|
+
// Without a detail page the card unfolds in place (`panelLabel`): what it does, the long version, the bird's rule.
|
|
6
|
+
// In a grid, cards with a fold align at the top — opening one never stretches its neighbours.
|
|
7
|
+
export default function ArgumentCardUnfold() {
|
|
8
|
+
return (
|
|
9
|
+
<ArgumentCard
|
|
10
|
+
className="max-w-md"
|
|
11
|
+
id="escrow"
|
|
12
|
+
title="Pledges in escrow"
|
|
13
|
+
mark={<Mascot bird="pigeon" size={40} animated={false} />}
|
|
14
|
+
hook={{ label: "The trap", text: "Elsewhere, fans pay for a video that never comes." }}
|
|
15
|
+
panelLabel="Details"
|
|
16
|
+
points={{ label: "What it does", items: ["Credits wait on a ledger.", "The creator is paid when the video is out."] }}
|
|
17
|
+
details={[{ label: "What it costs you", text: "Payouts wait for the delivery, not the pledge." }]}
|
|
18
|
+
rule={<MascotQuote bird="pigeon" label="The pigeon's rule">Nothing is paid that was not delivered.</MascotQuote>}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/card-grid/products.tsx
|
|
4
|
+
import { ProductLogo } from "@krizaka/ui";
|
|
5
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
6
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function CardGridProducts() {
|
|
9
|
+
return /* @__PURE__ */ jsxs(CardGrid, { className: "w-full max-w-3xl", fit: "fit", reveal: false, children: [
|
|
10
|
+
/* @__PURE__ */ jsx(LinkCard, { href: "#orazaka", icon: /* @__PURE__ */ jsx(ProductLogo, { id: "orazaka", size: 24, animated: false }), title: "Orazaka", description: "Sovereign AI on your own servers.", cta: "Overview" }),
|
|
11
|
+
/* @__PURE__ */ jsx(LinkCard, { href: "#orochia", icon: /* @__PURE__ */ jsx(ProductLogo, { id: "orochia", size: 24, animated: false }), title: "Orochia", description: "Creators paid for what they make.", cta: "Overview" })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
CardGridProducts as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProductLogo } from "@krizaka/ui";
|
|
2
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
3
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
4
|
+
|
|
5
|
+
// `fit="fit"`: the cards of a short row share the whole width — two products, two halves. One column on a phone.
|
|
6
|
+
export default function CardGridProducts() {
|
|
7
|
+
return (
|
|
8
|
+
<CardGrid className="w-full max-w-3xl" fit="fit" reveal={false}>
|
|
9
|
+
<LinkCard href="#orazaka" icon={<ProductLogo id="orazaka" size={24} animated={false} />} title="Orazaka" description="Sovereign AI on your own servers." cta="Overview" />
|
|
10
|
+
<LinkCard href="#orochia" icon={<ProductLogo id="orochia" size={24} animated={false} />} title="Orochia" description="Creators paid for what they make." cta="Overview" />
|
|
11
|
+
</CardGrid>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/card-grid/reveal.tsx
|
|
4
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
5
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var sections = ["Getting started", "Architecture", "API", "Operations", "Guidelines", "Glossary"];
|
|
8
|
+
function CardGridReveal() {
|
|
9
|
+
return /* @__PURE__ */ jsx(CardGrid, { className: "w-full max-w-4xl", min: 220, columns: 3, reveal: false, as: "ul", children: sections.map((s) => /* @__PURE__ */ jsx(LinkCard, { href: `#${s}`, title: s, titleAs: "span" }, s)) });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
CardGridReveal as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
2
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
3
|
+
|
|
4
|
+
const sections = ["Getting started", "Architecture", "API", "Operations", "Guidelines", "Glossary"];
|
|
5
|
+
|
|
6
|
+
// Below the first screen the cards rise once into place, staggered by column (`columns`): the page's MotionObserver
|
|
7
|
+
// reveals them. Shown here already revealed (`reveal={false}`) — keep the default on a real page.
|
|
8
|
+
export default function CardGridReveal() {
|
|
9
|
+
return (
|
|
10
|
+
<CardGrid className="w-full max-w-4xl" min={220} columns={3} reveal={false} as="ul">
|
|
11
|
+
{sections.map((s) => (
|
|
12
|
+
<LinkCard key={s} href={`#${s}`} title={s} titleAs="span" />
|
|
13
|
+
))}
|
|
14
|
+
</CardGrid>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/code-block/build-tools.tsx
|
|
4
|
+
import { CodeBlock, CodeTabs } from "@krizaka/ui/code-block";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var maven = `<parent>
|
|
7
|
+
<groupId>com.krizaka</groupId>
|
|
8
|
+
<artifactId>krizaka-parent</artifactId>
|
|
9
|
+
<version>0.1.0</version>
|
|
10
|
+
</parent>`;
|
|
11
|
+
var gradle = `dependencies {
|
|
12
|
+
implementation(platform("com.krizaka:krizaka-bom:0.1.0"))
|
|
13
|
+
}`;
|
|
14
|
+
function CodeBlockBuildTools() {
|
|
15
|
+
const copy = { copyLabel: "Copy", copiedLabel: "Copied" };
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
CodeTabs,
|
|
18
|
+
{
|
|
19
|
+
className: "w-full max-w-xl",
|
|
20
|
+
label: "Build tool",
|
|
21
|
+
tabs: [
|
|
22
|
+
{ id: "maven", label: "Maven", content: /* @__PURE__ */ jsx(CodeBlock, { code: maven, language: "xml", file: "pom.xml", ...copy }) },
|
|
23
|
+
{ id: "gradle", label: "Gradle", content: /* @__PURE__ */ jsx(CodeBlock, { code: gradle, language: "kotlin", file: "build.gradle.kts", ...copy }) }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
CodeBlockBuildTools as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CodeBlock, CodeTabs } from "@krizaka/ui/code-block";
|
|
2
|
+
|
|
3
|
+
const maven = `<parent>
|
|
4
|
+
<groupId>com.krizaka</groupId>
|
|
5
|
+
<artifactId>krizaka-parent</artifactId>
|
|
6
|
+
<version>0.1.0</version>
|
|
7
|
+
</parent>`;
|
|
8
|
+
const gradle = `dependencies {
|
|
9
|
+
implementation(platform("com.krizaka:krizaka-bom:0.1.0"))
|
|
10
|
+
}`;
|
|
11
|
+
|
|
12
|
+
// The same thing in several build tools: segmented tabs (arrow keys between them) above the samples.
|
|
13
|
+
export default function CodeBlockBuildTools() {
|
|
14
|
+
const copy = { copyLabel: "Copy", copiedLabel: "Copied" };
|
|
15
|
+
return (
|
|
16
|
+
<CodeTabs
|
|
17
|
+
className="w-full max-w-xl"
|
|
18
|
+
label="Build tool"
|
|
19
|
+
tabs={[
|
|
20
|
+
{ id: "maven", label: "Maven", content: <CodeBlock code={maven} language="xml" file="pom.xml" {...copy} /> },
|
|
21
|
+
{ id: "gradle", label: "Gradle", content: <CodeBlock code={gradle} language="kotlin" file="build.gradle.kts" {...copy} /> },
|
|
22
|
+
]}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/code-block/file.tsx
|
|
4
|
+
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var code = `spring:
|
|
7
|
+
application:
|
|
8
|
+
name: billing # one name, used by logs and traces
|
|
9
|
+
krizaka:
|
|
10
|
+
messaging:
|
|
11
|
+
dead-letter: true`;
|
|
12
|
+
function CodeBlockFile() {
|
|
13
|
+
return /* @__PURE__ */ jsx(CodeBlock, { className: "w-full max-w-xl", code, language: "yaml", file: "application.yml", copyLabel: "Copy", copiedLabel: "Copied" });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
CodeBlockFile as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
2
|
+
|
|
3
|
+
const code = `spring:
|
|
4
|
+
application:
|
|
5
|
+
name: billing # one name, used by logs and traces
|
|
6
|
+
krizaka:
|
|
7
|
+
messaging:
|
|
8
|
+
dead-letter: true`;
|
|
9
|
+
|
|
10
|
+
// A sample in its file: the language, the file name, a copy button that says it copied. Long lines scroll sideways.
|
|
11
|
+
export default function CodeBlockFile() {
|
|
12
|
+
return <CodeBlock className="w-full max-w-xl" code={code} language="yaml" file="application.yml" copyLabel="Copy" copiedLabel="Copied" />;
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/cta-panel/discuss.tsx
|
|
4
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
5
|
+
import { CtaPanel } from "@krizaka/ui/cta-panel";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function CtaPanelDiscuss() {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
CtaPanel,
|
|
10
|
+
{
|
|
11
|
+
className: "w-full max-w-4xl",
|
|
12
|
+
id: "discuss",
|
|
13
|
+
title: "Something to say about it?",
|
|
14
|
+
body: "A decision you would make differently, a starter you miss: the discussions are open, and every idea gets an answer.",
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
ActionBar,
|
|
17
|
+
{
|
|
18
|
+
label: "Talk about it",
|
|
19
|
+
primaryFirst: true,
|
|
20
|
+
actions: [
|
|
21
|
+
{ href: "https://github.com/orgs/krizaka/discussions", label: "Discuss" },
|
|
22
|
+
{ href: "https://github.com/krizaka/krizaka-java/issues/new", label: "Propose" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
CtaPanelDiscuss as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
2
|
+
import { CtaPanel } from "@krizaka/ui/cta-panel";
|
|
3
|
+
|
|
4
|
+
// The invitation at the end of a page: why it matters, and the ways to answer.
|
|
5
|
+
export default function CtaPanelDiscuss() {
|
|
6
|
+
return (
|
|
7
|
+
<CtaPanel
|
|
8
|
+
className="w-full max-w-4xl"
|
|
9
|
+
id="discuss"
|
|
10
|
+
title="Something to say about it?"
|
|
11
|
+
body="A decision you would make differently, a starter you miss: the discussions are open, and every idea gets an answer."
|
|
12
|
+
>
|
|
13
|
+
<ActionBar
|
|
14
|
+
label="Talk about it"
|
|
15
|
+
primaryFirst
|
|
16
|
+
actions={[
|
|
17
|
+
{ href: "https://github.com/orgs/krizaka/discussions", label: "Discuss" },
|
|
18
|
+
{ href: "https://github.com/krizaka/krizaka-java/issues/new", label: "Propose" },
|
|
19
|
+
]}
|
|
20
|
+
/>
|
|
21
|
+
</CtaPanel>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/decision-list/product.tsx
|
|
4
|
+
import { DecisionList } from "@krizaka/ui/decision-list";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var decisions = [
|
|
7
|
+
{
|
|
8
|
+
id: "local",
|
|
9
|
+
chose: "Local inference by default.",
|
|
10
|
+
refused: "A hosted API as the default path.",
|
|
11
|
+
because: "A prompt that never leaves cannot leak.",
|
|
12
|
+
cost: "You need a GPU, or patience on a CPU."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: "telemetry",
|
|
16
|
+
chose: "Zero telemetry.",
|
|
17
|
+
refused: "Anonymous usage statistics.",
|
|
18
|
+
because: "Anonymous rarely stays anonymous.",
|
|
19
|
+
cost: "You tell us what breaks: we cannot see it."
|
|
20
|
+
}
|
|
21
|
+
];
|
|
22
|
+
function DecisionListProduct() {
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
DecisionList,
|
|
25
|
+
{
|
|
26
|
+
className: "w-full max-w-4xl",
|
|
27
|
+
reveal: false,
|
|
28
|
+
decisions,
|
|
29
|
+
labels: { chose: "We chose", refused: "We refused", because: "Because", cost: "What it costs you" }
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
DecisionListProduct as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DecisionList } from "@krizaka/ui/decision-list";
|
|
2
|
+
|
|
3
|
+
const decisions = [
|
|
4
|
+
{
|
|
5
|
+
id: "local",
|
|
6
|
+
chose: "Local inference by default.",
|
|
7
|
+
refused: "A hosted API as the default path.",
|
|
8
|
+
because: "A prompt that never leaves cannot leak.",
|
|
9
|
+
cost: "You need a GPU, or patience on a CPU.",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "telemetry",
|
|
13
|
+
chose: "Zero telemetry.",
|
|
14
|
+
refused: "Anonymous usage statistics.",
|
|
15
|
+
because: "Anonymous rarely stays anonymous.",
|
|
16
|
+
cost: "You tell us what breaks: we cannot see it.",
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
// The decisions behind a product: what it chose, what it refused, why — and what it costs the reader, said honestly.
|
|
21
|
+
export default function DecisionListProduct() {
|
|
22
|
+
return (
|
|
23
|
+
<DecisionList
|
|
24
|
+
className="w-full max-w-4xl"
|
|
25
|
+
reveal={false}
|
|
26
|
+
decisions={decisions}
|
|
27
|
+
labels={{ chose: "We chose", refused: "We refused", because: "Because", cost: "What it costs you" }}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|