@nadicodeai/ui 9.2.1 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -0
- package/README.md +4 -29
- package/dist/agent-orb.d.ts +3 -0
- package/dist/agent-orb.d.ts.map +1 -0
- package/dist/agent-orb.js +2 -0
- package/dist/assets/brand/aionlabs.svg +2 -0
- package/dist/assets/brand/airtable.svg +2 -0
- package/dist/assets/brand/apple.svg +2 -0
- package/dist/assets/brand/arcee.svg +2 -0
- package/dist/assets/brand/asana.svg +2 -0
- package/dist/assets/brand/atlassian.svg +2 -0
- package/dist/assets/brand/baidu.svg +2 -0
- package/dist/assets/brand/bytedance.svg +2 -0
- package/dist/assets/brand/claude.svg +2 -0
- package/dist/assets/brand/cohere.svg +2 -0
- package/dist/assets/brand/datadog.svg +2 -0
- package/dist/assets/brand/deepseek.svg +2 -0
- package/dist/assets/brand/discord.svg +2 -0
- package/dist/assets/brand/dolphin.svg +2 -0
- package/dist/assets/brand/dotsstudio.svg +2 -0
- package/dist/assets/brand/figma.svg +2 -0
- package/dist/assets/brand/gemini.svg +2 -0
- package/dist/assets/brand/github.svg +2 -0
- package/dist/assets/brand/gitlab.svg +2 -0
- package/dist/assets/brand/gmail.svg +2 -0
- package/dist/assets/brand/google-calendar.svg +2 -0
- package/dist/assets/brand/google-drive.svg +2 -0
- package/dist/assets/brand/grok.svg +2 -0
- package/dist/assets/brand/huggingface.svg +2 -0
- package/dist/assets/brand/ibm.svg +2 -0
- package/dist/assets/brand/inception.svg +2 -0
- package/dist/assets/brand/inclusionai.svg +2 -0
- package/dist/assets/brand/index.json +778 -0
- package/dist/assets/brand/inference.svg +2 -0
- package/dist/assets/brand/intercom.svg +2 -0
- package/dist/assets/brand/jira.svg +2 -0
- package/dist/assets/brand/kwaipilot.svg +2 -0
- package/dist/assets/brand/linear.svg +2 -0
- package/dist/assets/brand/linux.svg +2 -0
- package/dist/assets/brand/liquid.svg +2 -0
- package/dist/assets/brand/longcat.svg +2 -0
- package/dist/assets/brand/mattermost.svg +2 -0
- package/dist/assets/brand/meta.svg +2 -0
- package/dist/assets/brand/microsoft.svg +2 -0
- package/dist/assets/brand/minimax.svg +2 -0
- package/dist/assets/brand/mistral.svg +2 -0
- package/dist/assets/brand/moonshot.svg +2 -0
- package/dist/assets/brand/morph.svg +2 -0
- package/dist/assets/brand/n8n.svg +2 -0
- package/dist/assets/brand/netlify.svg +2 -0
- package/dist/assets/brand/nexagi.svg +2 -0
- package/dist/assets/brand/notion.svg +2 -0
- package/dist/assets/brand/nousresearch.svg +2 -0
- package/dist/assets/brand/nova.svg +2 -0
- package/dist/assets/brand/nvidia.svg +2 -0
- package/dist/assets/brand/openai.svg +2 -0
- package/dist/assets/brand/openrouter.svg +2 -0
- package/dist/assets/brand/paypal.svg +2 -0
- package/dist/assets/brand/perceptron.svg +2 -0
- package/dist/assets/brand/perplexity.svg +2 -0
- package/dist/assets/brand/poolside.svg +2 -0
- package/dist/assets/brand/postgresql.svg +2 -0
- package/dist/assets/brand/qwen.svg +2 -0
- package/dist/assets/brand/reka.svg +2 -0
- package/dist/assets/brand/relace.svg +2 -0
- package/dist/assets/brand/sakana.svg +2 -0
- package/dist/assets/brand/sentry.svg +2 -0
- package/dist/assets/brand/signal.svg +2 -0
- package/dist/assets/brand/slack.svg +2 -0
- package/dist/assets/brand/spotify.svg +2 -0
- package/dist/assets/brand/square.svg +2 -0
- package/dist/assets/brand/stepfun.svg +2 -0
- package/dist/assets/brand/stripe.svg +2 -0
- package/dist/assets/brand/supabase.svg +2 -0
- package/dist/assets/brand/telegram.svg +2 -0
- package/dist/assets/brand/tencent.svg +2 -0
- package/dist/assets/brand/the-drummer.svg +2 -0
- package/dist/assets/brand/thinkingmachines.svg +2 -0
- package/dist/assets/brand/todoist.svg +2 -0
- package/dist/assets/brand/unbiased.svg +2 -0
- package/dist/assets/brand/unreal-engine.svg +2 -0
- package/dist/assets/brand/upstage.svg +2 -0
- package/dist/assets/brand/vercel.svg +2 -0
- package/dist/assets/brand/webflow.svg +2 -0
- package/dist/assets/brand/whatsapp.svg +2 -0
- package/dist/assets/brand/windows.svg +2 -0
- package/dist/assets/brand/writer.svg +2 -0
- package/dist/assets/brand/xiaomimimo.svg +2 -0
- package/dist/assets/brand/youtube.svg +2 -0
- package/dist/assets/brand/yuanbao.svg +2 -0
- package/dist/assets/brand/zai.svg +2 -0
- package/dist/assets/brand/zapier.svg +2 -0
- package/dist/components/action-status.d.ts +5 -0
- package/dist/components/action-status.d.ts.map +1 -1
- package/dist/components/action-status.js +6 -2
- package/dist/components/agent-orb-appearance.d.ts +16 -2
- package/dist/components/agent-orb-appearance.d.ts.map +1 -1
- package/dist/components/agent-orb-appearance.js +28 -5
- package/dist/components/agent-orb.d.ts +6 -3
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +20 -7
- package/dist/components/app-mark-aliases.d.ts +16 -0
- package/dist/components/app-mark-aliases.d.ts.map +1 -0
- package/dist/components/app-mark-aliases.js +84 -0
- package/dist/components/app-mark.d.ts +4 -0
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +14 -31
- package/dist/components/automation-section.d.ts.map +1 -1
- package/dist/components/automation-section.js +2 -2
- package/dist/components/badge.js +1 -1
- package/dist/components/brand.d.ts +3 -2
- package/dist/components/brand.d.ts.map +1 -1
- package/dist/components/brand.js +18 -28
- package/dist/components/button.js +1 -1
- package/dist/components/collection-filters.js +2 -2
- package/dist/components/confirm-dialog.d.ts +3 -1
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +3 -3
- package/dist/components/drawer.js +5 -5
- package/dist/components/feedback-state.d.ts.map +1 -1
- package/dist/components/feedback-state.js +6 -9
- package/dist/components/footer.js +2 -2
- package/dist/components/house-icons.d.ts.map +1 -1
- package/dist/components/house-icons.js +9 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/installer-shell.d.ts.map +1 -1
- package/dist/components/installer-shell.js +5 -6
- package/dist/components/navigation-menu.js +2 -2
- package/dist/components/pending-label.d.ts +15 -0
- package/dist/components/pending-label.d.ts.map +1 -0
- package/dist/components/pending-label.js +14 -0
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton.d.ts +4 -0
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +5 -1
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +5 -2
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/waiting-line.d.ts +30 -0
- package/dist/components/waiting-line.d.ts.map +1 -0
- package/dist/components/waiting-line.js +33 -0
- package/dist/eslint/rules/no-invalid-token-utility.js +1 -1
- package/dist/index.d.ts +3 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -38
- package/dist/internal/agent-orb-motion.d.ts +9 -1
- package/dist/internal/agent-orb-motion.d.ts.map +1 -1
- package/dist/internal/agent-orb-motion.js +23 -11
- package/dist/internal/agent-orb.d.ts +14 -1
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +78 -22
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/attachment.js +3 -2
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.js +4 -4
- package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +5 -4
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-group.js +4 -3
- package/dist/lib/motion.d.ts +18 -4
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +18 -4
- package/dist/styles/globals.css +0 -1
- package/docs/activity.md +99 -119
- package/docs/agent-orb.md +71 -20
- package/docs/component-classification.md +4 -4
- package/docs/consuming-cross-repo.md +8 -10
- package/docs/contract.md +10 -9
- package/docs/icon-assets.md +106 -0
- package/docs/migration/10.0.0.md +144 -0
- package/package.json +8 -7
- package/dist/activity.d.ts +0 -2
- package/dist/activity.d.ts.map +0 -1
- package/dist/activity.js +0 -2
- package/dist/components/action-band.d.ts +0 -12
- package/dist/components/action-band.d.ts.map +0 -1
- package/dist/components/action-band.js +0 -48
- package/dist/components/activity-orb.d.ts +0 -21
- package/dist/components/activity-orb.d.ts.map +0 -1
- package/dist/components/activity-orb.js +0 -26
- package/dist/components/benefits-bento.d.ts +0 -15
- package/dist/components/benefits-bento.d.ts.map +0 -1
- package/dist/components/benefits-bento.js +0 -6
- package/dist/components/bento.d.ts +0 -39
- package/dist/components/bento.d.ts.map +0 -1
- package/dist/components/bento.js +0 -70
- package/dist/components/card-marketing.d.ts +0 -30
- package/dist/components/card-marketing.d.ts.map +0 -1
- package/dist/components/card-marketing.js +0 -48
- package/dist/components/code-editor-mockup.d.ts +0 -25
- package/dist/components/code-editor-mockup.d.ts.map +0 -1
- package/dist/components/code-editor-mockup.js +0 -47
- package/dist/components/contact.d.ts +0 -32
- package/dist/components/contact.d.ts.map +0 -1
- package/dist/components/contact.js +0 -46
- package/dist/components/faq-item.d.ts +0 -25
- package/dist/components/faq-item.d.ts.map +0 -1
- package/dist/components/faq-item.js +0 -25
- package/dist/components/faq.d.ts +0 -20
- package/dist/components/faq.d.ts.map +0 -1
- package/dist/components/faq.js +0 -23
- package/dist/components/feature-grid.d.ts +0 -23
- package/dist/components/feature-grid.d.ts.map +0 -1
- package/dist/components/feature-grid.js +0 -33
- package/dist/components/feature-rows.d.ts +0 -23
- package/dist/components/feature-rows.d.ts.map +0 -1
- package/dist/components/feature-rows.js +0 -27
- package/dist/components/glyph-spinner.d.ts +0 -10
- package/dist/components/glyph-spinner.d.ts.map +0 -1
- package/dist/components/glyph-spinner.js +0 -101
- package/dist/components/hero-split.d.ts +0 -23
- package/dist/components/hero-split.d.ts.map +0 -1
- package/dist/components/hero-split.js +0 -35
- package/dist/components/hero.d.ts +0 -28
- package/dist/components/hero.d.ts.map +0 -1
- package/dist/components/hero.js +0 -45
- package/dist/components/integration-flow.d.ts +0 -36
- package/dist/components/integration-flow.d.ts.map +0 -1
- package/dist/components/integration-flow.js +0 -36
- package/dist/components/live-demo.d.ts +0 -31
- package/dist/components/live-demo.d.ts.map +0 -1
- package/dist/components/live-demo.js +0 -30
- package/dist/components/logo-band.d.ts +0 -33
- package/dist/components/logo-band.d.ts.map +0 -1
- package/dist/components/logo-band.js +0 -49
- package/dist/components/logo-tile.d.ts +0 -21
- package/dist/components/logo-tile.d.ts.map +0 -1
- package/dist/components/logo-tile.js +0 -28
- package/dist/components/media-mount.d.ts +0 -13
- package/dist/components/media-mount.d.ts.map +0 -1
- package/dist/components/media-mount.js +0 -15
- package/dist/components/nav-bar.d.ts +0 -24
- package/dist/components/nav-bar.d.ts.map +0 -1
- package/dist/components/nav-bar.js +0 -35
- package/dist/components/newsletter.d.ts +0 -24
- package/dist/components/newsletter.d.ts.map +0 -1
- package/dist/components/newsletter.js +0 -31
- package/dist/components/page-frame.d.ts +0 -30
- package/dist/components/page-frame.d.ts.map +0 -1
- package/dist/components/page-frame.js +0 -30
- package/dist/components/pricing-card.d.ts +0 -30
- package/dist/components/pricing-card.d.ts.map +0 -1
- package/dist/components/pricing-card.js +0 -44
- package/dist/components/pricing.d.ts +0 -25
- package/dist/components/pricing.d.ts.map +0 -1
- package/dist/components/pricing.js +0 -11
- package/dist/components/proof-slot.d.ts +0 -8
- package/dist/components/proof-slot.d.ts.map +0 -1
- package/dist/components/proof-slot.js +0 -8
- package/dist/components/quote-card.d.ts +0 -31
- package/dist/components/quote-card.d.ts.map +0 -1
- package/dist/components/quote-card.js +0 -48
- package/dist/components/seam-grid.d.ts +0 -30
- package/dist/components/seam-grid.d.ts.map +0 -1
- package/dist/components/seam-grid.js +0 -30
- package/dist/components/section-intro.d.ts +0 -18
- package/dist/components/section-intro.d.ts.map +0 -1
- package/dist/components/section-intro.js +0 -22
- package/dist/components/security-grid.d.ts +0 -25
- package/dist/components/security-grid.d.ts.map +0 -1
- package/dist/components/security-grid.js +0 -28
- package/dist/components/shift-band.d.ts +0 -14
- package/dist/components/shift-band.d.ts.map +0 -1
- package/dist/components/shift-band.js +0 -11
- package/dist/components/spinner.d.ts +0 -3
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js +0 -7
- package/dist/components/statement.d.ts +0 -32
- package/dist/components/statement.d.ts.map +0 -1
- package/dist/components/statement.js +0 -40
- package/dist/components/steps.d.ts +0 -34
- package/dist/components/steps.d.ts.map +0 -1
- package/dist/components/steps.js +0 -40
- package/dist/components/team-grid.d.ts +0 -27
- package/dist/components/team-grid.d.ts.map +0 -1
- package/dist/components/team-grid.js +0 -30
- package/dist/components/testimonials.d.ts +0 -48
- package/dist/components/testimonials.d.ts.map +0 -1
- package/dist/components/testimonials.js +0 -58
- package/dist/components/texture-strip.d.ts +0 -22
- package/dist/components/texture-strip.d.ts.map +0 -1
- package/dist/components/texture-strip.js +0 -32
- package/dist/components/use-case-bento.d.ts +0 -13
- package/dist/components/use-case-bento.d.ts.map +0 -1
- package/dist/components/use-case-bento.js +0 -8
- package/dist/internal/activity-orb.d.ts +0 -27
- package/dist/internal/activity-orb.d.ts.map +0 -1
- package/dist/internal/activity-orb.js +0 -150
- package/dist/lib/seam.d.ts +0 -29
- package/dist/lib/seam.d.ts.map +0 -1
- package/dist/lib/seam.js +0 -30
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team-grid.d.ts","sourceRoot":"","sources":["../../src/components/team-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQrE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAmB,EACnB,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,qBA2CA;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { SeamGrid } from "./seam-grid.js";
|
|
4
|
-
/**
|
|
5
|
-
* team-grid — the "the people" roster (V5 B17).
|
|
6
|
-
*
|
|
7
|
-
* A three-column wall of `TeamMember` cells over the gap-as-seam grid (`SeamGrid`
|
|
8
|
-
* owns every divider once; the cells are borderless fills). Each member reads
|
|
9
|
-
* avatar → role → name → line, top-aligned.
|
|
10
|
-
*
|
|
11
|
-
* SINGLE-OWNER SEAM: the holding `SeamGrid` paints the brand line behind the cells
|
|
12
|
-
* and leaves a 1px guide gap, so no cell draws a competing border.
|
|
13
|
-
*
|
|
14
|
-
* INVERTED CELL: the non-human team member renders as a dark surface cell inside an
|
|
15
|
-
* otherwise light section. This is expressed with an ancestor `.dark` class ON THE
|
|
16
|
-
* CELL ROOT (`variant="inverted"`) — an accepted ancestor-class remap, NOT a `dark:`
|
|
17
|
-
* utility. Every colour must flip from that cell-local `.dark`: the cell composes
|
|
18
|
-
* semantic roles (`bg-card`, `text-foreground`, `text-muted-foreground`) and the
|
|
19
|
-
* canonical `--nc-link-deep` pair for the verde accent. Token-only.
|
|
20
|
-
*/
|
|
21
|
-
function TeamGrid({ className, ...props }) {
|
|
22
|
-
return (_jsx(SeamGrid, { "data-slot": "team-grid", className: cn("h-full grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", className), ...props }));
|
|
23
|
-
}
|
|
24
|
-
function TeamMember({ className, variant = "default", avatar, role, name, children, ...props }) {
|
|
25
|
-
return (_jsxs("div", { "data-slot": "team-member", "data-variant": variant, className: cn("grid min-h-[250px] min-w-0 content-start gap-3 p-[clamp(24px,3vw,40px)] bg-card text-foreground",
|
|
26
|
-
// inverted: a dark cell inside a light section via a local `.dark` boundary
|
|
27
|
-
// (ancestor-class remap, not a `dark:` utility). Same roles, dark values.
|
|
28
|
-
variant === "inverted" && "dark", className), ...props, children: [avatar ? (_jsx("span", { "data-slot": "team-member-avatar", "aria-hidden": "true", className: "flex size-13 items-center justify-center rounded-full bg-success/15 text-lg font-semibold text-[var(--nc-link-deep)]", children: avatar })) : null, role ? (_jsx("span", { "data-slot": "team-member-role", className: "font-mono text-[10px] uppercase tracking-[0.13em] text-[var(--nc-link-deep)]", children: role })) : null, name ? (_jsx("h3", { "data-slot": "team-member-name", className: "text-[17px] font-semibold text-foreground", children: name })) : null, children ? (_jsx("p", { "data-slot": "team-member-line", className: "text-sm text-muted-foreground", children: children })) : null] }));
|
|
29
|
-
}
|
|
30
|
-
export { TeamGrid, TeamMember };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* testimonials — credibility surface for customer quotes.
|
|
4
|
-
*
|
|
5
|
-
* Three modes, all seam-single-owner:
|
|
6
|
-
* - single (no `columns`, no `aside`): one full-width `QuoteCard` centered with a
|
|
7
|
-
* comfortable measure; the card is borderless so it adds NO seam.
|
|
8
|
-
* - grid (`columns=2|3`): a wall of `QuoteCard`s in the gap-as-seam grid — the grid
|
|
9
|
-
* owns every divider once (`gap-px bg-border`). `surface="ink"` flips only the
|
|
10
|
-
* seam colour, never its weight.
|
|
11
|
-
* - record (`aside`): the featured 7fr / 5fr split (V5 B13) — a big quote beside a
|
|
12
|
-
* side record card (`TestimonialRecord`). This split uses a whitespace gap, not a
|
|
13
|
-
* hairline, so it introduces NO structural seam; the frame/lane/row perimeter is
|
|
14
|
-
* still owned by the kept geometry layer.
|
|
15
|
-
*
|
|
16
|
-
* The `TestimonialRecord` slot reuses the status-row idiom (a mono line with a tint
|
|
17
|
-
* state pill) through `TestimonialRecordRow` children, so consumers do not import any
|
|
18
|
-
* live-demo internals. No fake proof: absent rows/status render nothing.
|
|
19
|
-
*
|
|
20
|
-
* Token-only; no `dark:` styling.
|
|
21
|
-
*/
|
|
22
|
-
declare function Testimonials({ className, columns, surface, aside, children, ...props }: React.ComponentProps<"div"> & {
|
|
23
|
-
columns?: 2 | 3;
|
|
24
|
-
surface?: "canvas" | "ink";
|
|
25
|
-
/** the side record card; presence switches to the featured 7fr / 5fr split */
|
|
26
|
-
aside?: React.ReactNode;
|
|
27
|
-
}): React.JSX.Element;
|
|
28
|
-
/**
|
|
29
|
-
* TestimonialRecord — the side record card in the featured split. A soft, bordered
|
|
30
|
-
* card (its own perimeter, not a structural seam) with an optional mono `tag` over a
|
|
31
|
-
* stack of `TestimonialRecordRow` children.
|
|
32
|
-
*/
|
|
33
|
-
declare function TestimonialRecord({ className, tag, children, ...props }: React.ComponentProps<"div"> & {
|
|
34
|
-
tag?: React.ReactNode;
|
|
35
|
-
}): React.JSX.Element;
|
|
36
|
-
/**
|
|
37
|
-
* TestimonialRecordRow — one status line in the record card: a mono label with an
|
|
38
|
-
* optional trailing state pill (done = green soft/deep, waiting = amber soft/deep —
|
|
39
|
-
* the AA-clearing soft/deep idiom, a deep-ink label on a soft same-hue ground). The
|
|
40
|
-
* inter-row hairline is owned here (`border-t`, dropped on the first row). No fake
|
|
41
|
-
* proof: an absent `status` renders no pill.
|
|
42
|
-
*/
|
|
43
|
-
declare function TestimonialRecordRow({ className, state, status, children, ...props }: React.ComponentProps<"div"> & {
|
|
44
|
-
state?: "done" | "waiting";
|
|
45
|
-
status?: React.ReactNode;
|
|
46
|
-
}): React.JSX.Element;
|
|
47
|
-
export { Testimonials, TestimonialRecord, TestimonialRecordRow };
|
|
48
|
-
//# sourceMappingURL=testimonials.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testimonials.d.ts","sourceRoot":"","sources":["../../src/components/testimonials.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,OAAO,EACP,OAAkB,EAClB,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC3B,8EAA8E;IAC9E,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,qBAiDA;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAkBzD;AAED;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,KAAc,EACd,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBA4BxF;AAED,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { SeamGrid } from "./seam-grid.js";
|
|
4
|
-
/**
|
|
5
|
-
* testimonials — credibility surface for customer quotes.
|
|
6
|
-
*
|
|
7
|
-
* Three modes, all seam-single-owner:
|
|
8
|
-
* - single (no `columns`, no `aside`): one full-width `QuoteCard` centered with a
|
|
9
|
-
* comfortable measure; the card is borderless so it adds NO seam.
|
|
10
|
-
* - grid (`columns=2|3`): a wall of `QuoteCard`s in the gap-as-seam grid — the grid
|
|
11
|
-
* owns every divider once (`gap-px bg-border`). `surface="ink"` flips only the
|
|
12
|
-
* seam colour, never its weight.
|
|
13
|
-
* - record (`aside`): the featured 7fr / 5fr split (V5 B13) — a big quote beside a
|
|
14
|
-
* side record card (`TestimonialRecord`). This split uses a whitespace gap, not a
|
|
15
|
-
* hairline, so it introduces NO structural seam; the frame/lane/row perimeter is
|
|
16
|
-
* still owned by the kept geometry layer.
|
|
17
|
-
*
|
|
18
|
-
* The `TestimonialRecord` slot reuses the status-row idiom (a mono line with a tint
|
|
19
|
-
* state pill) through `TestimonialRecordRow` children, so consumers do not import any
|
|
20
|
-
* live-demo internals. No fake proof: absent rows/status render nothing.
|
|
21
|
-
*
|
|
22
|
-
* Token-only; no `dark:` styling.
|
|
23
|
-
*/
|
|
24
|
-
function Testimonials({ className, columns, surface = "canvas", aside, children, ...props }) {
|
|
25
|
-
if (aside) {
|
|
26
|
-
// featured record mode — big quote (7fr) beside the record card (5fr). The gap
|
|
27
|
-
// is whitespace, never a hairline, so this owns no structural seam.
|
|
28
|
-
return (_jsxs("div", { "data-slot": "testimonials", "data-layout": "record", "data-surface": surface, className: cn("grid grid-cols-1 items-center gap-x-[clamp(32px,5vw,72px)] gap-y-10 lg:grid-cols-[7fr_5fr]", className), ...props, children: [_jsx("div", { className: "min-w-0", children: children }), _jsx("div", { className: "min-w-0", children: aside })] }));
|
|
29
|
-
}
|
|
30
|
-
if (!columns) {
|
|
31
|
-
// single featured mode — the lone card is centered; no grid, no seam.
|
|
32
|
-
return (_jsx("div", { "data-slot": "testimonials", "data-surface": surface, className: cn("flex h-full items-center justify-center", className), ...props, children: _jsx("div", { className: "w-full max-w-[760px]", children: children }) }));
|
|
33
|
-
}
|
|
34
|
-
return (_jsx(SeamGrid, { "data-slot": "testimonials", surface: surface, className: cn("h-full", columns === 2 ? "grid-cols-1 sm:grid-cols-2" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", className), ...props, children: children }));
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* TestimonialRecord — the side record card in the featured split. A soft, bordered
|
|
38
|
-
* card (its own perimeter, not a structural seam) with an optional mono `tag` over a
|
|
39
|
-
* stack of `TestimonialRecordRow` children.
|
|
40
|
-
*/
|
|
41
|
-
function TestimonialRecord({ className, tag, children, ...props }) {
|
|
42
|
-
return (_jsxs("div", { "data-slot": "testimonial-record", className: cn("grid content-start rounded-md border border-border bg-muted p-5", className), ...props, children: [tag ? (_jsx("span", { "data-slot": "testimonial-record-tag", className: "mb-2 font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground", children: tag })) : null, children] }));
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* TestimonialRecordRow — one status line in the record card: a mono label with an
|
|
46
|
-
* optional trailing state pill (done = green soft/deep, waiting = amber soft/deep —
|
|
47
|
-
* the AA-clearing soft/deep idiom, a deep-ink label on a soft same-hue ground). The
|
|
48
|
-
* inter-row hairline is owned here (`border-t`, dropped on the first row). No fake
|
|
49
|
-
* proof: an absent `status` renders no pill.
|
|
50
|
-
*/
|
|
51
|
-
function TestimonialRecordRow({ className, state = "done", status, children, ...props }) {
|
|
52
|
-
return (_jsxs("div", { "data-slot": "testimonial-record-row", "data-state": state, className: cn("flex items-center justify-between gap-3 border-t border-border py-2.5 font-mono text-[11.5px] first:border-t-0", className), ...props, children: [_jsx("span", { className: "min-w-0 text-muted-foreground", children: children }), status ? (_jsx("span", { className: cn("shrink-0 rounded-sm px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-[0.04em]",
|
|
53
|
-
// Soft-ground + deep-ink feedback pairs (the semantic tone idiom):
|
|
54
|
-
// a solid hue on a same-hue 15% tint fails AA (≈2.5:1 / 1.4:1). success uses
|
|
55
|
-
// the link family (there is no success-deep token), warning its own soft/deep.
|
|
56
|
-
state === "done" && "bg-[var(--nc-link-bg-soft)] text-[var(--nc-link-deep)]", state === "waiting" && "bg-[var(--nc-warning-soft)] text-[var(--nc-warning-deep)]"), children: status })) : null] }));
|
|
57
|
-
}
|
|
58
|
-
export { Testimonials, TestimonialRecord, TestimonialRecordRow };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* texture-strip — a 40px full-bleed separator band (V5 B05).
|
|
4
|
-
*
|
|
5
|
-
* A thin horizontal divider that carries a dotted radial texture and a hairline
|
|
6
|
-
* on its top and bottom edges. The dots and their spacing are owned once by the
|
|
7
|
-
* design-system `nc-dotted-field` primitive (`radial-gradient(var(--nc-line)…)`
|
|
8
|
-
* over `var(--nc-canvas)`), so no raw gradient or colour lives in this component
|
|
9
|
-
* — only the band geometry (height, flex centring) is inline. Token-only; no
|
|
10
|
-
* `dark:` styling.
|
|
11
|
-
*
|
|
12
|
-
* Children remain an open composition slot. `TextureStripChip` remains as a
|
|
13
|
-
* deprecated compatibility export for consumers of the 0.10 package surface.
|
|
14
|
-
*/
|
|
15
|
-
declare function TextureStrip({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Pass any child to `TextureStrip` and style it for the owning
|
|
18
|
-
* surface. This wrapper remains exported to preserve the public 0.10 API.
|
|
19
|
-
*/
|
|
20
|
-
declare function TextureStripChip({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
21
|
-
export { TextureStrip, TextureStripChip };
|
|
22
|
-
//# sourceMappingURL=texture-strip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"texture-strip.d.ts","sourceRoot":"","sources":["../../src/components/texture-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;GAYG;AAEH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAazE;AAED;;;GAGG;AACH,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9E;AAKD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
|
-
/**
|
|
4
|
-
* texture-strip — a 40px full-bleed separator band (V5 B05).
|
|
5
|
-
*
|
|
6
|
-
* A thin horizontal divider that carries a dotted radial texture and a hairline
|
|
7
|
-
* on its top and bottom edges. The dots and their spacing are owned once by the
|
|
8
|
-
* design-system `nc-dotted-field` primitive (`radial-gradient(var(--nc-line)…)`
|
|
9
|
-
* over `var(--nc-canvas)`), so no raw gradient or colour lives in this component
|
|
10
|
-
* — only the band geometry (height, flex centring) is inline. Token-only; no
|
|
11
|
-
* `dark:` styling.
|
|
12
|
-
*
|
|
13
|
-
* Children remain an open composition slot. `TextureStripChip` remains as a
|
|
14
|
-
* deprecated compatibility export for consumers of the 0.10 package surface.
|
|
15
|
-
*/
|
|
16
|
-
function TextureStrip({ className, ...props }) {
|
|
17
|
-
return (_jsx("div", { "data-slot": "texture-strip", className: cn(
|
|
18
|
-
// Both the semantic background and the raw `--nc-*` tokens used by
|
|
19
|
-
// `nc-dotted-field` remap under any `.dark` ancestor.
|
|
20
|
-
"nc-dotted-field flex h-10 items-center justify-center border-y border-border bg-background", className), ...props }));
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Pass any child to `TextureStrip` and style it for the owning
|
|
24
|
-
* surface. This wrapper remains exported to preserve the public 0.10 API.
|
|
25
|
-
*/
|
|
26
|
-
function TextureStripChip({ className, ...props }) {
|
|
27
|
-
return (_jsx("span", { "data-slot": "texture-strip-chip", className: cn("nc-type-caption-mono rounded-full border border-border bg-background px-3 py-1 text-muted-foreground uppercase", className), ...props }));
|
|
28
|
-
}
|
|
29
|
-
// The deprecated export is named here because this is where it is DEFINED —
|
|
30
|
-
// re-exporting it is what keeps the 0.10 public API alive.
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated -- the export of the deprecated symbol itself
|
|
32
|
-
export { TextureStrip, TextureStripChip };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare function UseCaseBento({ kicker, title, body, proof, proofLabel, media, mediaClassName, demo, className, ...props }: React.ComponentProps<"article"> & {
|
|
3
|
-
kicker: string;
|
|
4
|
-
title: string;
|
|
5
|
-
body: string;
|
|
6
|
-
proof: string;
|
|
7
|
-
proofLabel?: string;
|
|
8
|
-
media: React.ReactNode;
|
|
9
|
-
mediaClassName?: string;
|
|
10
|
-
demo: React.ReactNode;
|
|
11
|
-
}): React.JSX.Element;
|
|
12
|
-
export { UseCaseBento };
|
|
13
|
-
//# sourceMappingURL=use-case-bento.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-case-bento.d.ts","sourceRoot":"","sources":["../../src/components/use-case-bento.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,iBAAS,YAAY,CAAC,EACpB,MAAM,EACN,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAmC,EACnC,KAAK,EACL,cAAc,EACd,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB,qBAmCA;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
|
-
import { Bento, BentoCopy, BentoDemo, BentoItem, BentoMedia } from "./bento.js";
|
|
4
|
-
import { MediaMount } from "./media-mount.js";
|
|
5
|
-
function UseCaseBento({ kicker, title, body, proof, proofLabel = "What the agent shows", media, mediaClassName, demo, className, ...props }) {
|
|
6
|
-
return (_jsx("article", { "data-slot": "use-case-bento", className: className, ...props, children: _jsxs(Bento, { height: "primary", children: [_jsxs(BentoItem, { span: 3, children: [_jsx("div", { className: "nc-artifact-surface pointer-events-none absolute inset-0 border-0 p-0 opacity-60", "aria-hidden": "true" }), _jsxs(BentoCopy, { children: [_jsx("p", { className: "nc-type-caption-mono text-muted-foreground uppercase", children: kicker }), _jsx("h3", { className: "nc-type-title-md text-foreground", children: title }), _jsx("p", { className: "nc-type-body-sm text-[var(--nc-body)]", children: body }), _jsxs("div", { className: "grid gap-2 border-t border-border pt-4", children: [_jsx("p", { className: "nc-type-caption-mono text-muted-foreground uppercase", children: proofLabel }), _jsx("p", { className: "nc-type-body-sm text-foreground", children: proof })] })] })] }), _jsx(BentoItem, { span: 5, flush: true, stretch: true, className: "min-h-[var(--nc-h-bento-primary)]", children: _jsx(BentoMedia, { children: _jsx(MediaMount, { ratio: "auto", className: cn("!h-full min-h-[var(--nc-h-bento-primary)]", mediaClassName), children: media }) }) }), _jsx(BentoItem, { span: 4, surface: "soft", stretch: true, className: "min-h-0 p-[var(--nc-sm)]", children: _jsx(BentoDemo, { children: demo }) })] }) }));
|
|
7
|
-
}
|
|
8
|
-
export { UseCaseBento };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** Product activities, not the vendor's agent vocabulary. */
|
|
2
|
-
declare const ACTIVITY_RECIPES: {
|
|
3
|
-
readonly loading: {
|
|
4
|
-
readonly state: "composing";
|
|
5
|
-
readonly speed: 0.92;
|
|
6
|
-
readonly still: 0.6;
|
|
7
|
-
};
|
|
8
|
-
readonly connecting: {
|
|
9
|
-
readonly state: "connecting";
|
|
10
|
-
readonly speed: 0.86;
|
|
11
|
-
readonly still: 0.6;
|
|
12
|
-
};
|
|
13
|
-
readonly processing: {
|
|
14
|
-
readonly state: "working";
|
|
15
|
-
readonly speed: 0.92;
|
|
16
|
-
readonly still: 0.6;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type ActivityKind = keyof typeof ACTIVITY_RECIPES;
|
|
20
|
-
export type ActivityOrbSize = 20 | 64 | 88;
|
|
21
|
-
/** Own canvas lifetime; callers supply activity and accessible meaning only. */
|
|
22
|
-
export declare function mountActivityOrb(canvas: HTMLCanvasElement, activity: ActivityKind, size: ActivityOrbSize, initiallyPaused?: boolean): {
|
|
23
|
-
destroy: () => void;
|
|
24
|
-
setPaused: (_paused: boolean) => void;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=activity-orb.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-orb.d.ts","sourceRoot":"","sources":["../../src/internal/activity-orb.ts"],"names":[],"mappings":"AAEA,6DAA6D;AAC7D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAIZ,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,gBAAgB,CAAC;AACzD,MAAM,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAoE3C,gFAAgF;AAChF,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,eAAe,EACrB,eAAe,UAAQ;;yBAEuC,OAAO;EA0FtE"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { MODE_FRAMES, resolvePreset } from "thinking-orbs/engine";
|
|
2
|
-
/** Product activities, not the vendor's agent vocabulary. */
|
|
3
|
-
const ACTIVITY_RECIPES = {
|
|
4
|
-
loading: { state: "composing", speed: 0.92, still: 0.6 },
|
|
5
|
-
connecting: { state: "connecting", speed: 0.86, still: 0.6 },
|
|
6
|
-
processing: { state: "working", speed: 0.92, still: 0.6 },
|
|
7
|
-
};
|
|
8
|
-
/** Preserve the library's geometry, depth ordering and optical size profiles. */
|
|
9
|
-
function activityFrame(activity, size, seconds) {
|
|
10
|
-
const recipe = ACTIVITY_RECIPES[activity];
|
|
11
|
-
const preset = resolvePreset(recipe.state, size === 20 ? 20 : 64);
|
|
12
|
-
return MODE_FRAMES[preset.mode](size, seconds * preset.speed * recipe.speed, preset.opts);
|
|
13
|
-
}
|
|
14
|
-
function colourAt(palette, white, opacity = 1) {
|
|
15
|
-
const depth = Math.min(1, Math.max(0, white));
|
|
16
|
-
// The foreground particles carry cobalto; the supporting structure keeps
|
|
17
|
-
// inherited ink. Opacity lets the same material work on inverted controls.
|
|
18
|
-
const accent = Math.min(1, Math.max(0, (0.4 - depth) / 0.32)) * 0.75;
|
|
19
|
-
const channels = palette.ink.map((ink, i) => Math.round(ink + ((palette.accent[i] ?? ink) - ink) * accent));
|
|
20
|
-
// eslint-disable-next-line no-restricted-syntax -- Canvas serializes channels resolved from currentColor and --nc-info; this adapter defines no palette literals.
|
|
21
|
-
return `rgba(${channels.join(",")},${opacity * (1 - depth)})`;
|
|
22
|
-
}
|
|
23
|
-
function paintActivityFrame(context, activity, size, seconds, palette) {
|
|
24
|
-
const frame = activityFrame(activity, size, seconds);
|
|
25
|
-
context.clearRect(0, 0, size, size);
|
|
26
|
-
for (const line of frame.lines) {
|
|
27
|
-
context.strokeStyle = colourAt(palette, line.white, line.a);
|
|
28
|
-
context.lineWidth = line.w;
|
|
29
|
-
context.beginPath();
|
|
30
|
-
context.moveTo(line.x1, line.y1);
|
|
31
|
-
context.lineTo(line.x2, line.y2);
|
|
32
|
-
context.stroke();
|
|
33
|
-
}
|
|
34
|
-
for (const dot of frame.dots) {
|
|
35
|
-
context.fillStyle = colourAt(palette, dot.white, dot.a);
|
|
36
|
-
context.beginPath();
|
|
37
|
-
context.arc(dot.x, dot.y, dot.r, 0, Math.PI * 2);
|
|
38
|
-
context.fill();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function readPalette(canvas) {
|
|
42
|
-
const probe = document.createElement("canvas");
|
|
43
|
-
probe.width = 1;
|
|
44
|
-
probe.height = 1;
|
|
45
|
-
const context = probe.getContext("2d", { willReadFrequently: true });
|
|
46
|
-
if (!context)
|
|
47
|
-
return null;
|
|
48
|
-
const style = getComputedStyle(canvas);
|
|
49
|
-
const read = (value) => {
|
|
50
|
-
context.clearRect(0, 0, 1, 1);
|
|
51
|
-
context.fillStyle = value;
|
|
52
|
-
context.fillRect(0, 0, 1, 1);
|
|
53
|
-
const { data } = context.getImageData(0, 0, 1, 1);
|
|
54
|
-
return [data[0] ?? 0, data[1] ?? 0, data[2] ?? 0];
|
|
55
|
-
};
|
|
56
|
-
const ink = read(style.color);
|
|
57
|
-
const accent = read(style.getPropertyValue("--nc-info").trim() || style.color);
|
|
58
|
-
return { ink, accent };
|
|
59
|
-
}
|
|
60
|
-
/** Own canvas lifetime; callers supply activity and accessible meaning only. */
|
|
61
|
-
export function mountActivityOrb(canvas, activity, size, initiallyPaused = false) {
|
|
62
|
-
const unavailable = { destroy: () => { }, setPaused: (_paused) => { } };
|
|
63
|
-
const context = canvas.getContext("2d");
|
|
64
|
-
if (!context)
|
|
65
|
-
return unavailable;
|
|
66
|
-
let palette = readPalette(canvas);
|
|
67
|
-
if (!palette)
|
|
68
|
-
return unavailable;
|
|
69
|
-
const query = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
70
|
-
let reduced = query.matches;
|
|
71
|
-
let paused = initiallyPaused;
|
|
72
|
-
let visible = true;
|
|
73
|
-
let disposed = false;
|
|
74
|
-
let request = 0;
|
|
75
|
-
// Each recipe retains a representative pose under reduced motion.
|
|
76
|
-
const still = ACTIVITY_RECIPES[activity].still;
|
|
77
|
-
let seconds = still;
|
|
78
|
-
let previous = null;
|
|
79
|
-
let ratio = 1;
|
|
80
|
-
function paint() {
|
|
81
|
-
if (!palette || !context)
|
|
82
|
-
return;
|
|
83
|
-
context.setTransform(ratio, 0, 0, ratio, 0, 0);
|
|
84
|
-
paintActivityFrame(context, activity, size, reduced ? still : seconds, palette);
|
|
85
|
-
}
|
|
86
|
-
function tick(now) {
|
|
87
|
-
request = 0;
|
|
88
|
-
if (disposed || !visible || document.hidden || reduced || paused)
|
|
89
|
-
return;
|
|
90
|
-
if (previous !== null)
|
|
91
|
-
seconds += Math.min((now - previous) / 1000, 0.1);
|
|
92
|
-
previous = now;
|
|
93
|
-
paint();
|
|
94
|
-
request = requestAnimationFrame(tick);
|
|
95
|
-
}
|
|
96
|
-
function play() {
|
|
97
|
-
cancelAnimationFrame(request);
|
|
98
|
-
previous = null;
|
|
99
|
-
paint();
|
|
100
|
-
if (!disposed && visible && !document.hidden && !reduced && !paused) {
|
|
101
|
-
request = requestAnimationFrame(tick);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
function refresh() {
|
|
105
|
-
ratio = Math.min(window.devicePixelRatio || 1, 2);
|
|
106
|
-
canvas.width = Math.round(size * ratio);
|
|
107
|
-
canvas.height = Math.round(size * ratio);
|
|
108
|
-
palette = readPalette(canvas);
|
|
109
|
-
play();
|
|
110
|
-
}
|
|
111
|
-
function motionChanged(event) {
|
|
112
|
-
reduced = event.matches;
|
|
113
|
-
play();
|
|
114
|
-
}
|
|
115
|
-
const visibility = typeof IntersectionObserver === "undefined"
|
|
116
|
-
? null
|
|
117
|
-
: new IntersectionObserver(([entry]) => {
|
|
118
|
-
visible = entry?.isIntersecting ?? false;
|
|
119
|
-
play();
|
|
120
|
-
});
|
|
121
|
-
visibility?.observe(canvas);
|
|
122
|
-
// Observe ancestors only: changing unrelated content must not repaint this
|
|
123
|
-
// canvas or install a document-wide subtree observer per inline indicator.
|
|
124
|
-
const theme = new MutationObserver(refresh);
|
|
125
|
-
for (let ancestor = canvas; ancestor; ancestor = ancestor.parentElement) {
|
|
126
|
-
theme.observe(ancestor, {
|
|
127
|
-
attributes: true,
|
|
128
|
-
attributeFilter: ["class", "style", "data-theme"],
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
query.addEventListener("change", motionChanged);
|
|
132
|
-
document.addEventListener("visibilitychange", play);
|
|
133
|
-
window.addEventListener("resize", refresh);
|
|
134
|
-
refresh();
|
|
135
|
-
return {
|
|
136
|
-
setPaused(value) {
|
|
137
|
-
paused = value;
|
|
138
|
-
play();
|
|
139
|
-
},
|
|
140
|
-
destroy() {
|
|
141
|
-
disposed = true;
|
|
142
|
-
cancelAnimationFrame(request);
|
|
143
|
-
visibility?.disconnect();
|
|
144
|
-
theme.disconnect();
|
|
145
|
-
query.removeEventListener("change", motionChanged);
|
|
146
|
-
document.removeEventListener("visibilitychange", play);
|
|
147
|
-
window.removeEventListener("resize", refresh);
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
}
|
package/dist/lib/seam.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal seam helper for the "gap-as-seam" grid mechanics.
|
|
3
|
-
*
|
|
4
|
-
* This module is the ONE place the ink seam `color-mix(...)` string lives, so a
|
|
5
|
-
* typo can no longer silently break one band's seam while the others stay
|
|
6
|
-
* correct. `SeamGrid` (the public primitive) and the `logo-band` grid owner both
|
|
7
|
-
* derive their seam colour from `seamSurfaceClass` here.
|
|
8
|
-
*
|
|
9
|
-
* SINGLE-OWNER SEAM: a `grid` with `gap-px` lets the panel paint one hairline at
|
|
10
|
-
* every cell boundary while borderless, square-cornered cells fill on top, so no
|
|
11
|
-
* coordinate ever carries two lines. The seam COLOUR is the only thing that flips
|
|
12
|
-
* with `surface`: canvas paints the brand `line` via `bg-border`; ink mixes the
|
|
13
|
-
* line toward the ink role so the seam stays a seam and never changes weight.
|
|
14
|
-
* Token-only; no `dark:` styling.
|
|
15
|
-
*
|
|
16
|
-
* This is NOT part of the public package surface. It has no `exports` subpath, so
|
|
17
|
-
* consumers couple to the `SeamGrid` component contract rather than to the exact
|
|
18
|
-
* arbitrary Tailwind class string. Keep it that way.
|
|
19
|
-
*/
|
|
20
|
-
type SeamSurface = "canvas" | "ink";
|
|
21
|
-
/**
|
|
22
|
-
* seamSurfaceClass is the single source for the seam colour class. Internal code
|
|
23
|
-
* reaches for this (or `SeamGrid`, which wraps it) instead of hand-copying the ink
|
|
24
|
-
* `color-mix(...)` string into another grid owner.
|
|
25
|
-
*/
|
|
26
|
-
declare function seamSurfaceClass(surface: SeamSurface): string;
|
|
27
|
-
export { seamSurfaceClass };
|
|
28
|
-
export type { SeamSurface };
|
|
29
|
-
//# sourceMappingURL=seam.d.ts.map
|
package/dist/lib/seam.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seam.d.ts","sourceRoot":"","sources":["../../src/lib/seam.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,KAAK,WAAW,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEpC;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAItD;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/lib/seam.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal seam helper for the "gap-as-seam" grid mechanics.
|
|
3
|
-
*
|
|
4
|
-
* This module is the ONE place the ink seam `color-mix(...)` string lives, so a
|
|
5
|
-
* typo can no longer silently break one band's seam while the others stay
|
|
6
|
-
* correct. `SeamGrid` (the public primitive) and the `logo-band` grid owner both
|
|
7
|
-
* derive their seam colour from `seamSurfaceClass` here.
|
|
8
|
-
*
|
|
9
|
-
* SINGLE-OWNER SEAM: a `grid` with `gap-px` lets the panel paint one hairline at
|
|
10
|
-
* every cell boundary while borderless, square-cornered cells fill on top, so no
|
|
11
|
-
* coordinate ever carries two lines. The seam COLOUR is the only thing that flips
|
|
12
|
-
* with `surface`: canvas paints the brand `line` via `bg-border`; ink mixes the
|
|
13
|
-
* line toward the ink role so the seam stays a seam and never changes weight.
|
|
14
|
-
* Token-only; no `dark:` styling.
|
|
15
|
-
*
|
|
16
|
-
* This is NOT part of the public package surface. It has no `exports` subpath, so
|
|
17
|
-
* consumers couple to the `SeamGrid` component contract rather than to the exact
|
|
18
|
-
* arbitrary Tailwind class string. Keep it that way.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* seamSurfaceClass is the single source for the seam colour class. Internal code
|
|
22
|
-
* reaches for this (or `SeamGrid`, which wraps it) instead of hand-copying the ink
|
|
23
|
-
* `color-mix(...)` string into another grid owner.
|
|
24
|
-
*/
|
|
25
|
-
function seamSurfaceClass(surface) {
|
|
26
|
-
return surface === "ink"
|
|
27
|
-
? "bg-[color-mix(in_srgb,var(--nc-line)_40%,var(--nc-ink))]"
|
|
28
|
-
: "bg-border";
|
|
29
|
-
}
|
|
30
|
-
export { seamSurfaceClass };
|