@ramme-io/ui 4.2.9 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +3 -9
  2. package/bin/ramme-ui.mjs +364 -0
  3. package/dist/blocks/iot/DeviceCard.d.ts +5 -0
  4. package/dist/blocks/iot/DeviceCard.js +29 -28
  5. package/dist/component-registry.js +384 -409
  6. package/dist/components/ai/AIChatThread/AIChatThread.d.ts +10 -2
  7. package/dist/components/ai/AIChatThread/AIChatThread.js +106 -119
  8. package/dist/components/ai/cardState.d.ts +19 -0
  9. package/dist/components/data-display/DocumentScanView.d.ts +81 -0
  10. package/dist/components/data-display/DocumentScanView.js +79 -0
  11. package/dist/components/data-display/Gallery.d.ts +49 -0
  12. package/dist/components/data-display/Gallery.js +95 -0
  13. package/dist/components/theme/ThemeSynthesizer.d.ts +2 -0
  14. package/dist/components/theme/ThemeSynthesizer.js +16 -15
  15. package/dist/components/ui/icon-loader.d.ts +1 -1
  16. package/dist/contexts/ThemeContext.d.ts +3 -0
  17. package/dist/contexts/ThemeContext.js +32 -30
  18. package/dist/index.d.ts +4 -9
  19. package/dist/index.js +252 -265
  20. package/dist/wizardManifest.js +123 -166
  21. package/package.json +7 -3
  22. package/src/wizardManifest.ts +123 -166
  23. package/tailwind.preset.js +17 -0
  24. package/dist/blocks/engines/WatchlistEngine.d.ts +0 -37
  25. package/dist/blocks/engines/WatchlistEngine.js +0 -130
  26. package/dist/components/ai/ArchitectureReferenceCard/ArchitectureReferenceCard.d.ts +0 -28
  27. package/dist/components/ai/ArchitectureReferenceCard/ArchitectureReferenceCard.js +0 -71
  28. package/dist/components/ai/ArchitectureReferenceCard/index.d.ts +0 -2
  29. package/dist/components/ai/CompanyProfileCard/CompanyProfileCard.d.ts +0 -15
  30. package/dist/components/ai/CompanyProfileCard/CompanyProfileCard.js +0 -110
  31. package/dist/components/ai/CompanyProfileCard/index.d.ts +0 -1
  32. package/dist/components/ai/CounterpartyGraphCard/CounterpartyGraphCard.d.ts +0 -30
  33. package/dist/components/ai/CounterpartyGraphCard/CounterpartyGraphCard.js +0 -83
  34. package/dist/components/ai/CounterpartyGraphCard/index.d.ts +0 -2
  35. package/dist/components/ai/DivergenceMetricsCard/DivergenceMetricsCard.d.ts +0 -29
  36. package/dist/components/ai/DivergenceMetricsCard/DivergenceMetricsCard.js +0 -70
  37. package/dist/components/ai/DivergenceMetricsCard/index.d.ts +0 -2
  38. package/dist/components/ai/LiveQuoteCard/LiveQuoteCard.d.ts +0 -27
  39. package/dist/components/ai/LiveQuoteCard/LiveQuoteCard.js +0 -73
  40. package/dist/components/ai/LiveQuoteCard/index.d.ts +0 -2
  41. package/dist/components/ai/NewsSummaryCard/NewsSummaryCard.d.ts +0 -27
  42. package/dist/components/ai/NewsSummaryCard/NewsSummaryCard.js +0 -78
  43. package/dist/components/ai/NewsSummaryCard/index.d.ts +0 -2
  44. package/dist/components/ai/StockChart/StockChart.d.ts +0 -34
  45. package/dist/components/ai/StockChart/StockChart.js +0 -199
  46. package/dist/components/ai/StockChart/index.d.ts +0 -2
  47. package/dist/utils/apiBaseUrl.d.ts +0 -1
  48. package/dist/utils/apiBaseUrl.js +0 -10
@@ -235,27 +235,6 @@ export const wizardManifest: WizardManifest = {
235
235
  "humanLabel": "PromptInput",
236
236
  "humanDescription": "A specialized input field for users to type and submit prompts, including a send button."
237
237
  },
