@canopy-iiif/app 0.10.4 → 0.10.6

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.
@@ -179,13 +179,38 @@ var Image = (props) => {
179
179
  } catch (_) {
180
180
  json = "{}";
181
181
  }
182
- return /* @__PURE__ */ React5.createElement("div", { "data-canopy-image": "1", className: "not-prose" }, /* @__PURE__ */ React5.createElement(
183
- "script",
182
+ const {
183
+ height = `600px`,
184
+ backgroundColor = `var(--color-gray-200)`,
185
+ caption
186
+ } = props || {};
187
+ return /* @__PURE__ */ React5.createElement(
188
+ "figure",
184
189
  {
185
- type: "application/json",
186
- dangerouslySetInnerHTML: { __html: json }
187
- }
188
- ));
190
+ style: {
191
+ margin: `1.618rem 0 2.618rem`
192
+ }
193
+ },
194
+ /* @__PURE__ */ React5.createElement(
195
+ "div",
196
+ {
197
+ "data-canopy-image": "1",
198
+ style: {
199
+ height,
200
+ backgroundColor,
201
+ borderRadius: `0.25rem`
202
+ }
203
+ },
204
+ /* @__PURE__ */ React5.createElement(
205
+ "script",
206
+ {
207
+ type: "application/json",
208
+ dangerouslySetInnerHTML: { __html: json }
209
+ }
210
+ )
211
+ ),
212
+ caption && /* @__PURE__ */ React5.createElement("figcaption", null, caption)
213
+ );
189
214
  }
190
215
  return /* @__PURE__ */ React5.createElement(CloverImage, { ...props });
191
216
  };
@@ -866,32 +891,27 @@ function Layout({
866
891
  );
867
892
  const showLeftColumn = navigation !== false;
868
893
  const hasContentNavigation = navigation !== false && contentNavigation !== false && headingTree.length > 0;
869
- const gridClass = (() => {
870
- if (showLeftColumn && hasContentNavigation) {
871
- return "md:grid md:grid-cols-[17rem_minmax(0,1fr)_14rem] md:items-start md:gap-10";
872
- }
873
- if (showLeftColumn) {
874
- return "md:grid md:grid-cols-[17rem_minmax(0,1fr)] md:items-start md:gap-10";
875
- }
876
- if (hasContentNavigation) {
877
- return "md:grid md:grid-cols-[minmax(0,1fr)_14rem] md:items-start md:gap-10";
878
- }
879
- return "";
894
+ const containerClassName = (() => {
895
+ const classes = ["getting-started-layout"];
896
+ classes.push(
897
+ fluid ? "getting-started-layout--fluid" : "getting-started-layout--fixed"
898
+ );
899
+ if (showLeftColumn) classes.push("getting-started-layout--with-sidebar");
900
+ if (hasContentNavigation)
901
+ classes.push("getting-started-layout--with-content-nav");
902
+ if (className) classes.push(className);
903
+ return classes.join(" ");
880
904
  })();
881
- const containerClassName = [
882
- "w-full py-6 getting-started-layout",
883
- gridClass,
884
- fluid ? "px-4 md:px-8 lg:px-12" : "mx-auto max-w-content px-4",
885
- className
886
- ].filter(Boolean).join(" ");
887
905
  const leftAsideClassName = [
888
- "mt-8 md:mt-0 md:order-1 md:sticky md:top-24 md:max-h-[calc(100vh-6rem)] md:overflow-y-auto text-slate-600",
906
+ "getting-started-layout__sidebar",
889
907
  sidebarClassName
890
908
  ].filter(Boolean).join(" ");
891
- const contentOrderClass = showLeftColumn ? "md:order-2" : hasContentNavigation ? "md:order-1" : "";
892
- const contentClassNames = ["space-y-6", contentOrderClass, contentClassName].filter(Boolean).join(" ");
909
+ const contentClassNames = [
910
+ "getting-started-layout__content",
911
+ contentClassName
912
+ ].filter(Boolean).join(" ");
893
913
  const contentNavigationAsideClassName = [
894
- "hidden md:block md:order-3 mt-8 md:mt-0 md:sticky md:top-24 md:max-h-[calc(100vh-6rem)] md:overflow-y-auto text-slate-600",
914
+ "getting-started-layout__content-nav",
895
915
  contentNavigationClassName
896
916
  ].filter(Boolean).join(" ");
897
917
  const sidebarNode = showLeftColumn ? buildNavigationAside(sidebar, sidebarClassName) : null;