@tangle-network/agent-app 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DesignCanvas-AOIVN3SJ.js +12 -0
- package/dist/DesignCanvasEditor-TN7CWUJW.js +13 -0
- package/dist/{TimelineEditor-JDG54OBP.js → TimelineEditor-Z7C6BFP5.js} +2 -2
- package/dist/{apply-Cp8c3K9D.d.ts → apply-Gk4raT2j.d.ts} +3 -1
- package/dist/brand-extraction/index.d.ts +212 -0
- package/dist/brand-extraction/index.js +446 -0
- package/dist/brand-extraction/index.js.map +1 -0
- package/dist/{chunk-AFDROJ64.js → chunk-2QI7XV2T.js} +1 -1
- package/dist/chunk-2QI7XV2T.js.map +1 -0
- package/dist/{chunk-LUE4HO5C.js → chunk-4IQMTTNE.js} +10 -10
- package/dist/chunk-4IQMTTNE.js.map +1 -0
- package/dist/{chunk-FSUR2752.js → chunk-7I37CO5D.js} +274 -388
- package/dist/chunk-7I37CO5D.js.map +1 -0
- package/dist/{chunk-5RT6KY4G.js → chunk-GQRL6VNU.js} +1 -1
- package/dist/chunk-GQRL6VNU.js.map +1 -0
- package/dist/{chunk-SCG5JJ4C.js → chunk-HFC4BTWJ.js} +32 -4
- package/dist/chunk-HFC4BTWJ.js.map +1 -0
- package/dist/{chunk-7QCIYDGC.js → chunk-IOREXWLM.js} +2 -2
- package/dist/chunk-J7JNV5BH.js +14 -0
- package/dist/chunk-J7JNV5BH.js.map +1 -0
- package/dist/{chunk-6UOE5CTA.js → chunk-JT6HHO5P.js} +5 -10
- package/dist/chunk-JT6HHO5P.js.map +1 -0
- package/dist/{chunk-JZAJE3JL.js → chunk-M2EBUDZ7.js} +19 -5
- package/dist/chunk-M2EBUDZ7.js.map +1 -0
- package/dist/{chunk-RJ2ZHK5D.js → chunk-S6WS2B32.js} +132 -7
- package/dist/chunk-S6WS2B32.js.map +1 -0
- package/dist/chunk-SQV7NUEM.js +136 -0
- package/dist/chunk-SQV7NUEM.js.map +1 -0
- package/dist/chunk-UAKFCMWK.js +1 -0
- package/dist/chunk-UAKFCMWK.js.map +1 -0
- package/dist/chunk-V5XZKHCL.js +296 -0
- package/dist/chunk-V5XZKHCL.js.map +1 -0
- package/dist/chunk-XWJXZ6WE.js +604 -0
- package/dist/chunk-XWJXZ6WE.js.map +1 -0
- package/dist/chunk-Y2SZVW35.js +125 -0
- package/dist/chunk-Y2SZVW35.js.map +1 -0
- package/dist/{chunk-LPAVBGVY.js → chunk-YEWTVDDT.js} +399 -860
- package/dist/chunk-YEWTVDDT.js.map +1 -0
- package/dist/{chunk-UDXMR3AD.js → chunk-YNALYIQ3.js} +56 -18
- package/dist/chunk-YNALYIQ3.js.map +1 -0
- package/dist/command-stack-CkjelfK_.d.ts +267 -0
- package/dist/design-canvas/drizzle.d.ts +2 -2
- package/dist/design-canvas/index.d.ts +7 -6
- package/dist/design-canvas/index.js +3 -2
- package/dist/design-canvas-react/engine.d.ts +349 -0
- package/dist/design-canvas-react/engine.js +86 -0
- package/dist/design-canvas-react/engine.js.map +1 -0
- package/dist/design-canvas-react/index.d.ts +80 -618
- package/dist/design-canvas-react/index.js +85 -172
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.d.ts +6 -0
- package/dist/design-canvas-react/lazy.js +9 -0
- package/dist/design-canvas-react/lazy.js.map +1 -0
- package/dist/{export-presets-Dl5Aa5xj.d.ts → export-presets-DAsU5Wal.d.ts} +2 -143
- package/dist/flow-types-Cb_AblZs.d.ts +25 -0
- package/dist/index.d.ts +11 -8
- package/dist/index.js +21 -8
- package/dist/lazy-BHHqS8-j.d.ts +72 -0
- package/dist/missions/index.d.ts +12 -0
- package/dist/missions/index.js +1 -1
- package/dist/{model-BHLN208Z.d.ts → model-BBwyOuWG.d.ts} +3 -1
- package/dist/operations-DLIvvD00.d.ts +144 -0
- package/dist/platform/index.js +1 -1
- package/dist/runtime/index.d.ts +33 -33
- package/dist/runtime/index.js +1 -1
- package/dist/sequences/index.d.ts +1 -1
- package/dist/sequences/index.js +2 -1
- package/dist/sequences-react/index.d.ts +15 -1
- package/dist/sequences-react/index.js +2 -2
- package/dist/{store-CUStmtdH.d.ts → store-CFyxgTlD.d.ts} +1 -1
- package/dist/theme/index.d.ts +80 -0
- package/dist/theme/index.js +14 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/tailwind-preset.d.ts +65 -0
- package/dist/theme/tailwind-preset.js +33 -0
- package/dist/theme/tailwind-preset.js.map +1 -0
- package/dist/theme/tokens.css +95 -0
- package/dist/trace/index.d.ts +2 -18
- package/dist/trace/index.js +2 -2
- package/dist/web/index.d.ts +25 -2
- package/dist/web/index.js +3 -1
- package/dist/web-react/index.d.ts +71 -31
- package/dist/web-react/index.js +625 -486
- package/dist/web-react/index.js.map +1 -1
- package/package.json +33 -3
- package/dist/DesignCanvas-MA5EH324.js +0 -10
- package/dist/DesignCanvasEditor-YLCO7I5I.js +0 -9
- package/dist/chunk-5RT6KY4G.js.map +0 -1
- package/dist/chunk-6UOE5CTA.js.map +0 -1
- package/dist/chunk-AFDROJ64.js.map +0 -1
- package/dist/chunk-FSUR2752.js.map +0 -1
- package/dist/chunk-JZAJE3JL.js.map +0 -1
- package/dist/chunk-LPAVBGVY.js.map +0 -1
- package/dist/chunk-LUE4HO5C.js.map +0 -1
- package/dist/chunk-RJ2ZHK5D.js.map +0 -1
- package/dist/chunk-SCG5JJ4C.js.map +0 -1
- package/dist/chunk-UDXMR3AD.js.map +0 -1
- /package/dist/{DesignCanvas-MA5EH324.js.map → DesignCanvas-AOIVN3SJ.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-YLCO7I5I.js.map → DesignCanvasEditor-TN7CWUJW.js.map} +0 -0
- /package/dist/{TimelineEditor-JDG54OBP.js.map → TimelineEditor-Z7C6BFP5.js.map} +0 -0
- /package/dist/{chunk-7QCIYDGC.js.map → chunk-IOREXWLM.js.map} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DesignCanvas,
|
|
3
|
+
DesignCanvas_default
|
|
4
|
+
} from "./chunk-YEWTVDDT.js";
|
|
5
|
+
import "./chunk-XWJXZ6WE.js";
|
|
6
|
+
import "./chunk-M2EBUDZ7.js";
|
|
7
|
+
import "./chunk-HFC4BTWJ.js";
|
|
8
|
+
export {
|
|
9
|
+
DesignCanvas,
|
|
10
|
+
DesignCanvas_default as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=DesignCanvas-AOIVN3SJ.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DesignCanvasEditor
|
|
3
|
+
} from "./chunk-7I37CO5D.js";
|
|
4
|
+
import "./chunk-YEWTVDDT.js";
|
|
5
|
+
import "./chunk-V5XZKHCL.js";
|
|
6
|
+
import "./chunk-XWJXZ6WE.js";
|
|
7
|
+
import "./chunk-M2EBUDZ7.js";
|
|
8
|
+
import "./chunk-Y2SZVW35.js";
|
|
9
|
+
import "./chunk-HFC4BTWJ.js";
|
|
10
|
+
export {
|
|
11
|
+
DesignCanvasEditor
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=DesignCanvasEditor-TN7CWUJW.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
SEQUENCE_MEDIA_DRAG_TYPE,
|
|
3
3
|
TimelineEditor,
|
|
4
4
|
TimelineEditor_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S6WS2B32.js";
|
|
6
6
|
import "./chunk-ZYBWGSAZ.js";
|
|
7
7
|
export {
|
|
8
8
|
SEQUENCE_MEDIA_DRAG_TYPE,
|
|
9
9
|
TimelineEditor,
|
|
10
10
|
TimelineEditor_default as default
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=TimelineEditor-
|
|
12
|
+
//# sourceMappingURL=TimelineEditor-Z7C6BFP5.js.map
|
|
@@ -192,7 +192,9 @@ declare function lastClipEndFrame(timeline: SequenceTimeline): number;
|
|
|
192
192
|
/** Media references must be provider URLs or app-served paths. Local sandbox
|
|
193
193
|
* artifacts (file:, data:, /tmp/, /home/) are rejected because they are
|
|
194
194
|
* unreachable from the product and signal an agent substituting local ffmpeg
|
|
195
|
-
* output for real provider generation.
|
|
195
|
+
* output for real provider generation. Delegates to the canonical
|
|
196
|
+
* `assertMediaUrl` boundary in `../web` — sequences and design-canvas share ONE
|
|
197
|
+
* rule so the two surfaces cannot drift on what counts as a reachable url. */
|
|
196
198
|
declare function assertSequenceMediaUrl(url: string): void;
|
|
197
199
|
|
|
198
200
|
/**
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed contract for a brand kit extracted from a website (+ optional shared
|
|
3
|
+
* source files). The extractor degrades gracefully: every field is best-effort,
|
|
4
|
+
* absence is represented explicitly (empty arrays, undefined), never faked.
|
|
5
|
+
*
|
|
6
|
+
* A consuming product (gtm, creative) maps this onto its own durable brand
|
|
7
|
+
* store — see the gtm `WorkspaceBrand`. This module owns only extraction; it
|
|
8
|
+
* does NOT persist, render, or judge confidence.
|
|
9
|
+
*/
|
|
10
|
+
/** A logo / brand-mark candidate discovered on a page. */
|
|
11
|
+
interface BrandLogoCandidate {
|
|
12
|
+
/** Absolute URL to the asset. */
|
|
13
|
+
url: string;
|
|
14
|
+
/** Where it came from — drives ranking and lets callers cite provenance. */
|
|
15
|
+
source: 'favicon' | 'apple-touch-icon' | 'og:image' | 'img-logo' | 'svg-inline' | 'manifest';
|
|
16
|
+
/** Higher = more likely the canonical logo. 0..1. */
|
|
17
|
+
confidence: number;
|
|
18
|
+
/** Declared width in px when known (from <link sizes> or <img width>). */
|
|
19
|
+
width?: number;
|
|
20
|
+
/** Declared height in px when known. */
|
|
21
|
+
height?: number;
|
|
22
|
+
/** MIME type when inferable from the extension. */
|
|
23
|
+
mimeType?: string;
|
|
24
|
+
/** alt / title text when present — a "logo" alt is a strong signal. */
|
|
25
|
+
alt?: string;
|
|
26
|
+
}
|
|
27
|
+
/** A color extracted from the page, with where it was seen. */
|
|
28
|
+
interface BrandColor {
|
|
29
|
+
/** Normalized 6- or 8-digit `#rrggbb` / `#rrggbbaa` hex (lowercase). */
|
|
30
|
+
hex: string;
|
|
31
|
+
/** How many distinct declarations referenced this color (popularity proxy). */
|
|
32
|
+
occurrences: number;
|
|
33
|
+
/** True when sourced from a `:root` CSS custom property (highest fidelity). */
|
|
34
|
+
fromToken: boolean;
|
|
35
|
+
/** The custom-property name when fromToken (e.g. `--accent`). */
|
|
36
|
+
tokenName?: string;
|
|
37
|
+
}
|
|
38
|
+
/** A font-family discovered in CSS, with role inference. */
|
|
39
|
+
interface BrandFont {
|
|
40
|
+
/** Primary family name, unquoted (e.g. `Inter`, `Playfair Display`). */
|
|
41
|
+
family: string;
|
|
42
|
+
/** The full declared stack as written, in order. */
|
|
43
|
+
stack: string[];
|
|
44
|
+
/** Inferred role from the selector the declaration was attached to. */
|
|
45
|
+
role: 'display' | 'body' | 'unknown';
|
|
46
|
+
/** Declaration count — popularity proxy for picking the dominant family. */
|
|
47
|
+
occurrences: number;
|
|
48
|
+
}
|
|
49
|
+
/** A prominent product / hero image candidate (not a logo). */
|
|
50
|
+
interface BrandImage {
|
|
51
|
+
url: string;
|
|
52
|
+
source: 'og:image' | 'twitter:image' | 'img-hero' | 'img-content';
|
|
53
|
+
/** alt text when present. */
|
|
54
|
+
alt?: string;
|
|
55
|
+
width?: number;
|
|
56
|
+
height?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The full extracted kit. The shape every consumer reads. Each list is ranked
|
|
60
|
+
* best-first; empty lists mean "found nothing", never a fabricated default.
|
|
61
|
+
*/
|
|
62
|
+
interface BrandKit {
|
|
63
|
+
/** The site the kit was extracted from (normalized, absolute). */
|
|
64
|
+
sourceUrl: string;
|
|
65
|
+
/** Best-guess brand / product name from <title>, og:site_name, manifest. */
|
|
66
|
+
name?: string;
|
|
67
|
+
/** Tagline / description from meta description or og:description. */
|
|
68
|
+
description?: string;
|
|
69
|
+
/** Logo candidates, ranked best-first. */
|
|
70
|
+
logos: BrandLogoCandidate[];
|
|
71
|
+
/** Colors, ranked by token-first then popularity. */
|
|
72
|
+
palette: BrandColor[];
|
|
73
|
+
/** Fonts, ranked display-then-body then popularity. */
|
|
74
|
+
fonts: BrandFont[];
|
|
75
|
+
/** Prominent images (hero / og), ranked best-first. */
|
|
76
|
+
images: BrandImage[];
|
|
77
|
+
/** Absolute URLs / labels the kit was derived from — for provenance. */
|
|
78
|
+
extractedFrom: string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Typed outcome. Callers MUST inspect `succeeded` before reading `kit`.
|
|
82
|
+
* No silent empties: a fetch failure is `succeeded:false` with a real error,
|
|
83
|
+
* NOT an empty BrandKit that downstream code mistakes for "this brand has
|
|
84
|
+
* nothing".
|
|
85
|
+
*/
|
|
86
|
+
type BrandExtractionResult = {
|
|
87
|
+
succeeded: true;
|
|
88
|
+
kit: BrandKit;
|
|
89
|
+
warnings: string[];
|
|
90
|
+
} | {
|
|
91
|
+
succeeded: false;
|
|
92
|
+
error: string;
|
|
93
|
+
stage: 'fetch' | 'parse' | 'input';
|
|
94
|
+
};
|
|
95
|
+
/** Fetch boundary, injectable so callers (Workers, Node, tests) supply their
|
|
96
|
+
* own fetch and so tests can run fully offline against fixture HTML. */
|
|
97
|
+
type FetchLike = (url: string, init?: {
|
|
98
|
+
signal?: AbortSignal;
|
|
99
|
+
headers?: Record<string, string>;
|
|
100
|
+
}) => Promise<{
|
|
101
|
+
ok: boolean;
|
|
102
|
+
status: number;
|
|
103
|
+
text(): Promise<string>;
|
|
104
|
+
headers?: {
|
|
105
|
+
get(name: string): string | null;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
interface ExtractBrandKitOptions {
|
|
109
|
+
/** Raw HTML for the page. When supplied, no network fetch happens — used by
|
|
110
|
+
* tests and by callers that already hold the HTML. */
|
|
111
|
+
html?: string;
|
|
112
|
+
/** Fetch implementation. Required when `html` is omitted. */
|
|
113
|
+
fetchImpl?: FetchLike;
|
|
114
|
+
/** Per-request timeout in ms (default 15000). Applied to the page fetch. */
|
|
115
|
+
timeoutMs?: number;
|
|
116
|
+
/** Cap on each ranked list (default 12). Keeps payloads bounded. */
|
|
117
|
+
maxPerList?: number;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Brand-kit extraction engine.
|
|
122
|
+
*
|
|
123
|
+
* Given a website URL (or raw HTML), parse the page and pull a typed BrandKit:
|
|
124
|
+
* logo candidates, color palette, fonts, and prominent images. Parsing is
|
|
125
|
+
* regex-based on purpose — this runs on Cloudflare Workers and other edge
|
|
126
|
+
* runtimes where DOM libraries (jsdom/cheerio) are unavailable, and the page
|
|
127
|
+
* structures we read (link tags, meta tags, CSS custom properties, font-family
|
|
128
|
+
* declarations) are flat enough that a DOM buys nothing.
|
|
129
|
+
*
|
|
130
|
+
* Degrades gracefully: a missing favicon, no CSS tokens, or an image-only page
|
|
131
|
+
* each narrow the kit rather than failing it. The ONLY hard failures are a bad
|
|
132
|
+
* input (no html and no fetch) and a fetch error — both returned as a typed
|
|
133
|
+
* `{ succeeded: false }` outcome so callers never mistake an empty kit for a
|
|
134
|
+
* real one.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/** Normalize a user-supplied site URL: add https:// when scheme-less, validate. */
|
|
138
|
+
declare function normalizeSiteUrl(raw: string): string | null;
|
|
139
|
+
/** Normalize any CSS color literal to #rrggbb / #rrggbbaa hex, or null. */
|
|
140
|
+
declare function normalizeColor(raw: string): string | null;
|
|
141
|
+
/** Parse already-fetched HTML into a BrandKit. Pure — no network. Exposed so
|
|
142
|
+
* callers that hold the HTML (or want to combine multiple pages) can reuse the
|
|
143
|
+
* parsing without re-fetching. */
|
|
144
|
+
declare function parseBrandKit(html: string, sourceUrl: string, maxPerList?: number): BrandKit;
|
|
145
|
+
/**
|
|
146
|
+
* Fetch a website (or use supplied HTML) and extract its BrandKit.
|
|
147
|
+
*
|
|
148
|
+
* Returns a typed outcome — callers MUST check `succeeded`. A fetch failure or
|
|
149
|
+
* empty input is a real, surfaced error, never an empty kit masquerading as a
|
|
150
|
+
* result. Parsing itself never throws: a malformed page yields a sparse kit
|
|
151
|
+
* with warnings, which is information, not failure.
|
|
152
|
+
*/
|
|
153
|
+
declare function extractBrandKit(url: string, options?: ExtractBrandKitOptions): Promise<BrandExtractionResult>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Pure mapping helpers from an extracted BrandKit onto consumable shapes.
|
|
157
|
+
*
|
|
158
|
+
* Extraction yields ranked candidate lists; products need decided roles
|
|
159
|
+
* (background vs accent, display vs body). These helpers make the obvious,
|
|
160
|
+
* defensible default choice and expose the reasoning so a confirmation UI can
|
|
161
|
+
* show "we picked X — change it?". They NEVER invent a value: when a role can't
|
|
162
|
+
* be filled from the kit, it is omitted, and the caller decides the fallback.
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/** Relative luminance (0..1) of an #rrggbb(aa) hex — for light/dark sorting. */
|
|
166
|
+
declare function luminance(hex: string): number;
|
|
167
|
+
interface DecidedPalette {
|
|
168
|
+
/** Lightest neutral — page background. */
|
|
169
|
+
background?: string;
|
|
170
|
+
/** A raised neutral one step from background. */
|
|
171
|
+
surface?: string;
|
|
172
|
+
/** Darkest readable color — primary text. */
|
|
173
|
+
textPrimary?: string;
|
|
174
|
+
/** Mid-tone neutral — secondary text. */
|
|
175
|
+
textSecondary?: string;
|
|
176
|
+
/** Most saturated / popular brand color — accent. */
|
|
177
|
+
accent?: string;
|
|
178
|
+
/** Readable text color to sit on the accent (black or white by contrast). */
|
|
179
|
+
accentText?: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Assign palette roles from the ranked colors. Heuristic, not authoritative —
|
|
183
|
+
* a confirmation step should let the user correct it. Roles only appear when
|
|
184
|
+
* the kit actually contained a color that fits.
|
|
185
|
+
*/
|
|
186
|
+
declare function decidePalette(palette: BrandColor[]): DecidedPalette;
|
|
187
|
+
interface DecidedFonts {
|
|
188
|
+
display?: BrandFont;
|
|
189
|
+
body?: BrandFont;
|
|
190
|
+
}
|
|
191
|
+
/** Pick a display and body font from the ranked list. When only one usable
|
|
192
|
+
* font exists it fills both roles — a single-typeface brand is valid. */
|
|
193
|
+
declare function decideFonts(fonts: BrandFont[]): DecidedFonts;
|
|
194
|
+
/** Everything a confirmation step needs from a kit, with roles decided. */
|
|
195
|
+
interface DecidedBrandKit {
|
|
196
|
+
name?: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
sourceUrl: string;
|
|
199
|
+
palette: DecidedPalette;
|
|
200
|
+
fonts: DecidedFonts;
|
|
201
|
+
/** Best logo URL, when any candidate was found. */
|
|
202
|
+
primaryLogoUrl?: string;
|
|
203
|
+
/** All logo URLs, ranked. */
|
|
204
|
+
logoUrls: string[];
|
|
205
|
+
/** Prominent image URLs, ranked. */
|
|
206
|
+
imageUrls: string[];
|
|
207
|
+
extractedFrom: string[];
|
|
208
|
+
}
|
|
209
|
+
/** Collapse a raw BrandKit into decided roles — the shape a product persists. */
|
|
210
|
+
declare function decideBrandKit(kit: BrandKit): DecidedBrandKit;
|
|
211
|
+
|
|
212
|
+
export { type BrandColor, type BrandExtractionResult, type BrandFont, type BrandImage, type BrandKit, type BrandLogoCandidate, type DecidedBrandKit, type DecidedFonts, type DecidedPalette, type ExtractBrandKitOptions, type FetchLike, decideBrandKit, decideFonts, decidePalette, extractBrandKit, luminance, normalizeColor, normalizeSiteUrl, parseBrandKit };
|