@immediately-run/sdk 0.21.0 → 0.23.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.
Files changed (45) hide show
  1. package/dist/boot.cjs +8 -4
  2. package/dist/boot.cjs.map +1 -1
  3. package/dist/boot.d.cts +22 -2
  4. package/dist/boot.d.ts +22 -2
  5. package/dist/boot.js +6 -3
  6. package/dist/boot.js.map +1 -1
  7. package/dist/components/Admonition.cjs +58 -0
  8. package/dist/components/Admonition.cjs.map +1 -0
  9. package/dist/components/Admonition.d.cts +24 -0
  10. package/dist/components/Admonition.d.ts +24 -0
  11. package/dist/components/Admonition.js +34 -0
  12. package/dist/components/Admonition.js.map +1 -0
  13. package/dist/components/Link.cjs +64 -0
  14. package/dist/components/Link.cjs.map +1 -0
  15. package/dist/components/Link.d.cts +10 -0
  16. package/dist/components/Link.d.ts +10 -0
  17. package/dist/components/Link.js +39 -0
  18. package/dist/components/Link.js.map +1 -0
  19. package/dist/components/MDXComponents.cjs +17 -38
  20. package/dist/components/MDXComponents.cjs.map +1 -1
  21. package/dist/components/MDXComponents.d.cts +13 -13
  22. package/dist/components/MDXComponents.d.ts +13 -13
  23. package/dist/components/MDXComponents.js +12 -35
  24. package/dist/components/MDXComponents.js.map +1 -1
  25. package/dist/components/WikiLink.cjs +44 -0
  26. package/dist/components/WikiLink.cjs.map +1 -0
  27. package/dist/components/WikiLink.d.cts +29 -0
  28. package/dist/components/WikiLink.d.ts +29 -0
  29. package/dist/components/WikiLink.js +20 -0
  30. package/dist/components/WikiLink.js.map +1 -0
  31. package/dist/index.d.cts +6 -3
  32. package/dist/index.d.ts +6 -3
  33. package/dist/mounts.cjs +16 -0
  34. package/dist/mounts.cjs.map +1 -1
  35. package/dist/mounts.d.cts +10 -1
  36. package/dist/mounts.d.ts +10 -1
  37. package/dist/mounts.js +13 -0
  38. package/dist/mounts.js.map +1 -1
  39. package/dist/version.cjs +1 -1
  40. package/dist/version.cjs.map +1 -1
  41. package/dist/version.d.cts +1 -1
  42. package/dist/version.d.ts +1 -1
  43. package/dist/version.js +1 -1
  44. package/dist/version.js.map +1 -1
  45. package/package.json +1 -1
@@ -18,58 +18,37 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var MDXComponents_exports = {};
20
20
  __export(MDXComponents_exports, {
21
+ Admonition: () => import_Admonition2.Admonition,
21
22
  DEFAULT_MDX_COMPONENTS: () => DEFAULT_MDX_COMPONENTS,
22
- InternalLink: () => InternalLink,
23
- Link: () => Link
23
+ InternalLink: () => import_Link2.InternalLink,
24
+ Link: () => import_Link2.Link,
25
+ WikiLink: () => import_WikiLink2.WikiLink
24
26
  });
25
27
  module.exports = __toCommonJS(MDXComponents_exports);
26
28
  var import_jsx_runtime = require("react/jsx-runtime");
27
- var import_react = require("react");
28
- var import_routing = require("../routing");
29
- var import_TinkerableContext = require("../TinkerableContext");
30
- var import_urlUtils = require("../urlUtils");
31
- const InternalLink = ({
32
- href,
33
- children,
34
- ...props
35
- }) => {
36
- const clickHandler = (0, import_react.useCallback)(
37
- (e) => {
38
- if (href) {
39
- e.preventDefault();
40
- (0, import_routing.navigate)(href);
41
- }
42
- },
43
- [href]
44
- );
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href, onClick: clickHandler, ...props, children });
46
- };
47
- const Link = ({
48
- href,
49
- children,
50
- ...properties
51
- }) => {
52
- const { outerHref, navigationState } = (0, import_react.use)(import_TinkerableContext.TinkerableContext);
53
- if (href && (0, import_urlUtils.isInternalHref)(outerHref, href, navigationState)) {
54
- const targetHref = (0, import_urlUtils.constructOuterUrl)(outerHref, href, navigationState);
55
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InternalLink, { href: targetHref, ...properties, children });
56
- } else {
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { ...{ href, ...properties }, children });
58
- }
59
- };
29
+ var import_Admonition = require("./Admonition");
30
+ var import_Link = require("./Link");
31
+ var import_WikiLink = require("./WikiLink");
32
+ var import_Link2 = require("./Link");
33
+ var import_Admonition2 = require("./Admonition");
34
+ var import_WikiLink2 = require("./WikiLink");
60
35
  const DEFAULT_MDX_COMPONENTS = {
61
36
  a({
62
37
  href,
63
38
  children,
64
39
  ...properties
65
40
  }) {
66
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { href, ...properties, children });
67
- }
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Link.Link, { href, ...properties, children });
42
+ },
43
+ Admonition: import_Admonition.Admonition,
44
+ WikiLink: import_WikiLink.WikiLink
68
45
  };
69
46
  // Annotate the CommonJS export names for ESM import in node:
70
47
  0 && (module.exports = {
48
+ Admonition,
71
49
  DEFAULT_MDX_COMPONENTS,
72
50
  InternalLink,
73
- Link
51
+ Link,
52
+ WikiLink
74
53
  });