238
- {
239
- "id": "watchlist-engine",
240
- "name": "WatchlistEngine",
241
- "version": "1.0.0",
242
- "description": "A self-contained financial watchlist showing tickers with live price, day change, market cap, and a risk grade. Strategic purpose: a worked reference for a schema-validated data block — rows are parsed through FinancialAssetSchema before render, so malformed feed data is rejected at the boundary rather than crashing the table.",
243
- "tags": [
244
- "engines",
245
- "finance",
246
- "watchlist",
247
- "table",
248
- "market",
249
- "block"
250
- ],
251
- "category": "blocks",
252
- "props": [],
253
- "importPath": "./blocks/engines/WatchlistEngine",
254
- "filePath": "src/blocks/engines/WatchlistEngine.tsx",
255
- "sku": "@molecule/block/watchlist-engine",
256
- "humanLabel": "WatchlistEngine",
257
- "humanDescription": "A self-contained financial watchlist showing tickers with live price, day change, market cap, and a risk grade. Strategic purpose: a worked reference for a schema-validated data block — rows are parsed through FinancialAssetSchema before render, so malformed feed data is rejected at the boundary rather than crashing the table."
258
- },
259
238
  {
260
239
  "id": "telemetry-log",
261
240
  "name": "TelemetryLog",
@@ -402,91 +381,6 @@ export const wizardManifest: WizardManifest = {
402
381
  "humanLabel": "AIChatThread",
403
382
  "humanDescription": "A complete chat surface — message history, streaming indicator, error banner, provider/model attribution, and the composer. Strategic purpose: the presentational half of a chat feature, driven entirely by props from kernel's useRammeAI(). It holds no transport of its own, and takes a `renderMessage` override so products can add markdown or rich rendering without pulling those deps into @ramme-io/ui."
404
383
  },
405
- {
406
- "id": "architecture-reference-card",
407
- "name": "ArchitectureReferenceCard",
408
- "version": "1.0.0",
409
- "description": "AI-generated card summarizing this platform's own data architecture — stack, data model, AI pipelines, and sentinel fleet",
410
- "tags": [
411
- "ai",
412
- "architecture",
413
- "reference",
414
- "generative-ui"
415
- ],
416
- "category": "ai",
417
- "props": [],
418
- "importPath": "./components/ai/ArchitectureReferenceCard/ArchitectureReferenceCard",
419
- "filePath": "src/components/ai/ArchitectureReferenceCard/ArchitectureReferenceCard.tsx",
420
- "sku": "@molecule/ai/architecture-reference-card",
421
- "humanLabel": "ArchitectureReferenceCard",
422
- "humanDescription": "AI-generated card summarizing this platform's own data architecture — stack, data model, AI pipelines, and sentinel fleet"
423
- },
424
- {
425
- "id": "company-profile-card",
426
- "name": "CompanyProfileCard",
427
- "version": "1.0.0",
428
- "description": "A company summary for a ticker — sector, industry, and description — fetched on demand and cached. Strategic purpose: a generative-UI block an AI tool call can render directly into a chat thread. Surfaces its own provenance, distinguishing a live fetch from a cached or stale answer instead of presenting all three as equally fresh.",
429
- "tags": [
430
- "ai",
431
- "finance",
432
- "company",
433
- "profile",
434
- "card",
435
- "generative-ui"
436
- ],
437
- "category": "ai",
438
- "props": [
439
- {
440
- "name": "ticker",
441
- "type": "string",
442
- "description": "The symbol to profile, e.g. 'AAPL'."
443
- }
444
- ],
445
- "importPath": "./components/ai/CompanyProfileCard/CompanyProfileCard",
446
- "filePath": "src/components/ai/CompanyProfileCard/CompanyProfileCard.tsx",
447
- "sku": "@molecule/ai/company-profile-card",
448
- "humanLabel": "CompanyProfileCard",
449
- "humanDescription": "A company summary for a ticker — sector, industry, and description — fetched on demand and cached. Strategic purpose: a generative-UI block an AI tool call can render directly into a chat thread. Surfaces its own provenance, distinguishing a live fetch from a cached or stale answer instead of presenting all three as equally fresh."
450
- },
451
- {
452
- "id": "counterparty-graph-card",
453
- "name": "CounterpartyGraphCard",
454
- "version": "1.0.0",
455
- "description": "AI-generated counterparty relationship card showing suppliers, customers, partners, and competitors inferred from alternative signals",
456
- "tags": [
457
- "ai",
458
- "counterparty",
459
- "graph",
460
- "relationships",
461
- "generative-ui"
462
- ],
463
- "category": "ai",
464
- "props": [],
465
- "importPath": "./components/ai/CounterpartyGraphCard/CounterpartyGraphCard",
466
- "filePath": "src/components/ai/CounterpartyGraphCard/CounterpartyGraphCard.tsx",
467
- "sku": "@molecule/ai/counterparty-graph-card",
468
- "humanLabel": "CounterpartyGraphCard",
469
- "humanDescription": "AI-generated counterparty relationship card showing suppliers, customers, partners, and competitors inferred from alternative signals"
470
- },
471
- {
472
- "id": "divergence-metrics-card",
473
- "name": "DivergenceMetricsCard",
474
- "version": "1.0.0",
475
- "description": "AI-generated card showing operational and customer divergence scores — a signed delta between expected and observed performance",
476
- "tags": [
477
- "ai",
478
- "divergence",
479
- "metrics",
480
- "generative-ui"
481
- ],
482
- "category": "ai",
483
- "props": [],
484
- "importPath": "./components/ai/DivergenceMetricsCard/DivergenceMetricsCard",
485
- "filePath": "src/components/ai/DivergenceMetricsCard/DivergenceMetricsCard.tsx",
486
- "sku": "@molecule/ai/divergence-metrics-card",
487
- "humanLabel": "DivergenceMetricsCard",
488
- "humanDescription": "AI-generated card showing operational and customer divergence scores — a signed delta between expected and observed performance"
489
- },
490
384
  {
491
385
  "id": "key-injection-overlay",
492
386
  "name": "KeyInjectionOverlay",
@@ -519,65 +413,6 @@ export const wizardManifest: WizardManifest = {
519
413
  "humanLabel": "KeyInjectionOverlay",
520
414
  "humanDescription": "Blocks the app and collects an AI provider key when the gateway reports one is missing or expired. Strategic purpose: the BYOK prompt, in one place, so a key request looks the same everywhere and never becomes an inline form somebody rebuilds per feature. Renders nothing unless status is 'BYOK_REQUIRED' or 'KEY_EXPIRED', so it can stay mounted at the shell level."
521
415
  },
522
- {
523
- "id": "live-quote-card",
524
- "name": "LiveQuoteCard",
525
- "version": "1.0.0",
526
- "description": "AI-generated live stock quote card with real-time price data",
527
- "tags": [
528
- "ai",
529
- "stocks",
530
- "quote",
531
- "real-time",
532
- "generative-ui"
533
- ],
534
- "category": "ai",
535
- "props": [],
536
- "importPath": "./components/ai/LiveQuoteCard/LiveQuoteCard",
537
- "filePath": "src/components/ai/LiveQuoteCard/LiveQuoteCard.tsx",
538
- "sku": "@molecule/ai/live-quote-card",
539
- "humanLabel": "LiveQuoteCard",
540
- "humanDescription": "AI-generated live stock quote card with real-time price data"
541
- },
542
- {
543
- "id": "news-summary-card",
544
- "name": "NewsSummaryCard",
545
- "version": "1.0.0",
546
- "description": "AI-generated news summary card with recent headlines",
547
- "tags": [
548
- "ai",
549
- "news",
550
- "sentiment",
551
- "generative-ui"
552
- ],
553
- "category": "ai",
554
- "props": [],
555
- "importPath": "./components/ai/NewsSummaryCard/NewsSummaryCard",
556
- "filePath": "src/components/ai/NewsSummaryCard/NewsSummaryCard.tsx",
557
- "sku": "@molecule/ai/news-summary-card",
558
- "humanLabel": "NewsSummaryCard",
559
- "humanDescription": "AI-generated news summary card with recent headlines"
560
- },
561
- {
562
- "id": "stock-chart",
563
- "name": "StockChart",
564
- "version": "1.0.0",
565
- "description": "AI-generated financial chart component with Bloomberg-style theming",
566
- "tags": [
567
- "ai",
568
- "charts",
569
- "finance",
570
- "stocks",
571
- "generative-ui"
572
- ],
573
- "category": "ai",
574
- "props": [],
575
- "importPath": "./components/ai/StockChart/StockChart",
576
- "filePath": "src/components/ai/StockChart/StockChart.tsx",
577
- "sku": "@molecule/ai/stock-chart",
578
- "humanLabel": "StockChart",
579
- "humanDescription": "AI-generated financial chart component with Bloomberg-style theming"
580
- },
581
416
  {
582
417
  "id": "telemetry-graph",
583
418
  "name": "TelemetryGraph",
@@ -960,6 +795,123 @@ export const wizardManifest: WizardManifest = {
960
795
  "humanLabel": "DataTable",
961
796
  "humanDescription": "A \"Smart\" data grid that renders data based on a simple JSON schema. Below 768px it renders the same rows as cards instead, derived from the column definitions — no second layout to write. Set mobileCards={false} to keep the grid at every width."
962
797
  },
798
+ {
799
+ "id": "document-scan-view",
800
+ "name": "DocumentScanView",
801
+ "version": "1.0.0",
802
+ "description": "A document page with a scanning sweep while a parser reads it, and the regions it found outlined where they sit on the page. Strategic purpose: makes a slow, invisible job legible — in `tracking` mode the page and the progress bar follow real progress; in `looping` mode it says plainly that the parser reports none. Built for comparing parsers side by side.",
803
+ "tags": [
804
+ "document",
805
+ "pdf",
806
+ "scan",
807
+ "parser",
808
+ "ocr",
809
+ "progress",
810
+ "compare",
811
+ "viewer"
812
+ ],
813
+ "category": "data-display",
814
+ "props": [
815
+ {
816
+ "name": "src",
817
+ "type": "string | null",
818
+ "description": "The page image URL (a blob URL works). The frame keeps its aspect ratio before it loads, so nothing below it moves."
819
+ },
820
+ {
821
+ "name": "page",
822
+ "type": "number",
823
+ "description": "The page shown, counted from 1."
824
+ },
825
+ {
826
+ "name": "pageCount",
827
+ "type": "number | null",
828
+ "description": "Total pages, when known."
829
+ },
830
+ {
831
+ "name": "mode",
832
+ "type": "'idle' | 'tracking' | 'looping' | 'done' | 'error'",
833
+ "description": "tracking = real progress, sweep over the page being read; looping = no progress reported, sweep loops; done/error/idle = no sweep."
834
+ },
835
+ {
836
+ "name": "progress",
837
+ "type": "number",
838
+ "description": "Share of the document finished, 0–1, shown as a bar in tracking mode."
839
+ },
840
+ {
841
+ "name": "boxes",
842
+ "type": "DocumentScanBox[]",
843
+ "description": "Regions found on this page as fractions of the page ({ x, y, w, h, label? }), top-left origin."
844
+ },
845
+ {
846
+ "name": "title",
847
+ "type": "string",
848
+ "description": "Heading above the page."
849
+ },
850
+ {
851
+ "name": "status",
852
+ "type": "string",
853
+ "description": "One line describing what is happening; announced politely to screen readers."
854
+ },
855
+ {
856
+ "name": "aspectRatio",
857
+ "type": "number",
858
+ "description": "Page width ÷ height before the image loads.",
859
+ "default": "0.7727 (US Letter)"
860
+ },
861
+ {
862
+ "name": "className",
863
+ "type": "string",
864
+ "description": "Additional classes for the outer element."
865
+ }
866
+ ],
867
+ "importPath": "./components/data-display/DocumentScanView",
868
+ "filePath": "src/components/data-display/DocumentScanView.tsx",
869
+ "sku": "@molecule/data/document-scan-view",
870
+ "humanLabel": "DocumentScanView",
871
+ "humanDescription": "A document page with a scanning sweep while a parser reads it, and the regions it found outlined where they sit on the page. Strategic purpose: makes a slow, invisible job legible — in `tracking` mode the page and the progress bar follow real progress; in `looping` mode it says plainly that the parser reports none. Built for comparing parsers side by side."
872
+ },
873
+ {
874
+ "id": "gallery",
875
+ "name": "Gallery",
876
+ "version": "1.0.1",
877
+ "description": "A main image with a row of thumbnails beneath it. Swipe the main image on a phone (native CSS scroll-snap, no library), use the arrow keys when it has focus, or tap a thumbnail. Every slide shares one aspect ratio, so the frame reserves its space before any image loads and nothing below it moves. An item with no `src` shows a labelled placeholder, so a page can ship before its photos exist. Strategic purpose: product and detail pages that show a physical thing from several sides. Use DataTable or Table for data, not this.",
878
+ "tags": [
879
+ "gallery",
880
+ "carousel",
881
+ "images",
882
+ "photos",
883
+ "media",
884
+ "slideshow"
885
+ ],
886
+ "category": "data-display",
887
+ "props": [
888
+ {
889
+ "name": "items",
890
+ "type": "\"{ src?: string; srcSet?: string; thumbSrc?: string; alt: string; caption?: string; content?: ReactNode; thumb?: ReactNode }[]\"",
891
+ "description": "The slides, in order. Leave out `src` for a placeholder; pass `content` to show a drawing instead of a photo; give `srcSet` and `thumbSrc` so a phone downloads small files."
892
+ },
893
+ {
894
+ "name": "label",
895
+ "type": "string",
896
+ "description": "An accessible name for the gallery."
897
+ },
898
+ {
899
+ "name": "aspectRatio",
900
+ "type": "string",
901
+ "description": "The CSS aspect ratio of the main frame. Defaults to \"4 / 3\"."
902
+ },
903
+ {
904
+ "name": "sizes",
905
+ "type": "string",
906
+ "description": "The rendered width as an img `sizes` value, so the browser picks the right srcSet width."
907
+ }
908
+ ],
909
+ "importPath": "./components/data-display/Gallery",
910
+ "filePath": "src/components/data-display/Gallery.tsx",
911
+ "sku": "@molecule/data/gallery",
912
+ "humanLabel": "Gallery",
913
+ "humanDescription": "A main image with a row of thumbnails beneath it. Swipe the main image on a phone (native CSS scroll-snap, no library), use the arrow keys when it has focus, or tap a thumbnail. Every slide shares one aspect ratio, so the frame reserves its space before any image loads and nothing below it moves. An item with no `src` shows a labelled placeholder, so a page can ship before its photos exist. Strategic purpose: product and detail pages that show a physical thing from several sides. Use DataTable or Table for data, not this."
914
+ },
963
915
  {
964
916
  "id": "kpi-grid",
965
917
  "name": "KpiGrid",
@@ -3147,7 +3099,7 @@ export const wizardManifest: WizardManifest = {
3147
3099
  {
3148
3100
  "id": "device-card",
3149
3101
  "name": "DeviceCard",
3150
- "version": "1.0.0",
3102
+ "version": "1.0.1",
3151
3103
  "description": "A specialized card designed to represent a physical device or a digital entity with live state. Features slots for status, live values, and interactive controls.",
3152
3104
  "tags": [
3153
3105
  "layout",
@@ -3179,6 +3131,11 @@ export const wizardManifest: WizardManifest = {
3179
3131
  "description": "The current operational state of the device. Changes the badge color.",
3180
3132
  "default": "'offline'"
3181
3133
  },
3134
+ {
3135
+ "name": "statusLabel",
3136
+ "type": "string",
3137
+ "description": "Words for the badge in place of the status name — \"Checked in recently\" rather than \"active\". The status still sets the colour."
3138
+ },
3182
3139
  {
3183
3140
  "name": "value",
3184
3141
  "type": "string | number",
@@ -214,6 +214,23 @@ module.exports = {
214
214
  toast: '70', // notifications — must clear everything, always
215
215
  },
216
216
 
217
+ // ─── Motion ───────────────────────────────────────
218
+ // transform only (Zero Jank rule 3): a sweep that moved `top` would lay
219
+ // the page out again on every frame. The element is a full-height
220
+ // overlay translated from above the frame to below it, so the bright
221
+ // edge crosses the whole page. Under prefers-reduced-motion the global
222
+ // rule in index.css cuts it to one instant run; DocumentScanView hides
223
+ // the sweep there instead (motion-reduce:hidden) and says it in words.
224
+ keyframes: {
225
+ 'scan-sweep': {
226
+ '0%': { transform: 'translateY(-100%)' },
227
+ '100%': { transform: 'translateY(100%)' },
228
+ },
229
+ },
230
+ animation: {
231
+ 'scan-sweep': 'scan-sweep 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite',
232
+ },
233
+
217
234
  // ─── Fluid Spacing Scale (clamp) ──────────────────
218
235
  // Usage: p-fluid-sm, gap-fluid-md, m-fluid-lg, etc.
219
236
  spacing: {
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import { z } from 'zod';
3
- /**
4
- * @wizard
5
- * @name WatchlistEngine
6
- * @description A self-contained financial watchlist showing tickers with live price, day change, market cap, and a risk grade. Strategic purpose: a worked reference for a schema-validated data block — rows are parsed through FinancialAssetSchema before render, so malformed feed data is rejected at the boundary rather than crashing the table.
7
- * @tags engines, finance, watchlist, table, market, block
8
- * @category blocks
9
- * @id watchlist-engine
10
- */
11
- export declare const FinancialAssetSchema: z.ZodObject<{
12
- id: z.ZodString;
13
- ticker: z.ZodString;
14
- companyName: z.ZodString;
15
- currentPrice: z.ZodNumber;
16
- dayChangePercent: z.ZodNumber;
17
- marketCap: z.ZodNumber;
18
- riskScore: z.ZodEnum<["Low", "Medium", "High"]>;
19
- }, "strip", z.ZodTypeAny, {
20
- id: string;
21
- ticker: string;
22
- companyName: string;
23
- currentPrice: number;
24
- dayChangePercent: number;
25
- marketCap: number;
26
- riskScore: "Low" | "Medium" | "High";
27
- }, {
28
- id: string;
29
- ticker: string;
30
- companyName: string;
31
- currentPrice: number;
32
- dayChangePercent: number;
33
- marketCap: number;
34
- riskScore: "Low" | "Medium" | "High";
35
- }>;
36
- export type FinancialAsset = z.infer<typeof FinancialAssetSchema>;
37
- export declare const WatchlistEngine: React.FC;
@@ -1,130 +0,0 @@
1
- import { jsx as a, jsxs as t } from "react/jsx-runtime";
2
- import { useMemo as c } from "react";
3
- import { z as i } from "zod";
4
- import { CollectionLayout as h } from "../../components/layout/CollectionLayout.js";
5
- import { DenseMetricRibbon as g } from "../../components/layout/DenseMetricRibbon.js";
6
- import { DataTable as f } from "../../components/data-display/DataTable.js";
7
- import { Badge as o } from "../../components/ui/Badge.js";
8
- import { Button as s } from "../../components/ui/Button.js";
9
- import { Icon as m } from "../../components/ui/Icon.js";
10
- const S = i.object({
11
- id: i.string(),
12
- ticker: i.string(),
13
- companyName: i.string(),
14
- currentPrice: i.number(),
15
- dayChangePercent: i.number(),
16
- marketCap: i.number(),
17
- riskScore: i.enum(["Low", "Medium", "High"])
18
- }), l = [
19
- { id: "1", ticker: "AAPL", companyName: "Apple Inc.", currentPrice: 175.5, dayChangePercent: 1.2, marketCap: 28e11, riskScore: "Low" },
20
- { id: "2", ticker: "TSLA", companyName: "Tesla, Inc.", currentPrice: 210.25, dayChangePercent: -3.4, marketCap: 65e10, riskScore: "High" },
21
- { id: "3", ticker: "MSFT", companyName: "Microsoft Corp.", currentPrice: 330.1, dayChangePercent: 0.8, marketCap: 25e11, riskScore: "Low" },
22
- { id: "4", ticker: "NVDA", companyName: "NVIDIA Corp.", currentPrice: 450.8, dayChangePercent: 5.6, marketCap: 11e11, riskScore: "High" },
23
- { id: "5", ticker: "JPM", companyName: "JPMorgan Chase", currentPrice: 145.2, dayChangePercent: -0.5, marketCap: 42e10, riskScore: "Medium" },
24
- { id: "6", ticker: "V", companyName: "Visa Inc.", currentPrice: 235, dayChangePercent: 0.2, marketCap: 49e10, riskScore: "Low" }
25
- ], M = () => {
26
- const d = c(() => [
27
- {
28
- id: "total-assets",
29
- label: "Total Assets",
30
- value: l.length,
31
- icon: "pie-chart"
32
- },
33
- {
34
- id: "avg-risk",
35
- label: "Avg Risk",
36
- value: "Medium",
37
- intent: "warning",
38
- icon: "alert-triangle"
39
- },
40
- {
41
- id: "top-mover",
42
- label: "Top Mover",
43
- value: "NVDA",
44
- trend: "up",
45
- trendValue: "+5.6%",
46
- intent: "success"
47
- }
48
- ], []), p = c(() => [
49
- {
50
- field: "ticker",
51
- headerName: "Ticker",
52
- width: 100,
53
- pinned: "left",
54
- cellRenderer: (r) => /* @__PURE__ */ a("span", { className: "font-bold", children: r.value })
55
- },
56
- { field: "companyName", headerName: "Company Name", flex: 1 },
57
- {
58
- field: "currentPrice",
59
- headerName: "Price",
60
- width: 120,
61
- valueFormatter: (r) => {
62
- var e;
63
- return `$${((e = r.value) == null ? void 0 : e.toFixed(2)) ?? "0.00"}`;
64
- }
65
- },
66
- {
67
- field: "dayChangePercent",
68
- headerName: "Day Change",
69
- width: 130,
70
- cellRenderer: (r) => {
71
- const e = r.value;
72
- if (typeof e != "number") return null;
73
- const n = e > 0, u = e < 0;
74
- return /* @__PURE__ */ a("div", { className: "flex items-center gap-1 h-full", children: /* @__PURE__ */ t(o, { variant: n ? "success" : u ? "danger" : "secondary", className: "px-1.5 py-0", children: [
75
- n ? "+" : "",
76
- e,
77
- "%"
78
- ] }) });
79
- }
80
- },
81
- {
82
- field: "marketCap",
83
- headerName: "Market Cap",
84
- width: 150,
85
- valueFormatter: (r) => {
86
- const e = r.value;
87
- return typeof e != "number" ? "-" : `$${(e / 1e9).toFixed(1)}B`;
88
- }
89
- },
90
- {
91
- field: "riskScore",
92
- headerName: "Risk",
93
- width: 110,
94
- cellRenderer: (r) => {
95
- const e = r.value;
96
- return /* @__PURE__ */ a("div", { className: "flex items-center h-full", children: /* @__PURE__ */ a(o, { variant: e === "Low" ? "success" : e === "Medium" ? "warning" : "danger", className: "px-1.5 py-0", children: e }) });
97
- }
98
- }
99
- ], []);
100
- return /* @__PURE__ */ a(
101
- h,
102
- {
103
- title: "Risk Watchlist",
104
- description: "Real-time monitoring of your high-priority assets",
105
- headerActions: /* @__PURE__ */ t("div", { className: "flex gap-2", children: [
106
- /* @__PURE__ */ t(s, { variant: "outline", size: "sm", children: [
107
- /* @__PURE__ */ a(m, { name: "download", size: 14, className: "mr-2" }),
108
- "Export"
109
- ] }),
110
- /* @__PURE__ */ t(s, { variant: "primary", size: "sm", children: [
111
- /* @__PURE__ */ a(m, { name: "plus", size: 14, className: "mr-2" }),
112
- "Add Asset"
113
- ] })
114
- ] }),
115
- metricsRibbon: /* @__PURE__ */ a(g, { metrics: d }),
116
- children: /* @__PURE__ */ a(
117
- f,
118
- {
119
- rowData: l,
120
- columnDefs: p,
121
- height: "100%"
122
- }
123
- )
124
- }
125
- );
126
- };
127
- export {
128
- S as FinancialAssetSchema,
129
- M as WatchlistEngine
130
- };
@@ -1,28 +0,0 @@
1
- /**
2
- * @file ArchitectureReferenceCard.tsx
3
- * @package @ramme-io/ui
4
- * @description AI-generated platform architecture summary card
5
- *
6
- * ARCHITECTURAL ROLE:
7
- * Renders a condensed summary of this platform's own data architecture
8
- * (stack, table count, AI pipelines, sentinel fleet, live scale facts)
9
- * inside AI chat bubbles. Fetches from the Ramme Data Factory API's
10
- * /architecture/reference endpoint. Follows the same self-fetching
11
- * pattern as LiveQuoteCard — takes no ticker, since it describes the
12
- * system itself rather than a company. Full detail lives on the Ops
13
- * console's Architecture Reference page; this card is a chat-sized digest.
14
- */
15
- import React from 'react';
16
- export interface ArchitectureReferenceCardProps {
17
- /** Present for signature symmetry with other tool cards; the tool takes no arguments. */
18
- params?: Record<string, never>;
19
- }
20
- /**
21
- * @wizard
22
- * @name ArchitectureReferenceCard
23
- * @description AI-generated card summarizing this platform's own data architecture — stack, data model, AI pipelines, and sentinel fleet
24
- * @tags ai, architecture, reference, generative-ui
25
- * @category ai
26
- * @id architecture-reference-card
27
- */
28
- export declare const ArchitectureReferenceCard: React.FC<ArchitectureReferenceCardProps>;
@@ -1,71 +0,0 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { apiBaseUrl as f } from "../../../utils/apiBaseUrl.js";
3
- import { useState as c, useEffect as x } from "react";
4
- import { Card as h, CardHeader as b, CardTitle as g, CardContent as N } from "../../layout/Card.js";
5
- import { Icon as n } from "../../ui/Icon.js";
6
- const C = () => {
7
- const [t, p] = c(null), [o, l] = c(!0), [d, i] = c(null);
8
- x(() => {
9
- (async () => {
10
- try {
11
- l(!0), i(null);
12
- const s = f(), m = await fetch(`${s}/architecture/reference`);
13
- if (!m.ok)
14
- throw new Error("Could not load the architecture reference");
15
- p(await m.json());
16
- } catch (s) {
17
- i(s instanceof Error ? s.message : "Failed to fetch architecture reference");
18
- } finally {
19
- l(!1);
20
- }
21
- })();
22
- }, []);
23
- const u = (t == null ? void 0 : t.data_model.groups.reduce((a, s) => a + s.tables.length, 0)) ?? 0;
24
- return /* @__PURE__ */ r(h, { className: "w-full min-w-[280px] max-w-md shadow-lg border-primary/20", children: [
25
- /* @__PURE__ */ e(b, { className: "pb-3", children: /* @__PURE__ */ r(g, { className: "text-sm font-medium text-muted-foreground flex items-center gap-2", children: [
26
- /* @__PURE__ */ e(n, { name: "book-open", size: 14 }),
27
- "Platform Architecture"
28
- ] }) }),
29
- /* @__PURE__ */ r(N, { className: "pt-0", children: [
30
- o && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ e(n, { name: "loader", size: 24, className: "animate-spin text-muted-foreground" }) }),
31
- d && /* @__PURE__ */ r("div", { className: "flex items-start gap-2 rounded-lg border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: [
32
- /* @__PURE__ */ e(n, { name: "alert-circle", size: 14, className: "mt-px shrink-0" }),
33
- /* @__PURE__ */ e("span", { children: d })
34
- ] }),
35
- t && !o && !d && /* @__PURE__ */ r("div", { className: "space-y-3", children: [
36
- /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: [
37
- /* @__PURE__ */ r("div", { className: "rounded-md border border-border/60 bg-muted/20 p-2 text-center", children: [
38
- /* @__PURE__ */ e("p", { className: "font-mono text-sm font-semibold tabular-nums", children: u }),
39
- /* @__PURE__ */ e("p", { className: "text-[10px] text-muted-foreground", children: "tables" })
40
- ] }),
41
- /* @__PURE__ */ r("div", { className: "rounded-md border border-border/60 bg-muted/20 p-2 text-center", children: [
42
- /* @__PURE__ */ e("p", { className: "font-mono text-sm font-semibold tabular-nums", children: t.ai_pipelines.length }),
43
- /* @__PURE__ */ e("p", { className: "text-[10px] text-muted-foreground", children: "AI pipelines" })
44
- ] }),
45
- /* @__PURE__ */ r("div", { className: "rounded-md border border-border/60 bg-muted/20 p-2 text-center", children: [
46
- /* @__PURE__ */ e("p", { className: "font-mono text-sm font-semibold tabular-nums", children: t.pm2_processes.length }),
47
- /* @__PURE__ */ e("p", { className: "text-[10px] text-muted-foreground", children: "workers" })
48
- ] })
49
- ] }),
50
- /* @__PURE__ */ r("div", { className: "space-y-1", children: [
51
- /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Stack" }),
52
- /* @__PURE__ */ r("p", { className: "text-xs text-foreground/90 leading-relaxed", children: [
53
- t.stack.backend[0],
54
- t.stack.frontend[0] ? ` · ${t.stack.frontend[0]}` : ""
55
- ] })
56
- ] }),
57
- /* @__PURE__ */ r("div", { className: "space-y-1", children: [
58
- /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: "AI / LLM providers" }),
59
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.stack.ai_llm_providers.map((a) => /* @__PURE__ */ e("span", { className: "rounded border border-border/60 bg-muted/20 px-1.5 py-0.5 font-mono text-[10px]", children: a }, a)) })
60
- ] }),
61
- t.scale_facts.db_size_gb !== null && /* @__PURE__ */ r("p", { className: "text-[10px] text-muted-foreground pt-1 border-t border-border/60", children: [
62
- t.scale_facts.db_size_gb,
63
- " GB database · see Ops → Architecture Reference for full detail"
64
- ] })
65
- ] })
66
- ] })
67
- ] });
68
- };
69
- export {
70
- C as ArchitectureReferenceCard
71
- };
@@ -1,2 +0,0 @@
1
- export { ArchitectureReferenceCard } from './ArchitectureReferenceCard';
2
- export type { ArchitectureReferenceCardProps } from './ArchitectureReferenceCard';
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- interface CompanyProfileCardProps {
3
- ticker: string;
4
- }
5
- /**
6
- * @wizard
7
- * @name CompanyProfileCard
8
- * @description A company summary for a ticker — sector, industry, and description — fetched on demand and cached. Strategic purpose: a generative-UI block an AI tool call can render directly into a chat thread. Surfaces its own provenance, distinguishing a live fetch from a cached or stale answer instead of presenting all three as equally fresh.
9
- * @tags ai, finance, company, profile, card, generative-ui
10
- * @category ai
11
- * @id company-profile-card
12
- * @param {string} ticker - The symbol to profile, e.g. 'AAPL'.
13
- */
14
- export declare const CompanyProfileCard: React.FC<CompanyProfileCardProps>;
15
- export {};