@qualcomm-ui/react-mdx 1.0.0
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/LICENSE.txt +31 -0
- package/dist/all.min.css +1 -0
- package/dist/angular-logo/angular-logo.d.ts +3 -0
- package/dist/angular-logo/angular-logo.d.ts.map +1 -0
- package/dist/angular-logo/index.d.ts +2 -0
- package/dist/angular-logo/index.d.ts.map +1 -0
- package/dist/angular-logo/index.js +3 -0
- package/dist/angular-logo/index.js.map +7 -0
- package/dist/code-demo/code-demo.types.d.ts +14 -0
- package/dist/code-demo/code-demo.types.d.ts.map +1 -0
- package/dist/code-demo/code-demo.utils.d.ts +54 -0
- package/dist/code-demo/code-demo.utils.d.ts.map +1 -0
- package/dist/code-demo/index.d.ts +6 -0
- package/dist/code-demo/index.d.ts.map +1 -0
- package/dist/code-demo/index.js +7 -0
- package/dist/code-demo/index.js.map +7 -0
- package/dist/code-demo/internal/index.d.ts +4 -0
- package/dist/code-demo/internal/index.d.ts.map +1 -0
- package/dist/code-demo/internal/qds-demo-theme-selector.d.ts +6 -0
- package/dist/code-demo/internal/qds-demo-theme-selector.d.ts.map +1 -0
- package/dist/code-demo/internal/use-code-demo-preview.d.ts +21 -0
- package/dist/code-demo/internal/use-code-demo-preview.d.ts.map +1 -0
- package/dist/code-demo/internal/use-qds-demo-theme.d.ts +19 -0
- package/dist/code-demo/internal/use-qds-demo-theme.d.ts.map +1 -0
- package/dist/code-demo/qds-angular-demo-runner.d.ts +32 -0
- package/dist/code-demo/qds-angular-demo-runner.d.ts.map +1 -0
- package/dist/code-demo/qds-demo-runner.d.ts +46 -0
- package/dist/code-demo/qds-demo-runner.d.ts.map +1 -0
- package/dist/code-demo/qds-react-demo.d.ts +56 -0
- package/dist/code-demo/qds-react-demo.d.ts.map +1 -0
- package/dist/code-highlight/code-highlight.d.ts +65 -0
- package/dist/code-highlight/code-highlight.d.ts.map +1 -0
- package/dist/code-highlight/index.d.ts +2 -0
- package/dist/code-highlight/index.d.ts.map +1 -0
- package/dist/code-highlight/index.js +4 -0
- package/dist/code-highlight/index.js.map +7 -0
- package/dist/code-highlight/reflection-reference-popup.d.ts +8 -0
- package/dist/code-highlight/reflection-reference-popup.d.ts.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +3 -0
- package/dist/context/index.js.map +7 -0
- package/dist/context/use-mdx-docs-context.d.ts +44 -0
- package/dist/context/use-mdx-docs-context.d.ts.map +1 -0
- package/dist/context/use-site-context.d.ts +5 -0
- package/dist/context/use-site-context.d.ts.map +1 -0
- package/dist/copy-to-clipboard/copy-to-clipboard-button.d.ts +6 -0
- package/dist/copy-to-clipboard/copy-to-clipboard-button.d.ts.map +1 -0
- package/dist/copy-to-clipboard/copy-to-clipboard-context.d.ts +8 -0
- package/dist/copy-to-clipboard/copy-to-clipboard-context.d.ts.map +1 -0
- package/dist/copy-to-clipboard/copy-to-clipboard-icon-button.d.ts +6 -0
- package/dist/copy-to-clipboard/copy-to-clipboard-icon-button.d.ts.map +1 -0
- package/dist/copy-to-clipboard/index.d.ts +5 -0
- package/dist/copy-to-clipboard/index.d.ts.map +1 -0
- package/dist/copy-to-clipboard/index.js +3 -0
- package/dist/copy-to-clipboard/index.js.map +7 -0
- package/dist/copy-to-clipboard/use-copy-to-clipboard.d.ts +9 -0
- package/dist/copy-to-clipboard/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/deprecated-module/deprecated-module.d.ts +14 -0
- package/dist/deprecated-module/deprecated-module.d.ts.map +1 -0
- package/dist/deprecated-module/index.d.ts +2 -0
- package/dist/deprecated-module/index.d.ts.map +1 -0
- package/dist/deprecated-module/index.js +3 -0
- package/dist/deprecated-module/index.js.map +7 -0
- package/dist/docs-layout/docs-layout.d.ts +15 -0
- package/dist/docs-layout/docs-layout.d.ts.map +1 -0
- package/dist/docs-layout/index.d.ts +5 -0
- package/dist/docs-layout/index.d.ts.map +1 -0
- package/dist/docs-layout/index.js +3 -0
- package/dist/docs-layout/index.js.map +7 -0
- package/dist/docs-layout/internal/anchor-header.d.ts +22 -0
- package/dist/docs-layout/internal/anchor-header.d.ts.map +1 -0
- package/dist/docs-layout/internal/code-tabs.d.ts +6 -0
- package/dist/docs-layout/internal/code-tabs.d.ts.map +1 -0
- package/dist/docs-layout/internal/index.d.ts +5 -0
- package/dist/docs-layout/internal/index.d.ts.map +1 -0
- package/dist/docs-layout/internal/shiki-pre.d.ts +5 -0
- package/dist/docs-layout/internal/shiki-pre.d.ts.map +1 -0
- package/dist/docs-layout/internal/toc-link.d.ts +10 -0
- package/dist/docs-layout/internal/toc-link.d.ts.map +1 -0
- package/dist/docs-layout/layout/app-content.d.ts +10 -0
- package/dist/docs-layout/layout/app-content.d.ts.map +1 -0
- package/dist/docs-layout/layout/breadcrumbs.d.ts +11 -0
- package/dist/docs-layout/layout/breadcrumbs.d.ts.map +1 -0
- package/dist/docs-layout/layout/content-wrapper.d.ts +10 -0
- package/dist/docs-layout/layout/content-wrapper.d.ts.map +1 -0
- package/dist/docs-layout/layout/docs-footer.d.ts +10 -0
- package/dist/docs-layout/layout/docs-footer.d.ts.map +1 -0
- package/dist/docs-layout/layout/index.d.ts +5 -0
- package/dist/docs-layout/layout/index.d.ts.map +1 -0
- package/dist/docs-layout/layout/layout.d.ts +21 -0
- package/dist/docs-layout/layout/layout.d.ts.map +1 -0
- package/dist/docs-layout/layout/main-content.d.ts +14 -0
- package/dist/docs-layout/layout/main-content.d.ts.map +1 -0
- package/dist/docs-layout/layout/mobile-sidebar.d.ts +12 -0
- package/dist/docs-layout/layout/mobile-sidebar.d.ts.map +1 -0
- package/dist/docs-layout/layout/page-links.d.ts +8 -0
- package/dist/docs-layout/layout/page-links.d.ts.map +1 -0
- package/dist/docs-layout/layout/root.d.ts +12 -0
- package/dist/docs-layout/layout/root.d.ts.map +1 -0
- package/dist/docs-layout/layout/sidebar.d.ts +27 -0
- package/dist/docs-layout/layout/sidebar.d.ts.map +1 -0
- package/dist/docs-layout/layout/table-of-contents.d.ts +7 -0
- package/dist/docs-layout/layout/table-of-contents.d.ts.map +1 -0
- package/dist/docs-layout/layout/use-mdx-docs-layout.d.ts +18 -0
- package/dist/docs-layout/layout/use-mdx-docs-layout.d.ts.map +1 -0
- package/dist/docs-layout/mdx-provider.d.ts +44 -0
- package/dist/docs-layout/mdx-provider.d.ts.map +1 -0
- package/dist/docs-layout/types.d.ts +88 -0
- package/dist/docs-layout/types.d.ts.map +1 -0
- package/dist/file-tree/file-tree.d.ts +12 -0
- package/dist/file-tree/file-tree.d.ts.map +1 -0
- package/dist/file-tree/index.d.ts +2 -0
- package/dist/file-tree/index.d.ts.map +1 -0
- package/dist/file-tree/index.js +3 -0
- package/dist/file-tree/index.js.map +7 -0
- package/dist/not-found/index.d.ts +2 -0
- package/dist/not-found/index.d.ts.map +1 -0
- package/dist/not-found/index.js +3 -0
- package/dist/not-found/index.js.map +7 -0
- package/dist/not-found/not-found.d.ts +5 -0
- package/dist/not-found/not-found.d.ts.map +1 -0
- package/dist/npm-install-tabs/index.d.ts +2 -0
- package/dist/npm-install-tabs/index.d.ts.map +1 -0
- package/dist/npm-install-tabs/index.js +3 -0
- package/dist/npm-install-tabs/index.js.map +7 -0
- package/dist/npm-install-tabs/npm-install-tabs.d.ts +19 -0
- package/dist/npm-install-tabs/npm-install-tabs.d.ts.map +1 -0
- package/dist/qui-ecosystem/index.d.ts +2 -0
- package/dist/qui-ecosystem/index.d.ts.map +1 -0
- package/dist/qui-ecosystem/index.js +3 -0
- package/dist/qui-ecosystem/index.js.map +7 -0
- package/dist/qui-ecosystem/qui-ecosystem.d.ts +8 -0
- package/dist/qui-ecosystem/qui-ecosystem.d.ts.map +1 -0
- package/dist/react-logo/index.d.ts +2 -0
- package/dist/react-logo/index.d.ts.map +1 -0
- package/dist/react-logo/index.js +3 -0
- package/dist/react-logo/index.js.map +7 -0
- package/dist/react-logo/react-logo.d.ts +6 -0
- package/dist/react-logo/react-logo.d.ts.map +1 -0
- package/dist/runner/index.d.ts +5 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +3 -0
- package/dist/runner/index.js.map +7 -0
- package/dist/runner/runner.d.ts +26 -0
- package/dist/runner/runner.d.ts.map +1 -0
- package/dist/runner/transform.d.ts +3 -0
- package/dist/runner/transform.d.ts.map +1 -0
- package/dist/runner/types.d.ts +11 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/use-runner.d.ts +12 -0
- package/dist/runner/use-runner.d.ts.map +1 -0
- package/dist/runner/utils.d.ts +6 -0
- package/dist/runner/utils.d.ts.map +1 -0
- package/dist/shiki/index.d.ts +3 -0
- package/dist/shiki/index.d.ts.map +1 -0
- package/dist/shiki/index.js +3 -0
- package/dist/shiki/index.js.map +7 -0
- package/dist/shiki/shiki-highlighter.d.ts +12 -0
- package/dist/shiki/shiki-highlighter.d.ts.map +1 -0
- package/dist/shiki/shiki-instance.d.ts +10 -0
- package/dist/shiki/shiki-instance.d.ts.map +1 -0
- package/dist/site-search/grouped-result-item.d.ts +9 -0
- package/dist/site-search/grouped-result-item.d.ts.map +1 -0
- package/dist/site-search/index.d.ts +6 -0
- package/dist/site-search/index.d.ts.map +1 -0
- package/dist/site-search/index.js +3 -0
- package/dist/site-search/index.js.map +7 -0
- package/dist/site-search/search-result-item.d.ts +11 -0
- package/dist/site-search/search-result-item.d.ts.map +1 -0
- package/dist/site-search/site-search.d.ts +12 -0
- package/dist/site-search/site-search.d.ts.map +1 -0
- package/dist/site-search/use-grouped-results.d.ts +11 -0
- package/dist/site-search/use-grouped-results.d.ts.map +1 -0
- package/dist/site-search/use-site-search.d.ts +6 -0
- package/dist/site-search/use-site-search.d.ts.map +1 -0
- package/dist/spoiler/index.d.ts +2 -0
- package/dist/spoiler/index.d.ts.map +1 -0
- package/dist/spoiler/index.js +3 -0
- package/dist/spoiler/index.js.map +7 -0
- package/dist/spoiler/spoiler.d.ts +25 -0
- package/dist/spoiler/spoiler.d.ts.map +1 -0
- package/dist/tsbuildinfo +1 -0
- package/dist/typedoc/docs-external-link.d.ts +9 -0
- package/dist/typedoc/docs-external-link.d.ts.map +1 -0
- package/dist/typedoc/index.d.ts +15 -0
- package/dist/typedoc/index.d.ts.map +1 -0
- package/dist/typedoc/index.js +10 -0
- package/dist/typedoc/index.js.map +7 -0
- package/dist/typedoc/internal/index.d.ts +3 -0
- package/dist/typedoc/internal/index.d.ts.map +1 -0
- package/dist/typedoc/internal/jsdoc-comment.d.ts +7 -0
- package/dist/typedoc/internal/jsdoc-comment.d.ts.map +1 -0
- package/dist/typedoc/internal/prop-types.utils.d.ts +30 -0
- package/dist/typedoc/internal/prop-types.utils.d.ts.map +1 -0
- package/dist/typedoc/prop-default.d.ts +7 -0
- package/dist/typedoc/prop-default.d.ts.map +1 -0
- package/dist/typedoc/prop-description/index.d.ts +9 -0
- package/dist/typedoc/prop-description/index.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-block-tags.d.ts +7 -0
- package/dist/typedoc/prop-description/prop-description-block-tags.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-extra-details.d.ts +8 -0
- package/dist/typedoc/prop-description/prop-description-extra-details.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-function-args.d.ts +8 -0
- package/dist/typedoc/prop-description/prop-description-function-args.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-inline-tag.d.ts +8 -0
- package/dist/typedoc/prop-description/prop-description-inline-tag.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-option-tags.d.ts +8 -0
- package/dist/typedoc/prop-description/prop-description-option-tags.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-see-tags.d.ts +9 -0
- package/dist/typedoc/prop-description/prop-description-see-tags.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description-summary.d.ts +8 -0
- package/dist/typedoc/prop-description/prop-description-summary.d.ts.map +1 -0
- package/dist/typedoc/prop-description/prop-description.d.ts +8 -0
- package/dist/typedoc/prop-description/prop-description.d.ts.map +1 -0
- package/dist/typedoc/prop-name.d.ts +10 -0
- package/dist/typedoc/prop-name.d.ts.map +1 -0
- package/dist/typedoc/prop-types/index.d.ts +7 -0
- package/dist/typedoc/prop-types/index.d.ts.map +1 -0
- package/dist/typedoc/prop-types/prop-type.d.ts +8 -0
- package/dist/typedoc/prop-types/prop-type.d.ts.map +1 -0
- package/dist/typedoc/prop-types/reference.d.ts +8 -0
- package/dist/typedoc/prop-types/reference.d.ts.map +1 -0
- package/dist/typedoc/prop-types/reflection.d.ts +7 -0
- package/dist/typedoc/prop-types/reflection.d.ts.map +1 -0
- package/dist/typedoc/prop-types/simple-type.d.ts +10 -0
- package/dist/typedoc/prop-types/simple-type.d.ts.map +1 -0
- package/dist/typedoc/prop-types/ts-icon.d.ts +5 -0
- package/dist/typedoc/prop-types/ts-icon.d.ts.map +1 -0
- package/dist/typedoc/prop-types/type-info-popup.d.ts +7 -0
- package/dist/typedoc/prop-types/type-info-popup.d.ts.map +1 -0
- package/dist/typedoc/reflection/index.d.ts +4 -0
- package/dist/typedoc/reflection/index.d.ts.map +1 -0
- package/dist/typedoc/reflection/type-doc-parameters-table.d.ts +7 -0
- package/dist/typedoc/reflection/type-doc-parameters-table.d.ts.map +1 -0
- package/dist/typedoc/reflection/type-doc-reflection-return.d.ts +7 -0
- package/dist/typedoc/reflection/type-doc-reflection-return.d.ts.map +1 -0
- package/dist/typedoc/reflection/type-doc-reflection.d.ts +9 -0
- package/dist/typedoc/reflection/type-doc-reflection.d.ts.map +1 -0
- package/dist/typedoc/type-doc-angular-attributes.d.ts +6 -0
- package/dist/typedoc/type-doc-angular-attributes.d.ts.map +1 -0
- package/dist/typedoc/type-doc-attributes.d.ts +10 -0
- package/dist/typedoc/type-doc-attributes.d.ts.map +1 -0
- package/dist/typedoc/type-doc-props.d.ts +71 -0
- package/dist/typedoc/type-doc-props.d.ts.map +1 -0
- package/dist/typedoc/typedoc-props-list.d.ts +11 -0
- package/dist/typedoc/typedoc-props-list.d.ts.map +1 -0
- package/dist/typedoc/typedoc-props-table.d.ts +11 -0
- package/dist/typedoc/typedoc-props-table.d.ts.map +1 -0
- package/dist/typedoc/use-props-context.d.ts +6 -0
- package/dist/typedoc/use-props-context.d.ts.map +1 -0
- package/dist/typedoc/use-props-layout-context.d.ts +16 -0
- package/dist/typedoc/use-props-layout-context.d.ts.map +1 -0
- package/dist/typedoc/use-typedoc-context.d.ts +21 -0
- package/dist/typedoc/use-typedoc-context.d.ts.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { useMDXComponents } from "@mdx-js/react";
|
|
3
|
+
import type { BreadcrumbsItemProps } from "@qualcomm-ui/react/breadcrumbs";
|
|
4
|
+
import type { MdxDocsContextValue, PackageManager, RouteDemoState } from "@qualcomm-ui/react-mdx/context";
|
|
5
|
+
export type TocHighlightStrategy = "nearest" | "viewport";
|
|
6
|
+
/**
|
|
7
|
+
* The function used to render the application's clientside link component.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type RenderLink = (props: HTMLAttributes<HTMLAnchorElement> & {
|
|
12
|
+
href: string;
|
|
13
|
+
}) => ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface DocPropsSettings {
|
|
18
|
+
/**
|
|
19
|
+
* URL for the changelog, used by the `@since` tags.
|
|
20
|
+
*/
|
|
21
|
+
changelogUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export interface DocsLayoutSettings extends Pick<MdxDocsContextValue, "packageManager" | "ssrUserAgent"> {
|
|
27
|
+
/**
|
|
28
|
+
* Demo state for each route, typically persisted via localStorage or a session
|
|
29
|
+
* cookie (SSR). This preserves the expand/collapse state of each demo on reload.
|
|
30
|
+
*/
|
|
31
|
+
demoState?: RouteDemoState;
|
|
32
|
+
/**
|
|
33
|
+
* Configuration for the Typedoc Props.
|
|
34
|
+
*
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
docProps?: DocPropsSettings;
|
|
38
|
+
/**
|
|
39
|
+
* Footer node. Renders below the app content.
|
|
40
|
+
*/
|
|
41
|
+
footer?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Header node, you'd typically use the {@link https://react.qui.qualcomm.com/components/header QHeader} here.
|
|
44
|
+
*/
|
|
45
|
+
header: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Forces the TOC to hide for every page. You can also control this per MDX page
|
|
48
|
+
* by using the property by the same name in the page's frontmatter.
|
|
49
|
+
*/
|
|
50
|
+
hideToc?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Override the MDX component definitions. Refer to the {@link https://mdxjs.com/table-of-components/ documentation} to learn more.
|
|
53
|
+
*
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
mdxComponents?: ReturnType<typeof useMDXComponents>;
|
|
57
|
+
/**
|
|
58
|
+
* Function fired when the route demo state changes.
|
|
59
|
+
*/
|
|
60
|
+
onDemoStateChange?: (state: RouteDemoState) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Function fired when the selected package manager changes.
|
|
63
|
+
*/
|
|
64
|
+
onPackageManagerChange?: (packageManager: PackageManager) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Current SPA pathname. If using React Router or Remix, this is the value of
|
|
67
|
+
* `useLocation().pathname`
|
|
68
|
+
*/
|
|
69
|
+
pathname: string;
|
|
70
|
+
/**
|
|
71
|
+
* SPA Link renderer for clientside routing.
|
|
72
|
+
*/
|
|
73
|
+
renderLink: RenderLink;
|
|
74
|
+
/**
|
|
75
|
+
* Optional root breadcrumb item.
|
|
76
|
+
*/
|
|
77
|
+
rootBreadcrumb?: BreadcrumbsItemProps;
|
|
78
|
+
/**
|
|
79
|
+
* Controls how the links in the Table of Contents are highlighted.
|
|
80
|
+
*
|
|
81
|
+
* @option 'nearest': only the nearest heading will be highlighted.
|
|
82
|
+
* @option 'viewport': visible headings will be highlighted.
|
|
83
|
+
*
|
|
84
|
+
* @default 'nearest'
|
|
85
|
+
*/
|
|
86
|
+
tocHighlightStrategy?: TocHighlightStrategy;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/docs-layout/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAEpD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAA;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,EACf,MAAM,gCAAgC,CAAA;AAEvC,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,UAAU,CAAA;AAEzD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,CACvB,KAAK,EAAE,cAAc,CAAC,iBAAiB,CAAC,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,KACtD,SAAS,CAAA;AAEd;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,cAAc,CAAC;IACpE;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;IAEnD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;IAEnD;;OAEG;IACH,sBAAsB,CAAC,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAA;IAEjE;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAA;IAErC;;;;;;;OAOG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;CAC5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type TreeRootProps } from "@qualcomm-ui/react/tree";
|
|
3
|
+
interface Item {
|
|
4
|
+
items?: Item[];
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
interface FileTreeProps extends Omit<TreeRootProps, "collection"> {
|
|
8
|
+
items: Item[];
|
|
9
|
+
}
|
|
10
|
+
export declare function FileTree({ defaultExpandedValue, items, ...props }: FileTreeProps): ReactElement;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=file-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tree.d.ts","sourceRoot":"","sources":["../../src/file-tree/file-tree.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAW,MAAM,OAAO,CAAA;AAKjD,OAAO,EAAO,KAAK,aAAa,EAAC,MAAM,yBAAyB,CAAA;AAEhE,UAAU,IAAI;IACZ,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,aAAc,SAAQ,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC;IAC/D,KAAK,EAAE,IAAI,EAAE,CAAA;CACd;AAED,wBAAgB,QAAQ,CAAC,EACvB,oBAAoB,EACpB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,GAAG,YAAY,CAkD9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file-tree/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as T}from"react/compiler-runtime";import{jsx as n,jsxs as s}from"react/jsx-runtime";import{useState as V}from"react";import{FileTextIcon as I,Folder as _,FolderOpen as E}from"lucide-react";import{createTreeCollection as F}from"@qualcomm-ui/core/tree";import{Tree as e}from"@qualcomm-ui/react/tree";function S(a){let o=T(3),{defaultExpandedValue:c,items:p,...f}=a,r;o[0]!==c?(r=c??[],o[0]=c,o[1]=r):r=o[1];let[i,x]=V(r),l=F({nodeChildren:"items",nodeText:"name",nodeValue:"name",rootNode:{items:p,name:"ROOT"}}),t;return o[2]===Symbol.for("react.memo_cache_sentinel")?(t=d=>x(d.expandedValue),o[2]=t):t=o[2],n(e.Root,{collection:l,expandedValue:i,onExpandedValueChange:t,...f,children:l.rootNode.items?.map((d,u)=>n(e.Nodes,{indexPath:[u],node:d,renderBranch:h=>{let{node:m}=h,N=i.includes(m.name);return s(e.BranchNode,{children:[n(e.NodeIcon,{icon:N?E:_}),n(e.NodeIndicator,{}),n(e.BranchTrigger,{}),n(e.NodeText,{children:m.name})]})},renderLeaf:g},d.name))})}function g(a){let{node:o}=a;return s(e.LeafNode,{children:[n(e.NodeIcon,{icon:I}),n(e.NodeIndicator,{}),n(e.NodeText,{children:o.name})]})}export{S as FileTree};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/file-tree/file-tree.tsx"],
|
|
4
|
+
"sourcesContent": ["import { c as _c } from \"react/compiler-runtime\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { FileTextIcon, Folder, FolderOpen } from \"lucide-react\";\nimport { createTreeCollection } from \"@qualcomm-ui/core/tree\";\nimport { Tree } from \"@qualcomm-ui/react/tree\";\nexport function FileTree(t0) {\n const $ = _c(3);\n const {\n defaultExpandedValue,\n items,\n ...props\n } = t0;\n let t1;\n if ($[0] !== defaultExpandedValue) {\n t1 = defaultExpandedValue ?? [];\n $[0] = defaultExpandedValue;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const [expandedValue, setExpandedValue] = useState(t1);\n const collection = createTreeCollection({\n nodeChildren: \"items\",\n nodeText: \"name\",\n nodeValue: \"name\",\n rootNode: {\n items,\n name: \"ROOT\"\n }\n });\n let t2;\n if ($[2] === Symbol.for(\"react.memo_cache_sentinel\")) {\n t2 = details => setExpandedValue(details.expandedValue);\n $[2] = t2;\n } else {\n t2 = $[2];\n }\n return jsx(Tree.Root, {\n collection,\n expandedValue,\n onExpandedValueChange: t2,\n ...props,\n children: collection.rootNode.items?.map((item, index) => jsx(Tree.Nodes, {\n indexPath: [index],\n node: item,\n renderBranch: t3 => {\n const {\n node\n } = t3;\n const isExpanded = expandedValue.includes(node.name);\n return jsxs(Tree.BranchNode, {\n children: [jsx(Tree.NodeIcon, {\n icon: isExpanded ? FolderOpen : Folder\n }), jsx(Tree.NodeIndicator, {}), jsx(Tree.BranchTrigger, {}), jsx(Tree.NodeText, {\n children: node.name\n })]\n });\n },\n renderLeaf: _temp\n }, item.name))\n });\n}\nfunction _temp(t0) {\n const {\n node: node_0\n } = t0;\n return jsxs(Tree.LeafNode, {\n children: [jsx(Tree.NodeIcon, {\n icon: FileTextIcon\n }), jsx(Tree.NodeIndicator, {}), jsx(Tree.NodeText, {\n children: node_0.name\n })]\n });\n}"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,KAAKA,MAAU,yBACxB,OAAS,OAAAC,EAAK,QAAAC,MAAY,oBAC1B,OAAS,YAAAC,MAAgB,QACzB,OAAS,gBAAAC,EAAc,UAAAC,EAAQ,cAAAC,MAAkB,eACjD,OAAS,wBAAAC,MAA4B,yBACrC,OAAS,QAAAC,MAAY,0BACd,SAASC,EAASC,EAAI,CAC3B,IAAMC,EAAIX,EAAG,CAAC,EACR,CACJ,qBAAAY,EACA,MAAAC,EACA,GAAGC,CACL,EAAIJ,EACAK,EACAJ,EAAE,CAAC,IAAMC,GACXG,EAAKH,GAAwB,CAAC,EAC9BD,EAAE,CAAC,EAAIC,EACPD,EAAE,CAAC,EAAII,GAEPA,EAAKJ,EAAE,CAAC,EAEV,GAAM,CAACK,EAAeC,CAAgB,EAAId,EAASY,CAAE,EAC/CG,EAAaX,EAAqB,CACtC,aAAc,QACd,SAAU,OACV,UAAW,OACX,SAAU,CACR,MAAAM,EACA,KAAM,MACR,CACF,CAAC,EACGM,EACJ,OAAIR,EAAE,CAAC,IAAM,OAAO,IAAI,2BAA2B,GACjDQ,EAAKC,GAAWH,EAAiBG,EAAQ,aAAa,EACtDT,EAAE,CAAC,EAAIQ,GAEPA,EAAKR,EAAE,CAAC,EAEHV,EAAIO,EAAK,KAAM,CACpB,WAAAU,EACA,cAAAF,EACA,sBAAuBG,EACvB,GAAGL,EACH,SAAUI,EAAW,SAAS,OAAO,IAAI,CAACG,EAAMC,IAAUrB,EAAIO,EAAK,MAAO,CACxE,UAAW,CAACc,CAAK,EACjB,KAAMD,EACN,aAAcE,GAAM,CAClB,GAAM,CACJ,KAAAC,CACF,EAAID,EACEE,EAAaT,EAAc,SAASQ,EAAK,IAAI,EACnD,OAAOtB,EAAKM,EAAK,WAAY,CAC3B,SAAU,CAACP,EAAIO,EAAK,SAAU,CAC5B,KAAMiB,EAAanB,EAAaD,CAClC,CAAC,EAAGJ,EAAIO,EAAK,cAAe,CAAC,CAAC,EAAGP,EAAIO,EAAK,cAAe,CAAC,CAAC,EAAGP,EAAIO,EAAK,SAAU,CAC/E,SAAUgB,EAAK,IACjB,CAAC,CAAC,CACJ,CAAC,CACH,EACA,WAAYE,CACd,EAAGL,EAAK,IAAI,CAAC,CACf,CAAC,CACH,CACA,SAASK,EAAMhB,EAAI,CACjB,GAAM,CACJ,KAAMiB,CACR,EAAIjB,EACJ,OAAOR,EAAKM,EAAK,SAAU,CACzB,SAAU,CAACP,EAAIO,EAAK,SAAU,CAC5B,KAAMJ,CACR,CAAC,EAAGH,EAAIO,EAAK,cAAe,CAAC,CAAC,EAAGP,EAAIO,EAAK,SAAU,CAClD,SAAUmB,EAAO,IACnB,CAAC,CAAC,CACJ,CAAC,CACH",
|
|
6
|
+
"names": ["_c", "jsx", "jsxs", "useState", "FileTextIcon", "Folder", "FolderOpen", "createTreeCollection", "Tree", "FileTree", "t0", "$", "defaultExpandedValue", "items", "props", "t1", "expandedValue", "setExpandedValue", "collection", "t2", "details", "item", "index", "t3", "node", "isExpanded", "_temp", "node_0"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/not-found/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as o,jsxs as s}from"react/jsx-runtime";import{ChevronLeftIcon as m}from"lucide-react";import{Link as c}from"@qualcomm-ui/react/link";import{useMdxDocsContext as i}from"@qualcomm-ui/react-mdx/context";import{clsx as d}from"@qualcomm-ui/utils/clsx";function x(r){let{className:e,...n}=r,{renderLink:t}=i();return s("div",{className:d("qui-docs__not-found",e),...n,children:[o("h1",{className:"mdx",children:"Not Found"}),o(c,{render:o(t,{href:"/"}),startIcon:m,children:"Click here to return home"})]})}export{x as NotFound};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/not-found/not-found.tsx"],
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { ChevronLeftIcon } from \"lucide-react\";\nimport { Link } from \"@qualcomm-ui/react/link\";\nimport { useMdxDocsContext } from \"@qualcomm-ui/react-mdx/context\";\nimport { clsx } from \"@qualcomm-ui/utils/clsx\";\nexport function NotFound(t0) {\n const {\n className,\n ...props\n } = t0;\n const {\n renderLink: RenderLink\n } = useMdxDocsContext();\n return jsxs(\"div\", {\n className: clsx(\"qui-docs__not-found\", className),\n ...props,\n children: [jsx(\"h1\", {\n className: \"mdx\",\n children: \"Not Found\"\n }), jsx(Link, {\n render: jsx(RenderLink, {\n href: \"/\"\n }),\n startIcon: ChevronLeftIcon,\n children: \"Click here to return home\"\n })]\n });\n}"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,OAAAA,EAAK,QAAAC,MAAY,oBAC1B,OAAS,mBAAAC,MAAuB,eAChC,OAAS,QAAAC,MAAY,0BACrB,OAAS,qBAAAC,MAAyB,iCAClC,OAAS,QAAAC,MAAY,0BACd,SAASC,EAASC,EAAI,CAC3B,GAAM,CACJ,UAAAC,EACA,GAAGC,CACL,EAAIF,EACE,CACJ,WAAYG,CACd,EAAIN,EAAkB,EACtB,OAAOH,EAAK,MAAO,CACjB,UAAWI,EAAK,sBAAuBG,CAAS,EAChD,GAAGC,EACH,SAAU,CAACT,EAAI,KAAM,CACnB,UAAW,MACX,SAAU,WACZ,CAAC,EAAGA,EAAIG,EAAM,CACZ,OAAQH,EAAIU,EAAY,CACtB,KAAM,GACR,CAAC,EACD,UAAWR,EACX,SAAU,2BACZ,CAAC,CAAC,CACJ,CAAC,CACH",
|
|
6
|
+
"names": ["jsx", "jsxs", "ChevronLeftIcon", "Link", "useMdxDocsContext", "clsx", "NotFound", "t0", "className", "props", "RenderLink"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface NotFoundProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3
|
+
}
|
|
4
|
+
export declare function NotFound({ className, ...props }: NotFoundProps): ReactNode;
|
|
5
|
+
//# sourceMappingURL=not-found.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-found.d.ts","sourceRoot":"","sources":["../../src/not-found/not-found.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAQpD,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;CAAG;AAE7D,wBAAgB,QAAQ,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,aAAa,GAAG,SAAS,CAUxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/npm-install-tabs/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as R}from"react/compiler-runtime";import{jsx as e,jsxs as m}from"react/jsx-runtime";import{Tab as r,Tabs as o}from"@qualcomm-ui/react/tabs";import{CodeHighlight as i}from"@qualcomm-ui/react-mdx/code-highlight";import{useMdxDocsContext as b}from"@qualcomm-ui/react-mdx/context";import{ensureArray as v}from"@qualcomm-ui/utils/array";function k(u){let a=R(4),{dev:t,packages:p,...g}=u,n;a[0]!==p?(n=v(p).join(" "),a[0]=p,a[1]=n):n=a[1];let l=n,{packageManager:c,setPackageManager:d}=b(),h=c===void 0?"npm":c,s;return a[2]!==d?(s=f=>{d?.(f)},a[2]=d,a[3]=s):s=a[3],m(o.Root,{onValueChange:s,size:"lg",value:h,...g,children:[m(o.List,{children:[e(o.Indicator,{}),e(r.Root,{value:"npm",children:e(r.Button,{children:"npm"})}),e(r.Root,{value:"pnpm",children:e(r.Button,{children:"pnpm"})}),e(r.Root,{value:"yarn",children:e(r.Button,{children:"yarn"})})]}),e(o.Panel,{className:"p-0",value:"npm",children:e(i,{className:"mdx",code:`npm i${t?" --save-dev":""} ${l}`,language:"bash",preProps:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}})}),e(o.Panel,{className:"p-0",value:"pnpm",children:e(i,{className:"mdx",code:`pnpm add${t?" -D":""} ${l}`,language:"bash",preProps:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}})}),e(o.Panel,{className:"p-0",value:"yarn",children:e(i,{className:"mdx",code:`yarn add${t?" -D":""} ${l}`,language:"bash",preProps:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}})})]})}export{k as NpmInstallTabs};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/npm-install-tabs/npm-install-tabs.tsx"],
|
|
4
|
+
"sourcesContent": ["import { c as _c } from \"react/compiler-runtime\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Tab, Tabs } from \"@qualcomm-ui/react/tabs\";\nimport { CodeHighlight } from \"@qualcomm-ui/react-mdx/code-highlight\";\nimport { useMdxDocsContext } from \"@qualcomm-ui/react-mdx/context\";\nimport { ensureArray } from \"@qualcomm-ui/utils/array\";\nexport function NpmInstallTabs(t0) {\n const $ = _c(4);\n const {\n dev,\n packages: packagesProp,\n ...props\n } = t0;\n let t1;\n if ($[0] !== packagesProp) {\n t1 = ensureArray(packagesProp).join(\" \");\n $[0] = packagesProp;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n const packages = t1;\n const {\n packageManager: t2,\n setPackageManager\n } = useMdxDocsContext();\n const packageManager = t2 === undefined ? \"npm\" : t2;\n let t3;\n if ($[2] !== setPackageManager) {\n t3 = value => {\n setPackageManager?.(value);\n };\n $[2] = setPackageManager;\n $[3] = t3;\n } else {\n t3 = $[3];\n }\n return jsxs(Tabs.Root, {\n onValueChange: t3,\n size: \"lg\",\n value: packageManager,\n ...props,\n children: [jsxs(Tabs.List, {\n children: [jsx(Tabs.Indicator, {}), jsx(Tab.Root, {\n value: \"npm\",\n children: jsx(Tab.Button, {\n children: \"npm\"\n })\n }), jsx(Tab.Root, {\n value: \"pnpm\",\n children: jsx(Tab.Button, {\n children: \"pnpm\"\n })\n }), jsx(Tab.Root, {\n value: \"yarn\",\n children: jsx(Tab.Button, {\n children: \"yarn\"\n })\n })]\n }), jsx(Tabs.Panel, {\n className: \"p-0\",\n value: \"npm\",\n children: jsx(CodeHighlight, {\n className: \"mdx\",\n code: `npm i${dev ? \" --save-dev\" : \"\"} ${packages}`,\n language: \"bash\",\n preProps: {\n style: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0\n }\n }\n })\n }), jsx(Tabs.Panel, {\n className: \"p-0\",\n value: \"pnpm\",\n children: jsx(CodeHighlight, {\n className: \"mdx\",\n code: `pnpm add${dev ? \" -D\" : \"\"} ${packages}`,\n language: \"bash\",\n preProps: {\n style: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0\n }\n }\n })\n }), jsx(Tabs.Panel, {\n className: \"p-0\",\n value: \"yarn\",\n children: jsx(CodeHighlight, {\n className: \"mdx\",\n code: `yarn add${dev ? \" -D\" : \"\"} ${packages}`,\n language: \"bash\",\n preProps: {\n style: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0\n }\n }\n })\n })]\n });\n}"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,KAAKA,MAAU,yBACxB,OAAS,OAAAC,EAAK,QAAAC,MAAY,oBAC1B,OAAS,OAAAC,EAAK,QAAAC,MAAY,0BAC1B,OAAS,iBAAAC,MAAqB,wCAC9B,OAAS,qBAAAC,MAAyB,iCAClC,OAAS,eAAAC,MAAmB,2BACrB,SAASC,EAAeC,EAAI,CACjC,IAAMC,EAAIV,EAAG,CAAC,EACR,CACJ,IAAAW,EACA,SAAUC,EACV,GAAGC,CACL,EAAIJ,EACAK,EACAJ,EAAE,CAAC,IAAME,GACXE,EAAKP,EAAYK,CAAY,EAAE,KAAK,GAAG,EACvCF,EAAE,CAAC,EAAIE,EACPF,EAAE,CAAC,EAAII,GAEPA,EAAKJ,EAAE,CAAC,EAEV,IAAMK,EAAWD,EACX,CACJ,eAAgBE,EAChB,kBAAAC,CACF,EAAIX,EAAkB,EAChBY,EAAiBF,IAAO,OAAY,MAAQA,EAC9CG,EACJ,OAAIT,EAAE,CAAC,IAAMO,GACXE,EAAKC,GAAS,CACZH,IAAoBG,CAAK,CAC3B,EACAV,EAAE,CAAC,EAAIO,EACPP,EAAE,CAAC,EAAIS,GAEPA,EAAKT,EAAE,CAAC,EAEHR,EAAKE,EAAK,KAAM,CACrB,cAAee,EACf,KAAM,KACN,MAAOD,EACP,GAAGL,EACH,SAAU,CAACX,EAAKE,EAAK,KAAM,CACzB,SAAU,CAACH,EAAIG,EAAK,UAAW,CAAC,CAAC,EAAGH,EAAIE,EAAI,KAAM,CAChD,MAAO,MACP,SAAUF,EAAIE,EAAI,OAAQ,CACxB,SAAU,KACZ,CAAC,CACH,CAAC,EAAGF,EAAIE,EAAI,KAAM,CAChB,MAAO,OACP,SAAUF,EAAIE,EAAI,OAAQ,CACxB,SAAU,MACZ,CAAC,CACH,CAAC,EAAGF,EAAIE,EAAI,KAAM,CAChB,MAAO,OACP,SAAUF,EAAIE,EAAI,OAAQ,CACxB,SAAU,MACZ,CAAC,CACH,CAAC,CAAC,CACJ,CAAC,EAAGF,EAAIG,EAAK,MAAO,CAClB,UAAW,MACX,MAAO,MACP,SAAUH,EAAII,EAAe,CAC3B,UAAW,MACX,KAAM,QAAQM,EAAM,cAAgB,EAAE,IAAII,CAAQ,GAClD,SAAU,OACV,SAAU,CACR,MAAO,CACL,oBAAqB,EACrB,qBAAsB,CACxB,CACF,CACF,CAAC,CACH,CAAC,EAAGd,EAAIG,EAAK,MAAO,CAClB,UAAW,MACX,MAAO,OACP,SAAUH,EAAII,EAAe,CAC3B,UAAW,MACX,KAAM,WAAWM,EAAM,MAAQ,EAAE,IAAII,CAAQ,GAC7C,SAAU,OACV,SAAU,CACR,MAAO,CACL,oBAAqB,EACrB,qBAAsB,CACxB,CACF,CACF,CAAC,CACH,CAAC,EAAGd,EAAIG,EAAK,MAAO,CAClB,UAAW,MACX,MAAO,OACP,SAAUH,EAAII,EAAe,CAC3B,UAAW,MACX,KAAM,WAAWM,EAAM,MAAQ,EAAE,IAAII,CAAQ,GAC7C,SAAU,OACV,SAAU,CACR,MAAO,CACL,oBAAqB,EACrB,qBAAsB,CACxB,CACF,CACF,CAAC,CACH,CAAC,CAAC,CACJ,CAAC,CACH",
|
|
6
|
+
"names": ["_c", "jsx", "jsxs", "Tab", "Tabs", "CodeHighlight", "useMdxDocsContext", "ensureArray", "NpmInstallTabs", "t0", "$", "dev", "packagesProp", "props", "t1", "packages", "t2", "setPackageManager", "packageManager", "t3", "value"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import { type TabsRootProps } from "@qualcomm-ui/react/tabs";
|
|
3
|
+
/**
|
|
4
|
+
* A simple component that provides an npm install command for each
|
|
5
|
+
* available package manager. The selected package manager is saved to the docs
|
|
6
|
+
* context.
|
|
7
|
+
*/
|
|
8
|
+
export interface NpmCommandTabsProps extends Omit<TabsRootProps, "children"> {
|
|
9
|
+
/**
|
|
10
|
+
* If true, the corresponding `dev` tag will be added to each install command.
|
|
11
|
+
*/
|
|
12
|
+
dev?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The command
|
|
15
|
+
*/
|
|
16
|
+
packages: string | string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function NpmInstallTabs({ dev, packages: packagesProp, ...props }: NpmCommandTabsProps): ReactElement;
|
|
19
|
+
//# sourceMappingURL=npm-install-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-install-tabs.d.ts","sourceRoot":"","sources":["../../src/npm-install-tabs/npm-install-tabs.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAY,KAAK,aAAa,EAAC,MAAM,yBAAyB,CAAA;AAQrE;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IAC1E;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC5B;AAED,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,QAAQ,EAAE,YAAY,EACtB,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,YAAY,CA2DpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/qui-ecosystem/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as a}from"react/jsx-runtime";import{AngularLogo as t}from"@qualcomm-ui/react-mdx/angular-logo";import{ReactLogo as o}from"@qualcomm-ui/react-mdx/react-logo";var i={angular:{description:"@qualcomm-ui/angular",href:"https://qui.aws.qualcomm.com",label:"Angular",logo:a(t,{height:18,width:18})},angularTable:{description:"@qualcomm-ui/angular-table",href:"https://angular-table.qui.aws.qualcomm.com",label:"Angular Table",logo:a(t,{height:18,width:18})},quiDocs:{description:"@qualcomm-ui/react-mdx",href:"https://docs.qui.qualcomm.com",label:"QUI Docs",logo:a(o,{height:18,width:16})},react:{description:"@qualcomm-ui/react",href:"https://react.qui.qualcomm.com",label:"React",logo:a(o,{height:18,width:16})},reactTable:{description:"@qualcomm-ui/react/table",href:"https://react-table.qui.qualcomm.com",label:"React Table",logo:a(o,{height:18,width:16})}};export{i as quiEcosystem};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/qui-ecosystem/qui-ecosystem.tsx"],
|
|
4
|
+
"sourcesContent": ["import { jsx } from \"react/jsx-runtime\";\nimport { AngularLogo } from \"@qualcomm-ui/react-mdx/angular-logo\";\nimport { ReactLogo } from \"@qualcomm-ui/react-mdx/react-logo\";\nexport const quiEcosystem = {\n angular: {\n description: \"@qualcomm-ui/angular\",\n href: \"https://qui.aws.qualcomm.com\",\n label: \"Angular\",\n logo: /* @__PURE__ */jsx(AngularLogo, {\n height: 18,\n width: 18\n })\n },\n angularTable: {\n description: \"@qualcomm-ui/angular-table\",\n href: \"https://angular-table.qui.aws.qualcomm.com\",\n label: \"Angular Table\",\n logo: /* @__PURE__ */jsx(AngularLogo, {\n height: 18,\n width: 18\n })\n },\n quiDocs: {\n description: \"@qualcomm-ui/react-mdx\",\n href: \"https://docs.qui.qualcomm.com\",\n label: \"QUI Docs\",\n logo: /* @__PURE__ */jsx(ReactLogo, {\n height: 18,\n width: 16\n })\n },\n react: {\n description: \"@qualcomm-ui/react\",\n href: \"https://react.qui.qualcomm.com\",\n label: \"React\",\n logo: /* @__PURE__ */jsx(ReactLogo, {\n height: 18,\n width: 16\n })\n },\n reactTable: {\n description: \"@qualcomm-ui/react/table\",\n href: \"https://react-table.qui.qualcomm.com\",\n label: \"React Table\",\n logo: /* @__PURE__ */jsx(ReactLogo, {\n height: 18,\n width: 16\n })\n }\n};"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,OAAAA,MAAW,oBACpB,OAAS,eAAAC,MAAmB,sCAC5B,OAAS,aAAAC,MAAiB,oCACnB,IAAMC,EAAe,CAC1B,QAAS,CACP,YAAa,uBACb,KAAM,+BACN,MAAO,UACP,KAAqBH,EAAIC,EAAa,CACpC,OAAQ,GACR,MAAO,EACT,CAAC,CACH,EACA,aAAc,CACZ,YAAa,6BACb,KAAM,6CACN,MAAO,gBACP,KAAqBD,EAAIC,EAAa,CACpC,OAAQ,GACR,MAAO,EACT,CAAC,CACH,EACA,QAAS,CACP,YAAa,yBACb,KAAM,gCACN,MAAO,WACP,KAAqBD,EAAIE,EAAW,CAClC,OAAQ,GACR,MAAO,EACT,CAAC,CACH,EACA,MAAO,CACL,YAAa,qBACb,KAAM,iCACN,MAAO,QACP,KAAqBF,EAAIE,EAAW,CAClC,OAAQ,GACR,MAAO,EACT,CAAC,CACH,EACA,WAAY,CACV,YAAa,2BACb,KAAM,uCACN,MAAO,cACP,KAAqBF,EAAIE,EAAW,CAClC,OAAQ,GACR,MAAO,EACT,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["jsx", "AngularLogo", "ReactLogo", "quiEcosystem"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
export declare const quiEcosystem: Record<"angular" | "angularTable" | "quiDocs" | "react" | "reactTable", {
|
|
3
|
+
description: string;
|
|
4
|
+
href: string;
|
|
5
|
+
label: string;
|
|
6
|
+
logo: ReactElement;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=qui-ecosystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qui-ecosystem.d.ts","sourceRoot":"","sources":["../../src/qui-ecosystem/qui-ecosystem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,OAAO,CAAA;AAKvC,eAAO,MAAM,YAAY,EAAE,MAAM,CAC/B,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,EAC/D;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAC,CAgCvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react-logo/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as c,jsxs as r}from"react/jsx-runtime";function t(m){return c("svg",{height:"32",viewBox:"175.7 78 490.6 436.9",width:"28.08",xmlns:"http://www.w3.org/2000/svg",...m,children:r("g",{fill:"#61dafb",children:[c("path",{d:"m666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9v-22.3c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6v-22.3c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zm-101.4 106.7c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24s9.5 15.8 14.4 23.4zm73.9-208.1c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zm53.8 142.9c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6z"}),c("circle",{cx:"420.9",cy:"296.5",r:"45.7"})]})})}export{t as ReactLogo};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-logo/react-logo.tsx"],
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nexport function ReactLogo(props) {\n return /* @__PURE__ */jsx(\"svg\", {\n height: \"32\",\n viewBox: \"175.7 78 490.6 436.9\",\n width: \"28.08\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ...props,\n children: /* @__PURE__ */jsxs(\"g\", {\n fill: \"#61dafb\",\n children: [/* @__PURE__ */jsx(\"path\", {\n d: \"m666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9v-22.3c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6v-22.3c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zm-101.4 106.7c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24s9.5 15.8 14.4 23.4zm73.9-208.1c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zm53.8 142.9c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6z\"\n }), /* @__PURE__ */jsx(\"circle\", {\n cx: \"420.9\",\n cy: \"296.5\",\n r: \"45.7\"\n })]\n })\n });\n}"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,OAAAA,EAAK,QAAAC,MAAY,oBACnB,SAASC,EAAUC,EAAO,CAC/B,OAAsBH,EAAI,MAAO,CAC/B,OAAQ,KACR,QAAS,uBACT,MAAO,QACP,MAAO,6BACP,GAAGG,EACH,SAAyBF,EAAK,IAAK,CACjC,KAAM,UACN,SAAU,CAAgBD,EAAI,OAAQ,CACpC,EAAG,k5EACL,CAAC,EAAkBA,EAAI,SAAU,CAC/B,GAAI,QACJ,GAAI,QACJ,EAAG,MACL,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,CACH",
|
|
6
|
+
"names": ["jsx", "jsxs", "ReactLogo", "props"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-logo.d.ts","sourceRoot":"","sources":["../../src/react-logo/react-logo.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAA;AAE9C,UAAU,KAAM,SAAQ,QAAQ,CAAC,aAAa,CAAC;CAAG;AAElD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAejD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,mBAAmB,SAAS,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{Component as g}from"react";import{createElement as v,isValidElement as C}from"react";import*as S from"react";import{transform as x}from"sucrase";function l(r){return x(r,{production:!0,transforms:["jsx","typescript","imports"]}).code.substring(13)}var h=/^(\s*)(<[^>]*>|function[(\s]|\(\)[\s=]|class\s)(.*)/;function m(r){return r.replace(h,"$1export default $2$3")}function f(r,e){let{default:t,import:n,...u}=e,o={React:S,require:E(n),...u},s=Object.keys(o),c=s.map(d=>o[d]);return new Function(...s,r)(...c)}function a(r){let{code:e,scope:t}=r;if(!e.trim())return null;let n={},u=s=>{n.default=s};f(l(m(e)),{render:u,...t,exports:n});let o=n.default;return o?C(o)?o:typeof o=="function"?v(o):typeof o=="string"?o:null:null}function E(r={}){return e=>{if(!r.hasOwnProperty(e))throw new Error(`Module not found: '${e}'`);return r[e]}}function j(r,e){let t={};return f(l(r),{...e,exports:t}),t}var p=class extends g{state={element:null,error:null,prevCode:null,prevScope:void 0};static getDerivedStateFromProps(e,t){if(t.prevCode===e.code&&t.prevScope===e.scope)return null;try{return{element:a(e),error:null,prevCode:e.code,prevScope:e.scope}}catch(n){return{element:null,error:n,prevCode:e.code,prevScope:e.scope}}}static getDerivedStateFromError(e){return{error:e}}componentDidMount(){this.props.onRendered?.(this.state.error||void 0)}shouldComponentUpdate(e,t){return e.code!==this.props.code||e.scope!==this.props.scope||t.error!==this.state.error}componentDidUpdate(){this.props.onRendered?.(this.state.error||void 0)}render(){return this.state.error?null:this.state.element}};import{createElement as R,useMemo as y,useRef as w,useState as D}from"react";function k({code:r,disableCache:e,onRendered:t,scope:n}){let u=w(null),[o,s]=D(null),c=y(()=>R(p,{code:r,onRendered:i=>{t?.(i),i?s(i.toString()):(u.current=c,s(null))},scope:n}),[r,t,n]);return{element:o&&!e?u.current:c,error:o}}export{p as Runner,E as createRequire,a as generateElement,j as importCode,k as useRunner};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runner/runner.tsx", "../../src/runner/utils.ts", "../../src/runner/transform.ts", "../../src/runner/use-runner.ts"],
|
|
4
|
+
"sourcesContent": ["import { Component } from \"react\";\nimport { generateElement } from \"./utils\";\nexport class Runner extends Component {\n state = {\n element: null,\n error: null,\n prevCode: null,\n prevScope: void 0\n };\n static getDerivedStateFromProps(props, state) {\n if (state.prevCode === props.code && state.prevScope === props.scope) {\n return null;\n }\n try {\n return {\n element: generateElement(props),\n error: null,\n prevCode: props.code,\n prevScope: props.scope\n };\n } catch (error) {\n return {\n element: null,\n error,\n prevCode: props.code,\n prevScope: props.scope\n };\n }\n }\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n componentDidMount() {\n this.props.onRendered?.(this.state.error || void 0);\n }\n shouldComponentUpdate(nextProps, nextState) {\n return nextProps.code !== this.props.code || nextProps.scope !== this.props.scope || nextState.error !== this.state.error;\n }\n componentDidUpdate() {\n this.props.onRendered?.(this.state.error || void 0);\n }\n render() {\n return this.state.error ? null : this.state.element;\n }\n}", "import { createElement, isValidElement } from \"react\";\nimport * as React from \"react\";\nimport { normalizeCode, transform } from \"./transform\";\nfunction evalCode(code, scope) {\n const {\n default: _,\n import: imports,\n ...rest\n } = scope;\n const finalScope = {\n React,\n require: createRequire(imports),\n ...rest\n };\n const scopeKeys = Object.keys(finalScope);\n const scopeValues = scopeKeys.map(key => finalScope[key]);\n const fn = new Function(...scopeKeys, code);\n return fn(...scopeValues);\n}\nexport function generateElement(options) {\n const {\n code,\n scope\n } = options;\n if (!code.trim()) {\n return null;\n }\n const exports = {};\n const render = value => {\n exports.default = value;\n };\n evalCode(transform(normalizeCode(code)), {\n render,\n ...scope,\n exports\n });\n const result = exports.default;\n if (!result) {\n return null;\n }\n if (isValidElement(result)) {\n return result;\n }\n if (typeof result === \"function\") {\n return createElement(result);\n }\n if (typeof result === \"string\") {\n return result;\n }\n return null;\n}\nexport function createRequire(imports = {}) {\n return module => {\n if (!imports.hasOwnProperty(module)) {\n throw new Error(`Module not found: '${module}'`);\n }\n return imports[module];\n };\n}\nexport function importCode(code, scope) {\n const exports = {};\n evalCode(transform(code), {\n ...scope,\n exports\n });\n return exports;\n}", "import { transform as _transform } from \"sucrase\";\nexport function transform(code) {\n return _transform(code, {\n production: true,\n transforms: [\"jsx\", \"typescript\", \"imports\"]\n }).code.substring(13);\n}\nconst firstStatementRegexp = /^(\\s*)(<[^>]*>|function[(\\s]|\\(\\)[\\s=]|class\\s)(.*)/;\nexport function normalizeCode(code) {\n return code.replace(firstStatementRegexp, \"$1export default $2$3\");\n}", "import { createElement, useMemo, useRef, useState } from \"react\";\nimport { Runner } from \"./runner\";\nexport function useRunner({\n code,\n disableCache,\n onRendered,\n scope\n}) {\n const cachedElementRef = useRef(null);\n const [error, setError] = useState(null);\n const element = useMemo(() => {\n return createElement(Runner, {\n code,\n onRendered: error2 => {\n onRendered?.(error2);\n if (error2) {\n setError(error2.toString());\n } else {\n cachedElementRef.current = element;\n setError(null);\n }\n },\n scope\n });\n }, [code, onRendered, scope]);\n return {\n element: error && !disableCache ? cachedElementRef.current : element,\n error\n };\n}"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Component", "createElement", "isValidElement", "React", "_transform", "transform", "code", "firstStatementRegexp", "normalizeCode", "evalCode", "code", "scope", "_", "imports", "rest", "finalScope", "React", "createRequire", "scopeKeys", "scopeValues", "key", "generateElement", "options", "exports", "render", "value", "transform", "normalizeCode", "result", "isValidElement", "createElement", "module", "importCode", "Runner", "Component", "props", "state", "generateElement", "error", "nextProps", "nextState", "createElement", "useMemo", "useRef", "useState", "useRunner", "code", "disableCache", "onRendered", "scope", "cachedElementRef", "useRef", "error", "setError", "useState", "element", "useMemo", "createElement", "Runner", "error2"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component, type ReactElement } from "react";
|
|
2
|
+
import type { RunnerOptions, Scope } from "./types";
|
|
3
|
+
export interface RunnerProps extends RunnerOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Callback fired when code is rendered. Returns an error message when code is
|
|
6
|
+
* invalid.
|
|
7
|
+
*/
|
|
8
|
+
onRendered?: (error?: Error) => void;
|
|
9
|
+
}
|
|
10
|
+
interface RunnerState {
|
|
11
|
+
element: ReactElement | null;
|
|
12
|
+
error: Error | null;
|
|
13
|
+
prevCode: string | null;
|
|
14
|
+
prevScope: Scope | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare class Runner extends Component<RunnerProps, RunnerState> {
|
|
17
|
+
state: RunnerState;
|
|
18
|
+
static getDerivedStateFromProps(props: RunnerProps, state: RunnerState): Partial<RunnerState> | null;
|
|
19
|
+
static getDerivedStateFromError(error: Error): Partial<RunnerState>;
|
|
20
|
+
componentDidMount(): void;
|
|
21
|
+
shouldComponentUpdate(nextProps: RunnerProps, nextState: RunnerState): boolean;
|
|
22
|
+
componentDidUpdate(): void;
|
|
23
|
+
render(): ReactElement | null;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/runner/runner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,SAAS,EAAE,KAAK,YAAY,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,KAAK,EAAC,aAAa,EAAE,KAAK,EAAC,MAAM,SAAS,CAAA;AAGjD,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;CACrC;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,SAAS,EAAE,KAAK,GAAG,SAAS,CAAA;CAC7B;AAED,qBAAa,MAAO,SAAQ,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IAC7D,KAAK,EAAE,WAAW,CAKjB;IAED,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAuB9B,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC;IAInE,iBAAiB,IAAI,IAAI;IAIzB,qBAAqB,CACnB,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,WAAW,GACrB,OAAO;IAQV,kBAAkB,IAAI,IAAI;IAI1B,MAAM,IAAI,YAAY,GAAG,IAAI;CAG9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/runner/transform.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9C;AAKD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Scope = Record<string, any> & {
|
|
2
|
+
/** scope used by import statement */
|
|
3
|
+
import?: Record<string, any>;
|
|
4
|
+
};
|
|
5
|
+
export type RunnerOptions = {
|
|
6
|
+
/** the code to run */
|
|
7
|
+
code: string;
|
|
8
|
+
/** globals that could be used in code */
|
|
9
|
+
scope?: Scope;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/runner/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IACxC,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import type { RunnerOptions } from "./types";
|
|
3
|
+
export interface UseRunnerProps extends RunnerOptions {
|
|
4
|
+
disableCache?: boolean;
|
|
5
|
+
onRendered?: (error: Error | undefined) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface UseRunnerReturn {
|
|
8
|
+
element: ReactElement | null;
|
|
9
|
+
error: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare function useRunner({ code, disableCache, onRendered, scope, }: UseRunnerProps): UseRunnerReturn;
|
|
12
|
+
//# sourceMappingURL=use-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-runner.d.ts","sourceRoot":"","sources":["../../src/runner/use-runner.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAA;AAGd,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,KAAK,IAAI,CAAA;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,KAAK,GACN,EAAE,cAAc,GAAG,eAAe,CAwBlC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import type { RunnerOptions, Scope } from "./types";
|
|
3
|
+
export declare function generateElement(options: RunnerOptions): ReactElement | null;
|
|
4
|
+
export declare function createRequire(imports?: Scope): (module: string) => Scope;
|
|
5
|
+
export declare function importCode(code: string, scope?: Scope): Scope;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/runner/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgC,KAAK,YAAY,EAAC,MAAM,OAAO,CAAA;AAKtE,OAAO,KAAK,EAAC,aAAa,EAAE,KAAK,EAAC,MAAM,SAAS,CAAA;AAcjD,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,GAAG,IAAI,CA2B3E;AAED,wBAAgB,aAAa,CAAC,OAAO,GAAE,KAAU,IACvC,QAAQ,MAAM,KAAG,KAAK,CAM/B;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAK7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shiki/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{c as M}from"react/compiler-runtime";import{jsx as y}from"react/jsx-runtime";import"react";import O from"quick-lru";import{mergeProps as q}from"@qualcomm-ui/utils/merge-props";import T from"@shikijs/langs/angular-html";import j from"@shikijs/langs/angular-ts";import v from"@shikijs/langs/json";import w from"@shikijs/langs/shell";import L from"@shikijs/langs/tsx";import N from"@shikijs/langs/typescript";import P from"@shikijs/themes/github-light-high-contrast";import{createHighlighterCore as $}from"react-shiki/core";import{createJavaScriptRegexEngine as b}from"shiki";import{quiCustomDarkTheme as E}from"@qualcomm-ui/mdx-common";var I=b({forgiving:!0}),J=[L,N,v,w,j,T],x=new Set(["tsx","typescript","json","shell","angular-ts","angular-html"]),k=await $({engine:I,langs:J,themes:[{...E,name:"dark"},{...P,name:"light"}]}),p="___extra_special_dummy_type_that_will_be_stripped",W=`type ${p}=`;var z=[{postprocess(t){let e=t.indexOf(p);return e>-1?t.substring(e+p.length+7).replace(">=",">"):t}}],_=new O({maxSize:1e3});function se(t){let e=M(10),i;if(e[0]!==t){let{cache:g,code:s,langAlias:l,language:n,shikiConfig:c,...S}=t,r;if(e[2]!==g||e[3]!==s||e[4]!==l||e[5]!==n||e[6]!==c){e:{let h=l?.[n??""]??n,o={...c,defaultColor:"light-dark()",lang:h&&x.has(h)?h:"tsx",structure:"inline",themes:{dark:"dark",light:"light"}},f=g&&!o?.grammarState?.getScopes&&!o?.grammarState?.getInternalStack&&!o?.transformers,m=f?`${s}-${JSON.stringify(o)}`:"";if(f){let a;e[8]!==m?(a=_.get(m),e[8]=m,e[9]=a):a=e[9];let d=a;if(d){r=d;break e}}let u=k.codeToHtml(s,{...o,transformers:z});f&&_.set(m,u),r=u}e[2]=g,e[3]=s,e[4]=l,e[5]=n,e[6]=c,e[7]=r}else r=e[7];let C=r,H=q({className:"shiki-code"},S);i=y("pre",{...H,children:y("div",{dangerouslySetInnerHTML:{__html:C}})}),e[0]=t,e[1]=i}else i=e[1];return i}export{se as ShikiHighlighter,p as dummyTypeName,W as dummyTypePrefix,k as shikiHighlighter,x as supportedLangs};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/shiki/shiki-highlighter.tsx", "../../src/shiki/shiki-instance.ts"],
|
|
4
|
+
"sourcesContent": ["import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport QuickLru from \"quick-lru\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { dummyTypeName, shikiHighlighter, supportedLangs } from \"./shiki-instance\";\nconst transformers = [{\n postprocess(html) {\n const index = html.indexOf(dummyTypeName);\n if (index > -1) {\n return html.substring(\n // add 7 characters to account for the trailing </span>\n index + dummyTypeName.length + 7).replace(\">=\", \">\");\n }\n return html;\n }\n}];\nconst shikiCache = new QuickLru({\n maxSize: 1e3\n});\nexport function ShikiHighlighter(t0) {\n const $ = _c(10);\n let t1;\n if ($[0] !== t0) {\n const {\n cache,\n code,\n langAlias,\n language: languageProp,\n shikiConfig,\n ...props\n } = t0;\n let t2;\n if ($[2] !== cache || $[3] !== code || $[4] !== langAlias || $[5] !== languageProp || $[6] !== shikiConfig) {\n bb0: {\n const language = langAlias?.[languageProp ?? \"\"] ?? languageProp;\n const resolvedConfig = {\n ...shikiConfig,\n defaultColor: \"light-dark()\",\n lang: language && supportedLangs.has(language) ? language : \"tsx\",\n structure: \"inline\",\n themes: {\n dark: \"dark\",\n light: \"light\"\n }\n };\n const shouldCache = cache && !resolvedConfig?.grammarState?.getScopes && !resolvedConfig?.grammarState?.getInternalStack && !resolvedConfig?.transformers;\n const cacheKey = shouldCache ? `${code}-${JSON.stringify(resolvedConfig)}` : \"\";\n if (shouldCache) {\n let t3;\n if ($[8] !== cacheKey) {\n t3 = shikiCache.get(cacheKey);\n $[8] = cacheKey;\n $[9] = t3;\n } else {\n t3 = $[9];\n }\n const cached = t3;\n if (cached) {\n t2 = cached;\n break bb0;\n }\n }\n const result = shikiHighlighter.codeToHtml(code, {\n ...resolvedConfig,\n transformers\n });\n if (shouldCache) {\n shikiCache.set(cacheKey, result);\n }\n t2 = result;\n }\n $[2] = cache;\n $[3] = code;\n $[4] = langAlias;\n $[5] = languageProp;\n $[6] = shikiConfig;\n $[7] = t2;\n } else {\n t2 = $[7];\n }\n const highlighted = t2;\n const mergedProps = mergeProps({\n className: \"shiki-code\"\n }, props);\n t1 = jsx(\"pre\", {\n ...mergedProps,\n children: jsx(\"div\", {\n dangerouslySetInnerHTML: {\n __html: highlighted\n }\n })\n });\n $[0] = t0;\n $[1] = t1;\n } else {\n t1 = $[1];\n }\n return t1;\n}", "import angularHtml from \"@shikijs/langs/angular-html\";\nimport angularTs from \"@shikijs/langs/angular-ts\";\nimport json from \"@shikijs/langs/json\";\nimport shell from \"@shikijs/langs/shell\";\nimport tsx from \"@shikijs/langs/tsx\";\nimport typescript from \"@shikijs/langs/typescript\";\nimport light from \"@shikijs/themes/github-light-high-contrast\";\nimport { createHighlighterCore } from \"react-shiki/core\";\nimport { createJavaScriptRegexEngine } from \"shiki\";\nimport { quiCustomDarkTheme } from \"@qualcomm-ui/mdx-common\";\nconst jsEngine = createJavaScriptRegexEngine({\n forgiving: true\n});\nconst langs = [tsx, typescript, json, shell, angularTs, angularHtml];\nexport const supportedLangs = /* @__PURE__ */new Set([\"tsx\", \"typescript\", \"json\", \"shell\", \"angular-ts\", \"angular-html\"]);\nexport const shikiHighlighter = await createHighlighterCore({\n engine: jsEngine,\n langs,\n themes: [{\n ...quiCustomDarkTheme,\n name: \"dark\"\n }, {\n ...light,\n name: \"light\"\n }]\n});\nexport const dummyTypeName = \"___extra_special_dummy_type_that_will_be_stripped\";\nexport const dummyTypePrefix = `type ${dummyTypeName}=`;"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["_c", "jsx", "QuickLru", "mergeProps", "angularHtml", "angularTs", "json", "shell", "tsx", "typescript", "light", "createHighlighterCore", "createJavaScriptRegexEngine", "quiCustomDarkTheme", "jsEngine", "langs", "supportedLangs", "shikiHighlighter", "dummyTypeName", "dummyTypePrefix", "transformers", "html", "index", "dummyTypeName", "shikiCache", "QuickLru", "ShikiHighlighter", "t0", "$", "_c", "t1", "cache", "code", "langAlias", "languageProp", "shikiConfig", "props", "t2", "bb0", "language", "resolvedConfig", "supportedLangs", "shouldCache", "cacheKey", "t3", "cached", "result", "shikiHighlighter", "highlighted", "mergedProps", "mergeProps", "jsx"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import type { CodeToHastOptions } from "shiki/types";
|
|
3
|
+
import type { ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
4
|
+
export interface ShikiHighlighterProps extends ElementRenderProp<"pre"> {
|
|
5
|
+
cache?: boolean;
|
|
6
|
+
code: string;
|
|
7
|
+
langAlias?: Record<string, string>;
|
|
8
|
+
language?: string;
|
|
9
|
+
shikiConfig?: Omit<CodeToHastOptions, "themes" | "defaultColor" | "lang">;
|
|
10
|
+
}
|
|
11
|
+
export declare function ShikiHighlighter({ cache, code, langAlias, language: languageProp, shikiConfig, ...props }: ShikiHighlighterProps): ReactElement;
|
|
12
|
+
//# sourceMappingURL=shiki-highlighter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shiki-highlighter.d.ts","sourceRoot":"","sources":["../../src/shiki/shiki-highlighter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,YAAY,EAAU,MAAM,OAAO,CAAA;AAIhD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAElD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAA;AAKrE,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,CAAC,KAAK,CAAC;IACrE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,cAAc,GAAG,MAAM,CAAC,CAAA;CAC1E;AAqBD,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EAAE,YAAY,EACtB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG,YAAY,CAiDtC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HighlighterCore } from "shiki/types";
|
|
2
|
+
export declare const supportedLangs: Set<string>;
|
|
3
|
+
export declare const shikiHighlighter: HighlighterCore;
|
|
4
|
+
export declare const dummyTypeName = "___extra_special_dummy_type_that_will_be_stripped";
|
|
5
|
+
/**
|
|
6
|
+
* Types are prefixed with this string so that highlighting works as expected for
|
|
7
|
+
* unions and function types.
|
|
8
|
+
*/
|
|
9
|
+
export declare const dummyTypePrefix: string;
|
|
10
|
+
//# sourceMappingURL=shiki-instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shiki-instance.d.ts","sourceRoot":"","sources":["../../src/shiki/shiki-instance.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,aAAa,CAAA;AAOhD,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,MAAM,CAOrC,CAAA;AAGF,eAAO,MAAM,gBAAgB,EAAE,eAU7B,CAAA;AAEF,eAAO,MAAM,aAAa,sDAAsD,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAiC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import { type ElementRenderProp } from "@qualcomm-ui/react-core/system";
|
|
3
|
+
import type { GroupedSearchResult } from "./use-grouped-results";
|
|
4
|
+
export type GroupedResultItemProps = ElementRenderProp<"button"> & {
|
|
5
|
+
active: boolean;
|
|
6
|
+
item: GroupedSearchResult;
|
|
7
|
+
};
|
|
8
|
+
export declare function GroupedResultItem({ active, className, item, ref, ...props }: GroupedResultItemProps): ReactElement;
|
|
9
|
+
//# sourceMappingURL=grouped-result-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-result-item.d.ts","sourceRoot":"","sources":["../../src/site-search/grouped-result-item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,OAAO,CAAA;AAMvC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAIvC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAE9D,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,GAAG;IACjE,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,mBAAmB,CAAA;CAC1B,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,SAAS,EACT,IAAI,EACJ,GAAG,EACH,GAAG,KAAK,EACT,EAAE,sBAAsB,GAAG,YAAY,CAwBvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/site-search/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA"}
|