75
54
  //# sourceMappingURL=MDXComponents.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/MDXComponents.tsx"],"sourcesContent":["import { ReactNode, use, useCallback } from 'react';\nimport { navigate } from '../routing';\nimport { TinkerableContext } from '../TinkerableContext';\nimport { constructOuterUrl, constructUrl, isInternalHref, repositoryPrefixURL } from '../urlUtils';\n\n/** An `<a>` that performs in-sandbox navigation on click (prevents the default\n * full-page load and routes via {@link navigate}). */\nexport const InternalLink = ({\n href,\n children,\n ...props\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const clickHandler = useCallback(\n (e: any) => {\n if (href) {\n e.preventDefault();\n navigate(href);\n }\n },\n [href]\n );\n return (\n <a href={href} onClick={clickHandler} {...props}>\n {children}\n </a>\n );\n};\n\n/** A link that routes same-app hrefs through the sandbox router (as an\n * {@link InternalLink}) and renders external hrefs as a plain `<a>`. */\nexport const Link = ({\n href,\n children,\n ...properties\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const { outerHref, navigationState } = use(TinkerableContext);\n if (href && isInternalHref(outerHref, href, navigationState)) {\n const targetHref = constructOuterUrl(outerHref, href, navigationState);\n return (\n <InternalLink href={targetHref} {...properties}>\n {children}\n </InternalLink>\n );\n } else {\n // create a regular link to external resource\n return <a {...{ href, ...properties }}>{children}</a>;\n }\n};\n\n/** Default MDX component overrides: routes `<a>` through {@link Link} so links in\n * MDX prose navigate within the app. Passed to {@link MDXProvider} by `boot`. */\nexport const DEFAULT_MDX_COMPONENTS = {\n a({\n href,\n children,\n ...properties\n }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) {\n return (\n <Link href={href} {...properties}>\n {children}\n </Link>\n );\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBI;AAtBJ,mBAA4C;AAC5C,qBAAyB;AACzB,+BAAkC;AAClC,sBAAqF;AAI9E,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,mBAAe;AAAA,IACnB,CAAC,MAAW;AACV,UAAI,MAAM;AACR,UAAE,eAAe;AACjB,qCAAS,IAAI;AAAA,MACf;AAAA,IACF;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AACA,SACE,4CAAC,OAAE,MAAY,SAAS,cAAe,GAAG,OACvC,UACH;AAEJ;AAIO,MAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,EAAE,WAAW,gBAAgB,QAAI,kBAAI,0CAAiB;AAC5D,MAAI,YAAQ,gCAAe,WAAW,MAAM,eAAe,GAAG;AAC5D,UAAM,iBAAa,mCAAkB,WAAW,MAAM,eAAe;AACrE,WACE,4CAAC,gBAAa,MAAM,YAAa,GAAG,YACjC,UACH;AAAA,EAEJ,OAAO;AAEL,WAAO,4CAAC,OAAG,GAAG,EAAE,MAAM,GAAG,WAAW,GAAI,UAAS;AAAA,EACnD;AACF;AAIO,MAAM,yBAAyB;AAAA,EACpC,EAAE;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAA8F;AAC5F,WACE,4CAAC,QAAK,MAAa,GAAG,YACnB,UACH;AAAA,EAEJ;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/components/MDXComponents.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { Admonition } from './Admonition';\nimport { Link } from './Link';\nimport { WikiLink } from './WikiLink';\n\n// The link primitives moved to ./Link so WikiLink can reuse Link without a\n// MDXComponents ↔ WikiLink import cycle (check:circular). Re-exported here so the\n// public `Link` / `InternalLink` entry points are unchanged.\nexport { InternalLink, Link } from './Link';\nexport { Admonition } from './Admonition';\nexport type { AdmonitionType } from './Admonition';\nexport { WikiLink } from './WikiLink';\n\n/** Default MDX component overrides passed to {@link MDXProvider} by `boot`. These\n * are the platform's *phantom defaults* (MARKDOWN_SYNTAX_SPEC §11.2): they are\n * always present in the provider — even for a plain-markdown repo that never\n * calls `boot({ mdxComponents })` — so the platform-emitted `Admonition` (§12)\n * and `WikiLink` (§13) components resolve without the MDX missing-reference guard\n * firing, and Markdown links route in-app via {@link Link}. An app overrides any\n * of them by name via `boot({ mdxComponents })`, which *merges* over these\n * defaults (§11.3) — overriding `WikiLink` alone still keeps `a` and `Admonition`. */\nexport const DEFAULT_MDX_COMPONENTS = {\n a({\n href,\n children,\n ...properties\n }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) {\n return (\n <Link href={href} {...properties}>\n {children}\n </Link>\n );\n },\n Admonition,\n WikiLink,\n} as Record<string, (props: any) => ReactNode>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BM;AA3BN,wBAA2B;AAC3B,kBAAqB;AACrB,sBAAyB;AAKzB,IAAAA,eAAmC;AACnC,IAAAC,qBAA2B;AAE3B,IAAAC,mBAAyB;AAUlB,MAAM,yBAAyB;AAAA,EACpC,EAAE;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAA8F;AAC5F,WACE,4CAAC,oBAAK,MAAa,GAAG,YACnB,UACH;AAAA,EAEJ;AAAA,EACA;AAAA,EACA;AACF;","names":["import_Link","import_Admonition","import_WikiLink"]}
@@ -1,16 +1,16 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
2
+ export { InternalLink, Link } from './Link.cjs';
3
+ export { Admonition, AdmonitionType } from './Admonition.cjs';
4
+ export { WikiLink } from './WikiLink.cjs';
3
5
 
