@cellarnode/ui 0.169.2 → 0.169.4
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 +2 -2
- package/dist/org/invite-member-dialog.js +1 -1
- package/package.json +9 -2
- package/dist/__storybook__/dark-mode.d.ts +0 -33
- package/dist/__storybook__/dark-mode.d.ts.map +0 -1
- package/dist/__storybook__/dark-mode.js +0 -63
- package/dist/__storybook__/dark-mode.js.map +0 -1
- package/dist/__storybook__/mock-data.d.ts +0 -24
- package/dist/__storybook__/mock-data.d.ts.map +0 -1
- package/dist/__storybook__/mock-data.js +0 -172
- package/dist/__storybook__/mock-data.js.map +0 -1
- package/dist/brand/brand-fixtures.d.ts +0 -15
- package/dist/brand/brand-fixtures.d.ts.map +0 -1
- package/dist/brand/brand-fixtures.js +0 -112
- package/dist/brand/brand-fixtures.js.map +0 -1
- package/dist/brand/brand-profile-display.story-copy.d.ts +0 -3
- package/dist/brand/brand-profile-display.story-copy.d.ts.map +0 -1
- package/dist/brand/brand-profile-display.story-copy.js +0 -126
- package/dist/brand/brand-profile-display.story-copy.js.map +0 -1
- package/dist/brand/brand-profile-display.story-data.d.ts +0 -12
- package/dist/brand/brand-profile-display.story-data.d.ts.map +0 -1
- package/dist/brand/brand-profile-display.story-data.js +0 -200
- package/dist/brand/brand-profile-display.story-data.js.map +0 -1
- package/dist/brand/brand-profile-review.story-data.d.ts +0 -3
- package/dist/brand/brand-profile-review.story-data.d.ts.map +0 -1
- package/dist/brand/brand-profile-review.story-data.js +0 -71
- package/dist/brand/brand-profile-review.story-data.js.map +0 -1
- package/dist/brand/brand-tagline-story-fixtures.d.ts +0 -20
- package/dist/brand/brand-tagline-story-fixtures.d.ts.map +0 -1
- package/dist/brand/brand-tagline-story-fixtures.js +0 -45
- package/dist/brand/brand-tagline-story-fixtures.js.map +0 -1
- package/dist/portfolio-import/session/test-helpers.d.ts +0 -20
- package/dist/portfolio-import/session/test-helpers.d.ts.map +0 -1
- package/dist/portfolio-import/session/test-helpers.js +0 -84
- package/dist/portfolio-import/session/test-helpers.js.map +0 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ src/
|
|
|
60
60
|
pnpm add @cellarnode/ui
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
> **Note:** This package is
|
|
63
|
+
> **Note:** This package is public on npmjs.org (`publishConfig.access: "public"`, CEL-1983); installs need no registry auth. The repo `.npmrc` still routes the `@cellarnode` scope to registry.npmjs.org and reads `${NPM_TOKEN}` if one is set.
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -227,7 +227,7 @@ claude mcp add storybook-mcp --transport http http://localhost:6006/mcp --scope
|
|
|
227
227
|
|
|
228
228
|
## Publishing
|
|
229
229
|
|
|
230
|
-
Packages are published to npm (
|
|
230
|
+
Packages are published to npm (public access — `publishConfig.access: "public"`, see CEL-1983) via **npm Trusted Publishing (OIDC)** —
|
|
231
231
|
`.github/workflows/publish.yml` publishes automatically on a merge to `main` that changes
|
|
232
232
|
`package.json`'s version. Nobody runs `npm publish` by hand; there is no long-lived npm token
|
|
233
233
|
in the publish job. Releases are cut locally via Make, then landed through a normal PR:
|
|
@@ -51,7 +51,7 @@ export function InviteMemberDialog({ open, onClose, onInvite, isPending: externa
|
|
|
51
51
|
setSubmitting(false);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
return (_jsxs(Dialog, { open: open, onClose: onClose, size: "sm", children: [_jsx("div", { className: "flex justify-center", children: _jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-primary/10 dark:bg-primary/15", children: _jsx(UserPlusSvg, { className: "size-6 text-primary dark:text-primary-foreground/90" }) }) }), _jsx(DialogTitle, { className: "mt-4 text-center", children: t("invite.title", "Invite a team member") }), _jsx(DialogDescription, { className: "text-center", children: t("invite.description", "Send an organisation invite by email.") }), _jsxs(DialogBody, { className: "flex flex-col gap-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-zinc-900 dark:text-zinc-100", children: t("invite.emailLabel", "Email") }), _jsx(Input, { type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "teammate@
|
|
54
|
+
return (_jsxs(Dialog, { open: open, onClose: onClose, size: "sm", children: [_jsx("div", { className: "flex justify-center", children: _jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-primary/10 dark:bg-primary/15", children: _jsx(UserPlusSvg, { className: "size-6 text-primary dark:text-primary-foreground/90" }) }) }), _jsx(DialogTitle, { className: "mt-4 text-center", children: t("invite.title", "Invite a team member") }), _jsx(DialogDescription, { className: "text-center", children: t("invite.description", "Send an organisation invite by email.") }), _jsxs(DialogBody, { className: "flex flex-col gap-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-zinc-900 dark:text-zinc-100", children: t("invite.emailLabel", "Email") }), _jsx(Input, { type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "teammate@example.com", onKeyDown: (e) => {
|
|
55
55
|
if (e.key === "Enter" && canSubmit && !isPending)
|
|
56
56
|
handleSubmit();
|
|
57
57
|
} })] }), error && (_jsx("div", { className: "rounded-lg border border-[var(--tone-danger-border)] bg-[var(--tone-danger-soft)] px-3 py-2 text-sm text-[var(--tone-danger-fg)]", children: error })), notice && (_jsx("div", { className: "rounded-lg border border-[var(--tone-success-border)] bg-[var(--tone-success-soft)] px-3 py-2 text-sm text-[var(--tone-success-fg)]", children: notice }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { plain: true, onClick: onClose, disabled: isPending, children: t("cancel", "Cancel") }), _jsx(Button, { color: "brand", onClick: handleSubmit, disabled: isPending || !canSubmit, children: isPending ? t("invite.sending", "Sending...") : t("invite.send", "Send invite") })] })] }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cellarnode/ui",
|
|
3
|
-
"version": "0.169.
|
|
3
|
+
"version": "0.169.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"registry": "https://registry.npmjs.org/",
|
|
15
|
-
"access": "
|
|
15
|
+
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
@@ -205,7 +205,14 @@
|
|
|
205
205
|
"dist",
|
|
206
206
|
"!dist/**/*.stories.*",
|
|
207
207
|
"!dist/**/*.test.*",
|
|
208
|
+
"!dist/**/*.story-data.*",
|
|
209
|
+
"!dist/**/*.story-copy.*",
|
|
210
|
+
"!dist/**/*-story-fixtures.*",
|
|
211
|
+
"!dist/**/brand-fixtures.*",
|
|
212
|
+
"!dist/**/test-helpers.*",
|
|
208
213
|
"!dist/**/__tests__/**",
|
|
214
|
+
"!dist/**/__a11y__/**",
|
|
215
|
+
"!dist/**/__storybook__/**",
|
|
209
216
|
"dist/offer/offer-document.print.css",
|
|
210
217
|
"src/theme/tokens.css"
|
|
211
218
|
],
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CEL-1261 — assertions that a story is genuinely rendering in dark mode.
|
|
3
|
-
*
|
|
4
|
-
* Two independent things have to be true before a `dark` story is worth
|
|
5
|
-
* anything, and both were false in this package until CEL-1261:
|
|
6
|
-
*
|
|
7
|
-
* 1. A `.dark` scope has to actually reach the story. `globals: { theme:
|
|
8
|
-
* "dark" }` did not — the old `withThemeByClassName` decorator applied
|
|
9
|
-
* the class from a `storybook/preview-api` `useEffect`, which the vitest
|
|
10
|
-
* browser runner never flushes. Nine stories rendered light while
|
|
11
|
-
* reporting dark coverage.
|
|
12
|
-
* 2. The `dark:` variant has to compile to that scope. Without
|
|
13
|
-
* `@custom-variant dark` in `.storybook/storybook.css`, Tailwind's
|
|
14
|
-
* built-in `dark` variant is `@media (prefers-color-scheme: dark)`, and
|
|
15
|
-
* headless Chromium runs light — so every `dark:` utility in the library
|
|
16
|
-
* was inert inside the library's own axe gate.
|
|
17
|
-
*
|
|
18
|
-
* A dark story that silently renders light is worse than no dark story: it
|
|
19
|
-
* reports coverage it does not have. Calling `expectDarkModeActive` in the
|
|
20
|
-
* play function is what stops that from happening again — each check fails
|
|
21
|
-
* loudly if its half of the mechanism regresses.
|
|
22
|
-
*
|
|
23
|
-
* Deliberately dependency-free (plain `Error`, no `storybook/test` import) so
|
|
24
|
-
* the module stays inert if it is ever pulled into the published bundle.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Asserts that `element` sits inside an active `.dark` scope AND that `dark:`
|
|
28
|
-
* utilities resolve against it.
|
|
29
|
-
*
|
|
30
|
-
* @param element Usually the story's `canvasElement`.
|
|
31
|
-
*/
|
|
32
|
-
export declare function expectDarkModeActive(element: HTMLElement): void;
|
|
33
|
-
//# sourceMappingURL=dark-mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dark-mode.d.ts","sourceRoot":"","sources":["../../src/__storybook__/dark-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAMH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CA+B/D"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CEL-1261 — assertions that a story is genuinely rendering in dark mode.
|
|
3
|
-
*
|
|
4
|
-
* Two independent things have to be true before a `dark` story is worth
|
|
5
|
-
* anything, and both were false in this package until CEL-1261:
|
|
6
|
-
*
|
|
7
|
-
* 1. A `.dark` scope has to actually reach the story. `globals: { theme:
|
|
8
|
-
* "dark" }` did not — the old `withThemeByClassName` decorator applied
|
|
9
|
-
* the class from a `storybook/preview-api` `useEffect`, which the vitest
|
|
10
|
-
* browser runner never flushes. Nine stories rendered light while
|
|
11
|
-
* reporting dark coverage.
|
|
12
|
-
* 2. The `dark:` variant has to compile to that scope. Without
|
|
13
|
-
* `@custom-variant dark` in `.storybook/storybook.css`, Tailwind's
|
|
14
|
-
* built-in `dark` variant is `@media (prefers-color-scheme: dark)`, and
|
|
15
|
-
* headless Chromium runs light — so every `dark:` utility in the library
|
|
16
|
-
* was inert inside the library's own axe gate.
|
|
17
|
-
*
|
|
18
|
-
* A dark story that silently renders light is worse than no dark story: it
|
|
19
|
-
* reports coverage it does not have. Calling `expectDarkModeActive` in the
|
|
20
|
-
* play function is what stops that from happening again — each check fails
|
|
21
|
-
* loudly if its half of the mechanism regresses.
|
|
22
|
-
*
|
|
23
|
-
* Deliberately dependency-free (plain `Error`, no `storybook/test` import) so
|
|
24
|
-
* the module stays inert if it is ever pulled into the published bundle.
|
|
25
|
-
*/
|
|
26
|
-
/** The literal below is also what makes Tailwind emit the probe's classes. */
|
|
27
|
-
const PROBE_CLASSNAME = "text-black dark:text-white";
|
|
28
|
-
const DARK_PROBE_COLOR = "rgb(255, 255, 255)";
|
|
29
|
-
/**
|
|
30
|
-
* Asserts that `element` sits inside an active `.dark` scope AND that `dark:`
|
|
31
|
-
* utilities resolve against it.
|
|
32
|
-
*
|
|
33
|
-
* @param element Usually the story's `canvasElement`.
|
|
34
|
-
*/
|
|
35
|
-
export function expectDarkModeActive(element) {
|
|
36
|
-
// (1) The scope exists. `<html class="dark">` (the preview decorator) and a
|
|
37
|
-
// local `<div class="dark">` wrapper both satisfy this.
|
|
38
|
-
const scope = element.closest(".dark") ?? element.querySelector(".dark");
|
|
39
|
-
if (!scope) {
|
|
40
|
-
throw new Error("Dark mode is not active: no `.dark` ancestor or descendant of the story canvas. " +
|
|
41
|
-
"The theme decorator in `.storybook/preview.tsx` is the usual suspect — see CEL-1261.");
|
|
42
|
-
}
|
|
43
|
-
// (2) The variant compiles. A probe rather than a hardcoded token value: a
|
|
44
|
-
// literal would have to be re-derived by hand every time a token moves, and
|
|
45
|
-
// the question here is only "did `dark:` fire", not "which colour is it".
|
|
46
|
-
const host = scope.contains(element) ? element : scope;
|
|
47
|
-
const probe = document.createElement("span");
|
|
48
|
-
probe.className = PROBE_CLASSNAME;
|
|
49
|
-
probe.textContent = "";
|
|
50
|
-
host.appendChild(probe);
|
|
51
|
-
try {
|
|
52
|
-
const resolved = getComputedStyle(probe).color;
|
|
53
|
-
if (resolved !== DARK_PROBE_COLOR) {
|
|
54
|
-
throw new Error(`The \`dark:\` variant did not fire inside the active .dark scope: ` +
|
|
55
|
-
`\`${PROBE_CLASSNAME}\` resolved to ${resolved}, expected ${DARK_PROBE_COLOR}. ` +
|
|
56
|
-
"`@custom-variant dark` is missing from `.storybook/storybook.css` — see CEL-1261.");
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
finally {
|
|
60
|
-
probe.remove();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=dark-mode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dark-mode.js","sourceRoot":"","sources":["../../src/__storybook__/dark-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,8EAA8E;AAC9E,MAAM,eAAe,GAAG,4BAA4B,CAAC;AACrD,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAoB;IACvD,4EAA4E;IAC5E,wDAAwD;IACxD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,kFAAkF;YAChF,sFAAsF,CACzF,CAAC;IACJ,CAAC;IAED,2EAA2E;IAC3E,4EAA4E;IAC5E,0EAA0E;IAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC;IAClC,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;IACxB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;QAC/C,IAAI,QAAQ,KAAK,gBAAgB,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CACb,oEAAoE;gBAClE,KAAK,eAAe,kBAAkB,QAAQ,cAAc,gBAAgB,IAAI;gBAChF,mFAAmF,CACtF,CAAC;QACJ,CAAC;IACH,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mock data factories for Storybook stories.
|
|
3
|
-
* Provides realistic beverage/wine industry data for component demonstrations.
|
|
4
|
-
*/
|
|
5
|
-
import type { ChatRoom, ChatMessage } from "../chat/types.js";
|
|
6
|
-
import type { OpportunityRow } from "../opportunities/opportunities-table.js";
|
|
7
|
-
import type { SidebarNavSection, SidebarUser, RenderLinkFn } from "../nav/types.js";
|
|
8
|
-
export declare function createMockChatRoom(overrides?: Partial<ChatRoom>): ChatRoom;
|
|
9
|
-
export declare function createMockChatMessage(overrides?: Partial<ChatMessage>): ChatMessage;
|
|
10
|
-
export declare function createMockChatMessages(): ChatMessage[];
|
|
11
|
-
export declare function createMockOpportunityRow(overrides?: Partial<OpportunityRow>): OpportunityRow;
|
|
12
|
-
export declare function createMockOpportunityRows(): OpportunityRow[];
|
|
13
|
-
/**
|
|
14
|
-
* Inline two-tone circle avatar as a data-URI SVG so Storybook stories stay
|
|
15
|
-
* hermetic (no network fetch). The initials fallback is still exercised by the
|
|
16
|
-
* `NoUser` / `InitialsAvatar` stories.
|
|
17
|
-
*/
|
|
18
|
-
export declare const MOCK_AVATAR_DATA_URI: string;
|
|
19
|
-
/** Inline CellarNode-ish brand mark data-URI so stories don't 404 on the app favicon path. */
|
|
20
|
-
export declare const MOCK_BRAND_LOGO_SRC: string;
|
|
21
|
-
export declare const MOCK_SIDEBAR_USER: SidebarUser;
|
|
22
|
-
export declare const MOCK_NAV_SECTIONS: SidebarNavSection[];
|
|
23
|
-
export declare const mockRenderLink: RenderLinkFn;
|
|
24
|
-
//# sourceMappingURL=mock-data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mock-data.d.ts","sourceRoot":"","sources":["../../src/__storybook__/mock-data.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjF,wBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAiB1E;AAID,wBAAgB,qBAAqB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAanF;AAED,wBAAgB,sBAAsB,IAAI,WAAW,EAAE,CAuBtD;AAID,wBAAgB,wBAAwB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAY5F;AAED,wBAAgB,yBAAyB,IAAI,cAAc,EAAE,CAwC5D;AAID;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAE9B,CAAC;AAEJ,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,QAE7B,CAAC;AAEJ,eAAO,MAAM,iBAAiB,EAAE,WAM/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAqChD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAI5B,CAAC"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Mock data factories for Storybook stories.
|
|
4
|
-
* Provides realistic beverage/wine industry data for component demonstrations.
|
|
5
|
-
*/
|
|
6
|
-
import { Building2, Inbox, LayoutDashboard, Target } from "lucide-react";
|
|
7
|
-
// ─── ChatRoom ─────────────────────────────────────────────────────────────────
|
|
8
|
-
export function createMockChatRoom(overrides) {
|
|
9
|
-
return {
|
|
10
|
-
id: "room-001",
|
|
11
|
-
offerId: "offer-001",
|
|
12
|
-
producerOrgId: "org-producer-001",
|
|
13
|
-
importerOrgId: "org-importer-001",
|
|
14
|
-
producerOrgName: "Château Margaux",
|
|
15
|
-
importerOrgName: "Noble Wine Imports Ltd.",
|
|
16
|
-
beverageName: "Château Margaux Grand Cru 2018",
|
|
17
|
-
beverageProducer: "Château Margaux",
|
|
18
|
-
offerStatus: "pending",
|
|
19
|
-
recipientId: "user-001",
|
|
20
|
-
status: "active",
|
|
21
|
-
lastMessageAt: new Date(Date.now() - 1000 * 60 * 15).toISOString(),
|
|
22
|
-
createdAt: new Date(Date.now() - 1000 * 60 * 60 * 24).toISOString(),
|
|
23
|
-
...overrides,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
// ─── ChatMessage ──────────────────────────────────────────────────────────────
|
|
27
|
-
export function createMockChatMessage(overrides) {
|
|
28
|
-
return {
|
|
29
|
-
id: "msg-001",
|
|
30
|
-
roomId: "room-001",
|
|
31
|
-
senderOrgId: "org-producer-001",
|
|
32
|
-
senderUserId: "user-producer-001",
|
|
33
|
-
content: "We are pleased to offer you our Château Margaux Grand Cru 2018 at €280 per bottle, FOB Bordeaux.",
|
|
34
|
-
messageType: "text",
|
|
35
|
-
metadata: null,
|
|
36
|
-
createdAt: new Date(Date.now() - 1000 * 60 * 30).toISOString(),
|
|
37
|
-
...overrides,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export function createMockChatMessages() {
|
|
41
|
-
return [
|
|
42
|
-
createMockChatMessage({
|
|
43
|
-
id: "msg-001",
|
|
44
|
-
senderOrgId: "org-producer-001",
|
|
45
|
-
content: "We are pleased to offer our Château Margaux Grand Cru 2018 at €280 per bottle, FOB Bordeaux.",
|
|
46
|
-
createdAt: new Date(Date.now() - 1000 * 60 * 60).toISOString(),
|
|
47
|
-
}),
|
|
48
|
-
createMockChatMessage({
|
|
49
|
-
id: "msg-002",
|
|
50
|
-
senderOrgId: "org-importer-001",
|
|
51
|
-
content: "Thank you for the offer. Would you consider €260 per bottle for an order of 600 cases?",
|
|
52
|
-
createdAt: new Date(Date.now() - 1000 * 60 * 45).toISOString(),
|
|
53
|
-
}),
|
|
54
|
-
createMockChatMessage({
|
|
55
|
-
id: "msg-003",
|
|
56
|
-
senderOrgId: "org-producer-001",
|
|
57
|
-
content: "We can accommodate €265 per bottle for 600 cases. Delivery within 6–8 weeks.",
|
|
58
|
-
createdAt: new Date(Date.now() - 1000 * 60 * 20).toISOString(),
|
|
59
|
-
}),
|
|
60
|
-
];
|
|
61
|
-
}
|
|
62
|
-
// ─── OpportunityRow ───────────────────────────────────────────────────────────
|
|
63
|
-
export function createMockOpportunityRow(overrides) {
|
|
64
|
-
return {
|
|
65
|
-
id: "opp-001",
|
|
66
|
-
name: "Premium Red Wine Tender — Nordic Distribution",
|
|
67
|
-
marketIdentifier: "TENDER-2026-NR-0047",
|
|
68
|
-
beverageType: "Red Wine",
|
|
69
|
-
countryOfOrigin: "France",
|
|
70
|
-
status: "open",
|
|
71
|
-
submissionDeadline: new Date(Date.now() + 1000 * 60 * 60 * 24 * 14).toISOString(),
|
|
72
|
-
createdAt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 3).toISOString(),
|
|
73
|
-
...overrides,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export function createMockOpportunityRows() {
|
|
77
|
-
return [
|
|
78
|
-
createMockOpportunityRow(),
|
|
79
|
-
createMockOpportunityRow({
|
|
80
|
-
id: "opp-002",
|
|
81
|
-
name: "Organic White Wine Supply — UK Retail",
|
|
82
|
-
marketIdentifier: "TENDER-2026-OW-0031",
|
|
83
|
-
beverageType: "White Wine",
|
|
84
|
-
countryOfOrigin: "Italy",
|
|
85
|
-
status: "open",
|
|
86
|
-
submissionDeadline: new Date(Date.now() + 1000 * 60 * 60 * 24 * 7).toISOString(),
|
|
87
|
-
}),
|
|
88
|
-
createMockOpportunityRow({
|
|
89
|
-
id: "opp-003",
|
|
90
|
-
name: "Sparkling Wine — APAC Hotel Group",
|
|
91
|
-
marketIdentifier: "TENDER-2026-SW-0018",
|
|
92
|
-
beverageType: "Sparkling Wine",
|
|
93
|
-
countryOfOrigin: "Spain",
|
|
94
|
-
status: "draft",
|
|
95
|
-
submissionDeadline: new Date(Date.now() + 1000 * 60 * 60 * 24 * 30).toISOString(),
|
|
96
|
-
}),
|
|
97
|
-
createMockOpportunityRow({
|
|
98
|
-
id: "opp-004",
|
|
99
|
-
name: "Craft Beer Annual Supply — Scandinavia",
|
|
100
|
-
marketIdentifier: "TENDER-2026-CB-0055",
|
|
101
|
-
beverageType: "Beer",
|
|
102
|
-
countryOfOrigin: "Germany",
|
|
103
|
-
status: "closed",
|
|
104
|
-
submissionDeadline: new Date(Date.now() - 1000 * 60 * 60 * 24 * 5).toISOString(),
|
|
105
|
-
}),
|
|
106
|
-
createMockOpportunityRow({
|
|
107
|
-
id: "opp-005",
|
|
108
|
-
name: "Premium Whisky — Global Duty Free",
|
|
109
|
-
marketIdentifier: "TENDER-2026-WK-0022",
|
|
110
|
-
beverageType: "Whisky",
|
|
111
|
-
countryOfOrigin: "United Kingdom",
|
|
112
|
-
status: "open",
|
|
113
|
-
submissionDeadline: new Date(Date.now() + 1000 * 60 * 60 * 24 * 21).toISOString(),
|
|
114
|
-
}),
|
|
115
|
-
];
|
|
116
|
-
}
|
|
117
|
-
// ─── Nav mock data ─────────────────────────────────────────────────────────────
|
|
118
|
-
/**
|
|
119
|
-
* Inline two-tone circle avatar as a data-URI SVG so Storybook stories stay
|
|
120
|
-
* hermetic (no network fetch). The initials fallback is still exercised by the
|
|
121
|
-
* `NoUser` / `InitialsAvatar` stories.
|
|
122
|
-
*/
|
|
123
|
-
export const MOCK_AVATAR_DATA_URI = `data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" fill="#e2e8f0"/><circle cx="32" cy="25" r="12" fill="#94a3b8"/><path d="M12 60c0-11 9-19 20-19s20 8 20 19z" fill="#94a3b8"/></svg>')}`;
|
|
124
|
-
/** Inline CellarNode-ish brand mark data-URI so stories don't 404 on the app favicon path. */
|
|
125
|
-
export const MOCK_BRAND_LOGO_SRC = `data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="16" fill="#0f766e"/><circle cx="32" cy="32" r="14" fill="none" stroke="#ffffff" stroke-width="6"/></svg>')}`;
|
|
126
|
-
export const MOCK_SIDEBAR_USER = {
|
|
127
|
-
name: "Jane Doe",
|
|
128
|
-
email: "jane.doe@noblwine.com",
|
|
129
|
-
initials: "JD",
|
|
130
|
-
avatarUrl: MOCK_AVATAR_DATA_URI,
|
|
131
|
-
profileHref: "/profile",
|
|
132
|
-
};
|
|
133
|
-
export const MOCK_NAV_SECTIONS = [
|
|
134
|
-
{
|
|
135
|
-
label: "Main",
|
|
136
|
-
items: [
|
|
137
|
-
{
|
|
138
|
-
title: "Dashboard",
|
|
139
|
-
href: "/dashboard",
|
|
140
|
-
icon: LayoutDashboard,
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
title: "Offers",
|
|
144
|
-
href: "/offers",
|
|
145
|
-
icon: Inbox,
|
|
146
|
-
badgeCount: 3,
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
title: "Opportunities",
|
|
150
|
-
href: "/opportunities",
|
|
151
|
-
icon: Target,
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
label: "Organisation",
|
|
157
|
-
items: [
|
|
158
|
-
{
|
|
159
|
-
title: "Organisation",
|
|
160
|
-
icon: Building2,
|
|
161
|
-
expandable: true,
|
|
162
|
-
children: [
|
|
163
|
-
{ title: "Team", href: "/organisation/team" },
|
|
164
|
-
{ title: "Profile", href: "/organisation/profile" },
|
|
165
|
-
{ title: "Partnerships", href: "/organisation/partnerships" },
|
|
166
|
-
],
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
},
|
|
170
|
-
];
|
|
171
|
-
export const mockRenderLink = ({ href, children, ...props }) => (_jsx("a", { href: href, ...props, children: children }));
|
|
172
|
-
//# sourceMappingURL=mock-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mock-data.js","sourceRoot":"","sources":["../../src/__storybook__/mock-data.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMzE,iFAAiF;AAEjF,MAAM,UAAU,kBAAkB,CAAC,SAA6B;IAC9D,OAAO;QACL,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE,kBAAkB;QACjC,aAAa,EAAE,kBAAkB;QACjC,eAAe,EAAE,iBAAiB;QAClC,eAAe,EAAE,yBAAyB;QAC1C,YAAY,EAAE,gCAAgC;QAC9C,gBAAgB,EAAE,iBAAiB;QACnC,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,UAAU;QACvB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AAE,UAAU;IAChB,KAAK,EAAE,uBAAuB;IAC9B,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,oBAAoB;IAC/B,WAAW,EAAE,UAAU;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD;QACE,KAAK,EAAE,MAAM;QACb,KAAK,EAAE;YACL;gBACE,KAAK,EAAE,WAAW;gBAClB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,eAAe;aACtB;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE,CAAC;aACd;YACD;gBACE,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD;QACE,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE;YACL;gBACE,KAAK,EAAE,cAAc;gBACrB,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,IAAa;gBACzB,QAAQ,EAAE;oBACR,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE;oBAC7C,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,uBAAuB,EAAE;oBACnD,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,4BAA4B,EAAE;iBAC9D;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAiB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC5E,YAAG,IAAI,EAAE,IAAI,KAAM,KAAK,YACrB,QAAQ,GACP,CACL,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { BrandAsset, BrandProfileData, BrandProfileInput } from "./types.js";
|
|
2
|
-
export declare const sampleBrandProfile: BrandProfileData;
|
|
3
|
-
export declare const canonicalBrandProfile: BrandProfileData;
|
|
4
|
-
/** Only two groups populated — exercises graceful handling of missing sections. */
|
|
5
|
-
export declare const partialBrandProfile: BrandProfileInput;
|
|
6
|
-
export declare const nestedPartialBrandProfile: BrandProfileInput;
|
|
7
|
-
export declare const nestedIdentityPartialBrandProfile: BrandProfileInput;
|
|
8
|
-
export declare const nestedVoicePartialBrandProfile: BrandProfileInput;
|
|
9
|
-
export declare const nestedValuesPartialBrandProfile: BrandProfileInput;
|
|
10
|
-
export declare const legacyWinemakingBrandProfile: BrandProfileInput;
|
|
11
|
-
export declare const invalidBrandProfile: BrandProfileInput;
|
|
12
|
-
export declare const emptyBrandProfile: BrandProfileInput;
|
|
13
|
-
export declare const sampleBrandAssets: BrandAsset[];
|
|
14
|
-
export declare const assetEdgeBrandAssets: readonly BrandAsset[];
|
|
15
|
-
//# sourceMappingURL=brand-fixtures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-fixtures.d.ts","sourceRoot":"","sources":["../../src/brand/brand-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,gBAAgB,EAEhB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAejB,eAAO,MAAM,kBAAkB,EAAE,gBAmChC,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,gBAAqC,CAAC;AAE1E,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,EAAE,iBAGjC,CAAC;AACF,eAAO,MAAM,yBAAyB,EAAE,iBAEvC,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,iBAE/C,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,iBAE5C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,iBAE7C,CAAC;AACF,eAAO,MAAM,4BAA4B,EAAE,iBAE1C,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,iBAEjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAAsB,CAAC;AAEvD,eAAO,MAAM,iBAAiB,EAAE,UAAU,EAmBzC,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE,SAAS,UAAU,EAoBrD,CAAC"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
function f(value, extractionMethod = "firecrawl_branding") {
|
|
2
|
-
return {
|
|
3
|
-
value,
|
|
4
|
-
sourceUrl: "https://estate-verdana.test",
|
|
5
|
-
confidence: 0.9,
|
|
6
|
-
extractionMethod,
|
|
7
|
-
iteration: 1,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export const sampleBrandProfile = {
|
|
11
|
-
visual: {
|
|
12
|
-
logo: f("https://estate-verdana.test/logo.svg"),
|
|
13
|
-
colorScheme: f("light"),
|
|
14
|
-
primaryColor: f("#6d3b2e", "user_manual"),
|
|
15
|
-
secondaryColor: f("#e8ddcf"),
|
|
16
|
-
accentColor: f("#c9a24b"),
|
|
17
|
-
palette: f({ bark: "#6d3b2e", linen: "#e8ddcf", gold: "#c9a24b" }),
|
|
18
|
-
typography: f({ fontFamilies: { primary: "Inter", heading: "Fraunces" } }),
|
|
19
|
-
spacing: f({ baseUnit: 4, borderRadius: "0.75rem" }),
|
|
20
|
-
ogImage: f("https://estate-verdana.test/og.jpg", "html_meta"),
|
|
21
|
-
faviconUrl: f("https://estate-verdana.test/favicon.ico", "html_meta"),
|
|
22
|
-
bannerImage: f("https://estate-verdana.test/hero.jpg", "html_meta"),
|
|
23
|
-
},
|
|
24
|
-
identity: {
|
|
25
|
-
producerName: f("Estate Verdana", "user_manual"),
|
|
26
|
-
tagline: f("Old-vine wines from the coastal hills", "llm_write"),
|
|
27
|
-
foundedYear: f(1936),
|
|
28
|
-
country: f("Italy"),
|
|
29
|
-
region: f("Tuscany"),
|
|
30
|
-
parentOrganization: f({ name: "Verdana Holdings", relationship: "Parent company" }),
|
|
31
|
-
keyPeople: f([{ name: "Lucia Romano", role: "Winemaker" }]),
|
|
32
|
-
contact: f({ email: "hello@estate-verdana.test" }),
|
|
33
|
-
},
|
|
34
|
-
voice: {
|
|
35
|
-
tone: f("elegant", "llm_merge"),
|
|
36
|
-
missionStatement: f("Honest wine that tastes of its place.", "llm_write"),
|
|
37
|
-
foundingStory: f("Three generations farming the same coastal slopes.", "llm_write"),
|
|
38
|
-
keyMessages: f(["Coastal terroir", "Old-vine fruit"]),
|
|
39
|
-
},
|
|
40
|
-
values: {
|
|
41
|
-
sustainability: f({ claims: ["Dry-farmed"], certifications: ["Organic"] }),
|
|
42
|
-
production: f({ philosophy: "Low intervention", methods: ["Native yeast"] }),
|
|
43
|
-
awards: f([{ name: "Tre Bicchieri", year: 2024, source: "Gambero Rosso" }]),
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
export const canonicalBrandProfile = sampleBrandProfile;
|
|
47
|
-
/** Only two groups populated — exercises graceful handling of missing sections. */
|
|
48
|
-
export const partialBrandProfile = {
|
|
49
|
-
identity: sampleBrandProfile.identity,
|
|
50
|
-
visual: sampleBrandProfile.visual,
|
|
51
|
-
};
|
|
52
|
-
export const nestedPartialBrandProfile = {
|
|
53
|
-
visual: { primaryColor: sampleBrandProfile.visual.primaryColor },
|
|
54
|
-
};
|
|
55
|
-
export const nestedIdentityPartialBrandProfile = {
|
|
56
|
-
identity: { parentOrganization: sampleBrandProfile.identity.parentOrganization },
|
|
57
|
-
};
|
|
58
|
-
export const nestedVoicePartialBrandProfile = {
|
|
59
|
-
voice: { tone: f("heritage") },
|
|
60
|
-
};
|
|
61
|
-
export const nestedValuesPartialBrandProfile = {
|
|
62
|
-
values: { production: sampleBrandProfile.values.production },
|
|
63
|
-
};
|
|
64
|
-
export const legacyWinemakingBrandProfile = {
|
|
65
|
-
values: { winemaking: f({ philosophy: "Low intervention", methods: ["Native yeast"] }) },
|
|
66
|
-
};
|
|
67
|
-
export const invalidBrandProfile = {
|
|
68
|
-
visual: { primaryColor: { ...f("not-a-hex-color"), sourceUrl: "javascript:alert('unsafe')" } },
|
|
69
|
-
};
|
|
70
|
-
export const emptyBrandProfile = {};
|
|
71
|
-
export const sampleBrandAssets = [
|
|
72
|
-
{
|
|
73
|
-
id: "a1",
|
|
74
|
-
slot: "primary",
|
|
75
|
-
fileUrl: "https://estate-verdana.test/logo.svg",
|
|
76
|
-
fileName: "logo.svg",
|
|
77
|
-
mimeType: "image/svg+xml",
|
|
78
|
-
fileSize: 4096,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: "a2",
|
|
82
|
-
slot: "favicon",
|
|
83
|
-
fileUrl: "https://estate-verdana.test/favicon.png",
|
|
84
|
-
fileName: "favicon.png",
|
|
85
|
-
mimeType: "image/png",
|
|
86
|
-
fileSize: 1024,
|
|
87
|
-
width: 64,
|
|
88
|
-
height: 64,
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
export const assetEdgeBrandAssets = [
|
|
92
|
-
...sampleBrandAssets,
|
|
93
|
-
{
|
|
94
|
-
id: "a3",
|
|
95
|
-
slot: "primary",
|
|
96
|
-
fileUrl: "https://estate-verdana.test/logo-alt.svg",
|
|
97
|
-
fileName: "logo-alt.svg",
|
|
98
|
-
mimeType: "image/svg+xml",
|
|
99
|
-
fileSize: 2048,
|
|
100
|
-
width: null,
|
|
101
|
-
height: null,
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
id: "a4",
|
|
105
|
-
slot: "monochrome_dark",
|
|
106
|
-
fileUrl: "not-a-url",
|
|
107
|
-
fileName: "dark-logo.svg",
|
|
108
|
-
mimeType: "image/svg+xml",
|
|
109
|
-
fileSize: 512,
|
|
110
|
-
},
|
|
111
|
-
];
|
|
112
|
-
//# sourceMappingURL=brand-fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-fixtures.js","sourceRoot":"","sources":["../../src/brand/brand-fixtures.ts"],"names":[],"mappings":"AASA,SAAS,CAAC,CACR,KAAQ,EACR,mBAA0C,oBAAoB;IAE9D,OAAO;QACL,KAAK;QACL,SAAS,EAAE,6BAA6B;QACxC,UAAU,EAAE,GAAG;QACf,gBA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QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;KACb;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE,GAAG;KACd;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-profile-display.story-copy.d.ts","sourceRoot":"","sources":["../../src/brand/brand-profile-display.story-copy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,eAAO,MAAM,iBAAiB,EAAE,uBA8H/B,CAAC"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
export const longLocalizedCopy = {
|
|
2
|
-
defaultBrandName: "Nombre de marca predeterminado excesivamente largo para probar el ajuste de línea",
|
|
3
|
-
emptyTitle: "No se encontró ningún perfil de marca para este producto",
|
|
4
|
-
emptyDescription: "Por favor, añada la información de la marca utilizando el botón que se proporciona a continuación para comenzar.",
|
|
5
|
-
sectionVisual: "Sistema Visual y Directrices de Diseño",
|
|
6
|
-
sectionColors: "Paleta de Colores y Esquemas",
|
|
7
|
-
sectionTypography: "Tipografía y Familias de Fuentes",
|
|
8
|
-
sectionLogos: "Logotipos y Activos de Marca",
|
|
9
|
-
sectionIdentity: "Identidad de Marca e Información Principal",
|
|
10
|
-
sectionVoice: "Voz y Tono de la Marca",
|
|
11
|
-
sectionValues: "Valores Fundamentales y Misión de la Marca",
|
|
12
|
-
fieldLabels: {
|
|
13
|
-
logo: "Logotipo",
|
|
14
|
-
primaryColor: "Color Primario",
|
|
15
|
-
secondaryColor: "Color Secundario",
|
|
16
|
-
accentColor: "Color de Acento",
|
|
17
|
-
palette: "Paleta",
|
|
18
|
-
typography: "Tipografía",
|
|
19
|
-
producerName: "Nombre de la Organización",
|
|
20
|
-
tagline: "Lema",
|
|
21
|
-
foundedYear: "Año de Fundación",
|
|
22
|
-
country: "País",
|
|
23
|
-
region: "Región",
|
|
24
|
-
parentOrganization: "Organización Matriz",
|
|
25
|
-
keyPeople: "Personas Clave",
|
|
26
|
-
contact: "Contacto",
|
|
27
|
-
tone: "Tono",
|
|
28
|
-
missionStatement: "Misión",
|
|
29
|
-
foundingStory: "Historia de Fundación",
|
|
30
|
-
keyMessages: "Mensajes Clave",
|
|
31
|
-
sustainability: "Sostenibilidad",
|
|
32
|
-
production: "Producción",
|
|
33
|
-
awards: "Premios",
|
|
34
|
-
},
|
|
35
|
-
contactLabels: {
|
|
36
|
-
email: "Correo Electrónico",
|
|
37
|
-
phone: "Teléfono",
|
|
38
|
-
address: "Dirección",
|
|
39
|
-
},
|
|
40
|
-
narrativeLabels: {
|
|
41
|
-
claims: "Declaraciones",
|
|
42
|
-
certifications: "Certificaciones",
|
|
43
|
-
philosophy: "Filosofía",
|
|
44
|
-
methods: "Métodos",
|
|
45
|
-
keyPeople: "Personas Clave",
|
|
46
|
-
awards: "Premios",
|
|
47
|
-
},
|
|
48
|
-
toneLabels: {
|
|
49
|
-
elegant: "Elegante",
|
|
50
|
-
rustic: "Rústico",
|
|
51
|
-
modern: "Moderno",
|
|
52
|
-
traditional: "Tradicional",
|
|
53
|
-
playful: "Juguetón",
|
|
54
|
-
premium: "Premium",
|
|
55
|
-
artisanal: "Artesanal",
|
|
56
|
-
bold: "Audaz",
|
|
57
|
-
classic: "Clásico",
|
|
58
|
-
contemporary: "Contemporáneo",
|
|
59
|
-
minimalist: "Minimalista",
|
|
60
|
-
approachable: "Accesible",
|
|
61
|
-
innovative: "Innovador",
|
|
62
|
-
heritage: "Patrimonio",
|
|
63
|
-
},
|
|
64
|
-
lowConfidenceLabel: "Baja Confianza",
|
|
65
|
-
provenanceLabels: {
|
|
66
|
-
firecrawl_branding: "Escaneo Automatizado de Sitio Web",
|
|
67
|
-
llm_write: "Generación de IA",
|
|
68
|
-
llm_merge: "Consolidación de IA",
|
|
69
|
-
user_manual: "Entrada Manual del Usuario",
|
|
70
|
-
html_meta: "De Metadatos del Sitio",
|
|
71
|
-
},
|
|
72
|
-
provenanceSummaryLabel: (method, count) => {
|
|
73
|
-
if (method === "low_confidence") {
|
|
74
|
-
return count === 1 ? "1 campo de baja confianza" : `${count} campos de baja confianza`;
|
|
75
|
-
}
|
|
76
|
-
const singular = {
|
|
77
|
-
firecrawl_branding: "detectado",
|
|
78
|
-
llm_write: "generado",
|
|
79
|
-
llm_merge: "consolidado",
|
|
80
|
-
user_manual: "manual",
|
|
81
|
-
html_meta: "de metadatos",
|
|
82
|
-
};
|
|
83
|
-
const plural = {
|
|
84
|
-
firecrawl_branding: "detectados",
|
|
85
|
-
llm_write: "generados",
|
|
86
|
-
llm_merge: "consolidados",
|
|
87
|
-
user_manual: "manuales",
|
|
88
|
-
html_meta: "de metadatos",
|
|
89
|
-
};
|
|
90
|
-
return count === 1 ? `1 campo ${singular[method]}` : `${count} campos ${plural[method]}`;
|
|
91
|
-
},
|
|
92
|
-
metadataLabels: {
|
|
93
|
-
method: "Método de Extracción",
|
|
94
|
-
confidence: "Nivel de Confianza",
|
|
95
|
-
iteration: "Iteración de Perfil",
|
|
96
|
-
source: "Fuente Original",
|
|
97
|
-
},
|
|
98
|
-
confidenceLabel: (confidence) => `Confianza del ${confidence}%`,
|
|
99
|
-
unavailableValueLabel: "Valor No Disponible",
|
|
100
|
-
sourceUnavailableLabel: "Fuente No Disponible",
|
|
101
|
-
sourceLinkLabel: (host) => `Visitar ${host}`,
|
|
102
|
-
colorAriaLabel: (name, hex) => `Color ${name}: ${hex}`,
|
|
103
|
-
invalidColorLabel: "Color Inválido",
|
|
104
|
-
typographyHintLabels: {
|
|
105
|
-
families: "Familias",
|
|
106
|
-
sizes: "Tamaños",
|
|
107
|
-
weights: "Pesos",
|
|
108
|
-
lineHeights: "Alturas de Línea",
|
|
109
|
-
},
|
|
110
|
-
typographyRoleLabels: {
|
|
111
|
-
heading: "Encabezado",
|
|
112
|
-
primary: "Principal",
|
|
113
|
-
code: "Código",
|
|
114
|
-
},
|
|
115
|
-
unavailableFontLabel: (font) => `Fuente no disponible: ${font}`,
|
|
116
|
-
assetSlotLabels: {
|
|
117
|
-
primary: "Primario",
|
|
118
|
-
monochrome_light: "Monocromo Claro",
|
|
119
|
-
monochrome_dark: "Monocromo Oscuro",
|
|
120
|
-
favicon: "Favicon",
|
|
121
|
-
},
|
|
122
|
-
missingVariantsLabel: (labels) => `Faltan variantes: ${labels.join(", ")}`,
|
|
123
|
-
logoAlt: (brand, slot) => `Logo ${slot} de ${brand}`,
|
|
124
|
-
imageUnavailableLabel: "Imagen No Disponible",
|
|
125
|
-
};
|
|
126
|
-
//# sourceMappingURL=brand-profile-display.story-copy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-profile-display.story-copy.js","sourceRoot":"","sources":["../../src/brand/brand-profile-display.story-copy.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAA4B;IACxD,gBAAgB,EACd,mFAAmF;IACrF,UAAU,EAAE,0DAA0D;IACtE,gBAAgB,EACd,kHAAkH;IACpH,aAAa,EAAE,wCAAwC;IACvD,aAAa,EAAE,8BAA8B;IAC7C,iBAAiB,EAAE,kCAAkC;IACrD,YAAY,EAAE,8BAA8B;IAC5C,eAAe,EAAE,4CAA4C;IAC7D,YAAY,EAAE,wBAAwB;IACtC,aAAa,EAAE,4CAA4C;IAC3D,WAAW,EAAE;QACX,IAAI,EAAE,UAAU;QAChB,YAAY,EAAE,gBAAgB;QAC9B,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,YAAY;QACxB,YAAY,EAAE,2BAA2B;QACzC,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE,MAAM;QACf,MA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QAAQ;KACf;IACD,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,IAAI,EAAE;IAC/D,eAAe,EAAE;QACf,OAAO,EAAE,UAAU;QACnB,gBAAgB,EAAE,iBAAiB;QACnC,eAAe,EAAE,kBAAkB;QACnC,OAAO,EAAE,SAAS;KACnB;IACD,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;IAC1E,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,IAAI,OAAO,KAAK,EAAE;IACpD,qBAAqB,EAAE,sBAAsB;CAC9C,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BrandAsset, BrandProfileInput } from "./types.js";
|
|
2
|
-
export declare const completeBrandAssets: readonly BrandAsset[];
|
|
3
|
-
export declare const completeProfileWithoutFontFamilies: BrandProfileInput;
|
|
4
|
-
export declare const partialProfileWithValidLogo: BrandProfileInput;
|
|
5
|
-
export declare const partialBrandAssets: BrandAsset[];
|
|
6
|
-
export declare const lowConfidenceProfile: BrandProfileInput;
|
|
7
|
-
export declare const missingFontsProfile: BrandProfileInput;
|
|
8
|
-
export declare const longLocalizedProfile: BrandProfileInput;
|
|
9
|
-
export declare const mobileLongSourceProfile: BrandProfileInput;
|
|
10
|
-
export declare const invalidProfile: BrandProfileInput;
|
|
11
|
-
export declare const invalidBrandAssets: readonly BrandAsset[];
|
|
12
|
-
//# sourceMappingURL=brand-profile-display.story-data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-profile-display.story-data.d.ts","sourceRoot":"","sources":["../../src/brand/brand-profile-display.story-data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,mBAAmB,EAAE,SAAS,UAAU,EAyCpD,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,iBAahD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAMzC,CAAC;AAEF,eAAO,MAAM,kBAAkB,cAE9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBA6BlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAiBjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBA2ClC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,iBAUrC,CAAC;AAEF,eAAO,MAAM,cAAc,mBAAsB,CAAC;AAElD,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EA+BnD,CAAC"}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { invalidBrandProfile, partialBrandProfile, sampleBrandProfile } from "./brand-fixtures.js";
|
|
2
|
-
export const completeBrandAssets = [
|
|
3
|
-
{
|
|
4
|
-
id: "1",
|
|
5
|
-
fileUrl: "https://placehold.co/400x400/png",
|
|
6
|
-
slot: "primary",
|
|
7
|
-
width: 400,
|
|
8
|
-
height: 400,
|
|
9
|
-
fileName: "primary.png",
|
|
10
|
-
mimeType: "image/png",
|
|
11
|
-
fileSize: 1024,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
id: "2",
|
|
15
|
-
fileUrl: "https://placehold.co/400x400/png",
|
|
16
|
-
slot: "monochrome_light",
|
|
17
|
-
width: 400,
|
|
18
|
-
height: 400,
|
|
19
|
-
fileName: "light.png",
|
|
20
|
-
mimeType: "image/png",
|
|
21
|
-
fileSize: 1024,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: "3",
|
|
25
|
-
fileUrl: "https://placehold.co/400x400/png",
|
|
26
|
-
slot: "monochrome_dark",
|
|
27
|
-
width: 400,
|
|
28
|
-
height: 400,
|
|
29
|
-
fileName: "dark.png",
|
|
30
|
-
mimeType: "image/png",
|
|
31
|
-
fileSize: 1024,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: "4",
|
|
35
|
-
fileUrl: "https://placehold.co/64x64/png",
|
|
36
|
-
slot: "favicon",
|
|
37
|
-
width: 64,
|
|
38
|
-
height: 64,
|
|
39
|
-
fileName: "favicon.png",
|
|
40
|
-
mimeType: "image/png",
|
|
41
|
-
fileSize: 1024,
|
|
42
|
-
},
|
|
43
|
-
];
|
|
44
|
-
export const completeProfileWithoutFontFamilies = {
|
|
45
|
-
...sampleBrandProfile,
|
|
46
|
-
visual: {
|
|
47
|
-
...sampleBrandProfile.visual,
|
|
48
|
-
logo: {
|
|
49
|
-
...sampleBrandProfile.visual.logo,
|
|
50
|
-
value: "https://placehold.co/400x400/png",
|
|
51
|
-
},
|
|
52
|
-
typography: {
|
|
53
|
-
...sampleBrandProfile.visual.typography,
|
|
54
|
-
value: { fontSizes: { h1: "32px" } },
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
export const partialProfileWithValidLogo = {
|
|
59
|
-
...partialBrandProfile,
|
|
60
|
-
visual: {
|
|
61
|
-
...partialBrandProfile.visual,
|
|
62
|
-
logo: completeProfileWithoutFontFamilies.visual?.logo,
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
export const partialBrandAssets = completeBrandAssets.filter(({ slot }) => slot === "primary" || slot === "favicon");
|
|
66
|
-
export const lowConfidenceProfile = {
|
|
67
|
-
...completeProfileWithoutFontFamilies,
|
|
68
|
-
visual: {
|
|
69
|
-
...completeProfileWithoutFontFamilies.visual,
|
|
70
|
-
primaryColor: {
|
|
71
|
-
value: "#6d3b2e",
|
|
72
|
-
sourceUrl: "https://estate-verdana.test",
|
|
73
|
-
confidence: 0.3,
|
|
74
|
-
extractionMethod: "llm_write",
|
|
75
|
-
iteration: 1,
|
|
76
|
-
},
|
|
77
|
-
typography: {
|
|
78
|
-
value: { fontFamilies: { primary: "Inter", heading: "Fraunces" } },
|
|
79
|
-
sourceUrl: "https://estate-verdana.test",
|
|
80
|
-
confidence: 0.4,
|
|
81
|
-
extractionMethod: "llm_merge",
|
|
82
|
-
iteration: 2,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
identity: {
|
|
86
|
-
...sampleBrandProfile.identity,
|
|
87
|
-
producerName: {
|
|
88
|
-
value: "Estate Verdana",
|
|
89
|
-
sourceUrl: null,
|
|
90
|
-
confidence: 0.1,
|
|
91
|
-
extractionMethod: "firecrawl_branding",
|
|
92
|
-
iteration: 1,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
export const missingFontsProfile = {
|
|
97
|
-
...completeProfileWithoutFontFamilies,
|
|
98
|
-
visual: {
|
|
99
|
-
...completeProfileWithoutFontFamilies.visual,
|
|
100
|
-
typography: {
|
|
101
|
-
value: {
|
|
102
|
-
fontFamilies: {
|
|
103
|
-
heading: "Unregistered Brand Serif",
|
|
104
|
-
primary: "Unregistered Brand Sans",
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
sourceUrl: "https://estate-verdana.test",
|
|
108
|
-
confidence: 0.9,
|
|
109
|
-
extractionMethod: "firecrawl_branding",
|
|
110
|
-
iteration: 1,
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
export const longLocalizedProfile = {
|
|
115
|
-
...completeProfileWithoutFontFamilies,
|
|
116
|
-
visual: {
|
|
117
|
-
...completeProfileWithoutFontFamilies.visual,
|
|
118
|
-
palette: {
|
|
119
|
-
value: {
|
|
120
|
-
bark: "#6d3b2e",
|
|
121
|
-
linen: "#e8ddcf",
|
|
122
|
-
gold: "#c9a24b",
|
|
123
|
-
sage: "#8f9779",
|
|
124
|
-
crimson: "#8a2432",
|
|
125
|
-
slate: "#708090",
|
|
126
|
-
blush: "#ffb6c1",
|
|
127
|
-
ochre: "#cc7722",
|
|
128
|
-
teal: "#008080",
|
|
129
|
-
navy: "#000080",
|
|
130
|
-
coral: "#ff7f50",
|
|
131
|
-
plum: "#dda0dd",
|
|
132
|
-
},
|
|
133
|
-
sourceUrl: "https://estate-verdana.test",
|
|
134
|
-
confidence: 0.9,
|
|
135
|
-
extractionMethod: "firecrawl_branding",
|
|
136
|
-
iteration: 1,
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
identity: {
|
|
140
|
-
...sampleBrandProfile.identity,
|
|
141
|
-
producerName: {
|
|
142
|
-
value: "Cooperativa Vitivinícola de las Laderas Atlánticas de la Toscana",
|
|
143
|
-
sourceUrl: "https://estate-verdana.test",
|
|
144
|
-
confidence: 0.9,
|
|
145
|
-
extractionMethod: "user_manual",
|
|
146
|
-
iteration: 1,
|
|
147
|
-
},
|
|
148
|
-
tagline: {
|
|
149
|
-
value: "Vinos de viñedos antiguos cultivados responsablemente en las colinas costeras durante generaciones",
|
|
150
|
-
sourceUrl: "https://estate-verdana.test",
|
|
151
|
-
confidence: 0.9,
|
|
152
|
-
extractionMethod: "llm_write",
|
|
153
|
-
iteration: 1,
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
export const mobileLongSourceProfile = {
|
|
158
|
-
...completeProfileWithoutFontFamilies,
|
|
159
|
-
visual: {
|
|
160
|
-
...completeProfileWithoutFontFamilies.visual,
|
|
161
|
-
primaryColor: {
|
|
162
|
-
...sampleBrandProfile.visual.primaryColor,
|
|
163
|
-
sourceUrl: "https://a-very-long-brand-source-hostname-that-must-wrap-within-mobile.example.test/brand",
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
export const invalidProfile = invalidBrandProfile;
|
|
168
|
-
export const invalidBrandAssets = [
|
|
169
|
-
{
|
|
170
|
-
id: "bad",
|
|
171
|
-
fileUrl: "https://invalid.example.test/img.png",
|
|
172
|
-
slot: "primary",
|
|
173
|
-
width: 100,
|
|
174
|
-
height: 100,
|
|
175
|
-
fileName: "bad.png",
|
|
176
|
-
mimeType: "image/png",
|
|
177
|
-
fileSize: 1024,
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
id: "bad-light",
|
|
181
|
-
fileUrl: "https://invalid.example.test/light.png",
|
|
182
|
-
slot: "monochrome_light",
|
|
183
|
-
width: 100,
|
|
184
|
-
height: 100,
|
|
185
|
-
fileName: "bad-light.png",
|
|
186
|
-
mimeType: "image/png",
|
|
187
|
-
fileSize: 1024,
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: "bad-dark",
|
|
191
|
-
fileUrl: "https://invalid.example.test/dark.png",
|
|
192
|
-
slot: "monochrome_dark",
|
|
193
|
-
width: 100,
|
|
194
|
-
height: 100,
|
|
195
|
-
fileName: "bad-dark.png",
|
|
196
|
-
mimeType: "image/png",
|
|
197
|
-
fileSize: 1024,
|
|
198
|
-
},
|
|
199
|
-
];
|
|
200
|
-
//# sourceMappingURL=brand-profile-display.story-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-profile-display.story-data.js","sourceRoot":"","sources":["../../src/brand/brand-profile-display.story-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGhG,MAAM,CAAC,MAAM,mBAAmB,GAA0B;IACxD;QACE,EAAE,EAAE,GAAG;QACP,OAAO,EAAE,kCAAkC;QAC3C,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,IAAI;KACf;IACD;QACE,EAAE,EAAE,GAAG;QACP,OAAO,EAAE,kCAAkC;QAC3C,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,IAAI;KACf;IACD;QACE,EAAE,EAAE,GAAG;QACP,OAAO,EAAE,kCAAkC;QAC3C,IAAI,EAAE,iB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Q,EAAE,WAAW;QACrB,QAAQ,EAAE,IAAI;KACf;IACD;QACE,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,uCAAuC;QAChD,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,cAAc;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-profile-review.story-data.d.ts","sourceRoot":"","sources":["../../src/brand/brand-profile-review.story-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAqBjB,eAAO,MAAM,iBAAiB,EAAE,iBA+D/B,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// Vinia — the brand shape from the approved CEL-1275 mockup, so stories match the
|
|
2
|
-
// locked visual reference. Fonts are intentionally unavailable in the browser
|
|
3
|
-
// (they render the "not previewable" badge); the banner is a rehost_failed marker
|
|
4
|
-
// exercising the quiet web-presence failure state (CEL-1273).
|
|
5
|
-
function field(value, extractionMethod = "llm_write", extra = {}) {
|
|
6
|
-
return {
|
|
7
|
-
value,
|
|
8
|
-
sourceUrl: "https://vinia.example",
|
|
9
|
-
confidence: 0.9,
|
|
10
|
-
extractionMethod,
|
|
11
|
-
iteration: 1,
|
|
12
|
-
...extra,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export const viniaBrandProfile = {
|
|
16
|
-
visual: {
|
|
17
|
-
logo: field(null, "firecrawl_branding"),
|
|
18
|
-
primaryColor: field("#8eb908", "firecrawl_branding"),
|
|
19
|
-
secondaryColor: field("#3c763d", "firecrawl_branding"),
|
|
20
|
-
accentColor: field("#8eb908", "firecrawl_branding"),
|
|
21
|
-
// Named palette: only the curated `link` role is promoted to a swatch (the
|
|
22
|
-
// approved mockup's fourth chip), so the visible color count matches the
|
|
23
|
-
// provenance summary (which counts `palette` once).
|
|
24
|
-
palette: field({ link: "#d31900" }, "firecrawl_branding"),
|
|
25
|
-
typography: field({
|
|
26
|
-
fontFamilies: { heading: "Kepler Std Condensed Display", primary: "Kepler Std" },
|
|
27
|
-
}, "firecrawl_branding"),
|
|
28
|
-
faviconUrl: field("https://vinia.example/favicon.png", "html_meta"),
|
|
29
|
-
ogImage: field("https://vinia.example/og.png", "html_meta"),
|
|
30
|
-
bannerImage: field(null, "firecrawl_branding", { assetStatus: "rehost_failed" }),
|
|
31
|
-
},
|
|
32
|
-
identity: {
|
|
33
|
-
producerName: field("Vinia", "firecrawl_branding"),
|
|
34
|
-
tagline: field("We offer quality wines for every taste and budget.", "firecrawl_branding"),
|
|
35
|
-
region: field("Sweden"),
|
|
36
|
-
parentOrganization: field({ name: "Sigva", relationship: "group company" }),
|
|
37
|
-
keyPeople: field([{ name: "Per Engström", role: "Founder" }]),
|
|
38
|
-
contact: field({
|
|
39
|
-
email: "per@vinia.se",
|
|
40
|
-
phone: "+46 735 39 55 55",
|
|
41
|
-
address: "Köpmangatan 15, Stockholm",
|
|
42
|
-
}),
|
|
43
|
-
},
|
|
44
|
-
voice: {
|
|
45
|
-
tone: field("approachable"),
|
|
46
|
-
missionStatement: field("By collaborating with producers who share our values of sustainability, quality, and transparency, we strive to make exceptional wine simple, inspiring, and accessible while enriching the Swedish market with a carefully curated selection."),
|
|
47
|
-
foundingStory: field("When Sweden joined the EU in 1995 and abolished the import monopoly, Sigva was founded, establishing our group's long history of importing directly to restaurants and navigating the evolving retail landscape."),
|
|
48
|
-
keyMessages: field([
|
|
49
|
-
"We deliver high-quality, accessible wines for every taste and budget.",
|
|
50
|
-
"We partner with producers who share our core values of sustainability, quality, and transparency.",
|
|
51
|
-
"We ensure rigorous quality standards through laboratory testing and blind tastings by independent experts.",
|
|
52
|
-
"We tailor our curated portfolio to closely align with current market trends and demands.",
|
|
53
|
-
]),
|
|
54
|
-
},
|
|
55
|
-
values: {
|
|
56
|
-
sustainability: field({
|
|
57
|
-
claims: ["Works with producers who share sustainability, quality and transparency values."],
|
|
58
|
-
certifications: ["Ekologiskt", "Veganskt"],
|
|
59
|
-
}),
|
|
60
|
-
production: field({
|
|
61
|
-
philosophy: "Active collaboration with producers to tailor and align offerings with strategic direction and market trends.",
|
|
62
|
-
methods: [
|
|
63
|
-
"Blind testing by independent wine experts using a 27-point system",
|
|
64
|
-
"Technical assessments performed in a laboratory",
|
|
65
|
-
"Rigorous evaluation of tender compliance and taste profiles",
|
|
66
|
-
],
|
|
67
|
-
}),
|
|
68
|
-
awards: field([]),
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=brand-profile-review.story-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-profile-review.story-data.js","sourceRoot":"","sources":["../../src/brand/brand-profile-review.story-data.ts"],"names":[],"mappings":"AAOA,kFAAkF;AAClF,8EAA8E;AAC9E,kFAAkF;AAClF,8DAA8D;AAC9D,SAAS,KAAK,CACZ,KAAe,EACf,mBAA0C,WAAW,EACrD,QAAuC,EAAE;IAEzC,OAAO;QACL,KAAK;QACL,SAAS,EAAE,uBAAuB;QAClC,UAAU,EAAE,GAAG;QACf,gBAAgB;QAChB,SAAS,EAAE,CAAC;QACZ,GAAG,KAAK;KACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,MAAM,EAAE;QACN,IAAI,EAAE,KAAK,CAAS,IAAI,EAAE,oBAAoB,CAAC;QAC/C,YAAY,EAAE,KAAK,CAAC,SAAS,EAAE,oBAAoB,CAAC;QACpD,cAAc,EAAE,KAAK,CAAC,SAAS,EAAE,oBAAoB,CAAC;QACtD,WAAW,EAAE,KAAK,CAAgB,SAAS,EAAE,oBAAoB,CAAC;QAClE,2EAA2E;QAC3E,yEAAyE;QACzE,oDAAoD;QACpD,OAAO,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE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E,UAAU,CAAC;SAC3C,CAAC;QACF,UAAU,EAAE,KAAK,CAAC;YAChB,UAAU,EACR,+GAA+G;YACjH,OAAO,EAAE;gBACP,mEAAmE;gBACnE,iDAAiD;gBACjD,6DAA6D;aAC9D;SACF,CAAC;QACF,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;KAClB;CACF,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { BrandProfileInput } from "./types.js";
|
|
2
|
-
export declare const CJK_TAGLINE = "\u5730\u57DF\u306E\u7269\u8A9E\u3068\u54C1\u8CEA\u3092\u4E16\u754C\u306E\u98DF\u5353\u3078\u3064\u306A\u3050";
|
|
3
|
-
export declare const CJK_TAGLINE_STORY_PARAMETERS: {
|
|
4
|
-
readonly viewport: {
|
|
5
|
-
readonly viewports: {
|
|
6
|
-
readonly cjk375: {
|
|
7
|
-
readonly name: "375px";
|
|
8
|
-
readonly styles: {
|
|
9
|
-
readonly width: "375px";
|
|
10
|
-
readonly height: "812px";
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
readonly defaultViewport: "cjk375";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare function withCjkTagline(profile: BrandProfileInput): BrandProfileInput;
|
|
18
|
-
export declare function findCjkTaglineSurface(root: ParentNode): HTMLElement | null;
|
|
19
|
-
export declare function expectCjkTaglineSurface(surface: HTMLElement | null): Promise<void>;
|
|
20
|
-
//# sourceMappingURL=brand-tagline-story-fixtures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-tagline-story-fixtures.d.ts","sourceRoot":"","sources":["../../src/brand/brand-tagline-story-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,WAAW,iHAAuB,CAAC;AAEhD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;CAO/B,CAAC;AAYX,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CAS5E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAM1E;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAYxF"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { expect } from "storybook/test";
|
|
2
|
-
export const CJK_TAGLINE = "地域の物語と品質を世界の食卓へつなぐ";
|
|
3
|
-
export const CJK_TAGLINE_STORY_PARAMETERS = {
|
|
4
|
-
viewport: {
|
|
5
|
-
viewports: {
|
|
6
|
-
cjk375: { name: "375px", styles: { width: "375px", height: "812px" } },
|
|
7
|
-
},
|
|
8
|
-
defaultViewport: "cjk375",
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
function field(value) {
|
|
12
|
-
return {
|
|
13
|
-
value,
|
|
14
|
-
sourceUrl: null,
|
|
15
|
-
confidence: 1,
|
|
16
|
-
extractionMethod: "user_manual",
|
|
17
|
-
iteration: 1,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export function withCjkTagline(profile) {
|
|
21
|
-
return {
|
|
22
|
-
...profile,
|
|
23
|
-
identity: {
|
|
24
|
-
...profile.identity,
|
|
25
|
-
producerName: field("Cellar Node"),
|
|
26
|
-
tagline: field(CJK_TAGLINE),
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export function findCjkTaglineSurface(root) {
|
|
31
|
-
return ([...root.querySelectorAll("p")].find((candidate) => candidate.textContent === CJK_TAGLINE) ?? null);
|
|
32
|
-
}
|
|
33
|
-
export async function expectCjkTaglineSurface(surface) {
|
|
34
|
-
await expect(surface).not.toBeNull();
|
|
35
|
-
if (!surface)
|
|
36
|
-
return;
|
|
37
|
-
const chunks = [...surface.querySelectorAll('[data-slot="brand-display-chunk"]')];
|
|
38
|
-
const units = [...surface.querySelectorAll('[data-slot="brand-display-unit"]')];
|
|
39
|
-
await expect(surface.textContent).toBe(CJK_TAGLINE);
|
|
40
|
-
await expect(chunks.length).toBeGreaterThanOrEqual(1);
|
|
41
|
-
await expect(units.length).toBeGreaterThanOrEqual(1);
|
|
42
|
-
await expect(chunks.some((chunk) => chunk.textContent === "食卓へつなぐ")).toBe(true);
|
|
43
|
-
await expect(surface.scrollWidth).toBeLessThanOrEqual(surface.clientWidth);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=brand-tagline-story-fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-tagline-story-fixtures.js","sourceRoot":"","sources":["../../src/brand/brand-tagline-story-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEhD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;SACvE;QACD,eAAe,EAAE,QAAQ;KAC1B;CACO,CAAC;AAEX,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO;QACL,KAAK;QACL,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,aAAa;QAC/B,SAAS,EAAE,CAAC;KACb,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAA0B;IACvD,OAAO;QACL,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,GAAG,OAAO,CAAC,QAAQ;YACnB,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC;YAClC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC;SAC5B;KACF,CAAC;AACJ,CAAC;AA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4
|
-
import type { ImportFetchAdapter, ImportHrefs, ImportHostConfig, ImportRealtimeAdapter } from "./types.js";
|
|
5
|
-
export declare const TEST_JOB_ID = "11111111-1111-1111-1111-1111111111bb";
|
|
6
|
-
export declare const TEST_ORG_ID = "org-1";
|
|
7
|
-
export declare function makeJob(overrides?: Partial<ExtractionJob>): ExtractionJob;
|
|
8
|
-
export declare function makeFetchAdapter(overrides?: Partial<ImportFetchAdapter>): ImportFetchAdapter;
|
|
9
|
-
export declare const testHrefs: ImportHrefs;
|
|
10
|
-
export declare const testHostConfig: ImportHostConfig;
|
|
11
|
-
export declare function newSessionQueryClient(): QueryClient;
|
|
12
|
-
/** Module-level test host so tests don't define a component inside a factory. */
|
|
13
|
-
export declare function SessionTestRoot({ children, fetch, realtime, host, queryClient, }: {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
fetch: ImportFetchAdapter;
|
|
16
|
-
realtime?: ImportRealtimeAdapter;
|
|
17
|
-
host?: Partial<ImportHostConfig>;
|
|
18
|
-
queryClient: QueryClient;
|
|
19
|
-
}): import("react").FunctionComponentElement<import("@tanstack/react-query").QueryClientProviderProps>;
|
|
20
|
-
//# sourceMappingURL=test-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../../src/portfolio-import/session/test-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,wBAAgB,OAAO,CAAC,SAAS,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAoB7E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,kBAAkB,CA2BhG;AAED,eAAO,MAAM,SAAS,EAAE,WAOvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAK5B,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,WAAW,CAInD;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;CAC1B,sGAYA"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
2
|
-
import { createElement } from "react";
|
|
3
|
-
import { ImportHost } from "./import-host.js";
|
|
4
|
-
export const TEST_JOB_ID = "11111111-1111-1111-1111-1111111111bb";
|
|
5
|
-
export const TEST_ORG_ID = "org-1";
|
|
6
|
-
export function makeJob(overrides = {}) {
|
|
7
|
-
const now = new Date().toISOString();
|
|
8
|
-
return {
|
|
9
|
-
id: TEST_JOB_ID,
|
|
10
|
-
orgId: TEST_ORG_ID,
|
|
11
|
-
mode: "catalog",
|
|
12
|
-
status: "processing",
|
|
13
|
-
preflightVerdict: null,
|
|
14
|
-
flaggedCount: 0,
|
|
15
|
-
reviewCompletedAt: null,
|
|
16
|
-
result: null,
|
|
17
|
-
progress: null,
|
|
18
|
-
input: { fileName: "catalog.pdf", mimeType: "application/pdf" },
|
|
19
|
-
error: null,
|
|
20
|
-
createdAt: now,
|
|
21
|
-
updatedAt: now,
|
|
22
|
-
startedAt: now,
|
|
23
|
-
completedAt: null,
|
|
24
|
-
...overrides,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export function makeFetchAdapter(overrides = {}) {
|
|
28
|
-
const job = makeJob();
|
|
29
|
-
return {
|
|
30
|
-
fetchJob: async () => job,
|
|
31
|
-
resumePreflight: async () => ({ ok: true }),
|
|
32
|
-
resumeNudge: async () => ({ ok: true }),
|
|
33
|
-
updateVariant: async () => ({ version: 2 }),
|
|
34
|
-
updateValidation: async () => ({ version: 3 }),
|
|
35
|
-
getVariant: async () => ({ version: 4 }),
|
|
36
|
-
deleteVariant: async () => undefined,
|
|
37
|
-
readinessBatch: async () => ({}),
|
|
38
|
-
listConfirmations: async () => ({
|
|
39
|
-
data: [],
|
|
40
|
-
pagination: { nextCursor: null, hasMore: false },
|
|
41
|
-
}),
|
|
42
|
-
confirmPair: async () => ({ kind: "merged" }),
|
|
43
|
-
dismissPair: async () => undefined,
|
|
44
|
-
fetchBottleJob: async () => null,
|
|
45
|
-
fetchSourceUrl: async () => ({
|
|
46
|
-
url: "https://example.test/doc.pdf",
|
|
47
|
-
expiresAt: new Date(Date.now() + 60_000).toISOString(),
|
|
48
|
-
}),
|
|
49
|
-
upload: async () => ({ jobId: TEST_JOB_ID }),
|
|
50
|
-
listPortfolios: async () => [{ id: "p-1", name: "Default", isDefault: true }],
|
|
51
|
-
createPortfolio: async ({ name }) => ({ id: "p-new", name }),
|
|
52
|
-
...overrides,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export const testHrefs = {
|
|
56
|
-
job: (id) => `/imports/${id}`,
|
|
57
|
-
hub: "/imports",
|
|
58
|
-
portfolio: (id) => (id ? `/portfolio/${id}` : "/portfolio"),
|
|
59
|
-
product: (portfolioId, productId) => `/portfolio/${portfolioId}/products/${productId}`,
|
|
60
|
-
confirmations: "/confirmations",
|
|
61
|
-
bottlePhotos: "/bottle-photos",
|
|
62
|
-
};
|
|
63
|
-
export const testHostConfig = {
|
|
64
|
-
t: (_key, fallback) => fallback ?? _key,
|
|
65
|
-
orgId: TEST_ORG_ID,
|
|
66
|
-
navigate: () => { },
|
|
67
|
-
toast: () => { },
|
|
68
|
-
};
|
|
69
|
-
export function newSessionQueryClient() {
|
|
70
|
-
return new QueryClient({
|
|
71
|
-
defaultOptions: { queries: { retry: false }, mutations: { retry: false } },
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
/** Module-level test host so tests don't define a component inside a factory. */
|
|
75
|
-
export function SessionTestRoot({ children, fetch, realtime, host, queryClient, }) {
|
|
76
|
-
return createElement(QueryClientProvider, { client: queryClient }, createElement(ImportHost, {
|
|
77
|
-
fetch,
|
|
78
|
-
hrefs: testHrefs,
|
|
79
|
-
host: { ...testHostConfig, ...host },
|
|
80
|
-
realtime,
|
|
81
|
-
children,
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=test-helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.js","sourceRoot":"","sources":["../../../src/portfolio-import/session/test-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,MAAM,CAAC,MAAM,WAAW,GAAG,sCAAsC,CAAC;AAClE,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,MAAM,UAAU,OAAO,CAAC,YAAoC,EAAE;IAC5D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrC,OAAO;QACL,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,YAAY;QACpB,gBAAgB,EAAE,IAAI;QACtB,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,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