@malloy-publisher/app 0.0.54 → 0.0.56

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.
@@ -0,0 +1 @@
1
+ export default function Header(): import("react/jsx-runtime").JSX.Element;
package/dist/index.cjs.js CHANGED
@@ -17429,85 +17429,92 @@ function NotebookCell({
17429
17429
  });
17430
17430
  }, [queryResultCodeSnippet]);
17431
17431
  return cell.type === "markdown" && /* @__PURE__ */ jsxRuntime.jsx(StyledCard$1, { variant: "outlined", children: /* @__PURE__ */ jsxRuntime.jsx(StyledCardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { children: cell.text }) }) }) || cell.type === "code" && /* @__PURE__ */ jsxRuntime.jsxs(StyledCard$1, { variant: "outlined", sx: { height: "auto" }, children: [
17432
- (!hideCodeCellIcon || !hideEmbeddingIcon && cell.result) && /* @__PURE__ */ jsxRuntime.jsx(
17432
+ (!hideCodeCellIcon || !hideEmbeddingIcon && cell.result) && /* @__PURE__ */ jsxRuntime.jsxs(
17433
17433
  material.Stack,
17434
17434
  {
17435
17435
  sx: {
17436
17436
  flexDirection: "row",
17437
- justifyContent: "right"
17437
+ justifyContent: "space-between",
17438
+ ml: "8px"
17438
17439
  },
17439
- children: /* @__PURE__ */ jsxRuntime.jsxs(
17440
- material.CardActions,
17441
- {
17442
- sx: {
17443
- padding: "0px 8px 0px 8px",
17444
- mb: "auto",
17445
- mt: "auto"
17446
- },
17447
- children: [
17448
- cell.newSources && cell.newSources.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: "Explore Data Sources", children: /* @__PURE__ */ jsxRuntime.jsx(
17449
- material.IconButton,
17450
- {
17451
- size: "small",
17452
- onClick: () => {
17453
- setSourcesExpanded(!sourcesExpanded);
17454
- setEmbeddingExpanded(false);
17455
- setCodeExpanded(false);
17456
- },
17457
- children: /* @__PURE__ */ jsxRuntime.jsx(
17458
- "svg",
17459
- {
17460
- width: "24",
17461
- height: "24",
17462
- viewBox: "0 0 24 24",
17463
- fill: "none",
17464
- xmlns: "http://www.w3.org/2000/svg",
17465
- children: /* @__PURE__ */ jsxRuntime.jsx(
17466
- "path",
17467
- {
17468
- d: "M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",
17469
- fill: "currentColor"
17470
- }
17471
- )
17472
- }
17473
- )
17474
- }
17475
- ) }),
17476
- !hideCodeCellIcon && /* @__PURE__ */ jsxRuntime.jsx(
17477
- material.Tooltip,
17478
- {
17479
- title: codeExpanded ? "Hide Code" : "View Code",
17480
- children: /* @__PURE__ */ jsxRuntime.jsx(
17481
- material.IconButton,
17482
- {
17483
- size: "small",
17484
- onClick: () => {
17485
- setCodeExpanded(!codeExpanded);
17486
- },
17487
- children: /* @__PURE__ */ jsxRuntime.jsx(CodeIcon, {})
17488
- }
17489
- )
17490
- }
17491
- ),
17492
- !hideEmbeddingIcon && cell.result && /* @__PURE__ */ jsxRuntime.jsx(
17493
- material.Tooltip,
17494
- {
17495
- title: embeddingExpanded ? "Hide Embedding" : "View Embedding",
17496
- children: /* @__PURE__ */ jsxRuntime.jsx(
17497
- material.IconButton,
17498
- {
17499
- size: "small",
17500
- onClick: () => {
17501
- setEmbeddingExpanded(!embeddingExpanded);
17502
- },
17503
- children: /* @__PURE__ */ jsxRuntime.jsx(LinkOutlinedIcon, {})
17504
- }
17505
- )
17506
- }
17507
- )
17508
- ]
17509
- }
17510
- )
17440
+ children: [
17441
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { sx: { flexDirection: "row" }, children: [
17442
+ cell.newSources && cell.newSources.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "overline", children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: "Data source" }) }),
17443
+ cell.result && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "overline", fontWeight: "bold", children: "Results" })
17444
+ ] }),
17445
+ /* @__PURE__ */ jsxRuntime.jsx(material.Stack, { sx: { flexDirection: "row" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
17446
+ material.CardActions,
17447
+ {
17448
+ sx: {
17449
+ padding: "0px 8px 0px 8px",
17450
+ mb: "auto",
17451
+ mt: "auto"
17452
+ },
17453
+ children: [
17454
+ cell.newSources && cell.newSources.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: "Explore Data Sources", children: /* @__PURE__ */ jsxRuntime.jsx(
17455
+ material.IconButton,
17456
+ {
17457
+ size: "small",
17458
+ onClick: () => {
17459
+ setSourcesExpanded(!sourcesExpanded);
17460
+ setEmbeddingExpanded(false);
17461
+ setCodeExpanded(false);
17462
+ },
17463
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17464
+ "svg",
17465
+ {
17466
+ width: "24",
17467
+ height: "24",
17468
+ viewBox: "0 0 24 24",
17469
+ fill: "none",
17470
+ xmlns: "http://www.w3.org/2000/svg",
17471
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17472
+ "path",
17473
+ {
17474
+ d: "M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",
17475
+ fill: "currentColor"
17476
+ }
17477
+ )
17478
+ }
17479
+ )
17480
+ }
17481
+ ) }),
17482
+ !hideCodeCellIcon && /* @__PURE__ */ jsxRuntime.jsx(
17483
+ material.Tooltip,
17484
+ {
17485
+ title: codeExpanded ? "Hide Code" : "View Code",
17486
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17487
+ material.IconButton,
17488
+ {
17489
+ size: "small",
17490
+ onClick: () => {
17491
+ setCodeExpanded(!codeExpanded);
17492
+ },
17493
+ children: /* @__PURE__ */ jsxRuntime.jsx(CodeIcon, {})
17494
+ }
17495
+ )
17496
+ }
17497
+ ),
17498
+ !hideEmbeddingIcon && cell.result && /* @__PURE__ */ jsxRuntime.jsx(
17499
+ material.Tooltip,
17500
+ {
17501
+ title: embeddingExpanded ? "Hide Embedding" : "View Embedding",
17502
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17503
+ material.IconButton,
17504
+ {
17505
+ size: "small",
17506
+ onClick: () => {
17507
+ setEmbeddingExpanded(!embeddingExpanded);
17508
+ },
17509
+ children: /* @__PURE__ */ jsxRuntime.jsx(LinkOutlinedIcon, {})
17510
+ }
17511
+ )
17512
+ }
17513
+ )
17514
+ ]
17515
+ }
17516
+ ) })
17517
+ ]
17511
17518
  }
