@lukeashford/aurelius 4.5.0 → 4.6.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/index.d.mts +167 -1
- package/dist/index.d.ts +167 -1
- package/dist/index.js +163 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +156 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +1 -0
- package/dist/styles/deliverable.css +476 -0
- package/llms.md +51 -0
- package/package.json +1 -1
- package/scripts/eslint.mjs +4 -2
package/dist/index.mjs
CHANGED
|
@@ -7564,6 +7564,155 @@ var NODE_TYPES = {
|
|
|
7564
7564
|
VARIANT_SET: "VARIANT_SET"
|
|
7565
7565
|
};
|
|
7566
7566
|
|
|
7567
|
+
// src/components/deliverable/DeliverableRenderer.tsx
|
|
7568
|
+
import React88, { useState as useState25 } from "react";
|
|
7569
|
+
|
|
7570
|
+
// src/components/deliverable/CoverSection.tsx
|
|
7571
|
+
import React82 from "react";
|
|
7572
|
+
function CoverSection({ data, clientName }) {
|
|
7573
|
+
return /* @__PURE__ */ React82.createElement("section", { className: "deliverable-cover deliverable-page" }, /* @__PURE__ */ React82.createElement("div", { className: "deliverable-cover-inner" }, data.eyebrow && /* @__PURE__ */ React82.createElement("p", { className: "deliverable-cover-eyebrow" }, data.eyebrow), /* @__PURE__ */ React82.createElement("h1", { className: "deliverable-cover-title" }, data.title), data.subtitle && /* @__PURE__ */ React82.createElement("p", { className: "deliverable-cover-subtitle" }, data.subtitle), clientName && /* @__PURE__ */ React82.createElement("p", { className: "deliverable-cover-client" }, "Prepared for", " ", /* @__PURE__ */ React82.createElement("span", { className: "deliverable-cover-client-name" }, clientName))));
|
|
7574
|
+
}
|
|
7575
|
+
|
|
7576
|
+
// src/components/deliverable/ArtifactImageGridSection.tsx
|
|
7577
|
+
import React83 from "react";
|
|
7578
|
+
var COLUMN_CLASSES = {
|
|
7579
|
+
1: "deliverable-image-grid-cols-1",
|
|
7580
|
+
2: "deliverable-image-grid-cols-2",
|
|
7581
|
+
3: "deliverable-image-grid-cols-3"
|
|
7582
|
+
};
|
|
7583
|
+
function ArtifactImageGridSection({ data }) {
|
|
7584
|
+
const columns = clampColumns(data.columns);
|
|
7585
|
+
return /* @__PURE__ */ React83.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React83.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React83.createElement("div", { className: cx("deliverable-image-grid", COLUMN_CLASSES[columns]) }, data.items.map((item, idx) => /* @__PURE__ */ React83.createElement("figure", { key: idx, className: "deliverable-image-item" }, item.artifact.url ? /* @__PURE__ */ React83.createElement(
|
|
7586
|
+
"img",
|
|
7587
|
+
{
|
|
7588
|
+
src: item.artifact.url,
|
|
7589
|
+
alt: item.artifact.title ?? "",
|
|
7590
|
+
className: "deliverable-image-img"
|
|
7591
|
+
}
|
|
7592
|
+
) : /* @__PURE__ */ React83.createElement("div", { className: "deliverable-image-missing" }, "Missing image"), item.caption && /* @__PURE__ */ React83.createElement("figcaption", { className: "deliverable-image-caption" }, item.caption)))));
|
|
7593
|
+
}
|
|
7594
|
+
function clampColumns(n) {
|
|
7595
|
+
if (n <= 1) return 1;
|
|
7596
|
+
if (n === 2) return 2;
|
|
7597
|
+
return 3;
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7600
|
+
// src/components/deliverable/ArtifactSpotlightSection.tsx
|
|
7601
|
+
import React84 from "react";
|
|
7602
|
+
function ArtifactSpotlightSection({ data }) {
|
|
7603
|
+
return /* @__PURE__ */ React84.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React84.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React84.createElement("div", { className: "deliverable-spotlight-media" }, data.artifact.url ? /* @__PURE__ */ React84.createElement(
|
|
7604
|
+
"img",
|
|
7605
|
+
{
|
|
7606
|
+
src: data.artifact.url,
|
|
7607
|
+
alt: data.artifact.title ?? "",
|
|
7608
|
+
className: "deliverable-spotlight-img"
|
|
7609
|
+
}
|
|
7610
|
+
) : /* @__PURE__ */ React84.createElement("div", { className: "deliverable-spotlight-missing" }, "Missing image")), data.body && /* @__PURE__ */ React84.createElement(
|
|
7611
|
+
MarkdownContent,
|
|
7612
|
+
{
|
|
7613
|
+
content: data.body,
|
|
7614
|
+
className: "deliverable-spotlight-body"
|
|
7615
|
+
}
|
|
7616
|
+
));
|
|
7617
|
+
}
|
|
7618
|
+
|
|
7619
|
+
// src/components/deliverable/TextBlockSection.tsx
|
|
7620
|
+
import React85 from "react";
|
|
7621
|
+
function TextBlockSection({ data }) {
|
|
7622
|
+
return /* @__PURE__ */ React85.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React85.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React85.createElement(
|
|
7623
|
+
MarkdownContent,
|
|
7624
|
+
{
|
|
7625
|
+
content: data.body,
|
|
7626
|
+
className: "deliverable-text-block"
|
|
7627
|
+
}
|
|
7628
|
+
));
|
|
7629
|
+
}
|
|
7630
|
+
|
|
7631
|
+
// src/components/deliverable/ColorPaletteSection.tsx
|
|
7632
|
+
import React86 from "react";
|
|
7633
|
+
function ColorPaletteSection({ data }) {
|
|
7634
|
+
return /* @__PURE__ */ React86.createElement("section", { className: "deliverable-page" }, data.heading && /* @__PURE__ */ React86.createElement("h2", { className: "deliverable-heading" }, data.heading), /* @__PURE__ */ React86.createElement("div", { className: "deliverable-palette" }, data.swatches.map((swatch, idx) => /* @__PURE__ */ React86.createElement("div", { key: idx, className: "deliverable-palette-item" }, /* @__PURE__ */ React86.createElement(
|
|
7635
|
+
"div",
|
|
7636
|
+
{
|
|
7637
|
+
className: "deliverable-palette-chip",
|
|
7638
|
+
style: { backgroundColor: swatch.color },
|
|
7639
|
+
"aria-label": swatch.label
|
|
7640
|
+
}
|
|
7641
|
+
), /* @__PURE__ */ React86.createElement("p", { className: "deliverable-palette-label" }, swatch.label), /* @__PURE__ */ React86.createElement("p", { className: "deliverable-palette-hex" }, swatch.color.toUpperCase())))));
|
|
7642
|
+
}
|
|
7643
|
+
|
|
7644
|
+
// src/components/deliverable/QuoteBlockSection.tsx
|
|
7645
|
+
import React87 from "react";
|
|
7646
|
+
function QuoteBlockSection({ data }) {
|
|
7647
|
+
return /* @__PURE__ */ React87.createElement("section", { className: "deliverable-page deliverable-quote" }, /* @__PURE__ */ React87.createElement("blockquote", { className: "deliverable-quote-body" }, /* @__PURE__ */ React87.createElement("p", { className: "deliverable-quote-text" }, "\u201C", data.quote, "\u201D"), data.attribution && /* @__PURE__ */ React87.createElement("footer", { className: "deliverable-quote-attribution" }, "\u2014 ", data.attribution)));
|
|
7648
|
+
}
|
|
7649
|
+
|
|
7650
|
+
// src/components/deliverable/DeliverableRenderer.tsx
|
|
7651
|
+
function DeliverableRenderer({
|
|
7652
|
+
deliverable,
|
|
7653
|
+
onDownloadPdf,
|
|
7654
|
+
hideActions = false,
|
|
7655
|
+
className
|
|
7656
|
+
}) {
|
|
7657
|
+
const [isDownloading, setIsDownloading] = useState25(false);
|
|
7658
|
+
const accent = deliverable.accentColor?.trim();
|
|
7659
|
+
const style = accent ? { "--deliverable-accent": accent } : void 0;
|
|
7660
|
+
const handleDownload = async () => {
|
|
7661
|
+
if (!onDownloadPdf || isDownloading) return;
|
|
7662
|
+
setIsDownloading(true);
|
|
7663
|
+
try {
|
|
7664
|
+
await onDownloadPdf();
|
|
7665
|
+
} finally {
|
|
7666
|
+
setIsDownloading(false);
|
|
7667
|
+
}
|
|
7668
|
+
};
|
|
7669
|
+
return /* @__PURE__ */ React88.createElement(
|
|
7670
|
+
"div",
|
|
7671
|
+
{
|
|
7672
|
+
className: cx("deliverable", className),
|
|
7673
|
+
style
|
|
7674
|
+
},
|
|
7675
|
+
deliverable.sections.map((section, idx) => renderSection(section, idx, deliverable)),
|
|
7676
|
+
!hideActions && onDownloadPdf && /* @__PURE__ */ React88.createElement("div", { className: "deliverable-actions" }, /* @__PURE__ */ React88.createElement(
|
|
7677
|
+
Button,
|
|
7678
|
+
{
|
|
7679
|
+
variant: "important",
|
|
7680
|
+
size: "md",
|
|
7681
|
+
onClick: handleDownload,
|
|
7682
|
+
loading: isDownloading,
|
|
7683
|
+
className: "deliverable-action-button"
|
|
7684
|
+
},
|
|
7685
|
+
"Download PDF"
|
|
7686
|
+
))
|
|
7687
|
+
);
|
|
7688
|
+
}
|
|
7689
|
+
function renderSection(section, idx, doc) {
|
|
7690
|
+
const key = `${section.type}-${idx}`;
|
|
7691
|
+
switch (section.type) {
|
|
7692
|
+
case "COVER":
|
|
7693
|
+
return /* @__PURE__ */ React88.createElement(
|
|
7694
|
+
CoverSection,
|
|
7695
|
+
{
|
|
7696
|
+
key,
|
|
7697
|
+
data: section,
|
|
7698
|
+
clientName: doc.clientName
|
|
7699
|
+
}
|
|
7700
|
+
);
|
|
7701
|
+
case "ARTIFACT_IMAGE_GRID":
|
|
7702
|
+
return /* @__PURE__ */ React88.createElement(ArtifactImageGridSection, { key, data: section });
|
|
7703
|
+
case "ARTIFACT_SPOTLIGHT":
|
|
7704
|
+
return /* @__PURE__ */ React88.createElement(ArtifactSpotlightSection, { key, data: section });
|
|
7705
|
+
case "TEXT_BLOCK":
|
|
7706
|
+
return /* @__PURE__ */ React88.createElement(TextBlockSection, { key, data: section });
|
|
7707
|
+
case "COLOR_PALETTE":
|
|
7708
|
+
return /* @__PURE__ */ React88.createElement(ColorPaletteSection, { key, data: section });
|
|
7709
|
+
case "QUOTE_BLOCK":
|
|
7710
|
+
return /* @__PURE__ */ React88.createElement(QuoteBlockSection, { key, data: section });
|
|
7711
|
+
default:
|
|
7712
|
+
return null;
|
|
7713
|
+
}
|
|
7714
|
+
}
|
|
7715
|
+
|
|
7567
7716
|
// src/index.ts
|
|
7568
7717
|
var version = "2.0.0";
|
|
7569
7718
|
export {
|
|
@@ -7576,6 +7725,8 @@ export {
|
|
|
7576
7725
|
AlertDialog,
|
|
7577
7726
|
ArtifactCard,
|
|
7578
7727
|
ArtifactGroup,
|
|
7728
|
+
ArtifactImageGridSection,
|
|
7729
|
+
ArtifactSpotlightSection,
|
|
7579
7730
|
ArtifactVariantStack,
|
|
7580
7731
|
ArtifactsPanel,
|
|
7581
7732
|
ArtifactsPanelToggle,
|
|
@@ -7601,10 +7752,13 @@ export {
|
|
|
7601
7752
|
ChevronRightIcon,
|
|
7602
7753
|
CloseIcon,
|
|
7603
7754
|
Col,
|
|
7755
|
+
ColorPaletteSection,
|
|
7604
7756
|
ColorSwatch,
|
|
7605
7757
|
ConfirmDialog,
|
|
7606
7758
|
Container,
|
|
7759
|
+
CoverSection,
|
|
7607
7760
|
CrossSquareIcon,
|
|
7761
|
+
DeliverableRenderer,
|
|
7608
7762
|
Divider,
|
|
7609
7763
|
Drawer,
|
|
7610
7764
|
EmptySquareIcon,
|
|
@@ -7652,6 +7806,7 @@ export {
|
|
|
7652
7806
|
Popover,
|
|
7653
7807
|
Progress,
|
|
7654
7808
|
PromptDialog,
|
|
7809
|
+
QuoteBlockSection,
|
|
7655
7810
|
Radio,
|
|
7656
7811
|
Row,
|
|
7657
7812
|
SCRIPT_ELEMENT_TYPES,
|
|
@@ -7679,6 +7834,7 @@ export {
|
|
|
7679
7834
|
TableHeader,
|
|
7680
7835
|
TableRow,
|
|
7681
7836
|
Tabs,
|
|
7837
|
+
TextBlockSection,
|
|
7682
7838
|
TextCard,
|
|
7683
7839
|
Textarea,
|
|
7684
7840
|
ThinkingIndicator,
|