@activecollab/components 2.0.363 → 2.0.365

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 (91) hide show
  1. package/dist/cjs/presentation/shared/index.js +37 -1
  2. package/dist/cjs/presentation/shared/index.js.map +1 -1
  3. package/dist/cjs/presentation/shared/settings.js +91 -0
  4. package/dist/cjs/presentation/shared/settings.js.map +1 -0
  5. package/dist/cjs/presentation/stackedCard/content/ImageCard.js +60 -0
  6. package/dist/cjs/presentation/stackedCard/content/ImageCard.js.map +1 -0
  7. package/dist/cjs/presentation/stackedCard/content/LinkCard.js +348 -0
  8. package/dist/cjs/presentation/stackedCard/content/LinkCard.js.map +1 -0
  9. package/dist/cjs/presentation/stackedCard/content/NoteCard.js +92 -0
  10. package/dist/cjs/presentation/stackedCard/content/NoteCard.js.map +1 -0
  11. package/dist/cjs/presentation/stackedCard/content/SwatchCard.js +74 -0
  12. package/dist/cjs/presentation/stackedCard/content/SwatchCard.js.map +1 -0
  13. package/dist/cjs/presentation/stackedCard/content/TaskCard.js +231 -0
  14. package/dist/cjs/presentation/stackedCard/content/TaskCard.js.map +1 -0
  15. package/dist/cjs/presentation/stackedCard/content/index.js +83 -0
  16. package/dist/cjs/presentation/stackedCard/content/index.js.map +1 -0
  17. package/dist/cjs/presentation/stackedCard/content/shared.js +144 -0
  18. package/dist/cjs/presentation/stackedCard/content/shared.js.map +1 -0
  19. package/dist/cjs/presentation/stackedCard/content/unfurl.js +172 -0
  20. package/dist/cjs/presentation/stackedCard/content/unfurl.js.map +1 -0
  21. package/dist/cjs/presentation/stackedCard/primitives.js +254 -0
  22. package/dist/cjs/presentation/stackedCard/primitives.js.map +1 -0
  23. package/dist/cjs/presentation/stackedCard/resizePolicy.js +183 -0
  24. package/dist/cjs/presentation/stackedCard/resizePolicy.js.map +1 -0
  25. package/dist/cjs/presentation/stackedCard/shell.js +165 -0
  26. package/dist/cjs/presentation/stackedCard/shell.js.map +1 -0
  27. package/dist/cjs/presentation/stackedCard/storyScaffold.js +72 -0
  28. package/dist/cjs/presentation/stackedCard/storyScaffold.js.map +1 -0
  29. package/dist/cjs/presentation/stackedCard/useInlineEdit.js +208 -0
  30. package/dist/cjs/presentation/stackedCard/useInlineEdit.js.map +1 -0
  31. package/dist/esm/presentation/shared/index.d.ts +2 -0
  32. package/dist/esm/presentation/shared/index.d.ts.map +1 -1
  33. package/dist/esm/presentation/shared/index.js +1 -0
  34. package/dist/esm/presentation/shared/index.js.map +1 -1
  35. package/dist/esm/presentation/shared/settings.d.ts +33 -0
  36. package/dist/esm/presentation/shared/settings.d.ts.map +1 -0
  37. package/dist/esm/presentation/shared/settings.js +84 -0
  38. package/dist/esm/presentation/shared/settings.js.map +1 -0
  39. package/dist/esm/presentation/stackedCard/content/ImageCard.d.ts +15 -0
  40. package/dist/esm/presentation/stackedCard/content/ImageCard.d.ts.map +1 -0
  41. package/dist/esm/presentation/stackedCard/content/ImageCard.js +50 -0
  42. package/dist/esm/presentation/stackedCard/content/ImageCard.js.map +1 -0
  43. package/dist/esm/presentation/stackedCard/content/LinkCard.d.ts +28 -0
  44. package/dist/esm/presentation/stackedCard/content/LinkCard.d.ts.map +1 -0
  45. package/dist/esm/presentation/stackedCard/content/LinkCard.js +336 -0
  46. package/dist/esm/presentation/stackedCard/content/LinkCard.js.map +1 -0
  47. package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts +10 -0
  48. package/dist/esm/presentation/stackedCard/content/NoteCard.d.ts.map +1 -0
  49. package/dist/esm/presentation/stackedCard/content/NoteCard.js +82 -0
  50. package/dist/esm/presentation/stackedCard/content/NoteCard.js.map +1 -0
  51. package/dist/esm/presentation/stackedCard/content/SwatchCard.d.ts +14 -0
  52. package/dist/esm/presentation/stackedCard/content/SwatchCard.d.ts.map +1 -0
  53. package/dist/esm/presentation/stackedCard/content/SwatchCard.js +64 -0
  54. package/dist/esm/presentation/stackedCard/content/SwatchCard.js.map +1 -0
  55. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts +29 -0
  56. package/dist/esm/presentation/stackedCard/content/TaskCard.d.ts.map +1 -0
  57. package/dist/esm/presentation/stackedCard/content/TaskCard.js +218 -0
  58. package/dist/esm/presentation/stackedCard/content/TaskCard.js.map +1 -0
  59. package/dist/esm/presentation/stackedCard/content/index.d.ts +8 -0
  60. package/dist/esm/presentation/stackedCard/content/index.d.ts.map +1 -0
  61. package/dist/esm/presentation/stackedCard/content/index.js +8 -0
  62. package/dist/esm/presentation/stackedCard/content/index.js.map +1 -0
  63. package/dist/esm/presentation/stackedCard/content/shared.d.ts +46 -0
  64. package/dist/esm/presentation/stackedCard/content/shared.d.ts.map +1 -0
  65. package/dist/esm/presentation/stackedCard/content/shared.js +134 -0
  66. package/dist/esm/presentation/stackedCard/content/shared.js.map +1 -0
  67. package/dist/esm/presentation/stackedCard/content/unfurl.d.ts +89 -0
  68. package/dist/esm/presentation/stackedCard/content/unfurl.d.ts.map +1 -0
  69. package/dist/esm/presentation/stackedCard/content/unfurl.js +147 -0
  70. package/dist/esm/presentation/stackedCard/content/unfurl.js.map +1 -0
  71. package/dist/esm/presentation/stackedCard/primitives.d.ts +84 -0
  72. package/dist/esm/presentation/stackedCard/primitives.d.ts.map +1 -0
  73. package/dist/esm/presentation/stackedCard/primitives.js +241 -0
  74. package/dist/esm/presentation/stackedCard/primitives.js.map +1 -0
  75. package/dist/esm/presentation/stackedCard/resizePolicy.d.ts +97 -0
  76. package/dist/esm/presentation/stackedCard/resizePolicy.d.ts.map +1 -0
  77. package/dist/esm/presentation/stackedCard/resizePolicy.js +173 -0
  78. package/dist/esm/presentation/stackedCard/resizePolicy.js.map +1 -0
  79. package/dist/esm/presentation/stackedCard/shell.d.ts +46 -0
  80. package/dist/esm/presentation/stackedCard/shell.d.ts.map +1 -0
  81. package/dist/esm/presentation/stackedCard/shell.js +156 -0
  82. package/dist/esm/presentation/stackedCard/shell.js.map +1 -0
  83. package/dist/esm/presentation/stackedCard/storyScaffold.d.ts +28 -0
  84. package/dist/esm/presentation/stackedCard/storyScaffold.d.ts.map +1 -0
  85. package/dist/esm/presentation/stackedCard/storyScaffold.js +66 -0
  86. package/dist/esm/presentation/stackedCard/storyScaffold.js.map +1 -0
  87. package/dist/esm/presentation/stackedCard/useInlineEdit.d.ts +68 -0
  88. package/dist/esm/presentation/stackedCard/useInlineEdit.d.ts.map +1 -0
  89. package/dist/esm/presentation/stackedCard/useInlineEdit.js +192 -0
  90. package/dist/esm/presentation/stackedCard/useInlineEdit.js.map +1 -0
  91. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/settings.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiFvD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,GAAI,uBAG5B,mBAAmB,KAAG,YAaxB,CAAC;AAMF,8EAA8E;AAC9E,eAAO,MAAM,eAAe,oEAM3B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;iBAA+B,OAAO;SAmBlE,CAAC;AAEF,eAAO,MAAM,OAAO,oEAwBnB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,UAAU,GAAI,4DAMxB,eAAe,KAAG,YAqBpB,CAAC"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Shared building blocks for the System Settings presentation stories
