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