4
- /** An `<a>` that performs in-sandbox navigation on click (prevents the default
5
- * full-page load and routes via {@link navigate}). */
6
- declare const InternalLink: ({ href, children, ...props }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => ReactNode;
7
- /** A link that routes same-app hrefs through the sandbox router (as an
8
- * {@link InternalLink}) and renders external hrefs as a plain `<a>`. */
9
- declare const Link: ({ href, children, ...properties }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => ReactNode;
10
- /** Default MDX component overrides: routes `<a>` through {@link Link} so links in
11
- * MDX prose navigate within the app. Passed to {@link MDXProvider} by `boot`. */
12
- declare const DEFAULT_MDX_COMPONENTS: {
13
- a({ href, children, ...properties }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): react_jsx_runtime.JSX.Element;
14
- };
6
+ /** Default MDX component overrides passed to {@link MDXProvider} by `boot`. These
7
+ * are the platform's *phantom defaults* (MARKDOWN_SYNTAX_SPEC §11.2): they are
8
+ * always present in the provider — even for a plain-markdown repo that never
9
+ * calls `boot({ mdxComponents })` — so the platform-emitted `Admonition` (§12)
10
+ * and `WikiLink` (§13) components resolve without the MDX missing-reference guard
11
+ * firing, and Markdown links route in-app via {@link Link}. An app overrides any
12
+ * of them by name via `boot({ mdxComponents })`, which *merges* over these
13
+ * defaults (§11.3) — overriding `WikiLink` alone still keeps `a` and `Admonition`. */
14
+ declare const DEFAULT_MDX_COMPONENTS: Record<string, (props: any) => ReactNode>;
15
15
 
16
- export { DEFAULT_MDX_COMPONENTS, InternalLink, Link };
16
+ export { DEFAULT_MDX_COMPONENTS };
@@ -1,16 +1,16 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
2
+ export { InternalLink, Link } from './Link.js';
3
+ export { Admonition, AdmonitionType } from './Admonition.js';
4
+ export { WikiLink } from './WikiLink.js';
3
5
 
4
- /** An `<a>` that performs in-sandbox navigation on click (prevents the default
5
- * full-page load and routes via {@link navigate}). */
6
- declare const InternalLink: ({ href, children, ...props }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => ReactNode;
7
- /** A link that routes same-app hrefs through the sandbox router (as an
8
- * {@link InternalLink}) and renders external hrefs as a plain `<a>`. */
9
- declare const Link: ({ href, children, ...properties }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => ReactNode;
10
- /** Default MDX component overrides: routes `<a>` through {@link Link} so links in
11
- * MDX prose navigate within the app. Passed to {@link MDXProvider} by `boot`. */
12
- declare const DEFAULT_MDX_COMPONENTS: {
13
- a({ href, children, ...properties }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): react_jsx_runtime.JSX.Element;
14
- };
6
+ /** Default MDX component overrides passed to {@link MDXProvider} by `boot`. These
7
+ * are the platform's *phantom defaults* (MARKDOWN_SYNTAX_SPEC §11.2): they are
8
+ * always present in the provider — even for a plain-markdown repo that never
9
+ * calls `boot({ mdxComponents })` — so the platform-emitted `Admonition` (§12)
10
+ * and `WikiLink` (§13) components resolve without the MDX missing-reference guard
11
+ * firing, and Markdown links route in-app via {@link Link}. An app overrides any
12
+ * of them by name via `boot({ mdxComponents })`, which *merges* over these
13
+ * defaults (§11.3) — overriding `WikiLink` alone still keeps `a` and `Admonition`. */
14
+ declare const DEFAULT_MDX_COMPONENTS: Record<string, (props: any) => ReactNode>;
15
15
 
16
- export { DEFAULT_MDX_COMPONENTS, InternalLink, Link };
16
+ export { DEFAULT_MDX_COMPONENTS };
@@ -1,37 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { use, useCallback } from "react";
3
- import { navigate } from "../routing";
4
- import { TinkerableContext } from "../TinkerableContext";
5
- import { constructOuterUrl, isInternalHref } from "../urlUtils";
6
- const InternalLink = ({
7
- href,
8
- children,
9
- ...props
10
- }) => {
11
- const clickHandler = useCallback(
12
- (e) => {
13
- if (href) {
14
- e.preventDefault();
15
- navigate(href);
16
- }
17
- },
18
- [href]
19
- );
20
- return /* @__PURE__ */ jsx("a", { href, onClick: clickHandler, ...props, children });
21
- };
22
- const Link = ({
23
- href,
24
- children,
25
- ...properties
26
- }) => {
27
- const { outerHref, navigationState } = use(TinkerableContext);
28
- if (href && isInternalHref(outerHref, href, navigationState)) {
29
- const targetHref = constructOuterUrl(outerHref, href, navigationState);
30
- return /* @__PURE__ */ jsx(InternalLink, { href: targetHref, ...properties, children });
31
- } else {
32
- return /* @__PURE__ */ jsx("a", { ...{ href, ...properties }, children });
33
- }
34
- };
2
+ import { Admonition } from "./Admonition";
3
+ import { Link } from "./Link";
4
+ import { WikiLink } from "./WikiLink";
5
+ import { InternalLink, Link as Link2 } from "./Link";
6
+ import { Admonition as Admonition2 } from "./Admonition";
7
+ import { WikiLink as WikiLink2 } from "./WikiLink";
35
8
  const DEFAULT_MDX_COMPONENTS = {
36
9
  a({
37
10
  href,
@@ -39,11 +12,15 @@ const DEFAULT_MDX_COMPONENTS = {
39
12
  ...properties
40
13
  }) {
41
14
  return /* @__PURE__ */ jsx(Link, { href, ...properties, children });
42
- }
15
+ },
16
+ Admonition,
17
+ WikiLink
43
18
  };
44
19
  export {
20
+ Admonition2 as Admonition,
45
21
  DEFAULT_MDX_COMPONENTS,
46
22
  InternalLink,
47
- Link
23
+ Link2 as Link,
24
+ WikiLink2 as WikiLink
48
25
  };
49
26
  //# sourceMappingURL=MDXComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/MDXComponents.tsx"],"sourcesContent":["import { ReactNode, use, useCallback } from 'react';\nimport { navigate } from '../routing';\nimport { TinkerableContext } from '../TinkerableContext';\nimport { constructOuterUrl, constructUrl, isInternalHref, repositoryPrefixURL } from '../urlUtils';\n\n/** An `<a>` that performs in-sandbox navigation on click (prevents the default\n * full-page load and routes via {@link navigate}). */\nexport const InternalLink = ({\n href,\n children,\n ...props\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const clickHandler = useCallback(\n (e: any) => {\n if (href) {\n e.preventDefault();\n navigate(href);\n }\n },\n [href]\n );\n return (\n <a href={href} onClick={clickHandler} {...props}>\n {children}\n </a>\n );\n};\n\n/** A link that routes same-app hrefs through the sandbox router (as an\n * {@link InternalLink}) and renders external hrefs as a plain `<a>`. */\nexport const Link = ({\n href,\n children,\n ...properties\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const { outerHref, navigationState } = use(TinkerableContext);\n if (href && isInternalHref(outerHref, href, navigationState)) {\n const targetHref = constructOuterUrl(outerHref, href, navigationState);\n return (\n <InternalLink href={targetHref} {...properties}>\n {children}\n </InternalLink>\n );\n } else {\n // create a regular link to external resource\n return <a {...{ href, ...properties }}>{children}</a>;\n }\n};\n\n/** Default MDX component overrides: routes `<a>` through {@link Link} so links in\n * MDX prose navigate within the app. Passed to {@link MDXProvider} by `boot`. */\nexport const DEFAULT_MDX_COMPONENTS = {\n a({\n href,\n children,\n ...properties\n }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) {\n return (\n <Link href={href} {...properties}>\n {children}\n </Link>\n );\n },\n};\n"],"mappings":"AAsBI;AAtBJ,SAAoB,KAAK,mBAAmB;AAC5C,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAClC,SAAS,mBAAiC,sBAA2C;AAI9E,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,eAAe;AAAA,IACnB,CAAC,MAAW;AACV,UAAI,MAAM;AACR,UAAE,eAAe;AACjB,iBAAS,IAAI;AAAA,MACf;AAAA,IACF;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AACA,SACE,oBAAC,OAAE,MAAY,SAAS,cAAe,GAAG,OACvC,UACH;AAEJ;AAIO,MAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,EAAE,WAAW,gBAAgB,IAAI,IAAI,iBAAiB;AAC5D,MAAI,QAAQ,eAAe,WAAW,MAAM,eAAe,GAAG;AAC5D,UAAM,aAAa,kBAAkB,WAAW,MAAM,eAAe;AACrE,WACE,oBAAC,gBAAa,MAAM,YAAa,GAAG,YACjC,UACH;AAAA,EAEJ,OAAO;AAEL,WAAO,oBAAC,OAAG,GAAG,EAAE,MAAM,GAAG,WAAW,GAAI,UAAS;AAAA,EACnD;AACF;AAIO,MAAM,yBAAyB;AAAA,EACpC,EAAE;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAA8F;AAC5F,WACE,oBAAC,QAAK,MAAa,GAAG,YACnB,UACH;AAAA,EAEJ;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/components/MDXComponents.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { Admonition } from './Admonition';\nimport { Link } from './Link';\nimport { WikiLink } from './WikiLink';\n\n// The link primitives moved to ./Link so WikiLink can reuse Link without a\n// MDXComponents ↔ WikiLink import cycle (check:circular). Re-exported here so the\n// public `Link` / `InternalLink` entry points are unchanged.\nexport { InternalLink, Link } from './Link';\nexport { Admonition } from './Admonition';\nexport type { AdmonitionType } from './Admonition';\nexport { WikiLink } from './WikiLink';\n\n/** Default MDX component overrides passed to {@link MDXProvider} by `boot`. These\n * are the platform's *phantom defaults* (MARKDOWN_SYNTAX_SPEC §11.2): they are\n * always present in the provider — even for a plain-markdown repo that never\n * calls `boot({ mdxComponents })` — so the platform-emitted `Admonition` (§12)\n * and `WikiLink` (§13) components resolve without the MDX missing-reference guard\n * firing, and Markdown links route in-app via {@link Link}. An app overrides any\n * of them by name via `boot({ mdxComponents })`, which *merges* over these\n * defaults (§11.3) — overriding `WikiLink` alone still keeps `a` and `Admonition`. */\nexport const DEFAULT_MDX_COMPONENTS = {\n a({\n href,\n children,\n ...properties\n }: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) {\n return (\n <Link href={href} {...properties}>\n {children}\n </Link>\n );\n },\n Admonition,\n WikiLink,\n} as Record<string, (props: any) => ReactNode>;\n"],"mappings":"AA4BM;AA3BN,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,gBAAgB;AAKzB,SAAS,cAAc,QAAAA,aAAY;AACnC,SAAS,cAAAC,mBAAkB;AAE3B,SAAS,YAAAC,iBAAgB;AAUlB,MAAM,yBAAyB;AAAA,EACpC,EAAE;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAA8F;AAC5F,WACE,oBAAC,QAAK,MAAa,GAAG,YACnB,UACH;AAAA,EAEJ;AAAA,EACA;AAAA,EACA;AACF;","names":["Link","Admonition","WikiLink"]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var WikiLink_exports = {};
20
+ __export(WikiLink_exports, {
21
+ WikiLink: () => WikiLink
22
+ });
23
+ module.exports = __toCommonJS(WikiLink_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_Link = require("./Link");
26
+ const labelFromTarget = (target) => {
27
+ const base = target.split(/[\\/]/).pop() ?? target;
28
+ return base.replace(/\.mdx?$/i, "") || target;
29
+ };
30
+ const WikiLink = ({
31
+ target,
32
+ label,
33
+ children,
34
+ ...rest
35
+ }) => {
36
+ const href = target ?? "";
37
+ const text = children ?? label ?? labelFromTarget(href);
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Link.Link, { href, className: "ir-wikilink", ...rest, children: text });
39
+ };
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ WikiLink
43
+ });
44
+ //# sourceMappingURL=WikiLink.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/WikiLink.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { Link } from './Link';\n\n/** Derive a human label from a target path: basename without the extension. */\nconst labelFromTarget = (target: string): string => {\n const base = target.split(/[\\\\/]/).pop() ?? target;\n return base.replace(/\\.mdx?$/i, '') || target;\n};\n\n/**\n * Default MDX `WikiLink` component — the render target for the `[[target]]` /\n * `[[label|target]]` wiki-link syntax (the transpiler remark plugin, R3-153,\n * compiles that syntax to `<WikiLink target=\"…\" label=\"…\">`, carrying the raw\n * target verbatim; resolution lives here in the component, MARKDOWN_SYNTAX_SPEC\n * §13.2).\n *\n * Registered in {@link DEFAULT_MDX_COMPONENTS} so wiki-links render even in a\n * plain-markdown repo (§11.2 phantom defaults). Targets are **paths only** —\n * relative (resolved against the current file by the router) or absolute — with\n * **no implicit search path** (§13.3, a deliberate departure from Obsidian).\n * Routes through {@link Link}, so a same-app path navigates in-app and an\n * external href renders as a plain `<a>`.\n *\n * Honesty note (R3-151): this default is the routing baseline. The\n * existence-driven resolved/broken/self visual states (§13.3) are layered on by\n * R3-153; today a link to a missing path simply routes as a normal in-app link.\n * An app overrides this component to add its own states/styling (the headline\n * late-binding capability, §11.1).\n */\nexport const WikiLink = ({\n target,\n label,\n children,\n ...rest\n}: {\n target?: string;\n label?: ReactNode;\n children?: ReactNode;\n} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>): ReactNode => {\n const href = target ?? '';\n const text = children ?? label ?? labelFromTarget(href);\n return (\n <Link href={href} className=\"ir-wikilink\" {...rest}>\n {text}\n </Link>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CI;AAzCJ,kBAAqB;AAGrB,MAAM,kBAAkB,CAAC,WAA2B;AAClD,QAAM,OAAO,OAAO,MAAM,OAAO,EAAE,IAAI,KAAK;AAC5C,SAAO,KAAK,QAAQ,YAAY,EAAE,KAAK;AACzC;AAsBO,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAI+E;AAC7E,QAAM,OAAO,UAAU;AACvB,QAAM,OAAO,YAAY,SAAS,gBAAgB,IAAI;AACtD,SACE,4CAAC,oBAAK,MAAY,WAAU,eAAe,GAAG,MAC3C,gBACH;AAEJ;","names":[]}
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ /**
4
+ * Default MDX `WikiLink` component — the render target for the `[[target]]` /
5
+ * `[[label|target]]` wiki-link syntax (the transpiler remark plugin, R3-153,
6
+ * compiles that syntax to `<WikiLink target="…" label="…">`, carrying the raw
7
+ * target verbatim; resolution lives here in the component, MARKDOWN_SYNTAX_SPEC
8
+ * §13.2).
9
+ *
10
+ * Registered in {@link DEFAULT_MDX_COMPONENTS} so wiki-links render even in a
11
+ * plain-markdown repo (§11.2 phantom defaults). Targets are **paths only** —
12
+ * relative (resolved against the current file by the router) or absolute — with
13
+ * **no implicit search path** (§13.3, a deliberate departure from Obsidian).
14
+ * Routes through {@link Link}, so a same-app path navigates in-app and an
15
+ * external href renders as a plain `<a>`.
16
+ *
17
+ * Honesty note (R3-151): this default is the routing baseline. The
18
+ * existence-driven resolved/broken/self visual states (§13.3) are layered on by
19
+ * R3-153; today a link to a missing path simply routes as a normal in-app link.
20
+ * An app overrides this component to add its own states/styling (the headline
21
+ * late-binding capability, §11.1).
22
+ */
23
+ declare const WikiLink: ({ target, label, children, ...rest }: {
24
+ target?: string;
25
+ label?: ReactNode;
26
+ children?: ReactNode;
27
+ } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">) => ReactNode;
28
+
29
+ export { WikiLink };
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ /**
4
+ * Default MDX `WikiLink` component — the render target for the `[[target]]` /
5
+ * `[[label|target]]` wiki-link syntax (the transpiler remark plugin, R3-153,
6
+ * compiles that syntax to `<WikiLink target="…" label="…">`, carrying the raw
7
+ * target verbatim; resolution lives here in the component, MARKDOWN_SYNTAX_SPEC
8
+ * §13.2).
9
+ *
10
+ * Registered in {@link DEFAULT_MDX_COMPONENTS} so wiki-links render even in a
11
+ * plain-markdown repo (§11.2 phantom defaults). Targets are **paths only** —
12
+ * relative (resolved against the current file by the router) or absolute — with
13
+ * **no implicit search path** (§13.3, a deliberate departure from Obsidian).
14
+ * Routes through {@link Link}, so a same-app path navigates in-app and an
15
+ * external href renders as a plain `<a>`.
16
+ *
17
+ * Honesty note (R3-151): this default is the routing baseline. The
18
+ * existence-driven resolved/broken/self visual states (§13.3) are layered on by
19
+ * R3-153; today a link to a missing path simply routes as a normal in-app link.
20
+ * An app overrides this component to add its own states/styling (the headline
21
+ * late-binding capability, §11.1).
22
+ */
23
+ declare const WikiLink: ({ target, label, children, ...rest }: {
24
+ target?: string;
25
+ label?: ReactNode;
26
+ children?: ReactNode;
27
+ } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">) => ReactNode;
28
+
29
+ export { WikiLink };
@@ -0,0 +1,20 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Link } from "./Link";
3
+ const labelFromTarget = (target) => {
4
+ const base = target.split(/[\\/]/).pop() ?? target;
5
+ return base.replace(/\.mdx?$/i, "") || target;
6
+ };
7
+ const WikiLink = ({
8
+ target,
9
+ label,
10
+ children,
11
+ ...rest
12
+ }) => {
13
+ const href = target ?? "";
14
+ const text = children ?? label ?? labelFromTarget(href);
15
+ return /* @__PURE__ */ jsx(Link, { href, className: "ir-wikilink", ...rest, children: text });
16
+ };
17
+ export {
18
+ WikiLink
19
+ };
20
+ //# sourceMappingURL=WikiLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/WikiLink.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { Link } from './Link';\n\n/** Derive a human label from a target path: basename without the extension. */\nconst labelFromTarget = (target: string): string => {\n const base = target.split(/[\\\\/]/).pop() ?? target;\n return base.replace(/\\.mdx?$/i, '') || target;\n};\n\n/**\n * Default MDX `WikiLink` component — the render target for the `[[target]]` /\n * `[[label|target]]` wiki-link syntax (the transpiler remark plugin, R3-153,\n * compiles that syntax to `<WikiLink target=\"…\" label=\"…\">`, carrying the raw\n * target verbatim; resolution lives here in the component, MARKDOWN_SYNTAX_SPEC\n * §13.2).\n *\n * Registered in {@link DEFAULT_MDX_COMPONENTS} so wiki-links render even in a\n * plain-markdown repo (§11.2 phantom defaults). Targets are **paths only** —\n * relative (resolved against the current file by the router) or absolute — with\n * **no implicit search path** (§13.3, a deliberate departure from Obsidian).\n * Routes through {@link Link}, so a same-app path navigates in-app and an\n * external href renders as a plain `<a>`.\n *\n * Honesty note (R3-151): this default is the routing baseline. The\n * existence-driven resolved/broken/self visual states (§13.3) are layered on by\n * R3-153; today a link to a missing path simply routes as a normal in-app link.\n * An app overrides this component to add its own states/styling (the headline\n * late-binding capability, §11.1).\n */\nexport const WikiLink = ({\n target,\n label,\n children,\n ...rest\n}: {\n target?: string;\n label?: ReactNode;\n children?: ReactNode;\n} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>): ReactNode => {\n const href = target ?? '';\n const text = children ?? label ?? labelFromTarget(href);\n return (\n <Link href={href} className=\"ir-wikilink\" {...rest}>\n {text}\n </Link>\n );\n};\n"],"mappings":"AA0CI;AAzCJ,SAAS,YAAY;AAGrB,MAAM,kBAAkB,CAAC,WAA2B;AAClD,QAAM,OAAO,OAAO,MAAM,OAAO,EAAE,IAAI,KAAK;AAC5C,SAAO,KAAK,QAAQ,YAAY,EAAE,KAAK;AACzC;AAsBO,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAI+E;AAC7E,QAAM,OAAO,UAAU;AACvB,QAAM,OAAO,YAAY,SAAS,gBAAgB,IAAI;AACtD,SACE,oBAAC,QAAK,MAAY,WAAU,eAAe,GAAG,MAC3C,gBACH;AAEJ;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { MDXProvider, useMDXComponents } from './MDXProvider.cjs';
2
2
  export { AppliedRoutingRule, Router, applyRoutingRule, navigate, renderRoute, useRoute, useRouteParams, useTinkerableLink } from './routing.cjs';
3
- export { BootProps, CATCH_ALL_ROUTING_SPEC, DEFAULT_ROUTING_SPEC, TinkerableApp, boot } from './boot.cjs';
3
+ export { BootProps, CATCH_ALL_ROUTING_SPEC, DEFAULT_ROUTING_SPEC, MdxComponents, TinkerableApp, boot, resolveMdxComponents } from './boot.cjs';
4
4
  export { Include, RenderExportedComponent, RenderExportedComponentContext, RenderFileContextType } from './components/Include.cjs';
5
- export { DEFAULT_MDX_COMPONENTS, InternalLink, Link } from './components/MDXComponents.cjs';
5
+ export { DEFAULT_MDX_COMPONENTS } from './components/MDXComponents.cjs';
6
6
  export { MountImage, MountImageProps } from './components/MountImage.cjs';
7
7
  export { Route, RouteProps, Routes } from './components/Routes.cjs';
8
8
  export { ObjectUrlState, useAllMetadata, useFileMetadata, useMetadataQuery, useObjectUrl } from './hooks.cjs';
@@ -12,7 +12,7 @@ export { EditorContext, getEditorContext, onEditorContextChange, useEditorContex
12
12
  export { EditTarget, EditorOpenError, EditorSessionError, EditorWriteError, RequestEditError, closeFile, createFile, createFolder, deleteEntry, openInEditor, renameEntry, requestEdit, setActiveFile, uploadFile } from './editor.cjs';
13
13
  export { FormFactor, FormFactorClass, Orientation, getFormFactor, onFormFactorChange, useFormFactor } from './formFactor.cjs';
14
14
  export { getRegion, useRegion } from './region.cjs';
15
- export { GrantRecord, Invite, Member, MountQuery, MountRemoveReason, MountRule, RemovedMount, ResolvedUser, Role, SandboxMount, SpaceError, SpaceInfo, acceptInvite, createSpace, declineInvite, findMount, getAppMountPath, getMounts, getSpaceMembers, importSettingsFromParent, inviteToSpace, listAllSpaces, listGrants, listMyInvites, listPendingInvites, listSettingsApps, listSpaces, lookupUser, makeContentRef, mount, mountSpace, onMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeGrant, revokeInvite, setSpaceRole, shareSpace, unmountSpace, unshareSpace, useMounts, waitForMount } from './mounts.cjs';
15
+ export { GrantRecord, Invite, Member, MountQuery, MountRemoveReason, MountRule, RemovedMount, ResolvedUser, Role, SandboxMount, SpaceError, SpaceInfo, acceptInvite, createSpace, declineInvite, findMount, getAppMountPath, getInvites, getMounts, getSpaceMembers, importSettingsFromParent, inviteToSpace, listAllSpaces, listGrants, listMyInvites, listPendingInvites, listSettingsApps, listSpaces, lookupUser, makeContentRef, mount, mountSpace, onInvitesChange, onMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeGrant, revokeInvite, setSpaceRole, shareSpace, unmountSpace, unshareSpace, useInvites, useMounts, waitForMount } from './mounts.cjs';
16
16
  export { ContributeMode, ContributeOptions, ContributionEvent, ContributionResult, contribute } from './contribute.cjs';
17
17
  export { ApiMethod, getCatalog, invoke, invokeStream, onCatalogChange, useCatalog } from './catalog.cjs';
18
18
  export { RegionMessage, onRegionMessage, postToRegion, useRegionMessage } from './ipc.cjs';
@@ -31,8 +31,11 @@ export { ReadyState, __resetReady, __setReadyDeps, getReadyState, onReady, repor
31
31
  export { LOADING_TIMINGS, LoadingRegion, Skeleton, SkeletonArchetype, SkeletonRow, Spinner } from './loading.cjs';
32
32
  export { StreamError, StreamFrame, StreamTransport, consumeStream, protocolStream } from './protocolStream.cjs';
33
33
  export { EvaluationContext, FileQueryResult, FilesMetadata, Metadata, MetadataQueryEntry, MetadataQueryFunction, MetadataQueryResult, ModuleExports } from './sandboxTypes.cjs';
34
+ export { Admonition, AdmonitionType } from './components/Admonition.cjs';
34
35
  export { ImmediatelyRunGlobal, getHostRuntime } from './hostRuntime.cjs';
36
+ export { InternalLink, Link } from './components/Link.cjs';
35
37
  export { SDK_VERSION } from './version.cjs';
38
+ export { WikiLink } from './components/WikiLink.cjs';
36
39
  import 'react';
37
40
  import './TinkerableContext.cjs';
38
41
  import './RoutingSpec.cjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { MDXProvider, useMDXComponents } from './MDXProvider.js';
2
2
  export { AppliedRoutingRule, Router, applyRoutingRule, navigate, renderRoute, useRoute, useRouteParams, useTinkerableLink } from './routing.js';
3
- export { BootProps, CATCH_ALL_ROUTING_SPEC, DEFAULT_ROUTING_SPEC, TinkerableApp, boot } from './boot.js';
3
+ export { BootProps, CATCH_ALL_ROUTING_SPEC, DEFAULT_ROUTING_SPEC, MdxComponents, TinkerableApp, boot, resolveMdxComponents } from './boot.js';
4
4
  export { Include, RenderExportedComponent, RenderExportedComponentContext, RenderFileContextType } from './components/Include.js';
5
- export { DEFAULT_MDX_COMPONENTS, InternalLink, Link } from './components/MDXComponents.js';
5
+ export { DEFAULT_MDX_COMPONENTS } from './components/MDXComponents.js';
6
6
  export { MountImage, MountImageProps } from './components/MountImage.js';
7
7
  export { Route, RouteProps, Routes } from './components/Routes.js';
8
8
  export { ObjectUrlState, useAllMetadata, useFileMetadata, useMetadataQuery, useObjectUrl } from './hooks.js';
@@ -12,7 +12,7 @@ export { EditorContext, getEditorContext, onEditorContextChange, useEditorContex
12
12
  export { EditTarget, EditorOpenError, EditorSessionError, EditorWriteError, RequestEditError, closeFile, createFile, createFolder, deleteEntry, openInEditor, renameEntry, requestEdit, setActiveFile, uploadFile } from './editor.js';
13
13
  export { FormFactor, FormFactorClass, Orientation, getFormFactor, onFormFactorChange, useFormFactor } from './formFactor.js';
14
14
  export { getRegion, useRegion } from './region.js';
15
- export { GrantRecord, Invite, Member, MountQuery, MountRemoveReason, MountRule, RemovedMount, ResolvedUser, Role, SandboxMount, SpaceError, SpaceInfo, acceptInvite, createSpace, declineInvite, findMount, getAppMountPath, getMounts, getSpaceMembers, importSettingsFromParent, inviteToSpace, listAllSpaces, listGrants, listMyInvites, listPendingInvites, listSettingsApps, listSpaces, lookupUser, makeContentRef, mount, mountSpace, onMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeGrant, revokeInvite, setSpaceRole, shareSpace, unmountSpace, unshareSpace, useMounts, waitForMount } from './mounts.js';
15
+ export { GrantRecord, Invite, Member, MountQuery, MountRemoveReason, MountRule, RemovedMount, ResolvedUser, Role, SandboxMount, SpaceError, SpaceInfo, acceptInvite, createSpace, declineInvite, findMount, getAppMountPath, getInvites, getMounts, getSpaceMembers, importSettingsFromParent, inviteToSpace, listAllSpaces, listGrants, listMyInvites, listPendingInvites, listSettingsApps, listSpaces, lookupUser, makeContentRef, mount, mountSpace, onInvitesChange, onMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeGrant, revokeInvite, setSpaceRole, shareSpace, unmountSpace, unshareSpace, useInvites, useMounts, waitForMount } from './mounts.js';
16
16
  export { ContributeMode, ContributeOptions, ContributionEvent, ContributionResult, contribute } from './contribute.js';
17
17
  export { ApiMethod, getCatalog, invoke, invokeStream, onCatalogChange, useCatalog } from './catalog.js';
18
18
  export { RegionMessage, onRegionMessage, postToRegion, useRegionMessage } from './ipc.js';
@@ -31,8 +31,11 @@ export { ReadyState, __resetReady, __setReadyDeps, getReadyState, onReady, repor
31
31
  export { LOADING_TIMINGS, LoadingRegion, Skeleton, SkeletonArchetype, SkeletonRow, Spinner } from './loading.js';
32
32
  export { StreamError, StreamFrame, StreamTransport, consumeStream, protocolStream } from './protocolStream.js';
33
33
  export { EvaluationContext, FileQueryResult, FilesMetadata, Metadata, MetadataQueryEntry, MetadataQueryFunction, MetadataQueryResult, ModuleExports } from './sandboxTypes.js';
34
+ export { Admonition, AdmonitionType } from './components/Admonition.js';
34
35
  export { ImmediatelyRunGlobal, getHostRuntime } from './hostRuntime.js';
36
+ export { InternalLink, Link } from './components/Link.js';
35
37
  export { SDK_VERSION } from './version.js';
38
+ export { WikiLink } from './components/WikiLink.js';
36
39
  import 'react';
37
40
  import './TinkerableContext.js';
38
41
  import './RoutingSpec.js';
package/dist/mounts.cjs CHANGED
@@ -23,6 +23,7 @@ __export(mounts_exports, {
23
23
  declineInvite: () => declineInvite,
24
24
  findMount: () => findMount,
25
25
  getAppMountPath: () => getAppMountPath,
26
+ getInvites: () => getInvites,
26
27
  getMounts: () => getMounts,
27
28
  getSpaceMembers: () => getSpaceMembers,
28
29
  importSettingsFromParent: () => importSettingsFromParent,
@@ -37,6 +38,7 @@ __export(mounts_exports, {
37
38
  makeContentRef: () => makeContentRef,
38
39
  mount: () => mount,
39
40
  mountSpace: () => mountSpace,
41
+ onInvitesChange: () => onInvitesChange,
40
42
  onMountsChange: () => onMountsChange,
41
43
  openSettings: () => openSettings,
42
44
  openSettingsOf: () => openSettingsOf,
@@ -50,12 +52,14 @@ __export(mounts_exports, {
50
52
  shareSpace: () => shareSpace,
51
53
  unmountSpace: () => unmountSpace,
52
54
  unshareSpace: () => unshareSpace,
55
+ useInvites: () => useInvites,
53
56
  useMounts: () => useMounts,
54
57
  waitForMount: () => waitForMount
55
58
  });
56
59
  module.exports = __toCommonJS(mounts_exports);
57
60
  var import_react = require("react");
58
61
  var import_sandboxUtils = require("./sandboxUtils");
62
+ var import_pushChannel = require("./pushChannel");
59
63
  var import_hostRuntime = require("./hostRuntime");
60
64
  var import_mountMatch = require("./mountMatch");
61
65
  const getAppMountPath = () => (0, import_hostRuntime.getHostRuntime)()?.appMountPath ?? "/app";
@@ -209,6 +213,15 @@ const acceptInvite = async (spaceId) => {
209
213
  const declineInvite = async (spaceId) => {
210
214
  await request("declineInvite", { spaceId });
211
215
  };
216
+ const invitesChannel = (0, import_pushChannel.createPushChannel)({
217
+ pushType: "invitations",
218
+ requestType: "request-invitations",
219
+ initial: [],
220
+ parse: (msg) => Array.isArray(msg.invites) ? msg.invites : void 0
221
+ });
222
+ const getInvites = () => invitesChannel.get();
223
+ const onInvitesChange = (listener) => invitesChannel.onChange(listener);
224
+ const useInvites = () => invitesChannel.use();
212
225
  const shareSpace = async (spaceId, login, role) => {
213
226
  await request("invite", { spaceId, login, role });
214
227
  };
@@ -230,6 +243,7 @@ const revokeGrant = async (appKey, spaceId) => {
230
243
  declineInvite,
231
244
  findMount,
232
245
  getAppMountPath,
246
+ getInvites,
233
247
  getMounts,
234
248
  getSpaceMembers,
235
249
  importSettingsFromParent,
@@ -244,6 +258,7 @@ const revokeGrant = async (appKey, spaceId) => {
244
258
  makeContentRef,
245
259
  mount,
246
260
  mountSpace,
261
+ onInvitesChange,
247
262
  onMountsChange,
248
263
  openSettings,
249
264
  openSettingsOf,
@@ -257,6 +272,7 @@ const revokeGrant = async (appKey, spaceId) => {
257
272
  shareSpace,
258
273
  unmountSpace,
259
274
  unshareSpace,
275
+ useInvites,
260
276
  useMounts,
261
277
  waitForMount
262
278
  });