17512
17519
  ),
17513
17520
  /* @__PURE__ */ jsxRuntime.jsx(material.Collapse, { in: embeddingExpanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -33315,87 +33322,70 @@ function BreadcrumbNav() {
33315
33322
  }
33316
33323
  ) });
33317
33324
  }
33318
- function MainPage({ showHeader = true }) {
33325
+ function Header() {
33319
33326
  const { projectName, packageName } = useParams();
33327
+ return /* @__PURE__ */ jsxRuntime.jsx(
33328
+ material.AppBar,
33329
+ {
33330
+ position: "sticky",
33331
+ elevation: 0,
33332
+ sx: {
33333
+ backgroundColor: "background.paper",
33334
+ borderBottom: "1px solid",
33335
+ borderColor: "divider"
33336
+ },
33337
+ children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { sx: { justifyContent: "space-between" }, children: [
33338
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
33339
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
33340
+ /* @__PURE__ */ jsxRuntime.jsx(
33341
+ material.Box,
33342
+ {
33343
+ component: "img",
33344
+ src: "/logo.svg",
33345
+ alt: "Malloy",
33346
+ sx: {
33347
+ width: 28,
33348
+ height: 28
33349
+ }
33350
+ }
33351
+ ),
33352
+ /* @__PURE__ */ jsxRuntime.jsx(
33353
+ material.Typography,
33354
+ {
33355
+ variant: "h5",
33356
+ sx: {
33357
+ color: "text.primary",
33358
+ fontWeight: 700,
33359
+ letterSpacing: "-0.025em"
33360
+ },
33361
+ children: "Malloy Publisher"
33362
+ }
33363
+ )
33364
+ ] }),
33365
+ /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbNav, {})
33366
+ ] }),
33367
+ /* @__PURE__ */ jsxRuntime.jsx(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: !projectName || !packageName ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33368
+ /* @__PURE__ */ jsxRuntime.jsx(material.Button, { href: "https://docs.malloydata.dev/documentation/", children: "Malloy Docs" }),
33369
+ /* @__PURE__ */ jsxRuntime.jsx(material.Button, { href: "https://github.com/malloydata/publisher/blob/main/README.md", children: "Publisher Docs" }),
33370
+ /* @__PURE__ */ jsxRuntime.jsx(material.Button, { href: "/api-doc.html", children: "Publisher API" })
33371
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
33372
+ AnalyzePackageButton,
33373
+ {
33374
+ projectName,
33375
+ packageName
33376
+ }
33377
+ ) }) })
33378
+ ] })
33379
+ }
33380
+ );
33381
+ }
33382
+ function MainPage({ showHeader = true }) {
33320
33383
  return /* @__PURE__ */ jsxRuntime.jsxs(
33321
33384
  material.Box,
33322
33385
  {
33323
33386
  sx: { display: "flex", flexDirection: "column", minHeight: "100vh" },
33324
33387
  children: [
33325
- showHeader && /* @__PURE__ */ jsxRuntime.jsx(
33326
- material.AppBar,
33327
- {
33328
- position: "sticky",
33329
- elevation: 0,
33330
- sx: {
33331
- backgroundColor: "background.paper",
33332
- borderBottom: "1px solid",
33333
- borderColor: "divider"
33334
- },
33335
- children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { sx: { justifyContent: "space-between" }, children: [
33336
- /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
33337
- /* @__PURE__ */ jsxRuntime.jsxs(
33338
- material.Box,
33339
- {
33340
- sx: { display: "flex", alignItems: "center", gap: 1 },
33341
- children: [
33342
- /* @__PURE__ */ jsxRuntime.jsx(
33343
- material.Box,
33344
- {
33345
- component: "img",
33346
- src: "/logo.svg",
33347
- alt: "Malloy",
33348
- sx: {
33349
- width: 28,
33350
- height: 28
33351
- }
33352
- }
33353
- ),
33354
- /* @__PURE__ */ jsxRuntime.jsx(
33355
- material.Typography,
33356
- {
33357
- variant: "h5",
33358
- sx: {
33359
- color: "text.primary",
33360
- fontWeight: 700,
33361
- letterSpacing: "-0.025em"
33362
- },
33363
- children: "Malloy Publisher"
33364
- }
33365
- )
33366
- ]
33367
- }
33368
- ),
33369
- /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbNav, {})
33370
- ] }),
33371
- /* @__PURE__ */ jsxRuntime.jsx(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: !projectName || !packageName ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33372
- /* @__PURE__ */ jsxRuntime.jsx(
33373
- material.Button,
33374
- {
33375
- href: "https://docs.malloydata.dev/documentation/",
33376
- size: "small",
33377
- children: "Malloy Docs"
33378
- }
33379
- ),
33380
- /* @__PURE__ */ jsxRuntime.jsx(
33381
- material.Button,
33382
- {
33383
- href: "https://github.com/malloydata/publisher/blob/main/README.md",
33384
- size: "small",
33385
- children: "Publisher Docs"
33386
- }
33387
- ),
33388
- /* @__PURE__ */ jsxRuntime.jsx(material.Button, { href: "/api-doc.html", size: "small", children: "Publisher API" })
33389
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
33390
- AnalyzePackageButton,
33391
- {
33392
- projectName,
33393
- packageName
33394
- }
33395
- ) }) })
33396
- ] })
33397
- }
33398
- ),
33388
+ showHeader && /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
33399
33389
  /* @__PURE__ */ jsxRuntime.jsx(
33400
33390
  Container,
33401
33391
  {