@krizaka/ui 2.9.0 → 3.0.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 +44 -6
- package/dist/audio-player.js +1 -1
- package/dist/blocks.css +247 -0
- package/dist/catalogue-page.d.ts +34 -0
- package/dist/catalogue-page.js +26 -0
- package/dist/catalogue-page.js.map +1 -0
- package/dist/changelog-page.d.ts +50 -0
- package/dist/changelog-page.js +27 -0
- package/dist/changelog-page.js.map +1 -0
- package/dist/{chunk-EUPTXKH7.js → chunk-BRKMQ6JV.js} +2 -1
- package/dist/chunk-FDCMBWUU.js +168 -0
- package/dist/chunk-FDCMBWUU.js.map +1 -0
- package/dist/chunk-HCNOOPZE.js +210 -0
- package/dist/chunk-HCNOOPZE.js.map +1 -0
- package/dist/{chunk-NOVUREEC.js → chunk-JZPVUJIX.js} +25 -3
- package/dist/chunk-JZPVUJIX.js.map +1 -0
- package/dist/chunk-KNBYZGSQ.js +11 -0
- package/dist/chunk-KNBYZGSQ.js.map +1 -0
- package/dist/{chunk-X6TW3X6Y.js → chunk-LCZXS6AK.js} +2 -2
- package/dist/chunk-OGJI5X4W.js +157 -0
- package/dist/chunk-OGJI5X4W.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/component-page.d.ts +41 -0
- package/dist/component-page.js +17 -0
- package/dist/component-page.js.map +1 -0
- package/dist/contact-page.d.ts +31 -0
- package/dist/contact-page.js +26 -0
- package/dist/contact-page.js.map +1 -0
- package/dist/data-table.d.ts +284 -24
- package/dist/data-table.js +914 -121
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/docs-article-page.d.ts +54 -0
- package/dist/docs-article-page.js +29 -0
- package/dist/docs-article-page.js.map +1 -0
- package/dist/docs-hub-page.d.ts +72 -0
- package/dist/docs-hub-page.js +45 -0
- package/dist/docs-hub-page.js.map +1 -0
- package/dist/error-page.d.ts +22 -0
- package/dist/error-page.js +23 -0
- package/dist/error-page.js.map +1 -0
- package/dist/filter-bar.d.ts +12 -12
- package/dist/filter-bar.js +9 -145
- package/dist/filter-bar.js.map +1 -1
- package/dist/gallery-page.d.ts +50 -0
- package/dist/gallery-page.js +30 -0
- package/dist/gallery-page.js.map +1 -0
- package/dist/{geometry-CXrAW34x.d.ts → geometry-CbOU4rtL.d.ts} +4 -4
- package/dist/how-it-works-page.d.ts +48 -0
- package/dist/how-it-works-page.js +28 -0
- package/dist/how-it-works-page.js.map +1 -0
- package/dist/image-cropper.js +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +93 -5
- package/dist/index.js.map +1 -1
- package/dist/landing-page.d.ts +58 -0
- package/dist/landing-page.js +42 -0
- package/dist/landing-page.js.map +1 -0
- package/dist/legal-page.d.ts +34 -0
- package/dist/legal-page.js +18 -0
- package/dist/legal-page.js.map +1 -0
- package/dist/longform-page.d.ts +42 -0
- package/dist/longform-page.js +29 -0
- package/dist/longform-page.js.map +1 -0
- package/dist/mascot-quote.d.ts +4 -4
- package/dist/mascot-quote.js +23 -1
- package/dist/mascot-quote.js.map +1 -1
- package/dist/mascot-state.d.ts +2 -2
- package/dist/mascot-state.js +1 -1
- package/dist/mascot-state.js.map +1 -1
- package/dist/mascots.d.ts +4 -4
- package/dist/mascots.js +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/native/list.d.ts +95 -0
- package/dist/native/list.js +135 -0
- package/dist/native/list.js.map +1 -0
- package/dist/native.d.ts +16 -9
- package/dist/native.js +183 -74
- package/dist/native.js.map +1 -1
- package/dist/pricing-page.d.ts +62 -0
- package/dist/pricing-page.js +71 -0
- package/dist/pricing-page.js.map +1 -0
- package/dist/product-page.d.ts +83 -0
- package/dist/product-page.js +60 -0
- package/dist/product-page.js.map +1 -0
- package/dist/search-field.js +6 -160
- package/dist/search-field.js.map +1 -1
- package/dist/status-page.d.ts +42 -0
- package/dist/status-page.js +28 -0
- package/dist/status-page.js.map +1 -0
- package/dist/tag-input.js +2 -2
- package/dist/video-player.js +1 -1
- package/dist/video-trimmer.js +1 -1
- package/dist/virtual.d.ts +140 -0
- package/dist/virtual.js +19 -0
- package/dist/virtual.js.map +1 -0
- package/package.json +296 -10
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +240 -0
- package/registry/changelog-page.json +226 -0
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/component-page.json +227 -0
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +212 -0
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +643 -49
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +242 -0
- package/registry/docs-hub-page.json +270 -0
- package/registry/docs-layout.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +183 -0
- package/registry/examples/catalogue-page/components.d.ts +4 -0
- package/registry/examples/catalogue-page/components.js +33 -0
- package/registry/examples/catalogue-page/components.tsx +36 -0
- package/registry/examples/changelog-page/releases.d.ts +4 -0
- package/registry/examples/changelog-page/releases.js +44 -0
- package/registry/examples/changelog-page/releases.tsx +39 -0
- package/registry/examples/component-page/button.d.ts +4 -0
- package/registry/examples/component-page/button.js +33 -0
- package/registry/examples/component-page/button.tsx +30 -0
- package/registry/examples/contact-page/team.d.ts +4 -0
- package/registry/examples/contact-page/team.js +39 -0
- package/registry/examples/contact-page/team.tsx +38 -0
- package/registry/examples/data-table/details.d.ts +4 -0
- package/registry/examples/data-table/details.js +33 -0
- package/registry/examples/data-table/details.tsx +31 -0
- package/registry/examples/data-table/filters.d.ts +4 -0
- package/registry/examples/data-table/filters.js +40 -0
- package/registry/examples/data-table/filters.tsx +40 -0
- package/registry/examples/data-table/grouped.d.ts +4 -0
- package/registry/examples/data-table/grouped.js +24 -0
- package/registry/examples/data-table/grouped.tsx +23 -0
- package/registry/examples/data-table/paginated.d.ts +4 -0
- package/registry/examples/data-table/paginated.js +23 -0
- package/registry/examples/data-table/paginated.tsx +22 -0
- package/registry/examples/data-table/pinned.d.ts +4 -0
- package/registry/examples/data-table/pinned.js +26 -0
- package/registry/examples/data-table/pinned.tsx +25 -0
- package/registry/examples/data-table/server.d.ts +4 -0
- package/registry/examples/data-table/server.js +40 -0
- package/registry/examples/data-table/server.tsx +40 -0
- package/registry/examples/data-table/virtualized.js +2 -2
- package/registry/examples/data-table/virtualized.tsx +3 -3
- package/registry/examples/docs-article-page/cli.d.ts +4 -0
- package/registry/examples/docs-article-page/cli.js +33 -0
- package/registry/examples/docs-article-page/cli.tsx +38 -0
- package/registry/examples/docs-hub-page/krizaka.d.ts +4 -0
- package/registry/examples/docs-hub-page/krizaka.js +46 -0
- package/registry/examples/docs-hub-page/krizaka.tsx +37 -0
- package/registry/examples/error-page/not-found.d.ts +4 -0
- package/registry/examples/error-page/not-found.js +24 -0
- package/registry/examples/error-page/not-found.tsx +19 -0
- package/registry/examples/gallery-page/made-here.d.ts +4 -0
- package/registry/examples/gallery-page/made-here.js +34 -0
- package/registry/examples/gallery-page/made-here.tsx +32 -0
- package/registry/examples/how-it-works-page/orazaka.d.ts +4 -0
- package/registry/examples/how-it-works-page/orazaka.js +30 -0
- package/registry/examples/how-it-works-page/orazaka.tsx +26 -0
- package/registry/examples/landing-page/krizaka.d.ts +4 -0
- package/registry/examples/landing-page/krizaka.js +44 -0
- package/registry/examples/landing-page/krizaka.tsx +44 -0
- package/registry/examples/legal-page/privacy.d.ts +4 -0
- package/registry/examples/legal-page/privacy.js +24 -0
- package/registry/examples/legal-page/privacy.tsx +19 -0
- package/registry/examples/list/native/default.d.ts +4 -0
- package/registry/examples/list/native/default.dark.png +0 -0
- package/registry/examples/list/native/default.js +33 -0
- package/registry/examples/list/native/default.light.png +0 -0
- package/registry/examples/list/native/default.tsx +31 -0
- package/registry/examples/list/native/infinite.d.ts +4 -0
- package/registry/examples/list/native/infinite.dark.png +0 -0
- package/registry/examples/list/native/infinite.js +30 -0
- package/registry/examples/list/native/infinite.light.png +0 -0
- package/registry/examples/list/native/infinite.tsx +35 -0
- package/registry/examples/list/native/states.d.ts +4 -0
- package/registry/examples/list/native/states.dark.png +0 -0
- package/registry/examples/list/native/states.js +26 -0
- package/registry/examples/list/native/states.light.png +0 -0
- package/registry/examples/list/native/states.tsx +21 -0
- package/registry/examples/longform-page/story.d.ts +4 -0
- package/registry/examples/longform-page/story.js +38 -0
- package/registry/examples/longform-page/story.tsx +35 -0
- package/registry/examples/mascots/crane.d.ts +4 -0
- package/registry/examples/mascots/crane.js +19 -0
- package/registry/examples/mascots/crane.tsx +18 -0
- package/registry/examples/mascots/flock.tsx +2 -1
- package/registry/examples/mascots/native/crane.d.ts +4 -0
- package/registry/examples/mascots/native/crane.dark.png +0 -0
- package/registry/examples/mascots/native/crane.js +21 -0
- package/registry/examples/mascots/native/crane.light.png +0 -0
- package/registry/examples/mascots/native/crane.tsx +18 -0
- package/registry/examples/pricing-page/credits.d.ts +4 -0
- package/registry/examples/pricing-page/credits.js +41 -0
- package/registry/examples/pricing-page/credits.tsx +33 -0
- package/registry/examples/product-page/orazaka.d.ts +4 -0
- package/registry/examples/product-page/orazaka.js +44 -0
- package/registry/examples/product-page/orazaka.tsx +36 -0
- package/registry/examples/status-page/building.d.ts +4 -0
- package/registry/examples/status-page/building.js +29 -0
- package/registry/examples/status-page/building.tsx +25 -0
- package/registry/examples/status-page/operational.d.ts +4 -0
- package/registry/examples/status-page/operational.js +26 -0
- package/registry/examples/status-page/operational.tsx +20 -0
- package/registry/examples/virtual/feed.d.ts +4 -0
- package/registry/examples/virtual/feed.js +26 -0
- package/registry/examples/virtual/feed.tsx +24 -0
- package/registry/examples/virtual/gallery.d.ts +4 -0
- package/registry/examples/virtual/gallery.js +31 -0
- package/registry/examples/virtual/gallery.tsx +28 -0
- package/registry/examples/virtual/messages.d.ts +4 -0
- package/registry/examples/virtual/messages.js +28 -0
- package/registry/examples/virtual/messages.tsx +28 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/gallery-page.json +256 -0
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +242 -0
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +356 -9
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +242 -0
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +199 -0
- package/registry/link-card.json +1 -1
- package/registry/list.json +249 -0
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +213 -0
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +6 -6
- package/registry/mascot-state.json +34 -34
- package/registry/mascots.json +41 -21
- package/registry/media-capture.json +1 -1
- 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 +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +245 -0
- package/registry/product-page.json +319 -0
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +263 -0
- 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 +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +569 -0
- package/skills/data-table/SKILL.md +56 -0
- package/skills/native-list/SKILL.md +39 -0
- package/skills/virtual/SKILL.md +35 -0
- package/dist/chunk-NOVUREEC.js.map +0 -1
- /package/dist/{chunk-EUPTXKH7.js.map → chunk-BRKMQ6JV.js.map} +0 -0
- /package/dist/{chunk-X6TW3X6Y.js.map → chunk-LCZXS6AK.js.map} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/data-table/filters.tsx
|
|
4
|
+
import { DataTable, DataTableColumnsMenu, DataTableExport, DataTableFilters } from "@krizaka/ui/data-table";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var videos = Array.from({ length: 36 }, (_, i) => ({
|
|
7
|
+
id: `v${i + 1}`,
|
|
8
|
+
title: ["Sunset over Montr\xE9al", "Behind the scenes", "Studio tour", "Live Q&A replay"][i % 4] + ` #${i + 1}`,
|
|
9
|
+
creator: ["Elena Varga", "Noah Petit", "Maya Chen"][i % 3],
|
|
10
|
+
status: ["Public", "Followers", "Draft"][i % 3 === 2 ? 2 : i % 2],
|
|
11
|
+
views: i * 7919 % 2e4
|
|
12
|
+
}));
|
|
13
|
+
var columns = [
|
|
14
|
+
{ id: "title", header: "Title", sortable: true, card: "title", filter: "text" },
|
|
15
|
+
{ id: "creator", header: "Creator", filter: "facet" },
|
|
16
|
+
{ id: "status", header: "Visibility", filter: "facet" },
|
|
17
|
+
{ id: "views", header: "Views", sortable: true, align: "end", filter: "range", cell: (v) => v.views.toLocaleString("en") }
|
|
18
|
+
];
|
|
19
|
+
function DataTableFiltersExample() {
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
DataTable,
|
|
22
|
+
{
|
|
23
|
+
caption: "Videos",
|
|
24
|
+
rows: videos,
|
|
25
|
+
columns,
|
|
26
|
+
getRowId: (v) => v.id,
|
|
27
|
+
defaultPageSize: 8,
|
|
28
|
+
toolbar: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(DataTableFilters, {}),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
31
|
+
/* @__PURE__ */ jsx(DataTableColumnsMenu, {}),
|
|
32
|
+
/* @__PURE__ */ jsx(DataTableExport, { filename: "videos.csv" })
|
|
33
|
+
] })
|
|
34
|
+
] })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
DataTableFiltersExample as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DataTable, type DataTableColumn, DataTableColumnsMenu, DataTableExport, DataTableFilters } from "@krizaka/ui/data-table";
|
|
4
|
+
|
|
5
|
+
type Video = { id: string; title: string; creator: string; status: string; views: number };
|
|
6
|
+
const videos: Video[] = Array.from({ length: 36 }, (_, i) => ({
|
|
7
|
+
id: `v${i + 1}`,
|
|
8
|
+
title: ["Sunset over Montréal", "Behind the scenes", "Studio tour", "Live Q&A replay"][i % 4]! + ` #${i + 1}`,
|
|
9
|
+
creator: ["Elena Varga", "Noah Petit", "Maya Chen"][i % 3]!,
|
|
10
|
+
status: ["Public", "Followers", "Draft"][i % 3 === 2 ? 2 : i % 2]!,
|
|
11
|
+
views: (i * 7919) % 20_000,
|
|
12
|
+
}));
|
|
13
|
+
const columns: DataTableColumn<Video>[] = [
|
|
14
|
+
{ id: "title", header: "Title", sortable: true, card: "title", filter: "text" },
|
|
15
|
+
{ id: "creator", header: "Creator", filter: "facet" },
|
|
16
|
+
{ id: "status", header: "Visibility", filter: "facet" },
|
|
17
|
+
{ id: "views", header: "Views", sortable: true, align: "end", filter: "range", cell: (v) => v.views.toLocaleString("en") },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
// A search, facets with their counts, a range, the filters as chips; hide columns, export what is shown.
|
|
21
|
+
export default function DataTableFiltersExample() {
|
|
22
|
+
return (
|
|
23
|
+
<DataTable
|
|
24
|
+
caption="Videos"
|
|
25
|
+
rows={videos}
|
|
26
|
+
columns={columns}
|
|
27
|
+
getRowId={(v) => v.id}
|
|
28
|
+
defaultPageSize={8}
|
|
29
|
+
toolbar={
|
|
30
|
+
<div className="flex flex-col gap-3">
|
|
31
|
+
<DataTableFilters />
|
|
32
|
+
<div className="flex justify-end gap-2">
|
|
33
|
+
<DataTableColumnsMenu />
|
|
34
|
+
<DataTableExport filename="videos.csv" />
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/data-table/grouped.tsx
|
|
4
|
+
import { DataTable } from "@krizaka/ui/data-table";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var tips = [
|
|
7
|
+
{ id: "t1", creator: "Elena Varga", fan: "marco_v", cents: 500 },
|
|
8
|
+
{ id: "t2", creator: "Elena Varga", fan: "ana.lu", cents: 1500 },
|
|
9
|
+
{ id: "t3", creator: "Noah Petit", fan: "kenji", cents: 300 },
|
|
10
|
+
{ id: "t4", creator: "Maya Chen", fan: "marco_v", cents: 2e3 },
|
|
11
|
+
{ id: "t5", creator: "Noah Petit", fan: "zoe", cents: 700 }
|
|
12
|
+
];
|
|
13
|
+
var money = (cents) => (cents / 100).toLocaleString("en", { style: "currency", currency: "USD" });
|
|
14
|
+
var columns = [
|
|
15
|
+
{ id: "creator", header: "Creator", groupable: true, card: "title" },
|
|
16
|
+
{ id: "fan", header: "From" },
|
|
17
|
+
{ id: "cents", header: "Amount", align: "end", cell: (t) => money(t.cents), aggregate: (rows) => money(rows.reduce((sum, t) => sum + t.cents, 0)) }
|
|
18
|
+
];
|
|
19
|
+
function DataTableGrouped() {
|
|
20
|
+
return /* @__PURE__ */ jsx(DataTable, { caption: "Tips this week", rows: tips, columns, getRowId: (t) => t.id, defaultGroupBy: ["creator"], defaultExpanded: { "creator:Elena Varga": true } });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
DataTableGrouped as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
|
|
4
|
+
|
|
5
|
+
type Tip = { id: string; creator: string; fan: string; cents: number };
|
|
6
|
+
const tips: Tip[] = [
|
|
7
|
+
{ id: "t1", creator: "Elena Varga", fan: "marco_v", cents: 500 },
|
|
8
|
+
{ id: "t2", creator: "Elena Varga", fan: "ana.lu", cents: 1500 },
|
|
9
|
+
{ id: "t3", creator: "Noah Petit", fan: "kenji", cents: 300 },
|
|
10
|
+
{ id: "t4", creator: "Maya Chen", fan: "marco_v", cents: 2000 },
|
|
11
|
+
{ id: "t5", creator: "Noah Petit", fan: "zoe", cents: 700 },
|
|
12
|
+
];
|
|
13
|
+
const money = (cents: number) => (cents / 100).toLocaleString("en", { style: "currency", currency: "USD" });
|
|
14
|
+
const columns: DataTableColumn<Tip>[] = [
|
|
15
|
+
{ id: "creator", header: "Creator", groupable: true, card: "title" },
|
|
16
|
+
{ id: "fan", header: "From" },
|
|
17
|
+
{ id: "cents", header: "Amount", align: "end", cell: (t) => money(t.cents), aggregate: (rows) => money(rows.reduce((sum, t) => sum + t.cents, 0)) },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
// Grouped by creator: a row per group with its count and its total, opened to see the tips.
|
|
21
|
+
export default function DataTableGrouped() {
|
|
22
|
+
return <DataTable caption="Tips this week" rows={tips} columns={columns} getRowId={(t) => t.id} defaultGroupBy={["creator"]} defaultExpanded={{ "creator:Elena Varga": true }} />;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/data-table/paginated.tsx
|
|
4
|
+
import { DataTable } from "@krizaka/ui/data-table";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var invoices = Array.from({ length: 87 }, (_, i) => ({
|
|
7
|
+
id: `INV-2026-${String(i + 1).padStart(4, "0")}`,
|
|
8
|
+
customer: ["Atelier Lumen", "Northwind Studio", "Caf\xE9 Br\xFBl\xE9", "Kite & Co"][i % 4],
|
|
9
|
+
issued: `2026-${String(1 + i % 9).padStart(2, "0")}-${String(1 + i % 27).padStart(2, "0")}`,
|
|
10
|
+
total: i * 4111 % 12e4 / 100
|
|
11
|
+
}));
|
|
12
|
+
var columns = [
|
|
13
|
+
{ id: "id", header: "Invoice", sortable: true, card: "title" },
|
|
14
|
+
{ id: "customer", header: "Customer", sortable: true },
|
|
15
|
+
{ id: "issued", header: "Issued", sortable: true },
|
|
16
|
+
{ id: "total", header: "Total", sortable: true, align: "end", cell: (r) => `\u20AC${r.total.toFixed(2)}` }
|
|
17
|
+
];
|
|
18
|
+
function DataTablePaginated() {
|
|
19
|
+
return /* @__PURE__ */ jsx(DataTable, { caption: "Invoices", rows: invoices, columns, getRowId: (r) => r.id, defaultPageSize: 10, pageSizeOptions: [10, 25, 50] });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
DataTablePaginated as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
|
|
4
|
+
|
|
5
|
+
type Invoice = { id: string; customer: string; issued: string; total: number };
|
|
6
|
+
const invoices: Invoice[] = Array.from({ length: 87 }, (_, i) => ({
|
|
7
|
+
id: `INV-2026-${String(i + 1).padStart(4, "0")}`,
|
|
8
|
+
customer: ["Atelier Lumen", "Northwind Studio", "Café Brûlé", "Kite & Co"][i % 4]!,
|
|
9
|
+
issued: `2026-${String(1 + (i % 9)).padStart(2, "0")}-${String(1 + (i % 27)).padStart(2, "0")}`,
|
|
10
|
+
total: ((i * 4111) % 120_000) / 100,
|
|
11
|
+
}));
|
|
12
|
+
const columns: DataTableColumn<Invoice>[] = [
|
|
13
|
+
{ id: "id", header: "Invoice", sortable: true, card: "title" },
|
|
14
|
+
{ id: "customer", header: "Customer", sortable: true },
|
|
15
|
+
{ id: "issued", header: "Issued", sortable: true },
|
|
16
|
+
{ id: "total", header: "Total", sortable: true, align: "end", cell: (r) => `€${r.total.toFixed(2)}` },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
// Pages in the browser: the pagination under the table, the rows per page to choose; a sort goes back to page 1.
|
|
20
|
+
export default function DataTablePaginated() {
|
|
21
|
+
return <DataTable caption="Invoices" rows={invoices} columns={columns} getRowId={(r) => r.id} defaultPageSize={10} pageSizeOptions={[10, 25, 50]} />;
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/data-table/pinned.tsx
|
|
4
|
+
import { DataTable } from "@krizaka/ui/data-table";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var models = [
|
|
7
|
+
{ id: "m1", name: "Llama 3.3 70B", provider: "Self-hosted", input: 0.23, output: 0.4, context: 128, latency: 420, region: "eu-west" },
|
|
8
|
+
{ id: "m2", name: "Mistral Large", provider: "Mistral", input: 2, output: 6, context: 128, latency: 380, region: "eu-west" },
|
|
9
|
+
{ id: "m3", name: "Qwen 2.5 Coder", provider: "Self-hosted", input: 0.12, output: 0.2, context: 32, latency: 210, region: "eu-central" }
|
|
10
|
+
];
|
|
11
|
+
var usd = (n) => `$${n.toFixed(2)}`;
|
|
12
|
+
var columns = [
|
|
13
|
+
{ id: "name", header: "Model", width: 180, card: "title" },
|
|
14
|
+
{ id: "provider", header: "Provider", width: 140 },
|
|
15
|
+
{ id: "input", header: "Input / 1M", width: 130, align: "end", cell: (m) => usd(m.input) },
|
|
16
|
+
{ id: "output", header: "Output / 1M", width: 130, align: "end", cell: (m) => usd(m.output) },
|
|
17
|
+
{ id: "context", header: "Context", width: 110, align: "end", cell: (m) => `${m.context}k` },
|
|
18
|
+
{ id: "latency", header: "Latency", width: 110, align: "end", cell: (m) => `${m.latency} ms` },
|
|
19
|
+
{ id: "region", header: "Region", width: 130 }
|
|
20
|
+
];
|
|
21
|
+
function DataTablePinned() {
|
|
22
|
+
return /* @__PURE__ */ jsx(DataTable, { caption: "Model pricing", rows: models, columns, getRowId: (m) => m.id, pinning: { start: ["name"] }, resizing: true, layout: "table" });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
DataTablePinned as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
|
|
4
|
+
|
|
5
|
+
type Model = { id: string; name: string; provider: string; input: number; output: number; context: number; latency: number; region: string };
|
|
6
|
+
const models: Model[] = [
|
|
7
|
+
{ id: "m1", name: "Llama 3.3 70B", provider: "Self-hosted", input: 0.23, output: 0.4, context: 128, latency: 420, region: "eu-west" },
|
|
8
|
+
{ id: "m2", name: "Mistral Large", provider: "Mistral", input: 2, output: 6, context: 128, latency: 380, region: "eu-west" },
|
|
9
|
+
{ id: "m3", name: "Qwen 2.5 Coder", provider: "Self-hosted", input: 0.12, output: 0.2, context: 32, latency: 210, region: "eu-central" },
|
|
10
|
+
];
|
|
11
|
+
const usd = (n: number) => `$${n.toFixed(2)}`;
|
|
12
|
+
const columns: DataTableColumn<Model>[] = [
|
|
13
|
+
{ id: "name", header: "Model", width: 180, card: "title" },
|
|
14
|
+
{ id: "provider", header: "Provider", width: 140 },
|
|
15
|
+
{ id: "input", header: "Input / 1M", width: 130, align: "end", cell: (m) => usd(m.input) },
|
|
16
|
+
{ id: "output", header: "Output / 1M", width: 130, align: "end", cell: (m) => usd(m.output) },
|
|
17
|
+
{ id: "context", header: "Context", width: 110, align: "end", cell: (m) => `${m.context}k` },
|
|
18
|
+
{ id: "latency", header: "Latency", width: 110, align: "end", cell: (m) => `${m.latency} ms` },
|
|
19
|
+
{ id: "region", header: "Region", width: 130 },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
// A wide table: the name stays at the start while it scrolls sideways; drag (or ← →) a header's edge to resize.
|
|
23
|
+
export default function DataTablePinned() {
|
|
24
|
+
return <DataTable caption="Model pricing" rows={models} columns={columns} getRowId={(m) => m.id} pinning={{ start: ["name"] }} resizing layout="table" />;
|
|
25
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/data-table/server.tsx
|
|
4
|
+
import { configureKrizakaFetch, defineKeys, keepPreviousData, krizakaFetch, KrizakaQueryProvider, useQuery } from "@krizaka/query";
|
|
5
|
+
import { DataTable, DataTableFilters } from "@krizaka/ui/data-table";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var ALL = Array.from({ length: 240 }, (_, i) => ({ id: `po-${1e3 + i}`, creator: ["Elena Varga", "Noah Petit", "Maya Chen"][i % 3], status: ["paid", "pending", "failed"][i % 4 % 3], amount: i * 7919 % 9e4 / 100 }));
|
|
9
|
+
async function fakeApi(input) {
|
|
10
|
+
const q = new URL(String(input), "https://api.example").searchParams;
|
|
11
|
+
const [by, dir] = (q.get("sort") ?? "id:ascending").split(":");
|
|
12
|
+
const rows = ALL.filter((p) => !q.get("status") || q.get("status").split(",").includes(p.status)).sort((a, b) => (a[by] > b[by] ? 1 : -1) * (dir === "descending" ? -1 : 1));
|
|
13
|
+
const [page, size] = [Number(q.get("page")), Number(q.get("size"))];
|
|
14
|
+
return Response.json({ rows: rows.slice((page - 1) * size, page * size), total: rows.length });
|
|
15
|
+
}
|
|
16
|
+
var payoutKeys = defineKeys("payouts", { list: (query) => [query] });
|
|
17
|
+
var columns = [
|
|
18
|
+
{ id: "id", header: "Payout", sortable: true, card: "title" },
|
|
19
|
+
{ id: "creator", header: "Creator", sortable: true },
|
|
20
|
+
{ id: "status", header: "Status", filter: "facet", options: [{ value: "paid", label: "Paid" }, { value: "pending", label: "Pending" }, { value: "failed", label: "Failed" }] },
|
|
21
|
+
{ id: "amount", header: "Amount", sortable: true, align: "end", cell: (p) => `$${p.amount.toFixed(2)}` }
|
|
22
|
+
];
|
|
23
|
+
var NONE = [];
|
|
24
|
+
function Payouts() {
|
|
25
|
+
const [query, setQuery] = useState({ sort: null, filters: {}, page: 1, pageSize: 10 });
|
|
26
|
+
const { data, isPending, error } = useQuery({
|
|
27
|
+
queryKey: payoutKeys.list(query),
|
|
28
|
+
queryFn: ({ signal }) => krizakaFetch("/api/payouts", { signal, query: { sort: query.sort && `${query.sort.column}:${query.sort.direction}`, status: query.filters.status, page: query.page, size: query.pageSize } }),
|
|
29
|
+
placeholderData: keepPreviousData,
|
|
30
|
+
meta: { list: true }
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ jsx(DataTable, { caption: "Payouts", rows: data?.rows ?? NONE, columns, getRowId: (p) => p.id, manual: { sorting: true, filtering: true, pagination: true }, rowCount: data?.total, defaultPageSize: 10, onStateChange: setQuery, loading: isPending, error: error?.message, toolbar: /* @__PURE__ */ jsx(DataTableFilters, {}) });
|
|
33
|
+
}
|
|
34
|
+
function DataTableServer() {
|
|
35
|
+
useState(() => configureKrizakaFetch({ fetch: fakeApi }));
|
|
36
|
+
return /* @__PURE__ */ jsx(KrizakaQueryProvider, { children: /* @__PURE__ */ jsx(Payouts, {}) });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
DataTableServer as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { configureKrizakaFetch, defineKeys, keepPreviousData, krizakaFetch, KrizakaQueryProvider, useQuery } from "@krizaka/query";
|
|
4
|
+
import { DataTable, type DataTableColumn, DataTableFilters, type DataTableQuery } from "@krizaka/ui/data-table";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
|
|
7
|
+
type Payout = { id: string; creator: string; status: string; amount: number };
|
|
8
|
+
const ALL: Payout[] = Array.from({ length: 240 }, (_, i) => ({ id: `po-${1000 + i}`, creator: ["Elena Varga", "Noah Petit", "Maya Chen"][i % 3]!, status: ["paid", "pending", "failed"][i % 4 % 3]!, amount: ((i * 7919) % 90_000) / 100 }));
|
|
9
|
+
// The API, faked in the page: it sorts, filters and pages — the table shows what it answers.
|
|
10
|
+
async function fakeApi(input: RequestInfo | URL) {
|
|
11
|
+
const q = new URL(String(input), "https://api.example").searchParams;
|
|
12
|
+
const [by, dir] = (q.get("sort") ?? "id:ascending").split(":") as [keyof Payout, string];
|
|
13
|
+
const rows = ALL.filter((p) => !q.get("status") || q.get("status")!.split(",").includes(p.status)).sort((a, b) => (a[by] > b[by] ? 1 : -1) * (dir === "descending" ? -1 : 1));
|
|
14
|
+
const [page, size] = [Number(q.get("page")), Number(q.get("size"))];
|
|
15
|
+
return Response.json({ rows: rows.slice((page - 1) * size, page * size), total: rows.length });
|
|
16
|
+
}
|
|
17
|
+
const payoutKeys = defineKeys("payouts", { list: (query: DataTableQuery) => [query] });
|
|
18
|
+
const columns: DataTableColumn<Payout>[] = [
|
|
19
|
+
{ id: "id", header: "Payout", sortable: true, card: "title" },
|
|
20
|
+
{ id: "creator", header: "Creator", sortable: true },
|
|
21
|
+
{ id: "status", header: "Status", filter: "facet", options: [{ value: "paid", label: "Paid" }, { value: "pending", label: "Pending" }, { value: "failed", label: "Failed" }] },
|
|
22
|
+
{ id: "amount", header: "Amount", sortable: true, align: "end", cell: (p) => `$${p.amount.toFixed(2)}` },
|
|
23
|
+
];
|
|
24
|
+
const NONE: Payout[] = [];
|
|
25
|
+
function Payouts() {
|
|
26
|
+
const [query, setQuery] = useState<DataTableQuery>({ sort: null, filters: {}, page: 1, pageSize: 10 });
|
|
27
|
+
const { data, isPending, error } = useQuery({
|
|
28
|
+
queryKey: payoutKeys.list(query),
|
|
29
|
+
queryFn: ({ signal }) => krizakaFetch("/api/payouts", { signal, query: { sort: query.sort && `${query.sort.column}:${query.sort.direction}`, status: query.filters.status as string[] | undefined, page: query.page, size: query.pageSize } }) as Promise<{ rows: Payout[]; total: number }>,
|
|
30
|
+
placeholderData: keepPreviousData,
|
|
31
|
+
meta: { list: true },
|
|
32
|
+
});
|
|
33
|
+
return <DataTable caption="Payouts" rows={data?.rows ?? NONE} columns={columns} getRowId={(p) => p.id} manual={{ sorting: true, filtering: true, pagination: true }} rowCount={data?.total} defaultPageSize={10} onStateChange={setQuery} loading={isPending} error={error?.message} toolbar={<DataTableFilters />} />;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Server mode: sort, filters and page go to the API (krizakaFetch, keys from defineKeys); the previous page stays while the next loads.
|
|
37
|
+
export default function DataTableServer() {
|
|
38
|
+
useState(() => configureKrizakaFetch({ fetch: fakeApi as typeof fetch }));
|
|
39
|
+
return <KrizakaQueryProvider><Payouts /></KrizakaQueryProvider>;
|
|
40
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// registry/examples/data-table/virtualized.tsx
|
|
4
4
|
import { DataTable } from "@krizaka/ui/data-table";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var events = Array.from({ length:
|
|
6
|
+
var events = Array.from({ length: 5e4 }, (_, i) => ({
|
|
7
7
|
id: `evt-${i + 1}`,
|
|
8
8
|
kind: ["view", "tip", "follow", "comment"][i % 4],
|
|
9
9
|
at: `2026-10-${String(1 + i % 11).padStart(2, "0")} ${String(i % 24).padStart(2, "0")}:00`
|
|
@@ -14,7 +14,7 @@ var columns = [
|
|
|
14
14
|
{ id: "at", header: "At", align: "end" }
|
|
15
15
|
];
|
|
16
16
|
function DataTableVirtualized() {
|
|
17
|
-
return /* @__PURE__ */ jsx(DataTable, { caption: "Events", rows: events, columns, getRowId: (e) => e.id,
|
|
17
|
+
return /* @__PURE__ */ jsx(DataTable, { caption: "Events", rows: events, columns, getRowId: (e) => e.id, virtualized: { height: 320, estimateRowHeight: 37 }, density: "compact" });
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
20
|
DataTableVirtualized as default
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
|
|
4
4
|
|
|
5
5
|
type Event = { id: string; kind: string; at: string };
|
|
6
|
-
const events: Event[] = Array.from({ length:
|
|
6
|
+
const events: Event[] = Array.from({ length: 50_000 }, (_, i) => ({
|
|
7
7
|
id: `evt-${i + 1}`,
|
|
8
8
|
kind: ["view", "tip", "follow", "comment"][i % 4]!,
|
|
9
9
|
at: `2026-10-${String(1 + (i % 11)).padStart(2, "0")} ${String(i % 24).padStart(2, "0")}:00`,
|
|
@@ -14,7 +14,7 @@ const columns: DataTableColumn<Event>[] = [
|
|
|
14
14
|
{ id: "at", header: "At", align: "end" },
|
|
15
15
|
];
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// 50,000 rows, ~20 rendered: the body scrolls, the header stays, the sort runs on all of them.
|
|
18
18
|
export default function DataTableVirtualized() {
|
|
19
|
-
return <DataTable caption="Events" rows={events} columns={columns} getRowId={(e) => e.id}
|
|
19
|
+
return <DataTable caption="Events" rows={events} columns={columns} getRowId={(e) => e.id} virtualized={{ height: 320, estimateRowHeight: 37 }} density="compact" />;
|
|
20
20
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/docs-article-page/cli.tsx
|
|
4
|
+
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
5
|
+
import { DocsArticlePage } from "@krizaka/ui/docs-article-page";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var PAGES = ["Getting started", "The CLI", "Packs & Studios"];
|
|
8
|
+
function DocsArticlePageCli() {
|
|
9
|
+
return /* @__PURE__ */ jsxs(
|
|
10
|
+
DocsArticlePage,
|
|
11
|
+
{
|
|
12
|
+
className: "brand-orazaka pt-6",
|
|
13
|
+
sidebarLabel: "Pages of the documentation",
|
|
14
|
+
sidebar: /* @__PURE__ */ jsx("nav", { "aria-label": "Orazaka documentation", children: /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1 text-sm", children: PAGES.map((p, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", { href: `#p${i}`, "aria-current": i === 1 ? "page" : void 0, className: "block rounded-md px-3 py-2 text-fg-secondary no-underline hover:bg-surface-2 aria-[current=page]:bg-accent-soft aria-[current=page]:text-fg", children: p }) }, p)) }) }),
|
|
15
|
+
breadcrumb: [{ href: "#docs", label: "Docs" }, { href: "#orazaka", label: "Orazaka" }],
|
|
16
|
+
title: "The CLI",
|
|
17
|
+
lead: "Install, start and develop Orazaka from one command line.",
|
|
18
|
+
facts: [{ label: "Updated 11 Oct 2026" }, { label: "4 min read" }],
|
|
19
|
+
toc: { label: "On this page", items: [{ id: "install", label: "Install" }, { id: "start", label: "Start" }] },
|
|
20
|
+
pager: { previous: { href: "#p0", title: "Getting started" }, next: { href: "#p2", title: "Packs & Studios" }, labels: { previous: "Previous", next: "Next" } },
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("h2", { id: "install", children: "Install" }),
|
|
23
|
+
/* @__PURE__ */ jsx("p", { children: "One command installs the engine, the console and the models you choose." }),
|
|
24
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: "npx orazaka install", language: "bash", file: "Terminal", copyLabel: "Copy", copiedLabel: "Copied" }),
|
|
25
|
+
/* @__PURE__ */ jsx("h2", { id: "start", children: "Start" }),
|
|
26
|
+
/* @__PURE__ */ jsx("p", { children: "Then start it; the console opens on your machine." })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
DocsArticlePageCli as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
2
|
+
import { DocsArticlePage } from "@krizaka/ui/docs-article-page";
|
|
3
|
+
|
|
4
|
+
const PAGES = ["Getting started", "The CLI", "Packs & Studios"];
|
|
5
|
+
|
|
6
|
+
// TEMPLATE — a documentation article (Orazaka's CLI): the pages, where it sits, its title and facts, the reading column,
|
|
7
|
+
// the contents beside it, previous and next at the foot. On a phone the pages fold above the article.
|
|
8
|
+
export default function DocsArticlePageCli() {
|
|
9
|
+
return (
|
|
10
|
+
<DocsArticlePage
|
|
11
|
+
className="brand-orazaka pt-6"
|
|
12
|
+
sidebarLabel="Pages of the documentation"
|
|
13
|
+
sidebar={
|
|
14
|
+
<nav aria-label="Orazaka documentation">
|
|
15
|
+
<ul className="flex flex-col gap-1 text-sm">
|
|
16
|
+
{PAGES.map((p, i) => (
|
|
17
|
+
<li key={p}>
|
|
18
|
+
<a href={`#p${i}`} aria-current={i === 1 ? "page" : undefined} className="block rounded-md px-3 py-2 text-fg-secondary no-underline hover:bg-surface-2 aria-[current=page]:bg-accent-soft aria-[current=page]:text-fg">{p}</a>
|
|
19
|
+
</li>
|
|
20
|
+
))}
|
|
21
|
+
</ul>
|
|
22
|
+
</nav>
|
|
23
|
+
}
|
|
24
|
+
breadcrumb={[{ href: "#docs", label: "Docs" }, { href: "#orazaka", label: "Orazaka" }]}
|
|
25
|
+
title="The CLI"
|
|
26
|
+
lead="Install, start and develop Orazaka from one command line."
|
|
27
|
+
facts={[{ label: "Updated 11 Oct 2026" }, { label: "4 min read" }]}
|
|
28
|
+
toc={{ label: "On this page", items: [{ id: "install", label: "Install" }, { id: "start", label: "Start" }] }}
|
|
29
|
+
pager={{ previous: { href: "#p0", title: "Getting started" }, next: { href: "#p2", title: "Packs & Studios" }, labels: { previous: "Previous", next: "Next" } }}
|
|
30
|
+
>
|
|
31
|
+
<h2 id="install">Install</h2>
|
|
32
|
+
<p>One command installs the engine, the console and the models you choose.</p>
|
|
33
|
+
<CodeBlock code="npx orazaka install" language="bash" file="Terminal" copyLabel="Copy" copiedLabel="Copied" />
|
|
34
|
+
<h2 id="start">Start</h2>
|
|
35
|
+
<p>Then start it; the console opens on your machine.</p>
|
|
36
|
+
</DocsArticlePage>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/docs-hub-page/krizaka.tsx
|
|
4
|
+
import { ProductLogo } from "@krizaka/ui";
|
|
5
|
+
import { Button } from "@krizaka/ui/button";
|
|
6
|
+
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
7
|
+
import { DocsHubPage } from "@krizaka/ui/docs-hub-page";
|
|
8
|
+
import { Kbd } from "@krizaka/ui/kbd";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var COLLECTIONS = [
|
|
11
|
+
{ id: "ui", title: "Krizaka UI", href: "#ui", mark: /* @__PURE__ */ jsx(ProductLogo, { id: "krizaka", size: 26, animated: false }), description: "Tokens, a Tailwind preset, the components \u2014 live, generated from their code.", links: [{ href: "#blocks", label: "Blocks" }, { href: "#layouts", label: "Layouts" }, { href: "#templates", label: "Templates" }] },
|
|
12
|
+
{ id: "java", title: "Krizaka Java", href: "#java", mark: /* @__PURE__ */ jsx(ProductLogo, { id: "krizaka", size: 26, animated: false }), description: "Parent, BOM, starters, messaging, Problem Details.", links: [{ href: "#bom", label: "BOM" }, { href: "#messaging", label: "Messaging" }] },
|
|
13
|
+
{ id: "orazaka", brand: "orazaka", title: "Orazaka", href: "#orazaka", mark: /* @__PURE__ */ jsx(ProductLogo, { id: "orazaka", size: 26, animated: false }), description: "The sovereign AI engine: install, packs, administration.", links: [{ href: "#cli", label: "CLI" }, { href: "#packs", label: "Packs" }, { href: "#admin", label: "Admin" }] },
|
|
14
|
+
{ id: "orochia", brand: "orochia", title: "Orochia", href: "#orochia", mark: /* @__PURE__ */ jsx(ProductLogo, { id: "orochia", size: 26, animated: false }), description: "The creator platform: payments, auctions, the admin console.", links: [{ href: "#payouts", label: "Payouts" }, { href: "#console", label: "Console" }] }
|
|
15
|
+
];
|
|
16
|
+
function DocsHubPageKrizaka() {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
DocsHubPage,
|
|
19
|
+
{
|
|
20
|
+
eyebrow: "Documentation",
|
|
21
|
+
title: "Build with Krizaka",
|
|
22
|
+
lead: "Every building block the products are made of, documented from its source.",
|
|
23
|
+
search: /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "lg", shape: "cut", className: "w-full justify-between text-fg-secondary", children: [
|
|
24
|
+
"Search the documentation ",
|
|
25
|
+
/* @__PURE__ */ jsx(Kbd, { children: "\u2318K" })
|
|
26
|
+
] }),
|
|
27
|
+
searchHints: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
+
"Try: ",
|
|
29
|
+
/* @__PURE__ */ jsx("a", { href: "#cli", children: "orazaka install" }),
|
|
30
|
+
" \xB7 ",
|
|
31
|
+
/* @__PURE__ */ jsx("a", { href: "#button", children: "Button" }),
|
|
32
|
+
" \xB7 ",
|
|
33
|
+
/* @__PURE__ */ jsx("a", { href: "#bom", children: "BOM" })
|
|
34
|
+
] }),
|
|
35
|
+
collectionsTitle: "Collections",
|
|
36
|
+
collections: COLLECTIONS,
|
|
37
|
+
quickstarts: { title: "Start in one line", children: /* @__PURE__ */ jsx(CodeBlock, { code: "npx orazaka install", language: "bash", file: "Terminal", copyLabel: "Copy", copiedLabel: "Copied" }) },
|
|
38
|
+
popular: { title: "Most read", items: [{ href: "#cli", title: "The CLI", meta: "Orazaka" }, { href: "#button", title: "Button", meta: "Krizaka UI" }, { href: "#bom", title: "The BOM", meta: "Java" }] },
|
|
39
|
+
whatsNew: { title: "What's new", items: [{ href: "#ui-260", title: "Page blocks: frame, hero, cards, decisions", meta: "@krizaka/ui 2.6.0" }, { href: "#java-010", title: "The platform kit on Maven Central", meta: "0.1.0" }] },
|
|
40
|
+
promise: { label: "The owl's promise", text: "Every page here is generated from the code it documents \u2014 when the code changes, the page does." }
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
DocsHubPageKrizaka as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ProductLogo } from "@krizaka/ui";
|
|
2
|
+
import { Button } from "@krizaka/ui/button";
|
|
3
|
+
import { CodeBlock } from "@krizaka/ui/code-block";
|
|
4
|
+
import { DocsHubPage } from "@krizaka/ui/docs-hub-page";
|
|
5
|
+
import { Kbd } from "@krizaka/ui/kbd";
|
|
6
|
+
|
|
7
|
+
const COLLECTIONS = [
|
|
8
|
+
{ id: "ui", title: "Krizaka UI", href: "#ui", mark: <ProductLogo id="krizaka" size={26} animated={false} />, description: "Tokens, a Tailwind preset, the components — live, generated from their code.", links: [{ href: "#blocks", label: "Blocks" }, { href: "#layouts", label: "Layouts" }, { href: "#templates", label: "Templates" }] },
|
|
9
|
+
{ id: "java", title: "Krizaka Java", href: "#java", mark: <ProductLogo id="krizaka" size={26} animated={false} />, description: "Parent, BOM, starters, messaging, Problem Details.", links: [{ href: "#bom", label: "BOM" }, { href: "#messaging", label: "Messaging" }] },
|
|
10
|
+
{ id: "orazaka", brand: "orazaka", title: "Orazaka", href: "#orazaka", mark: <ProductLogo id="orazaka" size={26} animated={false} />, description: "The sovereign AI engine: install, packs, administration.", links: [{ href: "#cli", label: "CLI" }, { href: "#packs", label: "Packs" }, { href: "#admin", label: "Admin" }] },
|
|
11
|
+
{ id: "orochia", brand: "orochia", title: "Orochia", href: "#orochia", mark: <ProductLogo id="orochia" size={26} animated={false} />, description: "The creator platform: payments, auctions, the admin console.", links: [{ href: "#payouts", label: "Payouts" }, { href: "#console", label: "Console" }] },
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
// TEMPLATE — krizaka.com/docs: the search in the middle of the hero (⌘K), the collections each in its product's brand
|
|
15
|
+
// with their quick links, a quick start beside the most read pages, what is new, the owl's promise. On a phone: search,
|
|
16
|
+
// then one collection per row.
|
|
17
|
+
export default function DocsHubPageKrizaka() {
|
|
18
|
+
return (
|
|
19
|
+
<DocsHubPage
|
|
20
|
+
eyebrow="Documentation"
|
|
21
|
+
title="Build with Krizaka"
|
|
22
|
+
lead="Every building block the products are made of, documented from its source."
|
|
23
|
+
search={
|
|
24
|
+
<Button variant="secondary" size="lg" shape="cut" className="w-full justify-between text-fg-secondary">
|
|
25
|
+
Search the documentation <Kbd>⌘K</Kbd>
|
|
26
|
+
</Button>
|
|
27
|
+
}
|
|
28
|
+
searchHints={<>Try: <a href="#cli">orazaka install</a> · <a href="#button">Button</a> · <a href="#bom">BOM</a></>}
|
|
29
|
+
collectionsTitle="Collections"
|
|
30
|
+
collections={COLLECTIONS}
|
|
31
|
+
quickstarts={{ title: "Start in one line", children: <CodeBlock code="npx orazaka install" language="bash" file="Terminal" copyLabel="Copy" copiedLabel="Copied" /> }}
|
|
32
|
+
popular={{ title: "Most read", items: [{ href: "#cli", title: "The CLI", meta: "Orazaka" }, { href: "#button", title: "Button", meta: "Krizaka UI" }, { href: "#bom", title: "The BOM", meta: "Java" }] }}
|
|
33
|
+
whatsNew={{ title: "What's new", items: [{ href: "#ui-260", title: "Page blocks: frame, hero, cards, decisions", meta: "@krizaka/ui 2.6.0" }, { href: "#java-010", title: "The platform kit on Maven Central", meta: "0.1.0" }] }}
|
|
34
|
+
promise={{ label: "The owl's promise", text: "Every page here is generated from the code it documents — when the code changes, the page does." }}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/error-page/not-found.tsx
|
|
4
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
5
|
+
import { ErrorPage } from "@krizaka/ui/error-page";
|
|
6
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
7
|
+
import { SearchField } from "@krizaka/ui/search-field";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function ErrorPageNotFound() {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
ErrorPage,
|
|
12
|
+
{
|
|
13
|
+
code: "404",
|
|
14
|
+
mascot: /* @__PURE__ */ jsx(Mascot, { bird: "pigeon", mood: "empty", size: 96 }),
|
|
15
|
+
title: "This page took another road",
|
|
16
|
+
text: "The address may have changed. Search for it, or start again from one of these.",
|
|
17
|
+
search: /* @__PURE__ */ jsx(SearchField, { label: "Search the site", placeholder: "Search\u2026" }),
|
|
18
|
+
actions: /* @__PURE__ */ jsx(ActionBar, { label: "Ways back", primaryFirst: true, actions: [{ href: "#home", label: "Home" }, { href: "#docs", label: "Documentation" }, { href: "#contact", label: "Contact" }] })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
ErrorPageNotFound as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionBar } from "@krizaka/ui/action-bar";
|
|
2
|
+
import { ErrorPage } from "@krizaka/ui/error-page";
|
|
3
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
4
|
+
import { SearchField } from "@krizaka/ui/search-field";
|
|
5
|
+
|
|
6
|
+
// TEMPLATE — a page that is not there: the code drawn, the pigeon that lost its way, one sentence, a search, the ways
|
|
7
|
+
// back. Never a dead end.
|
|
8
|
+
export default function ErrorPageNotFound() {
|
|
9
|
+
return (
|
|
10
|
+
<ErrorPage
|
|
11
|
+
code="404"
|
|
12
|
+
mascot={<Mascot bird="pigeon" mood="empty" size={96} />}
|
|
13
|
+
title="This page took another road"
|
|
14
|
+
text="The address may have changed. Search for it, or start again from one of these."
|
|
15
|
+
search={<SearchField label="Search the site" placeholder="Search…" />}
|
|
16
|
+
actions={<ActionBar label="Ways back" primaryFirst actions={[{ href: "#home", label: "Home" }, { href: "#docs", label: "Documentation" }, { href: "#contact", label: "Contact" }]} />}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|