3
+ * (`Presentation/System Settings/*`). The settings page header, the max-width
4
+ * body column and the "row" card (title + description on the left, a control on
5
+ * the right) are defined once here and reused by the Index, General and
6
+ * Security stories so the chrome stays identical and in one place.
7
+ *
8
+ * Mirrors the app: PageHeader.jsx + BackButton.js (header) and the repeated
9
+ * `Card variant="paper-2"` row pattern from the SystemSettings pages.
10
+ */
11
+ import React from "react";
12
+ import styled from "styled-components";
13
+ import { MD, SM } from "./tokens";
14
+ import { Card } from "../../components/Card";
15
+ import { IconButton } from "../../components/IconButton";
16
+ import { ArrowLeftIcon } from "../../components/Icons";
17
+ import { Body2, Caption1, Header2, Title2 } from "../../components/Typography";
18
+
19
+ /* ------------------------------------------------------------------ */
20
+ /* Settings page header (mirrors PageHeader.jsx + BackButton.js) */
21
+ /* ------------------------------------------------------------------ */
22
+
23
+ const StyledSettingsHeader = styled.div.withConfig({
24
+ displayName: "settings__StyledSettingsHeader",
25
+ componentId: "sc-1el9eq3-0"
26
+ })(["display:flex;align-items:center;justify-content:space-between;margin:12px 0;width:100%;height:40px;flex-shrink:0;.header-left{display:flex;align-items:center;width:100%;max-width:100%;@media (min-width:", "){min-width:0;}}.back-button{flex-shrink:0;margin-right:4px;@media (min-width:", "){margin-right:8px;}}.page-title-desktop{display:none;margin-right:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;@media (min-width:", "){display:block;}}.page-title-mobile{display:block;margin-right:8px;font-weight:300;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;@media (min-width:", "){display:none;}}.page-header-spacer{display:none;height:100%;width:208px;flex-shrink:0;@media (min-width:", "){display:flex;}}"], SM, MD, MD, MD, SM);
27
+ export const SettingsHeader = _ref => {
28
+ let title = _ref.title,
29
+ backTitle = _ref.backTitle;
30
+ return /*#__PURE__*/React.createElement(StyledSettingsHeader, null, /*#__PURE__*/React.createElement("div", {
31
+ className: "header-left"
32
+ }, backTitle ? /*#__PURE__*/React.createElement(IconButton, {
33
+ variant: "text gray",
34
+ className: "back-button"
35
+ }, /*#__PURE__*/React.createElement(ArrowLeftIcon, null)) : null, /*#__PURE__*/React.createElement(Title2, {
36
+ className: "page-title-desktop"
37
+ }, title), /*#__PURE__*/React.createElement(Header2, {
38
+ className: "page-title-mobile"
39
+ }, title)), /*#__PURE__*/React.createElement("div", {
40
+ className: "page-header-spacer"
41
+ }));
42
+ };
43
+
44
+ /* ------------------------------------------------------------------ */
45
+ /* Shared layout pieces */
46
+ /* ------------------------------------------------------------------ */
47
+
48
+ /** The page body, max-width 850px and left-aligned (mirrors the app Page). */
49
+ export const SettingsContent = styled.div.withConfig({
50
+ displayName: "settings__SettingsContent",
51
+ componentId: "sc-1el9eq3-1"
52
+ })(["display:flex;flex-direction:column;flex-grow:1;width:100%;max-width:850px;"]);
53
+
54
+ /** A settings row card: title + description on the left, control on the right. */
55
+ export const StyledSettingRow = styled(Card).withConfig({
56
+ displayName: "settings__StyledSettingRow",
57
+ componentId: "sc-1el9eq3-2"
58
+ })(["box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:12px 16px 12px 20px;margin-bottom:4px;", ""], _ref2 => {
59
+ let $clickable = _ref2.$clickable;
60
+ return $clickable ? "\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n " : "";
61
+ });
62
+ export const RowText = styled.div.withConfig({
63
+ displayName: "settings__RowText",
64
+ componentId: "sc-1el9eq3-3"
65
+ })(["display:flex;flex-direction:column;flex:1 1 0%;min-width:0;padding-right:12px;.row-title{margin-bottom:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.row-description{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.row-description-wrap{white-space:normal;}"]);
66
+ export const SettingRow = _ref3 => {
67
+ let title = _ref3.title,
68
+ description = _ref3.description,
69
+ control = _ref3.control,
70
+ onClick = _ref3.onClick,
71
+ _ref3$wrapDescription = _ref3.wrapDescription,
72
+ wrapDescription = _ref3$wrapDescription === void 0 ? false : _ref3$wrapDescription;
73
+ return /*#__PURE__*/React.createElement(StyledSettingRow, {
74
+ variant: "paper-2",
75
+ $clickable: Boolean(onClick),
76
+ onClick: onClick
77
+ }, /*#__PURE__*/React.createElement(RowText, null, /*#__PURE__*/React.createElement(Body2, {
78
+ className: "row-title"
79
+ }, title), description ? /*#__PURE__*/React.createElement(Caption1, {
80
+ className: wrapDescription ? "row-description-wrap" : "row-description",
81
+ color: "tertiary"
82
+ }, description) : null), control);
83
+ };
84
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","names":["React","styled","MD","SM","Card","IconButton","ArrowLeftIcon","Body2","Caption1","Header2","Title2","StyledSettingsHeader","div","withConfig","displayName","componentId","SettingsHeader","_ref","title","backTitle","createElement","className","variant","SettingsContent","StyledSettingRow","_ref2","$clickable","RowText","SettingRow","_ref3","description","control","onClick","_ref3$wrapDescription","wrapDescription","Boolean","color"],"sources":["../../../../src/presentation/shared/settings.tsx"],"sourcesContent":["/**\n * Shared building blocks for the System Settings presentation stories\n * (`Presentation/System Settings/*`). The settings page header, the max-width\n * body column and the \"row\" card (title + description on the left, a control on\n * the right) are defined once here and reused by the Index, General and\n * Security stories so the chrome stays identical and in one place.\n *\n * Mirrors the app: PageHeader.jsx + BackButton.js (header) and the repeated\n * `Card variant=\"paper-2\"` row pattern from the SystemSettings pages.\n */\nimport React, { ReactElement, ReactNode } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MD, SM } from \"./tokens\";\nimport { Card } from \"../../components/Card\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { ArrowLeftIcon } from \"../../components/Icons\";\nimport { Body2, Caption1, Header2, Title2 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* Settings page header (mirrors PageHeader.jsx + BackButton.js) */\n/* ------------------------------------------------------------------ */\n\nconst StyledSettingsHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 12px 0;\n width: 100%;\n height: 40px;\n flex-shrink: 0;\n\n .header-left {\n display: flex;\n align-items: center;\n width: 100%;\n max-width: 100%;\n\n @media (min-width: ${SM}) {\n min-width: 0;\n }\n }\n\n .back-button {\n flex-shrink: 0;\n margin-right: 4px;\n\n @media (min-width: ${MD}) {\n margin-right: 8px;\n }\n }\n\n .page-title-desktop {\n display: none;\n margin-right: 8px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n @media (min-width: ${MD}) {\n display: block;\n }\n }\n\n .page-title-mobile {\n display: block;\n margin-right: 8px;\n font-weight: 300;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n @media (min-width: ${MD}) {\n display: none;\n }\n }\n\n /* keeps the title clear of the absolutely-positioned top-right controls */\n .page-header-spacer {\n display: none;\n height: 100%;\n width: 208px;\n flex-shrink: 0;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n }\n`;\n\nexport interface SettingsHeaderProps {\n title: string;\n backTitle?: string;\n}\n\nexport const SettingsHeader = ({\n title,\n backTitle,\n}: SettingsHeaderProps): ReactElement => (\n <StyledSettingsHeader>\n <div className=\"header-left\">\n {backTitle ? (\n <IconButton variant=\"text gray\" className=\"back-button\">\n <ArrowLeftIcon />\n </IconButton>\n ) : null}\n <Title2 className=\"page-title-desktop\">{title}</Title2>\n <Header2 className=\"page-title-mobile\">{title}</Header2>\n </div>\n <div className=\"page-header-spacer\" />\n </StyledSettingsHeader>\n);\n\n/* ------------------------------------------------------------------ */\n/* Shared layout pieces */\n/* ------------------------------------------------------------------ */\n\n/** The page body, max-width 850px and left-aligned (mirrors the app Page). */\nexport const SettingsContent = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n width: 100%;\n max-width: 850px;\n`;\n\n/** A settings row card: title + description on the left, control on the right. */\nexport const StyledSettingRow = styled(Card)<{ $clickable?: boolean }>`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 68px;\n padding: 12px 16px 12px 20px;\n margin-bottom: 4px;\n\n ${({ $clickable }) =>\n $clickable\n ? `\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n `\n : \"\"}\n`;\n\nexport const RowText = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1 1 0%;\n min-width: 0;\n padding-right: 12px;\n\n .row-title {\n margin-bottom: 2px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .row-description {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n /* Long descriptions that are allowed to wrap onto multiple lines. */\n .row-description-wrap {\n white-space: normal;\n }\n`;\n\nexport interface SettingRowProps {\n title: string;\n description?: ReactNode;\n control?: ReactNode;\n onClick?: () => void;\n /** Let a long description wrap onto multiple lines instead of truncating. */\n wrapDescription?: boolean;\n}\n\nexport const SettingRow = ({\n title,\n description,\n control,\n onClick,\n wrapDescription = false,\n}: SettingRowProps): ReactElement => (\n <StyledSettingRow\n variant=\"paper-2\"\n $clickable={Boolean(onClick)}\n onClick={onClick}\n >\n <RowText>\n <Body2 className=\"row-title\">{title}</Body2>\n {description ? (\n <Caption1\n className={\n wrapDescription ? \"row-description-wrap\" : \"row-description\"\n }\n color=\"tertiary\"\n >\n {description}\n </Caption1>\n ) : null}\n </RowText>\n {control}\n </StyledSettingRow>\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAmC,OAAO;AAEtD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,EAAE,EAAEC,EAAE,QAAQ,UAAU;AACjC,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,MAAM,QAAQ,6BAA6B;;AAE9E;AACA;AACA;;AAEA,MAAMC,oBAAoB,GAAGV,MAAM,CAACW,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,muBAedZ,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KAAA,CAALX,KAAK;IACLY,WAAW,GAAAD,KAAA,CAAXC,WAAW;IACXC,OAAO,GAAAF,KAAA,CAAPE,OAAO;IACPC,OAAO,GAAAH,KAAA,CAAPG,OAAO;IAAAC,qBAAA,GAAAJ,KAAA,CACPK,eAAe;IAAfA,eAAe,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;EAAA,oBAEvBjC,KAAA,CAAAoB,aAAA,CAACI,gBAAgB;IACfF,OAAO,EAAC,SAAS;IACjBI,UAAU,EAAES,OAAO,CAACH,OAAO,CAAE;IAC7BA,OAAO,EAAEA;EAAQ,gBAEjBhC,KAAA,CAAAoB,aAAA,CAACO,OAAO,qBACN3B,KAAA,CAAAoB,aAAA,CAACb,KAAK;IAACc,SAAS,EAAC;EAAW,GAAEH,KAAa,CAAC,EAC3CY,WAAW,gBACV9B,KAAA,CAAAoB,aAAA,CAACZ,QAAQ;IACPa,SAAS,EACPa,eAAe,GAAG,sBAAsB,GAAG,iBAC5C;IACDE,KAAK,EAAC;EAAU,GAEfN,WACO,CAAC,GACT,IACG,CAAC,EACTC,OACe,CAAC;AAAA,CACpB","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ import React, { ReactElement } from "react";
2
+ /**
3
+ * ImageCard — a full-bleed image and little else. Cover-management controls
4
+ * (collapse, remove) appear on hover; there is no other chrome. Fixed-box in
5
+ * production (host sets width AND height, the cover scales aspect-locked); shown
6
+ * here in the auto-height shell with a reserved image aspect ratio.
7
+ */
8
+ export interface ImageCardProps {
9
+ color?: string;
10
+ src?: string;
11
+ }
12
+ export declare const ImageCard: ({ color, src, }: ImageCardProps) => ReactElement;
13
+ export declare const ImagePlaceholder: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ReactElement;
14
+ export declare const ImageSkeleton: () => ReactElement;
15
+ //# sourceMappingURL=ImageCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/ImageCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAQ5C;;;;;GAKG;AAEH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,SAAS,GAAI,iBAGvB,cAAc,KAAG,YAOnB,CAAC;AAKF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAQF,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,YAIhC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from "react";
3
+ import { StyledColorCover, coverManagement, Placeholder } from "./shared";
4
+ import { UploadIcon } from "../../../components/Icons";
5
+ import { SkeletonLoader } from "../../../components/Loaders";
6
+ import { Cover } from "../primitives";
7
+ import { COVER_RATIO_IMAGE } from "../shell";
8
+
9
+ /**
10
+ * ImageCard — a full-bleed image and little else. Cover-management controls
11
+ * (collapse, remove) appear on hover; there is no other chrome. Fixed-box in
12
+ * production (host sets width AND height, the cover scales aspect-locked); shown
13
+ * here in the auto-height shell with a reserved image aspect ratio.
14
+ */
15
+
16
+ export const ImageCard = _ref => {
17
+ let _ref$color = _ref.color,
18
+ color = _ref$color === void 0 ? "#F0997B" : _ref$color,
19
+ src = _ref.src;
20
+ return /*#__PURE__*/React.createElement(Cover, {
21
+ aspectRatio: COVER_RATIO_IMAGE,
22
+ topRightSlot: coverManagement({
23
+ removeLabel: "Remove image"
24
+ })
25
+ }, src ? /*#__PURE__*/React.createElement("img", {
26
+ src: src,
27
+ alt: ""
28
+ }) : /*#__PURE__*/React.createElement(StyledColorCover, {
29
+ $color: color
30
+ }));
31
+ };
32
+
33
+ /* ---- placeholder + skeleton ---- */
34
+
35
+ /* The placeholder doubles as the drop target (visual only here). */
36
+ export const ImagePlaceholder = props => /*#__PURE__*/React.createElement(Placeholder, _extends({
37
+ icon: /*#__PURE__*/React.createElement(UploadIcon, null),
38
+ label: "Drop an image or click to upload",
39
+ height: 168,
40
+ dashed: true
41
+ }, props));
42
+ export const ImageSkeleton = () => /*#__PURE__*/React.createElement(Cover, {
43
+ aspectRatio: COVER_RATIO_IMAGE
44
+ }, /*#__PURE__*/React.createElement(SkeletonLoader, {
45
+ style: {
46
+ width: "100%",
47
+ height: "100%"
48
+ }
49
+ }));
50
+ //# sourceMappingURL=ImageCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageCard.js","names":["React","StyledColorCover","coverManagement","Placeholder","UploadIcon","SkeletonLoader","Cover","COVER_RATIO_IMAGE","ImageCard","_ref","_ref$color","color","src","createElement","aspectRatio","topRightSlot","removeLabel","alt","$color","ImagePlaceholder","props","_extends","icon","label","height","dashed","ImageSkeleton","style","width"],"sources":["../../../../../src/presentation/stackedCard/content/ImageCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport { StyledColorCover, coverManagement, Placeholder } from \"./shared\";\nimport { UploadIcon } from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { Cover } from \"../primitives\";\nimport { COVER_RATIO_IMAGE } from \"../shell\";\n\n/**\n * ImageCard — a full-bleed image and little else. Cover-management controls\n * (collapse, remove) appear on hover; there is no other chrome. Fixed-box in\n * production (host sets width AND height, the cover scales aspect-locked); shown\n * here in the auto-height shell with a reserved image aspect ratio.\n */\n\nexport interface ImageCardProps {\n color?: string;\n src?: string;\n}\n\nexport const ImageCard = ({\n color = \"#F0997B\",\n src,\n}: ImageCardProps): ReactElement => (\n <Cover\n aspectRatio={COVER_RATIO_IMAGE}\n topRightSlot={coverManagement({ removeLabel: \"Remove image\" })}\n >\n {src ? <img src={src} alt=\"\" /> : <StyledColorCover $color={color} />}\n </Cover>\n);\n\n/* ---- placeholder + skeleton ---- */\n\n/* The placeholder doubles as the drop target (visual only here). */\nexport const ImagePlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder\n icon={<UploadIcon />}\n label=\"Drop an image or click to upload\"\n height={168}\n dashed\n {...props}\n />\n);\n\nexport const ImageSkeleton = (): ReactElement => (\n <Cover aspectRatio={COVER_RATIO_IMAGE}>\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n </Cover>\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,WAAW,QAAQ,UAAU;AACzE,SAASC,UAAU,QAAQ,2BAA2B;AACtD,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,KAAK,QAAQ,eAAe;AACrC,SAASC,iBAAiB,QAAQ,UAAU;;AAE5C;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAO,MAAMC,SAAS,GAAGC,IAAA;EAAA,IAAAC,UAAA,GAAAD,IAAA,CACvBE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,SAAS,GAAAA,UAAA;IACjBE,GAAG,GAAAH,IAAA,CAAHG,GAAG;EAAA,oBAEHZ,KAAA,CAAAa,aAAA,CAACP,KAAK;IACJQ,WAAW,EAAEP,iBAAkB;IAC/BQ,YAAY,EAAEb,eAAe,CAAC;MAAEc,WAAW,EAAE;IAAe,CAAC;EAAE,GAE9DJ,GAAG,gBAAGZ,KAAA,CAAAa,aAAA;IAAKD,GAAG,EAAEA,GAAI;IAACK,GAAG,EAAC;EAAE,CAAE,CAAC,gBAAGjB,KAAA,CAAAa,aAAA,CAACZ,gBAAgB;IAACiB,MAAM,EAAEP;EAAM,CAAE,CAC/D,CAAC;AAAA,CACT;;AAED;;AAEA;AACA,OAAO,MAAMQ,gBAAgB,GAC3BC,KAAoD,iBAEpDpB,KAAA,CAAAa,aAAA,CAACV,WAAW,EAAAkB,QAAA;EACVC,IAAI,eAAEtB,KAAA,CAAAa,aAAA,CAACT,UAAU,MAAE,CAAE;EACrBmB,KAAK,EAAC,kCAAkC;EACxCC,MAAM,EAAE,GAAI;EACZC,MAAM;AAAA,GACFL,KAAK,CACV,CACF;AAED,OAAO,MAAMM,aAAa,GAAGA,CAAA,kBAC3B1B,KAAA,CAAAa,aAAA,CAACP,KAAK;EAACQ,WAAW,EAAEP;AAAkB,gBACpCP,KAAA,CAAAa,aAAA,CAACR,cAAc;EAACsB,KAAK,EAAE;IAAEC,KAAK,EAAE,MAAM;IAAEJ,MAAM,EAAE;EAAO;AAAE,CAAE,CACtD,CACR","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ import React, { ReactElement } from "react";
2
+ import { UnfurlController } from "./unfurl";
3
+ /**
4
+ * LinkCard — a link preview as a LIFECYCLE, not two static layouts.
5
+ *
6
+ * Data climbs a progressive ladder (url → basic → full); the anatomy is
7
+ * CONSTANT at every tier, so each slot swaps a skeleton for real content in
8
+ * place and the card never reflows on upgrade. Four statuses layer on top:
9
+ * resolving — climbing the ladder, aspect + rows reserved by skeletons
10
+ * resolved — the full card
11
+ * stale — resolved, but past its cache window: shows `fetchedAt` and a
12
+ * re-unfurl affordance
13
+ * error — the unfurl failed: favicon + raw URL + retry, NO media
14
+ *
15
+ * Compact ↔ expanded is a user-switchable DISPLAY LEVEL on the same link
16
+ * entity (the data lives in the controller, so switching never refetches or
17
+ * loses it) — not two separate card types.
18
+ */
19
+ export type LinkDisplay = "compact" | "expanded";
20
+ export interface LinkCardProps {
21
+ unfurl: UnfurlController;
22
+ display?: LinkDisplay;
23
+ onToggleDisplay?: () => void;
24
+ }
25
+ export declare const LinkCard: ({ unfurl, display, onToggleDisplay, }: LinkCardProps) => ReactElement;
26
+ export declare const LinkSkeleton: () => ReactElement;
27
+ export declare const LinkPlaceholder: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ReactElement;
28
+ //# sourceMappingURL=LinkCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/LinkCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAa5C,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAY7D;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AA+JjD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,QAAQ,GAAI,uCAItB,aAAa,KAAG,YAiKlB,CAAC;AAyBF,eAAO,MAAM,YAAY,QAAO,YA0B/B,CAAC;AAIF,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAEF,CAAC"}
@@ -0,0 +1,336 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from "react";
3
+ import styled from "styled-components";
4
+ import { StyledChip, StyledClamp, StyledColorCover, StyledFavicon, coverManagement, playControl, Placeholder } from "./shared";
5
+ import { formatFetchedAt } from "./unfurl";
6
+ import { ArrowRefreshIcon, InsertLinkIcon, WarningTriangleIcon } from "../../../components/Icons";
7
+ import { SkeletonLoader } from "../../../components/Loaders";
8
+ import { Body2, Caption1 } from "../../../components/Typography";
9
+ import { Typography } from "../../../components/Typography/Typography";
10
+ import { Cover, StackRow } from "../primitives";
11
+ import { COVER_RATIO, COVER_RATIO_HERO } from "../shell";
12
+
13
+ /**
14
+ * LinkCard — a link preview as a LIFECYCLE, not two static layouts.
15
+ *
16
+ * Data climbs a progressive ladder (url → basic → full); the anatomy is
17
+ * CONSTANT at every tier, so each slot swaps a skeleton for real content in
18
+ * place and the card never reflows on upgrade. Four statuses layer on top:
19
+ * resolving — climbing the ladder, aspect + rows reserved by skeletons
20
+ * resolved — the full card
21
+ * stale — resolved, but past its cache window: shows `fetchedAt` and a
22
+ * re-unfurl affordance
23
+ * error — the unfurl failed: favicon + raw URL + retry, NO media
24
+ *
25
+ * Compact ↔ expanded is a user-switchable DISPLAY LEVEL on the same link
26
+ * entity (the data lives in the controller, so switching never refetches or
27
+ * loses it) — not two separate card types.
28
+ */
29
+
30
+ /* ------------------------------------------------------------------ */
31
+ /* Small building blocks */
32
+ /* ------------------------------------------------------------------ */
33
+
34
+ const StyledDomainRow = styled.div.withConfig({
35
+ displayName: "LinkCard__StyledDomainRow",
36
+ componentId: "sc-qyea73-0"
37
+ })(["display:flex;align-items:center;gap:8px;min-height:16px;"]);
38
+ const StyledChips = styled.div.withConfig({
39
+ displayName: "LinkCard__StyledChips",
40
+ componentId: "sc-qyea73-1"
41
+ })(["display:flex;align-items:center;gap:6px;min-height:18px;"]);
42
+
43
+ /* The stale strip — a re-unfurl affordance with the fetch time. */
44
+ const StyledStaleStrip = styled.div.withConfig({
45
+ displayName: "LinkCard__StyledStaleStrip",
46
+ componentId: "sc-qyea73-2"
47
+ })(["display:flex;align-items:center;gap:8px;color:var(--color-theme-600);> span{flex:1 1 auto;min-width:0;}"]);
48
+ const StyledReunfurl = styled.button.withConfig({
49
+ displayName: "LinkCard__StyledReunfurl",
50
+ componentId: "sc-qyea73-3"
51
+ })(["display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;padding:3px 8px;border:1px solid var(--border-primary);border-radius:6px;background:var(--page-paper-main);color:var(--color-theme-800);font-size:11px;cursor:pointer;svg{width:12px;height:12px;}&:hover{background:var(--color-theme-200);border-color:var(--sc-selection-ring);}"]);
52
+
53
+ /* The error body — favicon + raw URL + retry, no media (per spec §5). */
54
+ const StyledErrorBody = styled.div.withConfig({
55
+ displayName: "LinkCard__StyledErrorBody",
56
+ componentId: "sc-qyea73-4"
57
+ })(["display:flex;flex-direction:column;gap:10px;padding:12px;.err-head{display:flex;align-items:center;gap:8px;color:var(--red-alert);}.err-head svg{width:16px;height:16px;flex:0 0 auto;}.err-url{display:flex;align-items:center;gap:8px;word-break:break-all;}"]);
58
+ const StyledRetry = styled.button.withConfig({
59
+ displayName: "LinkCard__StyledRetry",
60
+ componentId: "sc-qyea73-5"
61
+ })(["align-self:flex-start;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--border-primary);border-radius:6px;background:var(--page-paper-main);color:var(--color-theme-800);cursor:pointer;svg{width:14px;height:14px;}&:hover{background:var(--color-theme-200);border-color:var(--sc-selection-ring);}"]);
62
+
63
+ /* The expanded footer band — tinted, holds the title + domain under the hero. */
64
+ const StyledFooterTitle = styled(Body2).withConfig({
65
+ displayName: "LinkCard__StyledFooterTitle",
66
+ componentId: "sc-qyea73-6"
67
+ })(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
68
+
69
+ /* ------------------------------------------------------------------ */
70
+ /* The display-level switch — lives in the entity "…" slot */
71
+ /* ------------------------------------------------------------------ */
72
+
73
+ const StyledDisplayToggle = styled.button.withConfig({
74
+ displayName: "LinkCard__StyledDisplayToggle",
75
+ componentId: "sc-qyea73-7"
76
+ })(["display:inline-flex;align-items:center;padding:2px 8px;border:1px solid var(--border-primary);border-radius:10px;background:var(--color-theme-200);color:var(--color-theme-700);font-size:11px;cursor:pointer;white-space:nowrap;&:hover{background:var(--color-theme-300);}"]);
77
+ const DisplayToggle = _ref => {
78
+ let display = _ref.display,
79
+ onToggle = _ref.onToggle;
80
+ return /*#__PURE__*/React.createElement(StyledDisplayToggle, {
81
+ type: "button",
82
+ "data-fixed": true,
83
+ className: "sc-control",
84
+ "aria-label": "Switch display level",
85
+ onClick: onToggle
86
+ }, display === "compact" ? "Expand ▾" : "Compact ▴");
87
+ };
88
+
89
+ /* ------------------------------------------------------------------ */
90
+ /* LinkCard */
91
+ /* ------------------------------------------------------------------ */
92
+
93
+ export const LinkCard = _ref2 => {
94
+ var _data$heroColor2, _data$faviconColor2;
95
+ let unfurl = _ref2.unfurl,
96
+ _ref2$display = _ref2.display,
97
+ display = _ref2$display === void 0 ? "compact" : _ref2$display,
98
+ onToggleDisplay = _ref2.onToggleDisplay;
99
+ const status = unfurl.status,
100
+ tier = unfurl.tier,
101
+ data = unfurl.data,
102
+ fetchedAt = unfurl.fetchedAt,
103
+ retry = unfurl.retry,
104
+ reunfurl = unfurl.reunfurl;
105
+
106
+ // ── Error: favicon + raw URL + retry, no media ──────────────────
107
+ if (status === "error") {
108
+ return /*#__PURE__*/React.createElement(StyledErrorBody, null, /*#__PURE__*/React.createElement("div", {
109
+ className: "err-head"
110
+ }, /*#__PURE__*/React.createElement(WarningTriangleIcon, null), /*#__PURE__*/React.createElement(Caption1, {
111
+ weight: "bold",
112
+ color: "tertiary"
113
+ }, "Couldn\u2019t load a preview")), /*#__PURE__*/React.createElement("div", {
114
+ className: "err-url"
115
+ }, /*#__PURE__*/React.createElement(StyledFavicon, {
116
+ $bg: "var(--color-theme-400)",
117
+ "data-fixed": true
118
+ }), /*#__PURE__*/React.createElement(Caption1, {
119
+ color: "secondary"
120
+ }, data.url)), /*#__PURE__*/React.createElement(StyledRetry, {
121
+ type: "button",
122
+ onClick: retry
123
+ }, /*#__PURE__*/React.createElement(ArrowRefreshIcon, null), /*#__PURE__*/React.createElement(Typography, {
124
+ as: "span",
125
+ variant: "Caption 1"
126
+ }, "Retry")));
127
+ }
128
+ const hasBasic = tier === "basic" || tier === "full";
129
+ const hasFull = tier === "full";
130
+ const toggle = onToggleDisplay != null ? onToggleDisplay : () => undefined;
131
+
132
+ // ── Expanded: hero + tinted footer band (title + domain) ────────
133
+ if (display === "expanded") {
134
+ var _data$heroColor, _data$faviconColor;
135
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cover, {
136
+ aspectRatio: COVER_RATIO_HERO,
137
+ centerSlot: hasFull && data.playable ? playControl : undefined,
138
+ topRightSlot: coverManagement()
139
+ }, hasFull ? /*#__PURE__*/React.createElement(StyledColorCover, {
140
+ $color: (_data$heroColor = data.heroColor) != null ? _data$heroColor : "#1D9E75"
141
+ }) : /*#__PURE__*/React.createElement(SkeletonLoader, {
142
+ style: {
143
+ width: "100%",
144
+ height: "100%"
145
+ }
146
+ })), /*#__PURE__*/React.createElement(StackRow, {
147
+ role: "footer",
148
+ direction: "column",
149
+ background: "var(--color-theme-200)"
150
+ }, /*#__PURE__*/React.createElement(StyledDomainRow, null, hasBasic ? /*#__PURE__*/React.createElement(StyledFavicon, {
151
+ $bg: (_data$faviconColor = data.faviconColor) != null ? _data$faviconColor : "#0F6E56",
152
+ "data-fixed": true
153
+ }) : /*#__PURE__*/React.createElement(SkeletonLoader, {
154
+ "data-fixed": true,
155
+ style: {
156
+ width: 16,
157
+ height: 16,
158
+ borderRadius: 4
159
+ }
160
+ }), hasBasic ? /*#__PURE__*/React.createElement(Caption1, {
161
+ color: "tertiary"
162
+ }, data.domain) : /*#__PURE__*/React.createElement(Caption1, {
163
+ color: "tertiary"
164
+ }, data.url), /*#__PURE__*/React.createElement("span", {
165
+ style: {
166
+ flex: "1 1 auto"
167
+ }
168
+ }), /*#__PURE__*/React.createElement(DisplayToggle, {
169
+ display: display,
170
+ onToggle: toggle
171
+ })), hasBasic ? /*#__PURE__*/React.createElement(StyledFooterTitle, {
172
+ weight: "bold"
173
+ }, data.title) : /*#__PURE__*/React.createElement(SkeletonLoader, {
174
+ style: {
175
+ height: 14,
176
+ width: "90%"
177
+ }
178
+ }), hasFull ? /*#__PURE__*/React.createElement(Caption1, {
179
+ color: "tertiary"
180
+ }, data.description) : /*#__PURE__*/React.createElement(SkeletonLoader, {
181
+ style: {
182
+ height: 10,
183
+ width: "70%"
184
+ }
185
+ })), status === "stale" ? /*#__PURE__*/React.createElement(StackRow, {
186
+ role: "meta"
187
+ }, /*#__PURE__*/React.createElement(StaleStrip, {
188
+ fetchedAt: fetchedAt,
189
+ onReunfurl: reunfurl
190
+ })) : null);
191
+ }
192
+
193
+ // ── Compact: cover + favicon/domain + title + chips ─────────────
194
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cover, {
195
+ aspectRatio: COVER_RATIO,
196
+ centerSlot: hasFull && data.playable ? playControl : undefined
197
+ }, hasFull ? /*#__PURE__*/React.createElement(StyledColorCover, {
198
+ $color: (_data$heroColor2 = data.heroColor) != null ? _data$heroColor2 : "#1D9E75"
199
+ }) : /*#__PURE__*/React.createElement(SkeletonLoader, {
200
+ style: {
201
+ width: "100%",
202
+ height: "100%"
203
+ }
204
+ })), /*#__PURE__*/React.createElement(StackRow, {
205
+ role: "custom"
206
+ }, /*#__PURE__*/React.createElement(StyledDomainRow, null, hasBasic ? /*#__PURE__*/React.createElement(StyledFavicon, {
207
+ $bg: (_data$faviconColor2 = data.faviconColor) != null ? _data$faviconColor2 : "#0F6E56",
208
+ "data-fixed": true
209
+ }) : /*#__PURE__*/React.createElement(SkeletonLoader, {
210
+ "data-fixed": true,
211
+ style: {
212
+ width: 16,
213
+ height: 16,
214
+ borderRadius: 4
215
+ }
216
+ }), hasBasic ? /*#__PURE__*/React.createElement(Caption1, {
217
+ color: "tertiary"
218
+ }, data.domain) : /*#__PURE__*/React.createElement(Caption1, {
219
+ color: "tertiary"
220
+ }, data.url), /*#__PURE__*/React.createElement("span", {
221
+ style: {
222
+ flex: "1 1 auto"
223
+ }
224
+ }), /*#__PURE__*/React.createElement(DisplayToggle, {
225
+ display: display,
226
+ onToggle: toggle
227
+ }))), /*#__PURE__*/React.createElement(StackRow, {
228
+ role: "title"
229
+ }, hasBasic ? /*#__PURE__*/React.createElement(StyledClamp, null, data.title) : /*#__PURE__*/React.createElement("div", {
230
+ style: {
231
+ width: "100%"
232
+ }
233
+ }, /*#__PURE__*/React.createElement(SkeletonLoader, {
234
+ style: {
235
+ height: 14,
236
+ width: "92%"
237
+ }
238
+ }), /*#__PURE__*/React.createElement(SkeletonLoader, {
239
+ style: {
240
+ height: 14,
241
+ width: "60%",
242
+ marginTop: 6
243
+ }
244
+ }))), /*#__PURE__*/React.createElement(StackRow, {
245
+ role: "custom"
246
+ }, /*#__PURE__*/React.createElement(StyledChips, null, hasFull ? /*#__PURE__*/React.createElement(React.Fragment, null, data.kind ? /*#__PURE__*/React.createElement(StyledChip, {
247
+ "data-fixed": true
248
+ }, data.kind) : null, data.duration ? /*#__PURE__*/React.createElement(StyledChip, {
249
+ "data-fixed": true
250
+ }, data.duration) : null) : /*#__PURE__*/React.createElement(SkeletonLoader, {
251
+ style: {
252
+ height: 18,
253
+ width: 96,
254
+ borderRadius: 10
255
+ }
256
+ }))), status === "stale" ? /*#__PURE__*/React.createElement(StackRow, {
257
+ role: "meta"
258
+ }, /*#__PURE__*/React.createElement(StaleStrip, {
259
+ fetchedAt: fetchedAt,
260
+ onReunfurl: reunfurl
261
+ })) : null);
262
+ };
263
+
264
+ /* The stale affordance — fetch time + a manual re-unfurl button. */
265
+ const StaleStrip = _ref3 => {
266
+ let fetchedAt = _ref3.fetchedAt,
267
+ onReunfurl = _ref3.onReunfurl;
268
+ return /*#__PURE__*/React.createElement(StyledStaleStrip, null, /*#__PURE__*/React.createElement(Typography, {
269
+ as: "span",
270
+ variant: "Caption 1",
271
+ color: "tertiary"
272
+ }, "Preview may be out of date \xB7 fetched ", formatFetchedAt(fetchedAt)), /*#__PURE__*/React.createElement(StyledReunfurl, {
273
+ type: "button",
274
+ onClick: onReunfurl
275
+ }, /*#__PURE__*/React.createElement(ArrowRefreshIcon, null), "Re-unfurl"));
276
+ };
277
+
278
+ /* ---- skeleton ---- */
279
+
280
+ /* Mirrors the compact anatomy row for row (this is the `resolving` render at
281
+ tier `url`), so a resolving link never reflows as it climbs the ladder. */
282
+ export const LinkSkeleton = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cover, {
283
+ aspectRatio: COVER_RATIO
284
+ }, /*#__PURE__*/React.createElement(SkeletonLoader, {
285
+ style: {
286
+ width: "100%",
287
+ height: "100%"
288
+ }
289
+ })), /*#__PURE__*/React.createElement(StackRow, {
290
+ role: "custom"
291
+ }, /*#__PURE__*/React.createElement(StyledDomainRow, null, /*#__PURE__*/React.createElement(SkeletonLoader, {
292
+ "data-fixed": true,
293
+ style: {
294
+ width: 16,
295
+ height: 16,
296
+ borderRadius: 4
297
+ }
298
+ }), /*#__PURE__*/React.createElement(SkeletonLoader, {
299
+ style: {
300
+ height: 10,
301
+ width: "40%"
302
+ }
303
+ }))), /*#__PURE__*/React.createElement(StackRow, {
304
+ role: "title"
305
+ }, /*#__PURE__*/React.createElement("div", {
306
+ style: {
307
+ width: "100%"
308
+ }
309
+ }, /*#__PURE__*/React.createElement(SkeletonLoader, {
310
+ style: {
311
+ height: 14,
312
+ width: "92%"
313
+ }
314
+ }), /*#__PURE__*/React.createElement(SkeletonLoader, {
315
+ style: {
316
+ height: 14,
317
+ width: "60%",
318
+ marginTop: 6
319
+ }
320
+ }))), /*#__PURE__*/React.createElement(StackRow, {
321
+ role: "custom"
322
+ }, /*#__PURE__*/React.createElement(StyledChips, null, /*#__PURE__*/React.createElement(SkeletonLoader, {
323
+ style: {
324
+ height: 18,
325
+ width: 96,
326
+ borderRadius: 10
327
+ }
328
+ }))));
329
+
330
+ /* ---- placeholder ---- */
331
+
332
+ export const LinkPlaceholder = props => /*#__PURE__*/React.createElement(Placeholder, _extends({
333
+ icon: /*#__PURE__*/React.createElement(InsertLinkIcon, null),
334
+ label: "Add a link"
335
+ }, props));
336
+ //# sourceMappingURL=LinkCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkCard.js","names":["React","styled","StyledChip","StyledClamp","StyledColorCover","StyledFavicon","coverManagement","playControl","Placeholder","formatFetchedAt","ArrowRefreshIcon","InsertLinkIcon","WarningTriangleIcon","SkeletonLoader","Body2","Caption1","Typography","Cover","StackRow","COVER_RATIO","COVER_RATIO_HERO","StyledDomainRow","div","withConfig","displayName","componentId","StyledChips","StyledStaleStrip","StyledReunfurl","button","StyledErrorBody","StyledRetry","StyledFooterTitle","StyledDisplayToggle","DisplayToggle","_ref","display","onToggle","createElement","type","className","onClick","LinkCard","_ref2","_data$heroColor2","_data$faviconColor2","unfurl","_ref2$display","onToggleDisplay","status","tier","data","fetchedAt","retry","reunfurl","weight","color","$bg","url","as","variant","hasBasic","hasFull","toggle","undefined","_data$heroColor","_data$faviconColor","Fragment","aspectRatio","centerSlot","playable","topRightSlot","$color","heroColor","style","width","height","role","direction","background","faviconColor","borderRadius","domain","flex","title","description","StaleStrip","onReunfurl","marginTop","kind","duration","_ref3","LinkSkeleton","LinkPlaceholder","props","_extends","icon","label"],"sources":["../../../../../src/presentation/stackedCard/content/LinkCard.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport {\n StyledChip,\n StyledClamp,\n StyledColorCover,\n StyledFavicon,\n coverManagement,\n playControl,\n Placeholder,\n} from \"./shared\";\nimport { UnfurlController, formatFetchedAt } from \"./unfurl\";\nimport {\n ArrowRefreshIcon,\n InsertLinkIcon,\n WarningTriangleIcon,\n} from \"../../../components/Icons\";\nimport { SkeletonLoader } from \"../../../components/Loaders\";\nimport { Body2, Caption1 } from \"../../../components/Typography\";\nimport { Typography } from \"../../../components/Typography/Typography\";\nimport { Cover, StackRow } from \"../primitives\";\nimport { COVER_RATIO, COVER_RATIO_HERO } from \"../shell\";\n\n/**\n * LinkCard — a link preview as a LIFECYCLE, not two static layouts.\n *\n * Data climbs a progressive ladder (url → basic → full); the anatomy is\n * CONSTANT at every tier, so each slot swaps a skeleton for real content in\n * place and the card never reflows on upgrade. Four statuses layer on top:\n * resolving — climbing the ladder, aspect + rows reserved by skeletons\n * resolved — the full card\n * stale — resolved, but past its cache window: shows `fetchedAt` and a\n * re-unfurl affordance\n * error — the unfurl failed: favicon + raw URL + retry, NO media\n *\n * Compact ↔ expanded is a user-switchable DISPLAY LEVEL on the same link\n * entity (the data lives in the controller, so switching never refetches or\n * loses it) — not two separate card types.\n */\n\nexport type LinkDisplay = \"compact\" | \"expanded\";\n\n/* ------------------------------------------------------------------ */\n/* Small building blocks */\n/* ------------------------------------------------------------------ */\n\nconst StyledDomainRow = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 16px;\n`;\n\nconst StyledChips = styled.div`\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 18px;\n`;\n\n/* The stale strip — a re-unfurl affordance with the fetch time. */\nconst StyledStaleStrip = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--color-theme-600);\n\n > span {\n flex: 1 1 auto;\n min-width: 0;\n }\n`;\n\nconst StyledReunfurl = styled.button`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: 0 0 auto;\n padding: 3px 8px;\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n background: var(--page-paper-main);\n color: var(--color-theme-800);\n font-size: 11px;\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n\n &:hover {\n background: var(--color-theme-200);\n border-color: var(--sc-selection-ring);\n }\n`;\n\n/* The error body — favicon + raw URL + retry, no media (per spec §5). */\nconst StyledErrorBody = styled.div`\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px;\n\n .err-head {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--red-alert);\n }\n\n .err-head svg {\n width: 16px;\n height: 16px;\n flex: 0 0 auto;\n }\n\n .err-url {\n display: flex;\n align-items: center;\n gap: 8px;\n word-break: break-all;\n }\n`;\n\nconst StyledRetry = styled.button`\n align-self: flex-start;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px;\n border: 1px solid var(--border-primary);\n border-radius: 6px;\n background: var(--page-paper-main);\n color: var(--color-theme-800);\n cursor: pointer;\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n &:hover {\n background: var(--color-theme-200);\n border-color: var(--sc-selection-ring);\n }\n`;\n\n/* The expanded footer band — tinted, holds the title + domain under the hero. */\nconst StyledFooterTitle = styled(Body2)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\n/* ------------------------------------------------------------------ */\n/* The display-level switch — lives in the entity \"…\" slot */\n/* ------------------------------------------------------------------ */\n\nconst StyledDisplayToggle = styled.button`\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border: 1px solid var(--border-primary);\n border-radius: 10px;\n background: var(--color-theme-200);\n color: var(--color-theme-700);\n font-size: 11px;\n cursor: pointer;\n white-space: nowrap;\n\n &:hover {\n background: var(--color-theme-300);\n }\n`;\n\nconst DisplayToggle = ({\n display,\n onToggle,\n}: {\n display: LinkDisplay;\n onToggle: () => void;\n}): ReactElement => (\n <StyledDisplayToggle\n type=\"button\"\n data-fixed\n className=\"sc-control\"\n aria-label=\"Switch display level\"\n onClick={onToggle}\n >\n {display === \"compact\" ? \"Expand ▾\" : \"Compact ▴\"}\n </StyledDisplayToggle>\n);\n\n/* ------------------------------------------------------------------ */\n/* LinkCard */\n/* ------------------------------------------------------------------ */\n\nexport interface LinkCardProps {\n unfurl: UnfurlController;\n display?: LinkDisplay;\n onToggleDisplay?: () => void;\n}\n\nexport const LinkCard = ({\n unfurl,\n display = \"compact\",\n onToggleDisplay,\n}: LinkCardProps): ReactElement => {\n const { status, tier, data, fetchedAt, retry, reunfurl } = unfurl;\n\n // ── Error: favicon + raw URL + retry, no media ──────────────────\n if (status === \"error\") {\n return (\n <StyledErrorBody>\n <div className=\"err-head\">\n <WarningTriangleIcon />\n <Caption1 weight=\"bold\" color=\"tertiary\">\n Couldn’t load a preview\n </Caption1>\n </div>\n <div className=\"err-url\">\n <StyledFavicon $bg=\"var(--color-theme-400)\" data-fixed />\n <Caption1 color=\"secondary\">{data.url}</Caption1>\n </div>\n <StyledRetry type=\"button\" onClick={retry}>\n <ArrowRefreshIcon />\n <Typography as=\"span\" variant=\"Caption 1\">\n Retry\n </Typography>\n </StyledRetry>\n </StyledErrorBody>\n );\n }\n\n const hasBasic = tier === \"basic\" || tier === \"full\";\n const hasFull = tier === \"full\";\n const toggle = onToggleDisplay ?? (() => undefined);\n\n // ── Expanded: hero + tinted footer band (title + domain) ────────\n if (display === \"expanded\") {\n return (\n <>\n <Cover\n aspectRatio={COVER_RATIO_HERO}\n centerSlot={hasFull && data.playable ? playControl : undefined}\n topRightSlot={coverManagement()}\n >\n {hasFull ? (\n <StyledColorCover $color={data.heroColor ?? \"#1D9E75\"} />\n ) : (\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n )}\n </Cover>\n <StackRow\n role=\"footer\"\n direction=\"column\"\n background=\"var(--color-theme-200)\"\n >\n <StyledDomainRow>\n {hasBasic ? (\n <StyledFavicon $bg={data.faviconColor ?? \"#0F6E56\"} data-fixed />\n ) : (\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n )}\n {hasBasic ? (\n <Caption1 color=\"tertiary\">{data.domain}</Caption1>\n ) : (\n <Caption1 color=\"tertiary\">{data.url}</Caption1>\n )}\n <span style={{ flex: \"1 1 auto\" }} />\n <DisplayToggle display={display} onToggle={toggle} />\n </StyledDomainRow>\n {hasBasic ? (\n <StyledFooterTitle weight=\"bold\">{data.title}</StyledFooterTitle>\n ) : (\n <SkeletonLoader style={{ height: 14, width: \"90%\" }} />\n )}\n {hasFull ? (\n <Caption1 color=\"tertiary\">{data.description}</Caption1>\n ) : (\n <SkeletonLoader style={{ height: 10, width: \"70%\" }} />\n )}\n </StackRow>\n {status === \"stale\" ? (\n <StackRow role=\"meta\">\n <StaleStrip fetchedAt={fetchedAt} onReunfurl={reunfurl} />\n </StackRow>\n ) : null}\n </>\n );\n }\n\n // ── Compact: cover + favicon/domain + title + chips ─────────────\n return (\n <>\n <Cover\n aspectRatio={COVER_RATIO}\n centerSlot={hasFull && data.playable ? playControl : undefined}\n >\n {hasFull ? (\n <StyledColorCover $color={data.heroColor ?? \"#1D9E75\"} />\n ) : (\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n )}\n </Cover>\n\n <StackRow role=\"custom\">\n <StyledDomainRow>\n {hasBasic ? (\n <StyledFavicon $bg={data.faviconColor ?? \"#0F6E56\"} data-fixed />\n ) : (\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n )}\n {hasBasic ? (\n <Caption1 color=\"tertiary\">{data.domain}</Caption1>\n ) : (\n <Caption1 color=\"tertiary\">{data.url}</Caption1>\n )}\n <span style={{ flex: \"1 1 auto\" }} />\n <DisplayToggle display={display} onToggle={toggle} />\n </StyledDomainRow>\n </StackRow>\n\n <StackRow role=\"title\">\n {hasBasic ? (\n <StyledClamp>{data.title}</StyledClamp>\n ) : (\n <div style={{ width: \"100%\" }}>\n <SkeletonLoader style={{ height: 14, width: \"92%\" }} />\n <SkeletonLoader\n style={{ height: 14, width: \"60%\", marginTop: 6 }}\n />\n </div>\n )}\n </StackRow>\n\n <StackRow role=\"custom\">\n <StyledChips>\n {hasFull ? (\n <>\n {data.kind ? (\n <StyledChip data-fixed>{data.kind}</StyledChip>\n ) : null}\n {data.duration ? (\n <StyledChip data-fixed>{data.duration}</StyledChip>\n ) : null}\n </>\n ) : (\n <SkeletonLoader\n style={{ height: 18, width: 96, borderRadius: 10 }}\n />\n )}\n </StyledChips>\n </StackRow>\n\n {status === \"stale\" ? (\n <StackRow role=\"meta\">\n <StaleStrip fetchedAt={fetchedAt} onReunfurl={reunfurl} />\n </StackRow>\n ) : null}\n </>\n );\n};\n\n/* The stale affordance — fetch time + a manual re-unfurl button. */\nconst StaleStrip = ({\n fetchedAt,\n onReunfurl,\n}: {\n fetchedAt: number | null;\n onReunfurl: () => void;\n}): ReactElement => (\n <StyledStaleStrip>\n <Typography as=\"span\" variant=\"Caption 1\" color=\"tertiary\">\n Preview may be out of date · fetched {formatFetchedAt(fetchedAt)}\n </Typography>\n <StyledReunfurl type=\"button\" onClick={onReunfurl}>\n <ArrowRefreshIcon />\n Re-unfurl\n </StyledReunfurl>\n </StyledStaleStrip>\n);\n\n/* ---- skeleton ---- */\n\n/* Mirrors the compact anatomy row for row (this is the `resolving` render at\n tier `url`), so a resolving link never reflows as it climbs the ladder. */\nexport const LinkSkeleton = (): ReactElement => (\n <>\n <Cover aspectRatio={COVER_RATIO}>\n <SkeletonLoader style={{ width: \"100%\", height: \"100%\" }} />\n </Cover>\n <StackRow role=\"custom\">\n <StyledDomainRow>\n <SkeletonLoader\n data-fixed\n style={{ width: 16, height: 16, borderRadius: 4 }}\n />\n <SkeletonLoader style={{ height: 10, width: \"40%\" }} />\n </StyledDomainRow>\n </StackRow>\n <StackRow role=\"title\">\n <div style={{ width: \"100%\" }}>\n <SkeletonLoader style={{ height: 14, width: \"92%\" }} />\n <SkeletonLoader style={{ height: 14, width: \"60%\", marginTop: 6 }} />\n </div>\n </StackRow>\n <StackRow role=\"custom\">\n <StyledChips>\n <SkeletonLoader style={{ height: 18, width: 96, borderRadius: 10 }} />\n </StyledChips>\n </StackRow>\n </>\n);\n\n/* ---- placeholder ---- */\n\nexport const LinkPlaceholder = (\n props: React.ButtonHTMLAttributes<HTMLButtonElement>\n): ReactElement => (\n <Placeholder icon={<InsertLinkIcon />} label=\"Add a link\" {...props} />\n);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SACEC,UAAU,EACVC,WAAW,EACXC,gBAAgB,EAChBC,aAAa,EACbC,eAAe,EACfC,WAAW,EACXC,WAAW,QACN,UAAU;AACjB,SAA2BC,eAAe,QAAQ,UAAU;AAC5D,SACEC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,QACd,2BAA2B;AAClC,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,KAAK,EAAEC,QAAQ,QAAQ,gCAAgC;AAChE,SAASC,UAAU,QAAQ,2CAA2C;AACtE,SAASC,KAAK,EAAEC,QAAQ,QAAQ,eAAe;AAC/C,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,UAAU;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;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AE,EAAE;IAAEM,YAAY,EAAE;EAAG;AAAE,CAAE,CAC1D,CACL,CACV,CACH;;AAED;;AAEA,OAAO,MAAMY,eAAe,GAC1BC,KAAoD,iBAEpD9F,KAAA,CAAAsC,aAAA,CAAC9B,WAAW,EAAAuF,QAAA;EAACC,IAAI,eAAEhG,KAAA,CAAAsC,aAAA,CAAC3B,cAAc,MAAE,CAAE;EAACsF,KAAK,EAAC;AAAY,GAAKH,KAAK,CAAG,CACvE","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import React, { ReactElement } from "react";
2
+ export declare const SAMPLE_NOTE = "Kickoff open questions before we lock the columns:\n\n\u2022 Who owns the migration off react-dnd, and does it block the canvas work or run in parallel?\n\u2022 Confirm the outline-placeholder choreography reads the same in a scrolled column.\n\u2022 Do we ship the note type in v1, or defer inline editing?";
3
+ export interface NoteCardProps {
4
+ title?: string;
5
+ body?: string;
6
+ }
7
+ export declare const NoteCard: ({ title, body, }: NoteCardProps) => ReactElement;
8
+ export declare const NotePlaceholder: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ReactElement;
9
+ export declare const NoteSkeleton: () => ReactElement;
10
+ //# sourceMappingURL=NoteCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoteCard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/stackedCard/content/NoteCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA4B5C,eAAO,MAAM,WAAW,wTAImC,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,QAAQ,GAAI,kBAGtB,aAAa,KAAG,YAUlB,CAAC;AAIF,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KACnD,YAEF,CAAC;AAGF,eAAO,MAAM,YAAY,QAAO,YAY/B,CAAC"}