@malloy-publisher/sdk 0.0.159 → 0.0.161

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/sdk",
3
3
  "description": "Malloy Publisher SDK",
4
- "version": "0.0.159",
4
+ "version": "0.0.161",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -1,5 +1,7 @@
1
1
  import { Box, Grid } from "@mui/material";
2
+ import React from "react";
2
3
  import { encodeResourceUri, parseResourceUri } from "../../utils/formatting";
4
+ import { RetrievalFunction } from "../filter/DimensionFilter";
3
5
  import { Notebook } from "../Notebook";
4
6
  import {
5
7
  PackageCard,
@@ -17,11 +19,14 @@ const README_NOTEBOOK = "README.malloynb";
17
19
  interface PackageProps {
18
20
  onClickPackageFile?: (to: string, event?: React.MouseEvent) => void;
19
21
  resourceUri: string;
22
+ /** Optional retrieval function for semantic search filters */
23
+ retrievalFn?: RetrievalFunction;
20
24
  }
21
25
 
22
26
  export default function Package({
23
27
  onClickPackageFile,
24
28
  resourceUri,
29
+ retrievalFn,
25
30
  }: PackageProps) {
26
31
  if (!onClickPackageFile) {
27
32
  onClickPackageFile = (to: string) => {
@@ -63,7 +68,10 @@ export default function Package({
63
68
  <PackageCardContent>
64
69
  <PackageSectionTitle>README</PackageSectionTitle>
65
70
  <Box sx={{ mt: 1 }}>
66
- <Notebook resourceUri={readmeResourceUri} />
71
+ <Notebook
72
+ resourceUri={readmeResourceUri}
73
+ retrievalFn={retrievalFn}
74
+ />
67
75
  </Box>
68
76
  </PackageCardContent>
69
77
  </PackageCard>