polen 0.11.0-next.23 → 0.11.0-next.24
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.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/template/routes/pages.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/template/routes/pages.tsx"],"names":[],"mappings":"AAgCA,eAAO,MAAM,KAAK,OAIhB,CAAA"}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Catalog } from '#lib/catalog/$';
|
2
3
|
import { route } from '#lib/react-router-effect/route';
|
3
4
|
import { SidebarLayout } from '#template/layouts/index';
|
4
5
|
import { Outlet, useLocation } from 'react-router';
|
5
6
|
import { pagesCatalog } from 'virtual:polen/project/pages';
|
6
7
|
import { routes } from 'virtual:polen/project/routes.jsx';
|
8
|
+
import { schemasCatalog } from 'virtual:polen/project/schemas';
|
7
9
|
import { MdxProvider } from '../providers/mdx.js';
|
8
10
|
const Component = () => {
|
9
11
|
const location = useLocation();
|
@@ -13,7 +15,9 @@ const Component = () => {
|
|
13
15
|
const topLevelPath = pathSegments[0] ? `/${pathSegments[0]}` : '/';
|
14
16
|
// Get the sidebar for this section
|
15
17
|
const sidebar = pagesCatalog.sidebarIndex[topLevelPath]?.items || [];
|
16
|
-
|
18
|
+
// Get the latest schema for interactive GraphQL blocks
|
19
|
+
const schema = schemasCatalog && Catalog.getLatest(schemasCatalog).definition;
|
20
|
+
return (_jsx(MdxProvider, { schema: schema, children: _jsx(SidebarLayout, { sidebar: sidebar, children: _jsx(Outlet, {}) }) }));
|
17
21
|
};
|
18
22
|
export const pages = route({
|
19
23
|
// Pathless layout route - doesn't affect URL paths
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/template/routes/pages.tsx"],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,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,mCAAmC;IACnC,kEAAkE;IAClE,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACjE,MAAM,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;IAElE,mCAAmC;IACnC,MAAM,OAAO,GAAG,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,EAAE,CAAA;IAEpE,uDAAuD;IACvD,MAAM,MAAM,GAAG,cAAc,IAAI,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,UAAU,CAAA;IAE7E,OAAO,CACL,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,YACzB,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,YAC7B,KAAC,MAAM,KAAG,GACI,GACJ,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC;IACzB,mDAAmD;IACnD,SAAS;IACT,QAAQ,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,8BAA8B;CACtD,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
import { Catalog } from '#lib/catalog/$'
|
1
2
|
import { route } from '#lib/react-router-effect/route'
|
2
3
|
import { SidebarLayout } from '#template/layouts/index'
|
3
4
|
import { Outlet, useLocation } from 'react-router'
|
4
5
|
import { pagesCatalog } from 'virtual:polen/project/pages'
|
5
6
|
import { routes } from 'virtual:polen/project/routes.jsx'
|
7
|
+
import { schemasCatalog } from 'virtual:polen/project/schemas'
|
6
8
|
import { MdxProvider } from '../providers/mdx.js'
|
7
9
|
|
8
10
|
const Component = () => {
|
@@ -16,8 +18,11 @@ const Component = () => {
|
|
16
18
|
// Get the sidebar for this section
|
17
19
|
const sidebar = pagesCatalog.sidebarIndex[topLevelPath]?.items || []
|
18
20
|
|
21
|
+
// Get the latest schema for interactive GraphQL blocks
|
22
|
+
const schema = schemasCatalog && Catalog.getLatest(schemasCatalog).definition
|
23
|
+
|
19
24
|
return (
|
20
|
-
<MdxProvider>
|
25
|
+
<MdxProvider schema={schema}>
|
21
26
|
<SidebarLayout sidebar={sidebar}>
|
22
27
|
<Outlet />
|
23
28
|
</SidebarLayout>
|