@dxos/plugin-github 0.6.11 → 0.6.12-main.2d19bf1

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.
@@ -0,0 +1,20 @@
1
+ // packages/plugins/experimental/plugin-github/src/meta.ts
2
+ var GITHUB_PLUGIN = "dxos.org/plugin/github";
3
+ var GITHUB_PLUGIN_SHORT_ID = "github";
4
+ var meta_default = {
5
+ id: GITHUB_PLUGIN,
6
+ shortId: GITHUB_PLUGIN_SHORT_ID,
7
+ name: "GitHub",
8
+ description: "GitHub integration.",
9
+ tags: [
10
+ "experimental"
11
+ ],
12
+ icon: "ph--github-logo--regular"
13
+ };
14
+
15
+ export {
16
+ GITHUB_PLUGIN,
17
+ GITHUB_PLUGIN_SHORT_ID,
18
+ meta_default
19
+ };
20
+ //# sourceMappingURL=chunk-KVP4SDH2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const GITHUB_PLUGIN = 'dxos.org/plugin/github';\nexport const GITHUB_PLUGIN_SHORT_ID = 'github';\n\nexport default {\n id: GITHUB_PLUGIN,\n shortId: GITHUB_PLUGIN_SHORT_ID,\n name: 'GitHub',\n description: 'GitHub integration.',\n tags: ['experimental'],\n icon: 'ph--github-logo--regular',\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAMO,IAAMA,gBAAgB;AACtB,IAAMC,yBAAyB;AAEtC,IAAA,eAAe;EACbC,IAAIF;EACJG,SAASF;EACTG,MAAM;EACNC,aAAa;EACbC,MAAM;IAAC;;EACPC,MAAM;AACR;",
6
+ "names": ["GITHUB_PLUGIN", "GITHUB_PLUGIN_SHORT_ID", "id", "shortId", "name", "description", "tags", "icon"]
7
+ }
@@ -2,10 +2,9 @@ import {
2
2
  GITHUB_PLUGIN,
3
3
  GITHUB_PLUGIN_SHORT_ID,
4
4
  meta_default
5
- } from "./chunk-NJP5BGD2.mjs";
5
+ } from "./chunk-KVP4SDH2.mjs";
6
6
 
7
7
  // packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx
8
- import { GithubLogo } from "@phosphor-icons/react";
9
8
  import React16 from "react";
10
9
  import { resolvePlugin } from "@dxos/app-framework";
11
10
  import { LocalStorageStore } from "@dxos/local-storage";
@@ -282,7 +281,7 @@ var GfmPreview = ({ markdown, owner, repo }) => {
282
281
  markdown,
283
282
  octokit
284
283
  ]);
285
- return html ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("style", null, ".markdown-body ol, .markdown-body ul {list-style-type: disc; list-style-position: outside;}"), /* @__PURE__ */ React4.createElement("article", {
284
+ return html ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("style", null, ".markdown-body ol, .markdown-body ul {list-style-type: disc; list-style-position: outside;}"), /* @__PURE__ */ React4.createElement("div", {
286
285
  className: "markdown-body grow is-full max-is-[980px] mli-auto p-[15px] sm:pli-[45px] sm:plb-[30px]",
287
286
  dangerouslySetInnerHTML: sanitize(html, {})
288
287
  })) : /* @__PURE__ */ React4.createElement("div", {
@@ -1461,8 +1460,7 @@ var GithubPlugin = () => {
1461
1460
  ns: GITHUB_PLUGIN
1462
1461
  }
1463
1462
  ],
1464
- icon: (props) => /* @__PURE__ */ React16.createElement(GithubLogo, props),
1465
- iconSymbol: "ph--github-logo--regular"
1463
+ icon: "ph--github-logo--regular"
1466
1464
  }
1467
1465
  }
1468
1466
  ];
@@ -1506,7 +1504,7 @@ var GithubPlugin = () => {
1506
1504
  onUpdate: (content) => {
1507
1505
  log7.info("onUpdate", content, {
1508
1506
  F: __dxlog_file6,
1509
- L: 107,
1507
+ L: 105,
1510
1508
  S: void 0,
1511
1509
  C: (f, a) => f(...a)
1512
1510
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/GithubPlugin.tsx", "../../../src/components/EmbeddedMain/EmbeddedMain.tsx", "../../../src/components/EmbeddedMain/GfmPreview.tsx", "../../../src/components/GithubApiProviders/GitHubSettings.tsx", "../../../src/components/GithubApiProviders/OctokitProvider.tsx", "../../../src/components/Loading/Loading.tsx", "../../../src/hooks/useDocGhId.ts", "../../../src/hooks/useGhIdFromUrl.ts", "../../../src/components/GithubEchoResolverProviders/ResolverDialog.tsx", "../../../src/components/GithubEchoResolverProviders/ResolverTree.tsx", "../../../src/components/GithubEchoResolverProviders/ResolverContext.tsx", "../../../src/components/GithubEchoResolverProviders/spaceResolvers.ts", "../../../src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx", "../../../src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx", "../../../src/components/ExportDialog.tsx", "../../../src/components/ImportDialog.tsx", "../../../src/components/Issue.tsx", "../../../src/components/MarkdownActions.tsx", "../../../src/components/UrlDialog.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { GithubLogo, type IconProps } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { resolvePlugin, type PluginDefinition } from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { log } from '@dxos/log';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\nimport { isMarkdownProperties } from '@dxos/plugin-markdown';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { memoizeQuery } from '@dxos/plugin-space';\nimport { getMeta, isSpace, Filter, type Space } from '@dxos/react-client/echo';\n\nimport { EmbeddedMain, ImportDialog, OctokitProvider, GitHubSettings, UrlDialog, MarkdownActions } from './components';\nimport meta, { GITHUB_PLUGIN, GITHUB_PLUGIN_SHORT_ID } from './meta';\nimport translations from './translations';\nimport { type GhIdentifier, type GithubPluginProvides, type GithubSettingsProps } from './types';\n\nexport const GithubPlugin = (): PluginDefinition<GithubPluginProvides> => {\n const settings = new LocalStorageStore<GithubSettingsProps>(GITHUB_PLUGIN);\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'pat', type: LocalStorageStore.string({ allowUndefined: true }) });\n },\n unload: async () => {\n settings.close();\n },\n provides: {\n settings: settings.values,\n translations,\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n if (!client) {\n return [];\n }\n\n return createExtension({\n id: GITHUB_PLUGIN,\n filter: (node): node is Node<Space> => isSpace(node.data),\n connector: ({ node }) => {\n const documents = memoizeQuery(\n node.data,\n Filter.schema(DocumentType, (doc) =>\n getMeta(doc)?.keys?.find((key) => key?.source?.includes('github')),\n ),\n );\n\n if (documents.length > 0) {\n return [\n {\n id: `${GITHUB_PLUGIN_SHORT_ID}:${node.id}`,\n data: GITHUB_PLUGIN_SHORT_ID,\n type: GITHUB_PLUGIN,\n properties: {\n label: ['plugin name', { ns: GITHUB_PLUGIN }],\n icon: (props: IconProps) => <GithubLogo {...props} />,\n iconSymbol: 'ph--github-logo--regular',\n },\n // TODO(wittjosiah): Add documents.\n // nodes: documents.map((doc) => ({}),\n },\n ];\n }\n },\n });\n },\n },\n context: (props) => (\n <OctokitProvider pat={settings.values.pat} onPatChanged={(pat) => (settings.values.pat = pat)} {...props} />\n ),\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${GITHUB_PLUGIN}/embedded`:\n return <EmbeddedMain />;\n }\n\n switch (role) {\n case 'dialog':\n switch (data.content) {\n case 'dxos.org/plugin/github/BindDialog':\n return isMarkdownProperties(data.properties) ? <UrlDialog properties={data.properties} /> : null;\n // TODO(burdon): Model should not be passed via surfaces.\n // return isEditorModel(data.model) ? (\n // <ExportDialog\n // model={data.model}\n // type={data.type as ExportViewState}\n // target={data.target as string | null}\n // docGhId={data.docGhId as GhIdentifier}\n // />\n // ) : null;\n case 'dxos.org/plugin/github/ExportDialog':\n return null;\n case 'dxos.org/plugin/github/ImportDialog':\n return (\n <ImportDialog\n docGhId={data.docGhId as GhIdentifier}\n onUpdate={(content) => {\n // TODO(burdon): Fire intent.\n log.info('onUpdate', content);\n }}\n />\n );\n default:\n return null;\n }\n case 'menuitem':\n return typeof data.content === 'string' &&\n isMarkdownProperties(data.properties) &&\n !data.properties.readonly ? (\n <MarkdownActions content={data.content} properties={data.properties} />\n ) : null;\n case 'settings':\n return data.plugin === meta.id ? <GitHubSettings /> : null;\n default:\n return null;\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport './embedded.css';\n\nimport {\n ArrowSquareOut,\n CaretDown,\n DotsThreeVertical,\n Eye,\n Option,\n PencilSimpleLine,\n UserPlus,\n} from '@phosphor-icons/react';\nimport React, { useCallback, useContext, useRef, useState } from 'react';\n\nimport { Surface, useIntent } from '@dxos/app-framework';\nimport { SPACE_PLUGIN, SpaceAction, getSpaceDisplayName } from '@dxos/plugin-space';\nimport { useClient } from '@dxos/react-client';\nimport { getMeta } from '@dxos/react-client/echo';\nimport {\n Avatar,\n Button,\n ButtonGroup,\n DensityProvider,\n Dialog,\n DropdownMenu,\n Main,\n Toggle,\n Tooltip,\n toLocalizedString,\n useTranslation,\n} from '@dxos/react-ui';\nimport { defaultTx, descriptionText, getSize, mx } from '@dxos/react-ui-theme';\nimport { hexToFallback } from '@dxos/util';\n\nimport { GfmPreview } from './GfmPreview';\nimport { useDocGhId } from '../../hooks';\nimport { GITHUB_PLUGIN } from '../../meta';\nimport type { EditorViewState } from '../../types';\nimport {\n DocumentResolverProvider,\n DocumentResolverContext,\n ResolverDialog,\n SpaceResolverProvider,\n SpaceResolverContext,\n} from '../GithubEchoResolverProviders';\n\nconst overlayAttrs = { side: 'top' as const, sideOffset: 4 };\n\nconst EmbeddedLayoutImpl = () => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { space, source, id, identityHex } = useContext(SpaceResolverContext);\n const { document } = useContext(DocumentResolverContext);\n const { dispatch } = useIntent();\n const client = useClient();\n\n const handleCloseEmbed = useCallback(() => {\n window.parent.postMessage({ type: 'close-embed' }, 'https://github.com');\n }, []);\n\n const handleSaveAndCloseEmbed = useCallback(() => {\n document &&\n window.parent.postMessage({ type: 'save-data', content: document.content?.content }, 'https://github.com');\n }, [document]);\n\n const handleCreateSpace = () => dispatch({ action: SpaceAction.CREATE });\n const handleJoinSpace = () => dispatch({ action: SpaceAction.JOIN });\n\n const handleInvite = useCallback(() => {\n if (client && space) {\n void client.shell.shareSpace({ spaceKey: space.key });\n }\n }, [client, space]);\n\n const [editorViewState, setEditorViewState] = useState<EditorViewState>('editor');\n const isPreviewing = editorViewState === 'preview';\n\n const suppressNextTooltip = useRef<boolean>(false);\n const [optionsTooltipOpen, setOptionsTooltipOpen] = useState(false);\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n\n const [renameDialogOpen, setRenameDialogOpen] = useState(false);\n const [resolverDialogOpen, setResolverDialogOpen] = useState(false);\n\n const spaceFallbackValue = hexToFallback(space?.key.toHex() ?? '0');\n\n const docGhId = useDocGhId((document ? getMeta(document)?.keys : []) ?? []);\n const name = space && getSpaceDisplayName(space);\n\n return (\n <>\n <style type='text/css'>{`\n :root {\n --surface-bg: #F6F8FA;\n }\n .dark:root {\n --surface-bg: #161b22;\n }\n `}</style>\n <DensityProvider density='fine'>\n <div role='none' className='fixed inline-end-2 block-end-2 z-10 flex gap-2'>\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button disabled={!space} onClick={handleInvite}>\n <span className='sr-only'>{t('create invitation label', { ns: 'appkit' })}</span>\n <UserPlus className={getSize(5)} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Content {...overlayAttrs}>\n {t('create invitation label', { ns: 'appkit' })}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Toggle\n disabled={!(space && document)}\n pressed={isPreviewing}\n onPressedChange={(nextPressed) => setEditorViewState(nextPressed ? 'preview' : 'editor')}\n >\n <span className='sr-only'>{t(isPreviewing ? 'exit gfm preview label' : 'preview gfm label')}</span>\n {isPreviewing ? <PencilSimpleLine className={getSize(5)} /> : <Eye className={getSize(5)} />}\n </Toggle>\n </Tooltip.Trigger>\n <Tooltip.Content {...overlayAttrs}>\n {t(isPreviewing ? 'exit gfm preview label' : 'preview gfm label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root\n open={optionsTooltipOpen}\n onOpenChange={(nextOpen) => {\n if (suppressNextTooltip.current) {\n setOptionsTooltipOpen(false);\n suppressNextTooltip.current = false;\n } else {\n setOptionsTooltipOpen(nextOpen);\n }\n }}\n >\n <DropdownMenu.Root\n {...{\n modal: false,\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <Tooltip.Trigger asChild>\n <DropdownMenu.Trigger asChild disabled={!(space && document)}>\n <Button>\n <DotsThreeVertical className={getSize(5)} />\n <span className='sr-only'>{t('embedded options label')}</span>\n </Button>\n </DropdownMenu.Trigger>\n </Tooltip.Trigger>\n <DropdownMenu.Content {...overlayAttrs}>\n <DropdownMenu.Viewport>\n <DropdownMenu.Item asChild>\n <a\n target='_blank'\n rel='noreferrer'\n href={\n space && document\n ? `${location.origin}/dxos/space/${space?.key.toHex() ?? 'never'}/${document.id}`\n : '#'\n }\n >\n <ArrowSquareOut className={mx('shrink-0', getSize(5))} />\n <span className='grow'>{t('open in composer label', { ns: GITHUB_PLUGIN })}</span>\n </a>\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.GroupLabel>\n {t('active space label', { ns: SPACE_PLUGIN })}\n <Avatar.Root size={5} variant='circle'>\n <div role='none' className='flex gap-1 mlb-1 items-center'>\n <Avatar.Frame>\n <Avatar.Fallback text={spaceFallbackValue.emoji} />\n </Avatar.Frame>\n <Avatar.Label classNames='text-sm text-[--surface-text]'>\n {name && toLocalizedString(name, t)}\n </Avatar.Label>\n </div>\n </Avatar.Root>\n </DropdownMenu.GroupLabel>\n <DropdownMenu.Item onClick={() => setRenameDialogOpen(true)}>\n <span className='grow'>{t('rename space label', { ns: SPACE_PLUGIN })}</span>\n <PencilSimpleLine className={mx('shrink-0', getSize(5))} />\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => setResolverDialogOpen(true)}>\n <span className='grow'>{t('unset repo space label')}</span>\n <Option className={mx('shrink-0', getSize(5))} />\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n <Tooltip.Content {...overlayAttrs}>\n {t('embedded options label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </DropdownMenu.Root>\n </Tooltip.Root>\n <ButtonGroup classNames={[!(space && document) && 'shadow-none']}>\n <Button disabled={!(space && document)} onClick={handleSaveAndCloseEmbed}>\n {t('save and close label')}\n </Button>\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild disabled={!(space && document)}>\n <Button>\n <CaretDown />\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content {...overlayAttrs}>\n <DropdownMenu.Viewport>\n <DropdownMenu.Item onClick={handleSaveAndCloseEmbed} classNames='block'>\n <p>{t('save and close label')}</p>\n <p className={descriptionText}>{t('save and close description')}</p>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={handleCloseEmbed} classNames='block'>\n <p>{t('close label', { ns: 'appkit' })}</p>\n <p className={descriptionText}>{t('close embed description')}</p>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n </ButtonGroup>\n </div>\n {space && document ? (\n editorViewState === 'preview' ? (\n <Main.Content classNames='min-bs-[100dvh] flex flex-col p-0.5'>\n <GfmPreview\n markdown={document.content?.toString() ?? ''}\n {...(docGhId && { owner: docGhId.owner, repo: docGhId.repo })}\n />\n </Main.Content>\n ) : (\n // TODO(burdon): This will break since model is not defined.\n <Surface role='main' data={{ properties: document, view: 'embedded' }} />\n )\n ) : source && id && identityHex ? (\n <Dialog.Root open onOpenChange={() => true}>\n <div role='none' className={defaultTx('dialog.overlay', 'dialog--resolver__overlay', {}, 'static bs-full')}>\n <div\n role='none'\n className={defaultTx(\n 'dialog.content',\n 'dialog--resolver__content',\n {},\n 'p-2 bs-72 flex flex-col shadow-none bg-transparent',\n )}\n >\n <ResolverDialog handleCreateSpace={handleCreateSpace} handleJoinSpace={handleJoinSpace} />\n </div>\n </div>\n </Dialog.Root>\n ) : null}\n {space && (\n <Dialog.Root open={renameDialogOpen} onOpenChange={setRenameDialogOpen}>\n <Dialog.Overlay classNames='backdrop-blur'>\n <Dialog.Content>\n <Surface role='dialog' data={{ content: 'dxos.org/plugin/space/RenameSpaceDialog', subject: space }} />\n </Dialog.Content>\n </Dialog.Overlay>\n </Dialog.Root>\n )}\n <Dialog.Root open={resolverDialogOpen} onOpenChange={setResolverDialogOpen}>\n <Dialog.Overlay classNames='backdrop-blur'>\n <Dialog.Content>\n <ResolverDialog handleCreateSpace={handleCreateSpace} handleJoinSpace={handleJoinSpace} />\n </Dialog.Content>\n </Dialog.Overlay>\n </Dialog.Root>\n </DensityProvider>\n </>\n );\n};\n\nexport const EmbeddedMain = () => {\n return (\n <SpaceResolverProvider>\n <DocumentResolverProvider>\n <EmbeddedLayoutImpl />\n </DocumentResolverProvider>\n </SpaceResolverProvider>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport 'github-markdown-css/github-markdown.css';\nimport DOMPurify from 'dompurify';\nimport React, { useEffect, useState } from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\n\nimport { GITHUB_PLUGIN } from '../../meta';\nimport { GitHubSettings, useOctokitContext } from '../GithubApiProviders';\nimport { Loading } from '../Loading';\n\nconst defaultOptions: Parameters<typeof DOMPurify.sanitize>[1] = {\n ALLOWED_TAGS: [\n 'span',\n 'div',\n 'b',\n 'i',\n 'em',\n 'strong',\n 'a',\n 'p',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'table',\n 'td',\n 'th',\n 'tr',\n 'blockquote',\n 'ul',\n 'ol',\n 'li',\n 'dd',\n 'tt',\n 'dl',\n 'dt',\n 'details',\n 'figcaption',\n 'figure',\n 'summary',\n 'abbr',\n 'dfn',\n 'mark',\n 'sub',\n 'sup',\n 'img',\n 'code',\n 'kbd',\n 'pre',\n 'samp',\n 'hr',\n 'input',\n 'pre',\n 'del',\n 'g-emoji',\n 'label',\n ],\n ALLOWED_ATTR: ['class', 'href', 'target', 'hidden', 'title', 'type', 'role', 'align', 'data-footnote-ref'],\n};\n\nconst sanitize = (dirty: string, options: Partial<Parameters<typeof DOMPurify.sanitize>[1]>) => ({\n __html: DOMPurify.sanitize(dirty, { ...defaultOptions, ...options }) as string,\n});\n\nexport type GfmPreviewProps = {\n markdown: string;\n owner?: string;\n repo?: string;\n};\n\nexport const GfmPreview = ({ markdown, owner, repo }: GfmPreviewProps) => {\n const [html, setHtml] = useState('');\n const { octokit } = useOctokitContext();\n const { t } = useTranslation(GITHUB_PLUGIN);\n\n useEffect(() => {\n if (octokit && markdown) {\n void octokit\n .request('POST /markdown', {\n text: markdown,\n ...(owner && repo && { context: `${owner}/${repo}` }),\n })\n .then(\n ({ data }) => setHtml(data),\n () => {},\n );\n }\n }, [markdown, octokit]);\n\n return html ? (\n <>\n <style>{'.markdown-body ol, .markdown-body ul {list-style-type: disc; list-style-position: outside;}'}</style>\n <article\n className='markdown-body grow is-full max-is-[980px] mli-auto p-[15px] sm:pli-[45px] sm:plb-[30px]'\n dangerouslySetInnerHTML={sanitize(html, {})}\n />\n </>\n ) : (\n <div role='none' className='mli-auto max-is-md pli-2 text-center'>\n {!octokit && <p className='mlb-4 text-lg font-medium'>{t('empty github pat message')}</p>}\n {octokit ? <Loading label={t('loading preview message')} /> : <GitHubSettings />}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ArrowSquareOut } from '@phosphor-icons/react';\nimport React, { type PropsWithChildren, useEffect, useState } from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Link, Input, Trans, useTranslation, useId } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { useOctokitContext } from './OctokitProvider';\nimport { GITHUB_PLUGIN } from '../../meta';\n\n// TODO(burdon): Factor out with PluginList.\nconst ExternalLink = ({ children }: PropsWithChildren<{}>) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const descriptionId = useId('link--external');\n return (\n <>\n <Link href={t('github pat description href')} target='_blank' rel='noreferrer' aria-describedby={descriptionId}>\n {children}\n <ArrowSquareOut weight='bold' className={mx(getSize(3), 'inline-block leading-none -mbs-0.5 mli-px')} />\n </Link>\n <span className='sr-only' id={descriptionId}>\n {t('target blank description', { ns: GITHUB_PLUGIN })}\n </span>\n </>\n );\n};\n\n// TODO(burdon): Pass in settings.\nexport const GitHubSettings = () => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { pat, setPat } = useOctokitContext();\n const [patValue, setPatValue] = useState(pat);\n\n useEffect(() => {\n setPatValue(pat);\n }, [pat]);\n\n useEffect(() => {\n void setPat(patValue);\n }, [patValue]);\n\n return (\n <>\n <SettingsValue\n label={t('github pat label')}\n description={\n <Trans\n {...{\n t,\n i18nKey: 'github pat description',\n components: {\n docsLink: <ExternalLink />,\n },\n }}\n />\n }\n >\n <Input.TextInput\n autoFocus\n spellCheck={false}\n classNames='font-mono mlb-1'\n value={patValue ?? ''}\n onChange={({ target: { value } }) => setPatValue(value)}\n />\n </SettingsValue>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Octokit } from 'octokit';\nimport React, { type Context, createContext, type PropsWithChildren, useContext, useEffect, useState } from 'react';\n\nimport { log } from '@dxos/log';\n\nexport type OctokitContextValue = {\n pat?: string;\n setPat: (pat?: string) => void;\n patError: 'failed' | null; // TODO(burdon): Remove/generalize?\n octokit: Octokit | null;\n};\n\nexport const OctokitContext: Context<OctokitContextValue> = createContext<OctokitContextValue>({\n setPat: () => {},\n patError: null,\n octokit: null,\n});\n\nexport const useOctokitContext = () => useContext(OctokitContext);\n\nexport const OctokitProvider = ({\n pat,\n onPatChanged,\n children,\n}: PropsWithChildren<{ pat?: string; onPatChanged?: (pat: string | undefined) => void }>) => {\n const [octokit, setOctokit] = useState<Octokit | null>(null);\n const [patError, setPatError] = useState<OctokitContextValue['patError']>(null);\n\n useEffect(() => {\n if (pat && !octokit) {\n void setPat(pat);\n }\n }, [pat, octokit]);\n\n const setPat = async (pat?: string) => {\n onPatChanged?.(pat);\n if (pat) {\n const octokit = new Octokit({ auth: pat });\n return octokit.rest.users.getAuthenticated().then(\n () => {\n setPatError(null);\n setOctokit(octokit);\n },\n (err) => {\n log.warn('Failed to authenticate Octokit from PAT', err);\n setPatError('failed');\n setOctokit(null);\n },\n );\n } else {\n setOctokit(null);\n }\n };\n\n return <OctokitContext.Provider value={{ pat, setPat, patError, octokit }}>{children}</OctokitContext.Provider>;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport React, { type ComponentProps } from 'react';\n\nimport { useId } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type LoadingSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport type LoadingColor = 'primary' | 'neutral';\n\nexport interface LoadingSlots {\n root?: Omit<ComponentProps<'div'>, 'children'>;\n svg?: Pick<ComponentProps<'svg'>, 'className'>;\n}\n\nexport interface LoadingProps {\n label: string;\n size?: LoadingSize;\n color?: LoadingColor;\n slots?: LoadingSlots;\n}\n\nconst sizeMap = new Map<LoadingSize, string>([\n ['sm', 'w-4 h-4'],\n ['md', 'w-8 h-8'],\n ['lg', 'w-12 h-12'],\n ['xl', 'w-16 h-16'],\n]);\n\n// TODO(wittjosiah): Factor out.\nexport const Loading = ({ size, color, label, slots = {} }: LoadingProps) => {\n const labelId = useId('loading-label');\n const sizeClassName = sizeMap.get(size ?? 'md');\n return (\n <div\n {...slots.root}\n className={mx('flex justify-center p-4', slots.root?.className)}\n role='status'\n aria-labelledby={labelId}\n >\n <svg\n role='none'\n className={mx(\n sizeClassName,\n 'text-neutral-200/50 animate-spin dark:text-neutral-600/50',\n color === 'neutral' ? 'fill-neutral-400' : 'fill-primary-400',\n slots.svg?.className,\n )}\n viewBox='0 0 100 101'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z'\n fill='currentColor'\n />\n <path\n d='M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z'\n fill='currentFill'\n />\n </svg>\n <span className='sr-only' id={labelId}>\n {label}\n </span>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { log } from '@dxos/log';\n\nimport { type GhIdentifier } from '../types';\n\nexport const useDocGhId = (keys: { source?: string; id?: string }[]) => {\n return useMemo<GhIdentifier | null>(() => {\n try {\n const key = keys?.find((key) => key.source === 'github.com');\n const [owner, repo, type, ...rest] = key?.id?.split('/') ?? [];\n if (type === 'issues') {\n return {\n owner,\n repo,\n issueNumber: parseInt(rest[0], 10),\n };\n } else if (type === 'blob') {\n const [ref, ...pathParts] = rest;\n return {\n owner,\n repo,\n ref,\n path: pathParts.join('/'),\n };\n } else {\n return null;\n }\n } catch (err) {\n log.catch(err);\n return null;\n }\n }, [keys]);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nexport const useGhIdFromUrl = (ghUrlValue: string) =>\n useMemo<string | null>(() => {\n try {\n const url = new URL(ghUrlValue);\n const [_, owner, repo, type, ...rest] = url.pathname.split('/');\n if (type === 'blob') {\n const [ref, ...pathParts] = rest;\n const path = pathParts.join('/');\n const ext = pathParts[pathParts.length - 1].split('.')[1];\n return ext === 'md' ? `${owner}/${repo}/blob/${ref}/${path}` : null;\n } else if (type === 'issues') {\n const [issueNumberString] = rest;\n return `${owner}/${repo}/issues/${issueNumberString}`;\n } else {\n return null;\n }\n } catch (e) {\n return null;\n }\n }, [ghUrlValue]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Button, useTranslation } from '@dxos/react-ui';\n\nimport { ResolverTree } from './ResolverTree';\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const ResolverDialog = ({\n handleJoinSpace,\n handleCreateSpace,\n}: {\n handleJoinSpace?: () => void;\n handleCreateSpace?: () => void;\n}) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n\n return (\n <>\n <ResolverTree />\n <div role='group' className='shrink-0 flex is-full gap-2'>\n <Button classNames='grow' onClick={handleCreateSpace}>\n {t('create space label', { ns: 'appkit' })}\n </Button>\n <Button classNames='grow' onClick={handleJoinSpace}>\n {t('join space label', { ns: 'appkit' })}\n </Button>\n </div>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useContext } from 'react';\n\nimport { useClient } from '@dxos/react-client';\nimport { useSpaces, type Space } from '@dxos/react-client/echo';\nimport { Button, Dialog, Tree, useId, useTranslation } from '@dxos/react-ui';\n\nimport { SpaceResolverContext } from './ResolverContext';\nimport { SpacePickerTreeItem } from './SpacePickerTreeItem';\nimport { bindSpace, unbindSpace } from './spaceResolvers';\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const ResolverTree = () => {\n const client = useClient();\n const spaces = useSpaces({ all: true });\n const treeLabel = useId('treeLabel');\n const { t } = useTranslation(GITHUB_PLUGIN);\n const {\n space: selectedSpace,\n setSpace: setSelectedSpace,\n source,\n id,\n identityHex,\n } = useContext(SpaceResolverContext);\n const setSpace = useCallback(\n (nextSpace: Space | null) => {\n if (identityHex && source && id) {\n selectedSpace && unbindSpace(selectedSpace, identityHex, source, id);\n nextSpace && bindSpace(nextSpace, identityHex, source, id);\n }\n setSelectedSpace(nextSpace);\n },\n [selectedSpace, setSelectedSpace, identityHex, source, id],\n );\n return spaces.length ? (\n <>\n {' '}\n <Dialog.Title tabIndex={-1} classNames='shrink-0'>\n {t('resolver tree label')}\n </Dialog.Title>\n <Dialog.Description>{t('resolver tree description')}</Dialog.Description>\n <div role='separator' className='shrink-0 bs-px bg-neutral-500/20 mlb-1' />\n <Tree.Root\n aria-label={t('resolver tree label')}\n data-testid='composer.sidebarTree'\n classNames='overflow-y-auto -mli-2 p-2'\n >\n {spaces.map((space) => {\n return (\n <SpacePickerTreeItem\n key={space.key.toHex()}\n {...{\n space,\n selected: selectedSpace === space,\n setSpace,\n identityHex: identityHex!,\n source: source!,\n id: id!,\n }}\n />\n );\n })}\n </Tree.Root>\n </>\n ) : (\n <>\n <h1 className='text-lg font-normal' id={treeLabel}>\n {t('resolver no spaces message')}\n </h1>\n <div role='separator' className='bs-px bg-neutral-500/20 mlb-2' />\n <Button\n classNames='block is-full'\n onClick={async () => {\n const space = await client.spaces.create();\n bindSpace(space, identityHex!, source!, id!);\n setSpace(space);\n }}\n >\n {t('resolver create space label')}\n </Button>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, {\n type Context,\n createContext,\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { create } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { DocumentType, TextType } from '@dxos/plugin-markdown/types';\nimport { useMulticastObservable } from '@dxos/react-client';\nimport { getMeta, type Space, SpaceState, useQuery, useSpaces } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\n\nimport { type DocumentResolverProps, type SpaceResolverProps } from './ResolverProps';\nimport { displayName, matchSpace } from './spaceResolvers';\n\nconst getLocationIdentifier = () => {\n const searchParams = new URLSearchParams(window.location.search);\n const location = searchParams.get('location');\n let source, id;\n try {\n const url = location ? new URL(location) : undefined;\n source = url?.hostname.split('.').reverse().join('.');\n id = url?.pathname.slice(1);\n } catch (err) {\n log.catch(err);\n }\n return [source, id];\n};\n\nexport const SpaceResolverContext: Context<SpaceResolverProps> = createContext<SpaceResolverProps>({\n space: null,\n setSpace: (_space) => {},\n});\n\nexport const SpaceResolverProvider = ({ children }: PropsWithChildren<{}>) => {\n const identity = useIdentity();\n const identityHex = identity?.identityKey.toHex();\n const [source, id] = getLocationIdentifier();\n const spaces = useSpaces({ all: true });\n\n const [nextSpace, setSpace] = useState<Space | null>(null);\n\n const space = useMemo(\n () =>\n nextSpace ?? (identityHex ? spaces.find((space) => matchSpace(space, identityHex, source, id)) ?? null : null),\n [spaces, nextSpace, identityHex, source, id],\n );\n\n return (\n <SpaceResolverContext.Provider value={{ space, setSpace, source, id, identityHex }}>\n {children}\n </SpaceResolverContext.Provider>\n );\n};\n\nconst defaultDocumentResolverContext: DocumentResolverProps = {\n document: null,\n setDocument: (_document) => {},\n};\n\nexport const DocumentResolverContext: Context<DocumentResolverProps> =\n createContext<DocumentResolverProps>(defaultDocumentResolverContext);\n\nconst DocumentResolverProviderImpl = ({\n space,\n source,\n id,\n children,\n}: PropsWithChildren<{ space: Space; source: string; id: string }>) => {\n const spaceState = useMulticastObservable(space.state);\n const [document, setDocument] = useState<DocumentType | null>(null);\n const defaultDisplayName = displayName(source, id);\n\n const documents = useQuery(space, (obj) => {\n const keys = getMeta(obj)?.keys;\n return keys?.find((key: any) => key.source === source && key.id === id);\n });\n\n useEffect(() => {\n const handler = (event: MessageEvent) => {\n if (event.source !== window.parent || spaceState !== SpaceState.SPACE_READY) {\n return;\n }\n\n if (event.data.type === 'initial-data') {\n const nextDocument = space.db.add(\n create(\n DocumentType,\n {\n name: defaultDisplayName,\n content: create(TextType, { content: event.data.content }),\n threads: [],\n },\n {\n keys: [{ source, id }],\n },\n ),\n );\n\n setDocument(nextDocument);\n }\n };\n\n // todo(thure): Won't this always be the case initially?\n if (documents.length === 0) {\n window.addEventListener('message', handler);\n window.parent.postMessage({ type: 'request-initial-data' }, 'https://github.com');\n return () => window.removeEventListener('message', handler);\n } else {\n setDocument(documents[0] as DocumentType);\n }\n }, [spaceState, space, documents]);\n\n return (\n <DocumentResolverContext.Provider value={{ document, setDocument }}>{children}</DocumentResolverContext.Provider>\n );\n};\n\nexport const DocumentResolverProvider = ({ children }: PropsWithChildren<{}>) => {\n const { space, source, id } = useContext(SpaceResolverContext);\n\n return space && source && id ? (\n <DocumentResolverProviderImpl space={space} source={source} id={id}>\n {children}\n </DocumentResolverProviderImpl>\n ) : (\n <DocumentResolverContext.Provider value={defaultDocumentResolverContext}>\n {children}\n </DocumentResolverContext.Provider>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport get from 'lodash.get';\nimport update from 'lodash.update';\n\nimport { type Space } from '@dxos/react-client/echo';\n\n// todo(thure): Why is the value that gets set in `ghBind` always undefined by the time this is called?\nconst ghMatch = (space: Space, identityHex: string, id: string): boolean => {\n const [ghOwner, ghRepo, ..._ghEtc] = id.split('/');\n return get(space.properties, ['members', identityHex, 'github', 'repos'], []).includes(`${ghOwner}/${ghRepo}`);\n};\n\nexport const matchSpace = (space: Space, identityHex: string, source?: string, id?: string) => {\n if (!id) {\n return false;\n }\n switch (source) {\n case 'github.com':\n return ghMatch(space, identityHex, id);\n default:\n return false;\n }\n};\n\n// todo(thure): Why does the new space.properties value not propagate?\nconst ghBind = (space: Space, identityHex: string, id: string): string[] => {\n const [ghOwner, ghRepo, ..._ghEtc] = id.split('/');\n update(space.properties, ['members', identityHex, 'github', 'repos'], (ghBindings) => {\n return [...(ghBindings ?? []), `${ghOwner}/${ghRepo}`];\n });\n return space.properties.members?.[identityHex]?.github?.repos ?? [];\n};\n\nexport const bindSpace = (space: Space, identityHex: string, source: string, id: string): string[] => {\n switch (source) {\n case 'github.com':\n return ghBind(space, identityHex, id);\n default:\n return [];\n }\n};\nconst ghUnbind = (space: Space, identityHex: string, id: string): string[] => {\n const [ghOwner, ghRepo, ..._ghEtc] = id.split('/');\n update(space.properties, ['members', identityHex, 'github', 'repos'], (ghBindings) => {\n const index = ghBindings.indexOf(`${ghOwner}/${ghRepo}`);\n if (index >= 0) {\n const result = [...ghBindings];\n result.splice(index, 1);\n return result;\n } else {\n return ghBindings;\n }\n });\n return space.properties.members?.[identityHex]?.github?.repos ?? [];\n};\n\nexport const unbindSpace = (space: Space, identityHex: string, source: string, id: string): string[] => {\n switch (source) {\n case 'github.com':\n return ghUnbind(space, identityHex, id);\n default:\n return [];\n }\n};\n\nconst ghDisplayName = (id: string): string => {\n const [ghOwner, ghRepo, ghResource, ...etc] = id.split('/');\n switch (ghResource) {\n case 'issues':\n return `${ghOwner}/${ghRepo} #${etc[0]}`;\n default:\n return `${ghOwner}/${ghRepo} ${[ghResource, ...etc].join('/')}`;\n }\n};\n\nexport const displayName = (source: string, id: string): string => {\n switch (source) {\n case 'github.com':\n return ghDisplayName(id);\n default:\n return id;\n }\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CaretDown, CaretRight } from '@phosphor-icons/react';\nimport React, { useMemo, useState } from 'react';\n\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { getSpaceDisplayName } from '@dxos/plugin-space';\nimport { useMulticastObservable } from '@dxos/react-client';\nimport { type Space, SpaceState, useQuery, Filter } from '@dxos/react-client/echo';\nimport { Button, Tag, Tooltip, Tree, TreeItem, useTranslation } from '@dxos/react-ui';\nimport { staticDisabled } from '@dxos/react-ui-theme';\n\nimport { DocumentTreeItem } from './DocumentTreeItem';\nimport { matchSpace } from './spaceResolvers';\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const SpacePickerTreeItem = ({\n identityHex,\n space,\n source,\n id,\n setSpace,\n selected,\n}: {\n identityHex: string;\n space: Space;\n setSpace: (nextSpace: Space | null) => void;\n source: string;\n id: string;\n selected?: boolean;\n}) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const spaceSate = useMulticastObservable(space.state);\n const disabled = spaceSate !== SpaceState.SPACE_READY;\n const spaceDisplayName = getSpaceDisplayName(space);\n const documents = useQuery(space, Filter.schema(DocumentType));\n const hasDocuments = documents.length > 0;\n\n const [open, setOpen] = useState(false);\n\n const nBoundMembers = useMemo(() => {\n return Object.keys(space.properties.members ?? {}).filter((identityHex) =>\n matchSpace(space, identityHex, source, id),\n ).length;\n }, [source, id, space.properties]);\n\n const OpenTriggerIcon = open ? CaretDown : CaretRight;\n\n return (\n <TreeItem.Root\n collapsible\n open={open}\n onOpenChange={setOpen}\n classNames={['mbe-2 block', disabled && staticDisabled]}\n {...(disabled && { 'aria-disabled': true })}\n >\n <div role='none' className='flex items-center gap-2'>\n {hasDocuments ? (\n <TreeItem.OpenTrigger>\n <OpenTriggerIcon />\n </TreeItem.OpenTrigger>\n ) : (\n <TreeItem.OpenTrigger disabled classNames={staticDisabled}>\n <CaretRight />\n </TreeItem.OpenTrigger>\n )}\n <TreeItem.Heading\n classNames='grow break-words pbs-1 text-baseText font-medium'\n data-testid='composer.spaceTreeItemHeading'\n >\n {Array.isArray(spaceDisplayName) ? t(...spaceDisplayName) : spaceDisplayName}\n </TreeItem.Heading>\n {nBoundMembers > 0 && (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Tag palette='info' aria-label={t('bound members message', { count: nBoundMembers })}>\n {nBoundMembers}\n </Tag>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>\n <Tooltip.Arrow />\n {t('bound members message', { count: nBoundMembers })}\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n )}\n <Button disabled={selected} density='fine' classNames='shrink-0' onClick={() => setSpace(space)}>\n {t(selected ? 'selected label' : 'select label')}\n </Button>\n </div>\n <TreeItem.Body className='pis-4'>\n {hasDocuments && (\n <Tree.Branch>\n {documents.map((document) => (\n <DocumentTreeItem key={document.id} document={document} />\n ))}\n </Tree.Branch>\n )}\n </TreeItem.Body>\n </TreeItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { TextAa } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { type DocumentType } from '@dxos/plugin-markdown/types';\nimport { useTranslation, TreeItem } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const DocumentTreeItem = ({ document }: { document: DocumentType }) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n return (\n <TreeItem.Root classNames='flex gap-2'>\n <TreeItem.Heading classNames='contents'>\n <TextAa weight='regular' className={mx(getSize(4), 'shrink-0 mbs-2')} />\n <span className='grow mbs-2 text-sm no-leading'>\n {document.name || t('document title placeholder', { ns: 'dxos.org/plugin/markdown' })}\n </span>\n </TreeItem.Heading>\n </TreeItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useState } from 'react';\n\nimport { log } from '@dxos/log';\nimport { Button, Dialog, Input, Trans, useTranslation } from '@dxos/react-ui';\n\nimport { useOctokitContext } from './GithubApiProviders';\nimport { GITHUB_PLUGIN } from '../meta';\nimport type { ExportViewState, GhFileIdentifier, GhIdentifier } from '../types';\n\nexport const ExportDialog = ({\n type,\n target,\n docGhId,\n}: {\n type: ExportViewState;\n target: string | null;\n docGhId: GhIdentifier;\n}) => {\n // TODO(burdon): Model removed.\n const content = '';\n\n const { octokit } = useOctokitContext();\n const { t } = useTranslation(GITHUB_PLUGIN);\n const [exportViewState, setExportViewState] = useState<ExportViewState>(type);\n const [ghResponseUrl, setGhResponseUrl] = useState<string | null>(target);\n const [ghBranchValue, setGhBranchValue] = useState('');\n const [ghMessageValue, setGhMessageValue] = useState('');\n\n const exportGhFileContent = useCallback(async () => {\n if (octokit && docGhId && 'path' in docGhId && content) {\n const branchName = ghBranchValue || t('github branch name placeholder');\n const commitMessage = ghMessageValue || t('github commit message placeholder');\n setExportViewState('pending');\n try {\n const { owner, repo, path, ref } = docGhId as GhFileIdentifier;\n const { data: fileData } = await octokit.rest.repos.getContent({ owner, repo, path });\n if (Array.isArray(fileData) || fileData.type !== 'file') {\n log.error('Attempted to export to a destination in Github that is not a file.');\n return;\n }\n const { sha: fileSha } = fileData;\n const {\n data: {\n object: { sha: baseSha },\n },\n } = await octokit.rest.git.getRef({ owner, repo, ref: `heads/${ref}` });\n await octokit.rest.git.createRef({\n owner,\n repo,\n ref: `refs/heads/${branchName}`,\n sha: baseSha,\n });\n await octokit.rest.repos.createOrUpdateFileContents({\n owner,\n repo,\n path,\n message: commitMessage,\n branch: branchName,\n sha: fileSha,\n content: btoa(content),\n });\n const {\n data: { html_url: prUrl },\n } = await octokit.rest.pulls.create({\n owner,\n repo,\n head: branchName,\n base: ref,\n title: commitMessage,\n });\n setGhResponseUrl(prUrl);\n setExportViewState('response');\n } catch (err) {\n log.error('Failed to export to Github file', err);\n setExportViewState('create-pr');\n setGhResponseUrl(null);\n }\n } else {\n log.error('Not prepared to export to Github file when requested.');\n setGhResponseUrl(null);\n }\n }, [octokit, docGhId, content, ghBranchValue, ghMessageValue, t]);\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t('confirm export title')}</Dialog.Title>\n {exportViewState === 'response' ? (\n <>\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'export to github success message',\n values: { linkText: ghResponseUrl },\n components: {\n resultStyle: <span className='text-success-600 dark:text-success-300'>_</span>,\n prLink: (\n <a\n href={ghResponseUrl!}\n target='_blank'\n rel='noreferrer'\n className='text-primary-600 dark:text-primary-300 hover:text-primary-700 dark:hover:text-primary-400'\n >\n _\n </a>\n ),\n },\n }}\n />\n </p>\n <div role='none' className='flex justify-end'>\n <Dialog.Close asChild>\n <Button variant='primary' onClick={() => setExportViewState(null)}>\n {t('done label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </div>\n </>\n ) : (\n <div role='none' className='mbs-2 space-b-2'>\n <Input.Root>\n <Input.Label>{t('github branch name label')}</Input.Label>\n <Input.TextInput\n autoFocus\n classNames='font-mono'\n disabled={exportViewState === 'pending'}\n placeholder={t('github branch name placeholder')}\n value={ghBranchValue}\n onChange={({ target: { value } }) => setGhBranchValue(value)}\n />\n </Input.Root>\n <Input.Root>\n <Input.Label>{t('github commit message label')}</Input.Label>\n <Input.TextArea\n disabled={exportViewState === 'pending'}\n placeholder={t('github commit message placeholder')}\n value={ghMessageValue}\n onChange={({ target: { value } }) => setGhMessageValue(value)}\n />\n </Input.Root>\n <div role='none' className='flex justify-end gap-2'>\n <Dialog.Close asChild>\n <Button onClick={() => setExportViewState(null)}>{t('close label', { ns: 'os' })}</Button>\n </Dialog.Close>\n <Button disabled={exportViewState === 'pending'} variant='primary' onClick={() => exportGhFileContent()}>\n {t('continue label', { ns: 'os' })}\n </Button>\n </div>\n </div>\n )}\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { log } from '@dxos/log';\nimport { Button, Dialog, useTranslation } from '@dxos/react-ui';\n\nimport { useOctokitContext } from './GithubApiProviders';\nimport { GITHUB_PLUGIN } from '../meta';\nimport type { GhFileIdentifier, GhIdentifier, GhIssueIdentifier } from '../types';\n\nexport const ImportDialog = ({ docGhId, onUpdate }: { docGhId: GhIdentifier; onUpdate: (content: string) => void }) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { octokit } = useOctokitContext();\n\n const importGhIssueContent = useCallback(async () => {\n if (octokit && docGhId && 'issueNumber') {\n try {\n const { owner, repo, issueNumber } = docGhId as GhIssueIdentifier;\n const { data } = await octokit.rest.issues.get({ owner, repo, issue_number: issueNumber });\n onUpdate(data.body ?? '');\n } catch (err) {\n log.error('Failed to import from Github issue', err);\n }\n } else {\n log.error('Not prepared to import from Github issue when requested.');\n }\n }, [octokit, docGhId]);\n\n const importGhFileContent = useCallback(async () => {\n if (octokit && docGhId && 'path' in docGhId) {\n try {\n const { owner, repo, path } = docGhId as GhFileIdentifier;\n const { data } = await octokit.rest.repos.getContent({ owner, repo, path });\n if (!Array.isArray(data) && data.type === 'file') {\n onUpdate(atob(data.content));\n } else {\n log.error('Did not receive file with content from Github.');\n }\n } catch (err) {\n log.error('Failed to import from Github file', err);\n }\n } else {\n log.error('Not prepared to import from Github file when requested.');\n }\n }, [octokit, docGhId]);\n\n const handleGhImport = useCallback(() => {\n return (\n docGhId && ('issueNumber' in docGhId ? importGhIssueContent() : 'path' in docGhId ? importGhFileContent() : null)\n );\n }, [importGhIssueContent, importGhFileContent, docGhId]);\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t('confirm import title')}</Dialog.Title>\n <p className='plb-2'>{t('confirm import body')}</p>\n <div role='none' className='flex justify-end gap-2'>\n <Dialog.Close asChild>\n <Button>{t('cancel label', { ns: 'appkit' })}</Button>\n </Dialog.Close>\n <Dialog.Close asChild>\n <Button variant='primary' onClick={handleGhImport}>\n {t('import from github label')}\n </Button>\n </Dialog.Close>\n </div>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type IconWeight, IconBase, type IconProps } from '@phosphor-icons/react';\nimport React, { forwardRef, type ReactElement } from 'react';\n\n// TODO(wittjosiah): This is a workaround until we have utilities to compose icons.\n// This is a combination of the Circle and Dot icons.\n\nconst weights = new Map<IconWeight, ReactElement>([\n [\n 'bold',\n <>\n <path d='M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z' />\n <path d='M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128Z' />\n </>,\n ],\n [\n 'duotone',\n <>\n <path d='M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z' opacity='0.2' />\n <path d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z' />\n <path d='M176,128a48,48,0,1,1-48-48A48,48,0,0,1,176,128Z' opacity='0.2' />\n <path d='M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z' />\n </>,\n ],\n [\n 'fill',\n <>\n <path d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z' />\n <path d='M128,80a48,48,0,1,0,48,48A48,48,0,0,0,128,80Zm0,60a12,12,0,1,1,12-12A12,12,0,0,1,128,140Z' />\n </>,\n ],\n [\n 'light',\n <>\n <path d='M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z' />\n <path d='M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128Z' />\n </>,\n ],\n [\n 'regular',\n <>\n <path d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z' />\n <path d='M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z' />\n </>,\n ],\n [\n 'thin',\n <>\n <path d='M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z' />\n <path d='M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Z' />\n </>,\n ],\n]);\n\nconst Issue = forwardRef<SVGSVGElement, IconProps>((props, ref) => <IconBase ref={ref} {...props} weights={weights} />);\n\nIssue.displayName = 'Issue';\n\nexport { Issue };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ArrowSquareOut, FileArrowDown, FileArrowUp, Link, LinkBreak } from '@phosphor-icons/react';\nimport React, { useCallback } from 'react';\n\nimport { LayoutAction, useIntent } from '@dxos/app-framework';\nimport { log } from '@dxos/log';\nimport { type MarkdownProperties } from '@dxos/plugin-markdown';\nimport { getMeta } from '@dxos/react-client/echo';\nimport { DropdownMenu, useTranslation } from '@dxos/react-ui';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { useOctokitContext } from './GithubApiProviders';\nimport { useDocGhId } from '../hooks';\nimport { GITHUB_PLUGIN } from '../meta';\nimport { type GhIssueIdentifier } from '../types';\n\n// TODO(burdon): Requires test; very likely out of date.\n// TODO(burdon): Where do \"properties\" come from? Is this the graph node datum?\nexport const MarkdownActions = ({ content, properties }: { content: string; properties: MarkdownProperties }) => {\n // TODO(burdon): Ad hoc assumption that underlying object is ECHO?\n const ghId = getMeta(properties)?.keys?.find((key) => key.source === 'github.com')?.id;\n const { octokit } = useOctokitContext();\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { dispatch } = useIntent();\n\n const docGhId = useDocGhId(properties.__meta?.keys ?? []);\n\n const updateIssueContent = useCallback(() => {\n const { owner, repo, issueNumber } = docGhId as GhIssueIdentifier;\n return octokit!.rest.issues.update({\n owner,\n repo,\n issue_number: issueNumber,\n body: content,\n });\n }, [octokit, docGhId, content]);\n\n const exportGhIssueContent = useCallback(async () => {\n if (octokit && docGhId && 'issueNumber' in docGhId && content) {\n try {\n const {\n data: { html_url: issueUrl },\n } = await updateIssueContent();\n await dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/github/ExportDialog',\n subject: { type: 'response', target: issueUrl, docGhId, content },\n },\n });\n } catch (err) {\n log.error('Failed to export to Github issue');\n }\n } else {\n log.error('Not prepared to export to Github issue when requested.');\n }\n }, [octokit, docGhId, content]);\n\n const handleGhExport = useCallback(() => {\n if ('issueNumber' in docGhId!) {\n void exportGhIssueContent();\n } else if ('path' in docGhId!) {\n void dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/github/ExportDialog',\n subject: { type: 'create-pr', content, docGhId },\n },\n });\n }\n }, [exportGhIssueContent, docGhId]);\n\n return (\n <>\n <DropdownMenu.GroupLabel>{t('markdown actions label')}</DropdownMenu.GroupLabel>\n {docGhId ? (\n <>\n <DropdownMenu.Item\n classNames='gap-2'\n disabled={!docGhId}\n onClick={() =>\n // TODO(burdon): Intent should return content value from dialog.\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: { element: 'dialog', component: 'dxos.org/plugin/github/ImportDialog', subject: { docGhId } },\n })\n }\n >\n <FileArrowDown className={getSize(4)} />\n <span className='grow'>{t('import from github label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item classNames='gap-2' disabled={!docGhId} onClick={() => docGhId && handleGhExport()}>\n <FileArrowUp className={getSize(4)} />\n <span className='grow'>{t('export to github label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item asChild classNames='gap-2' disabled={!ghId}>\n <a\n {...(ghId ? { href: `https://github.com/${ghId}`, target: '_blank', rel: 'noreferrer' } : { href: '#' })}\n >\n <ArrowSquareOut className={getSize(4)} />\n <span className='grow'>{t('open in github label')}</span>\n </a>\n </DropdownMenu.Item>\n <DropdownMenu.Item\n classNames='gap-2'\n onClick={() => {\n const index = getMeta(properties)?.keys?.findIndex((key) => key.source === 'github.com');\n typeof index !== 'undefined' && index >= 0 && properties.__meta?.keys?.splice(index, 1);\n }}\n >\n <LinkBreak className={getSize(4)} />\n <span className='grow'>{t('unbind to file in github label')}</span>\n </DropdownMenu.Item>\n </>\n ) : (\n <DropdownMenu.Item\n classNames='gap-2'\n onClick={() =>\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: { element: 'dialog', component: 'dxos.org/plugin/github/BindDialog', subject: properties },\n })\n }\n >\n <Link className={getSize(4)} />\n <span className='grow'>{t('bind to file in github label')}</span>\n </DropdownMenu.Item>\n )}\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { type MarkdownProperties } from '@dxos/plugin-markdown';\nimport { Dialog, Button, useTranslation, Input } from '@dxos/react-ui';\n\nimport { useGhIdFromUrl } from '../hooks';\nimport { GITHUB_PLUGIN } from '../meta';\n\nexport const UrlDialog = ({ properties }: { properties: MarkdownProperties }) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const [ghUrlValue, setGhUrlValue] = useState('');\n const ghId = useGhIdFromUrl(ghUrlValue);\n\n return (\n <>\n <Dialog.Title classNames='mbe-2'>{t('bind to file in github label')}</Dialog.Title>\n <Input.Root validationValence='error'>\n <Input.Label>{t('paste url to file in github label')}</Input.Label>\n <Input.TextInput\n placeholder={t('paste url to file in github placeholder')}\n value={ghUrlValue}\n onChange={({ target: { value } }) => setGhUrlValue(value)}\n />\n <Input.DescriptionAndValidation>\n {ghUrlValue.length > 0 && !ghId && (\n <Input.Validation>{t('error github markdown path message')}</Input.Validation>\n )}\n <Input.Description>{t('paste url to file in github description')}</Input.Description>\n </Input.DescriptionAndValidation>\n </Input.Root>\n <div role='none' className='flex justify-end gap-2'>\n <Dialog.Close asChild>\n <Button\n classNames='mbs-2'\n onClick={() => {\n if (ghId && document) {\n // TODO(burdon): Meta should be immutable.\n properties.__meta.keys.push({ source: 'github.com', id: ghId });\n }\n }}\n >\n {t('done label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </div>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GITHUB_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [GITHUB_PLUGIN]: {\n 'plugin name': 'GitHub',\n 'markdown actions label': 'GitHub actions',\n 'unbind to file in github label': 'Disconnect from GitHub',\n 'bind to file in github label': 'Connect to issue or file in GitHub',\n 'github pat label': 'GitHub personal access token:',\n 'github pat description':\n 'Composer needs this in order to communicate with GitHub. <docsLink>GitHub’s documentation describes how to create a token.</docsLink> Composer only needs write access to issues, contents, and pull requests.',\n 'github pat description href':\n 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens',\n 'empty github pat message': 'Set a GitHub personal access token to continue.',\n 'set github pat label': 'Set GitHub token',\n 'error github pat message':\n 'There was a problem authenticating with GitHub using the personal access token provided.',\n 'error github markdown path message': 'This is not a valid path to a Markdown file or Issue in GitHub.',\n 'paste url to file in github label': 'Paste the URL to the Issue or Markdown file in GitHub.',\n 'paste url to file in github description':\n 'Navigate to the issue or file in GitHub, then copy the URL in your browser and paste it here.',\n 'paste url to file in github placeholder': 'https://github.com/owner/repo/blob/main/path/to/README.md',\n 'confirm export title': 'Export to GitHub',\n 'export to github success message':\n '<resultStyle>Success!</resultStyle> Your changes are now live here: <prLink>{{linkText}}</prLink>',\n 'github branch name label': 'Name of the branch to create',\n 'github branch name placeholder': 'update-readme',\n 'github commit message label': 'Commit message',\n 'github commit message placeholder': 'Updated README.md',\n 'save and close description': 'Save changes to GitHub and close the editor',\n 'close embed description':\n 'Close the editor without saving changes to GitHub. Your changes will still persist in Composer.',\n 'resolver init document message': 'Syncing this document, one moment…',\n 'comment stale title': 'No longer in-sync',\n 'comment stale body':\n 'The document in GitHub was updated in another session. To re-sync, please save your changes, reload the page, and choose to edit from GitHub again.',\n 'open in github label': 'Open in GitHub',\n 'stale rescue title': 'Set a personal access token',\n 'stale rescue description':\n 'Another user has recently updated this issue, so GitHub won’t accept your changes unless you set a personal access token (a PAT) here, or refresh the page.',\n 'embedded options label': 'Options',\n 'unset repo space label': 'Select a different space for this repository',\n 'loading preview message': 'Loading preview…',\n 'preview gfm label': 'Preview Markdown',\n 'exit gfm preview label': 'Exit preview',\n 'save and close label': 'Save & close',\n 'export to github label': 'Export to GitHub',\n 'import from github label': 'Import from GitHub',\n 'resolver tree label': 'Choose a Space',\n 'resolver tree description':\n 'To collaborate on documents in this repository, choose the Space that will store and control access to the documents.',\n 'resolver no spaces message': 'You aren’t in any spaces yet',\n 'resolver create space label': 'Create a space for this repository',\n 'bound members message_one': 'One member uses this space for this repository',\n 'bound members message_other': '{{count}} members use this space for this repository',\n 'select label': 'Select',\n 'selected label': 'Selected',\n 'open in composer label': 'Open in Composer',\n 'confirm import title': 'Overwrite this document’s content?',\n 'confirm import body':\n 'Importing will overwrite this document’s content. If you’d rather import into a new document, first create a new document and then import into it.',\n 'target blank description': 'Link opens in a new tab.',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GithubPlugin } from './GithubPlugin';\n\nexport default GithubPlugin;\n\nexport * from './GithubPlugin';\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,kBAAkC;AAC3C,OAAOC,aAAW;AAElB,SAASC,qBAA4C;AACrD,SAASC,yBAAyB;AAClC,SAASC,OAAAA,YAAW;AACpB,SAASC,yBAAyB;AAClC,SAASC,uBAAkC;AAC3C,SAASC,4BAA4B;AACrC,SAASC,gBAAAA,qBAAoB;AAC7B,SAASC,oBAAoB;AAC7B,SAASC,WAAAA,UAASC,SAASC,UAAAA,eAA0B;;;ACTrD,SACEC,kBAAAA,iBACAC,aAAAA,YACAC,mBACAC,KACAC,QACAC,kBACAC,gBACK;AACP,OAAOC,WAASC,eAAAA,cAAaC,cAAAA,aAAYC,QAAQC,YAAAA,iBAAgB;AAEjE,SAASC,SAASC,iBAAiB;AACnC,SAASC,cAAcC,aAAaC,uBAAAA,4BAA2B;AAC/D,SAASC,aAAAA,kBAAiB;AAC1B,SAASC,WA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O;UACX;QACF;MACF;IACF;EACF;AACF;;;AoB1HA,IAAA,cAAeC;",
6
- "names": ["GithubLogo", "React", "resolvePlugin", "LocalStorageStore", "log", "parseClientPlugin", "createExtension", "isMarkdownProperties", "DocumentType", "memoizeQuery", "getMeta", "isSpace", "Filter", "ArrowSquareOut", "CaretDown", "DotsThreeVertical", "Eye", "Option", "PencilSimpleLine", "UserPlus", "React", "useCallback", "useContext", "useRef", "useState", "Surface", "useIntent", "SPACE_PLUGIN", "SpaceAction", "getSpaceDisplayName", "useClient", "getMeta", "Avatar", "Button", "ButtonGroup", "DensityProvider", "Dialog", "DropdownMenu", "Main", "Toggle", "Tooltip", "toLocalizedString", "useTranslation", "defaultTx", "descriptionText", "getSize", "mx", "hexToFallback", "DOMPurify", "React", "useEffect", "useState", "useTranslation", "ArrowSquareOut", "React", "useEffect", "useState", "SettingsValue", "Link", "Input", "Trans", "useTranslation", "useId", "getSize", "mx", "Octokit", "React", "createContext", "useContext", "useEffect", "useState", "log", "OctokitContext", "setPat", "patError", "octokit", "useOctokitContext", "OctokitProvider", "pat", "onPatChanged", "children", "setOctokit", "setPatError", "auth", "rest", "users", "getAuthenticated", "then", "err", "warn", "Provider", "value", "ExternalLink", "children", "t", "useTranslation", "GITHUB_PLUGIN", "descriptionId", "useId", "React", "Link", "href", "target", "rel", "aria-describedby", "ArrowSquareOut", "weight", "className", "mx", "getSize", "span", "id", "ns", "GitHubSettings", "pat", "setPat", "useOctokitContext", "patValue", "setPatValue", "useState", "useEffect", "SettingsValue", "label", "description", "Trans", "i18nKey", "components", "docsLink", "Input", "TextInput", "autoFocus", "spellCheck", "classNames", "value", "onChange", "React", "useId", "mx", "sizeMap", "Map", "Loading", "size", "color", "label", "slots", "labelId", "useId", "sizeClassName", "get", "React", "div", "root", "className", "mx", "role", "aria-labelledby", "svg", "viewBox", "fill", "xmlns", "path", "d", "span", "id", "defaultOptions", "ALLOWED_TAGS", "ALLOWED_ATTR", "sanitize", "dirty", "options", "__html", "DOMPurify", "GfmPreview", "markdown", "owner", "repo", "html", "setHtml", "useState", "octokit", "useOctokitContext", "t", "useTranslation", "GITHUB_PLUGIN", "useEffect", "request", "text", "context", "then", "data", "React", "style", "article", "className", "dangerouslySetInnerHTML", "div", "role", "p", "Loading", "label", "GitHubSettings", "useMemo", "log", "useDocGhId", "keys", "key", "find", "source", "owner", "repo", "type", "rest", "id", "split", "issueNumber", "parseInt", "ref", "pathParts", "path", "join", "err", "catch", "useMemo", "useGhIdFromUrl", "ghUrlValue", "useMemo", "url", "URL", "_", "owner", "repo", "type", "rest", "pathname", "split", "ref", "pathParts", "path", "join", "ext", "length", "issueNumberString", "e", "React", "Button", "useTranslation", "React", "useCallback", "useContext", "useClient", "useSpaces", "Button", "Dialog", "Tree", "useId", "useTranslation", "React", "createContext", "useContext", "useEffect", "useMemo", "useState", "create", "log", "DocumentType", "TextType", "useMulticastObservable", "getMeta", "SpaceState", "useQuery", "useSpaces", "useIdentity", "get", "update", "ghMatch", "space", "identityHex", "id", "ghOwner", "ghRepo", "_ghEtc", "split", "get", "properties", "includes", "matchSpace", "source", "ghBind", "update", "ghBindings", "members", "github", "repos", "bindSpace", "ghUnbind", "index", "indexOf", "result", "splice", "unbindSpace", "ghDisplayName", "ghResource", "etc", "join", "displayName", "getLocationIdentifier", "searchParams", "URLSearchParams", "window", "location", "search", "get", "source", "id", "url", "URL", "undefined", "hostname", "split", "reverse", "join", "pathname", "slice", "err", "log", "catch", "SpaceResolverContext", "createContext", "space", "setSpace", "_space", "SpaceResolverProvider", "children", "identity", "useIdentity", "identityHex", "identityKey", "toHex", "spaces", "useSpaces", "all", "nextSpace", "useState", "useMemo", "find", "matchSpace", "React", "Provider", "value", "defaultDocumentResolverContext", "document", "setDocument", "_document", "DocumentResolverContext", "DocumentResolverProviderImpl", "spaceState", "useMulticastObservable", "state", "defaultDisplayName", "displayName", "documents", "useQuery", "obj", "keys", "getMeta", "key", "useEffect", "handler", "event", "parent", "SpaceState", "SPACE_READY", "data", "type", "nextDocument", "db", "add", "create", "DocumentType", "name", "content", "TextType", "threads", "length", "addEventListener", "postMessage", "removeEventListener", "DocumentResolverProvider", "useContext", "CaretDown", "CaretRight", "React", "useMemo", "useState", "DocumentType", "getSpaceDisplayName", "useMulticastObservable", "SpaceState", "useQuery", "Filter", "Button", "Tag", "Tooltip", "Tree", "TreeItem", "useTranslation", "staticDisabled", "TextAa", "React", "useTranslation", "TreeItem", "getSize", "mx", "DocumentTreeItem", "document", "t", "useTranslation", "GITHUB_PLUGIN", "React", "TreeItem", "Root", "classNames", "Heading", "TextAa", "weight", "className", "mx", "getSize", "span", "name", "ns", "SpacePickerTreeItem", "identityHex", "space", "source", "id", "setSpace", "selected", "t", "useTranslation", "GITHUB_PLUGIN", "spaceSate", "useMulticastObservable", "state", "disabled", "SpaceState", "SPACE_READY", "spaceDisplayName", "getSpaceDisplayName", "documents", "useQuery", "Filter", "schema", "DocumentType", "hasDocuments", "length", "open", "setOpen", "useState", "nBoundMembers", "useMemo", "Object", "keys", "properties", "members", "filter", "matchSpace", "OpenTriggerIcon", "CaretDown", "CaretRight", "React", "TreeItem", "Root", "collapsible", "onOpenChange", "classNames", "staticDisabled", "div", "role", "className", "OpenTrigger", "Heading", "data-testid", "Array", "isArray", "Tooltip", "Trigger", "asChild", "Tag", "palette", "aria-label", "count", "Portal", "Content", "side", "Arrow", "Button", "density", "onClick", "Body", "Tree", "Branch", "map", "document", "DocumentTreeItem", "key", "ResolverTree", "client", "useClient", "spaces", "useSpaces", "all", "treeLabel", "useId", "t", "useTranslation", "GITHUB_PLUGIN", "space", "selectedSpace", "setSpace", "setSelectedSpace", "source", "id", "identityHex", "useContext", "SpaceResolverContext", "useCallback", "nextSpace", "unbindSpace", "bindSpace", "length", "React", "Dialog", "Title", "tabIndex", "classNames", "Description", "div", "role", "className", "Tree", "Root", "aria-label", "data-testid", "map", "SpacePickerTreeItem", "key", "toHex", "selected", "h1", "Button", "onClick", "create", "ResolverDialog", "handleJoinSpace", "handleCreateSpace", "t", "useTranslation", "GITHUB_PLUGIN", "React", "ResolverTree", "div", "role", "className", "Button", "classNames", "onClick", "ns", "overlayAttrs", "side", "sideOffset", "EmbeddedLayoutImpl", "t", "useTranslation", "GITHUB_PLUGIN", "space", "source", "id", "identityHex", "useContext", "SpaceResolverContext", "document", "DocumentResolverContext", "dispatch", "useIntent", "client", "useClient", "handleCloseEmbed", "useCallback", "window", "parent", "postMessage", "type", "handleSaveAndCloseEmbed", "content", "handleCreateSpace", "action", "SpaceAction", "CREATE", "handleJoinSpace", "JOIN", "handleInvite", "shell", "shareSpace", "spaceKey", "key", "editorViewState", "setEditorViewState", "useState", "isPreviewing", "suppressNextTooltip", "useRef", "optionsTooltipOpen", "setOptionsTooltipOpen", "optionsMenuOpen", "setOptionsMenuOpen", "renameDialogOpen", "setRenameDialogOpen", "resolverDialogOpen", "setResolverDialogOpen", "spaceFallbackValue", "hexToFallback", "toHex", "docGhId", "useDocGhId", "getMeta", "keys", "name", "getSpaceDisplayName", "React", "style", "DensityProvider", "density", "div", "role", "className", "Tooltip", "Root", "Trigger", "asChild", "Button", "disabled", "onClick", "span", "ns", "UserPlus", "getSize", "Content", "Arrow", "Toggle", "pressed", "onPressedChange", "nextPressed", "PencilSimpleLine", "Eye", "open", "onOpenChange", "nextOpen", "current", "DropdownMenu", "modal", "DotsThreeVertical", "Viewport", "Item", "a", "target", "rel", "href", "location", "origin", "ArrowSquareOut", "mx", "Separator", "GroupLabel", "SPACE_PLUGIN", "Avatar", "size", "variant", "Frame", "Fallback", "text", "emoji", "Label", "classNames", "toLocalizedString", "Option", "ButtonGroup", "CaretDown", "Portal", "p", "descriptionText", "Main", "GfmPreview", "markdown", "toString", "owner", "repo", "Surface", "data", "properties", "view", "Dialog", "defaultTx", "ResolverDialog", "Overlay", "subject", "EmbeddedMain", "SpaceResolverProvider", "DocumentResolverProvider", "React", "useCallback", "useState", "log", "Button", "Dialog", "Input", "Trans", "useTranslation", "React", "useCallback", "log", "Button", "Dialog", "useTranslation", "ImportDialog", "docGhId", "onUpdate", "t", "useTranslation", "GITHUB_PLUGIN", "octokit", "useOctokitContext", "importGhIssueContent", "useCallback", "owner", "repo", "issueNumber", "data", "rest", "issues", "get", "issue_number", "body", "err", "log", "error", "importGhFileContent", "path", "repos", "getContent", "Array", "isArray", "type", "atob", "content", "handleGhImport", "React", "Dialog", "Content", "Title", "p", "className", "div", "role", "Close", "asChild", "Button", "ns", "variant", "onClick", "IconBase", "React", "forwardRef", "weights", "Map", "React", "path", "d", "opacity", "Issue", "forwardRef", "props", "ref", "IconBase", "displayName", "ArrowSquareOut", "FileArrowDown", "FileArrowUp", "Link", "LinkBreak", "React", "useCallback", "LayoutAction", "useIntent", "log", "getMeta", "DropdownMenu", "useTranslation", "getSize", "MarkdownActions", "content", "properties", "ghId", "getMeta", "keys", "find", "key", "source", "id", "octokit", "useOctokitContext", "t", "useTranslation", "GITHUB_PLUGIN", "dispatch", "useIntent", "docGhId", "useDocGhId", "__meta", "updateIssueContent", "useCallback", "owner", "repo", "issueNumber", "rest", "issues", "update", "issue_number", "body", "exportGhIssueContent", "data", "html_url", "issueUrl", "action", "LayoutAction", "SET_LAYOUT", "element", "component", "subject", "type", "target", "err", "log", "error", "handleGhExport", "React", "DropdownMenu", "GroupLabel", "Item", "classNames", "disabled", "onClick", "FileArrowDown", "className", "getSize", "span", "FileArrowUp", "asChild", "a", "href", "rel", "ArrowSquareOut", "index", "findIndex", "splice", "LinkBreak", "Link", "React", "useState", "Dialog", "Button", "useTranslation", "Input", "UrlDialog", "properties", "t", "useTranslation", "GITHUB_PLUGIN", "ghUrlValue", "setGhUrlValue", "useState", "ghId", "useGhIdFromUrl", "React", "Dialog", "Title", "classNames", "Input", "Root", "validationValence", "Label", "TextInput", "placeholder", "value", "onChange", "target", "DescriptionAndValidation", "length", "Validation", "Description", "div", "role", "className", "Close", "asChild", "Button", "onClick", "document", "__meta", "keys", "push", "source", "id", "ns", "GITHUB_PLUGIN", "GithubPlugin", "settings", "LocalStorageStore", "GITHUB_PLUGIN", "meta", "ready", "prop", "key", "type", "string", "allowUndefined", "unload", "close", "provides", "values", "translations", "graph", "builder", "plugins", "client", "resolvePlugin", "parseClientPlugin", "createExtension", "id", "filter", "node", "isSpace", "data", "connector", "documents", "memoizeQuery", "Filter", "schema", "DocumentType", "doc", "getMeta", "keys", "find", "source", "includes", "length", "GITHUB_PLUGIN_SHORT_ID", "properties", "label", "ns", "icon", "props", "React", "GithubLogo", "iconSymbol", "context", "OctokitProvider", "pat", "onPatChanged", "surface", "component", "role", "EmbeddedMain", "content", "isMarkdownProperties", "UrlDialog", "ImportDialog", "docGhId", "onUpdate", "log", "info", "readonly", "MarkdownActions", "plugin", "GitHubSettings", "GithubPlugin"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { resolvePlugin, type PluginDefinition } from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { log } from '@dxos/log';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\nimport { isMarkdownProperties } from '@dxos/plugin-markdown';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { memoizeQuery } from '@dxos/plugin-space';\nimport { getMeta, isSpace, Filter, type Space } from '@dxos/react-client/echo';\n\nimport { EmbeddedMain, ImportDialog, OctokitProvider, GitHubSettings, UrlDialog, MarkdownActions } from './components';\nimport meta, { GITHUB_PLUGIN, GITHUB_PLUGIN_SHORT_ID } from './meta';\nimport translations from './translations';\nimport { type GhIdentifier, type GithubPluginProvides, type GithubSettingsProps } from './types';\n\nexport const GithubPlugin = (): PluginDefinition<GithubPluginProvides> => {\n const settings = new LocalStorageStore<GithubSettingsProps>(GITHUB_PLUGIN);\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'pat', type: LocalStorageStore.string({ allowUndefined: true }) });\n },\n unload: async () => {\n settings.close();\n },\n provides: {\n settings: settings.values,\n translations,\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n if (!client) {\n return [];\n }\n\n return createExtension({\n id: GITHUB_PLUGIN,\n filter: (node): node is Node<Space> => isSpace(node.data),\n connector: ({ node }) => {\n const documents = memoizeQuery(\n node.data,\n Filter.schema(DocumentType, (doc) =>\n getMeta(doc)?.keys?.find((key) => key?.source?.includes('github')),\n ),\n );\n\n if (documents.length > 0) {\n return [\n {\n id: `${GITHUB_PLUGIN_SHORT_ID}:${node.id}`,\n data: GITHUB_PLUGIN_SHORT_ID,\n type: GITHUB_PLUGIN,\n properties: {\n label: ['plugin name', { ns: GITHUB_PLUGIN }],\n icon: 'ph--github-logo--regular',\n },\n // TODO(wittjosiah): Add documents.\n // nodes: documents.map((doc) => ({}),\n },\n ];\n }\n },\n });\n },\n },\n context: (props) => (\n <OctokitProvider pat={settings.values.pat} onPatChanged={(pat) => (settings.values.pat = pat)} {...props} />\n ),\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${GITHUB_PLUGIN}/embedded`:\n return <EmbeddedMain />;\n }\n\n switch (role) {\n case 'dialog':\n switch (data.content) {\n case 'dxos.org/plugin/github/BindDialog':\n return isMarkdownProperties(data.properties) ? <UrlDialog properties={data.properties} /> : null;\n // TODO(burdon): Model should not be passed via surfaces.\n // return isEditorModel(data.model) ? (\n // <ExportDialog\n // model={data.model}\n // type={data.type as ExportViewState}\n // target={data.target as string | null}\n // docGhId={data.docGhId as GhIdentifier}\n // />\n // ) : null;\n case 'dxos.org/plugin/github/ExportDialog':\n return null;\n case 'dxos.org/plugin/github/ImportDialog':\n return (\n <ImportDialog\n docGhId={data.docGhId as GhIdentifier}\n onUpdate={(content) => {\n // TODO(burdon): Fire intent.\n log.info('onUpdate', content);\n }}\n />\n );\n default:\n return null;\n }\n case 'menuitem':\n return typeof data.content === 'string' &&\n isMarkdownProperties(data.properties) &&\n !data.properties.readonly ? (\n <MarkdownActions content={data.content} properties={data.properties} />\n ) : null;\n case 'settings':\n return data.plugin === meta.id ? <GitHubSettings /> : null;\n default:\n return null;\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport './embedded.css';\n\nimport {\n ArrowSquareOut,\n CaretDown,\n DotsThreeVertical,\n Eye,\n Option,\n PencilSimpleLine,\n UserPlus,\n} from '@phosphor-icons/react';\nimport React, { useCallback, useContext, useRef, useState } from 'react';\n\nimport { Surface, useIntent } from '@dxos/app-framework';\nimport { SPACE_PLUGIN, SpaceAction, getSpaceDisplayName } from '@dxos/plugin-space';\nimport { useClient } from '@dxos/react-client';\nimport { getMeta } from '@dxos/react-client/echo';\nimport {\n Avatar,\n Button,\n ButtonGroup,\n DensityProvider,\n Dialog,\n DropdownMenu,\n Main,\n Toggle,\n Tooltip,\n toLocalizedString,\n useTranslation,\n} from '@dxos/react-ui';\nimport { defaultTx, descriptionText, getSize, mx } from '@dxos/react-ui-theme';\nimport { hexToFallback } from '@dxos/util';\n\nimport { GfmPreview } from './GfmPreview';\nimport { useDocGhId } from '../../hooks';\nimport { GITHUB_PLUGIN } from '../../meta';\nimport type { EditorViewState } from '../../types';\nimport {\n DocumentResolverProvider,\n DocumentResolverContext,\n ResolverDialog,\n SpaceResolverProvider,\n SpaceResolverContext,\n} from '../GithubEchoResolverProviders';\n\nconst overlayAttrs = { side: 'top' as const, sideOffset: 4 };\n\nconst EmbeddedLayoutImpl = () => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { space, source, id, identityHex } = useContext(SpaceResolverContext);\n const { document } = useContext(DocumentResolverContext);\n const { dispatch } = useIntent();\n const client = useClient();\n\n const handleCloseEmbed = useCallback(() => {\n window.parent.postMessage({ type: 'close-embed' }, 'https://github.com');\n }, []);\n\n const handleSaveAndCloseEmbed = useCallback(() => {\n document &&\n window.parent.postMessage({ type: 'save-data', content: document.content?.content }, 'https://github.com');\n }, [document]);\n\n const handleCreateSpace = () => dispatch({ action: SpaceAction.CREATE });\n const handleJoinSpace = () => dispatch({ action: SpaceAction.JOIN });\n\n const handleInvite = useCallback(() => {\n if (client && space) {\n void client.shell.shareSpace({ spaceKey: space.key });\n }\n }, [client, space]);\n\n const [editorViewState, setEditorViewState] = useState<EditorViewState>('editor');\n const isPreviewing = editorViewState === 'preview';\n\n const suppressNextTooltip = useRef<boolean>(false);\n const [optionsTooltipOpen, setOptionsTooltipOpen] = useState(false);\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n\n const [renameDialogOpen, setRenameDialogOpen] = useState(false);\n const [resolverDialogOpen, setResolverDialogOpen] = useState(false);\n\n const spaceFallbackValue = hexToFallback(space?.key.toHex() ?? '0');\n\n const docGhId = useDocGhId((document ? getMeta(document)?.keys : []) ?? []);\n const name = space && getSpaceDisplayName(space);\n\n return (\n <>\n <style type='text/css'>{`\n :root {\n --surface-bg: #F6F8FA;\n }\n .dark:root {\n --surface-bg: #161b22;\n }\n `}</style>\n <DensityProvider density='fine'>\n <div role='none' className='fixed inline-end-2 block-end-2 z-10 flex gap-2'>\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button disabled={!space} onClick={handleInvite}>\n <span className='sr-only'>{t('create invitation label', { ns: 'appkit' })}</span>\n <UserPlus className={getSize(5)} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Content {...overlayAttrs}>\n {t('create invitation label', { ns: 'appkit' })}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Toggle\n disabled={!(space && document)}\n pressed={isPreviewing}\n onPressedChange={(nextPressed) => setEditorViewState(nextPressed ? 'preview' : 'editor')}\n >\n <span className='sr-only'>{t(isPreviewing ? 'exit gfm preview label' : 'preview gfm label')}</span>\n {isPreviewing ? <PencilSimpleLine className={getSize(5)} /> : <Eye className={getSize(5)} />}\n </Toggle>\n </Tooltip.Trigger>\n <Tooltip.Content {...overlayAttrs}>\n {t(isPreviewing ? 'exit gfm preview label' : 'preview gfm label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root\n open={optionsTooltipOpen}\n onOpenChange={(nextOpen) => {\n if (suppressNextTooltip.current) {\n setOptionsTooltipOpen(false);\n suppressNextTooltip.current = false;\n } else {\n setOptionsTooltipOpen(nextOpen);\n }\n }}\n >\n <DropdownMenu.Root\n {...{\n modal: false,\n open: optionsMenuOpen,\n onOpenChange: (nextOpen: boolean) => {\n if (!nextOpen) {\n suppressNextTooltip.current = true;\n }\n return setOptionsMenuOpen(nextOpen);\n },\n }}\n >\n <Tooltip.Trigger asChild>\n <DropdownMenu.Trigger asChild disabled={!(space && document)}>\n <Button>\n <DotsThreeVertical className={getSize(5)} />\n <span className='sr-only'>{t('embedded options label')}</span>\n </Button>\n </DropdownMenu.Trigger>\n </Tooltip.Trigger>\n <DropdownMenu.Content {...overlayAttrs}>\n <DropdownMenu.Viewport>\n <DropdownMenu.Item asChild>\n <a\n target='_blank'\n rel='noreferrer'\n href={\n space && document\n ? `${location.origin}/dxos/space/${space?.key.toHex() ?? 'never'}/${document.id}`\n : '#'\n }\n >\n <ArrowSquareOut className={mx('shrink-0', getSize(5))} />\n <span className='grow'>{t('open in composer label', { ns: GITHUB_PLUGIN })}</span>\n </a>\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.GroupLabel>\n {t('active space label', { ns: SPACE_PLUGIN })}\n <Avatar.Root size={5} variant='circle'>\n <div role='none' className='flex gap-1 mlb-1 items-center'>\n <Avatar.Frame>\n <Avatar.Fallback text={spaceFallbackValue.emoji} />\n </Avatar.Frame>\n <Avatar.Label classNames='text-sm text-[--surface-text]'>\n {name && toLocalizedString(name, t)}\n </Avatar.Label>\n </div>\n </Avatar.Root>\n </DropdownMenu.GroupLabel>\n <DropdownMenu.Item onClick={() => setRenameDialogOpen(true)}>\n <span className='grow'>{t('rename space label', { ns: SPACE_PLUGIN })}</span>\n <PencilSimpleLine className={mx('shrink-0', getSize(5))} />\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => setResolverDialogOpen(true)}>\n <span className='grow'>{t('unset repo space label')}</span>\n <Option className={mx('shrink-0', getSize(5))} />\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n <Tooltip.Content {...overlayAttrs}>\n {t('embedded options label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </DropdownMenu.Root>\n </Tooltip.Root>\n <ButtonGroup classNames={[!(space && document) && 'shadow-none']}>\n <Button disabled={!(space && document)} onClick={handleSaveAndCloseEmbed}>\n {t('save and close label')}\n </Button>\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild disabled={!(space && document)}>\n <Button>\n <CaretDown />\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content {...overlayAttrs}>\n <DropdownMenu.Viewport>\n <DropdownMenu.Item onClick={handleSaveAndCloseEmbed} classNames='block'>\n <p>{t('save and close label')}</p>\n <p className={descriptionText}>{t('save and close description')}</p>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={handleCloseEmbed} classNames='block'>\n <p>{t('close label', { ns: 'appkit' })}</p>\n <p className={descriptionText}>{t('close embed description')}</p>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n </ButtonGroup>\n </div>\n {space && document ? (\n editorViewState === 'preview' ? (\n <Main.Content classNames='min-bs-[100dvh] flex flex-col p-0.5'>\n <GfmPreview\n markdown={document.content?.toString() ?? ''}\n {...(docGhId && { owner: docGhId.owner, repo: docGhId.repo })}\n />\n </Main.Content>\n ) : (\n // TODO(burdon): This will break since model is not defined.\n <Surface role='main' data={{ properties: document, view: 'embedded' }} />\n )\n ) : source && id && identityHex ? (\n <Dialog.Root open onOpenChange={() => true}>\n <div role='none' className={defaultTx('dialog.overlay', 'dialog--resolver__overlay', {}, 'static bs-full')}>\n <div\n role='none'\n className={defaultTx(\n 'dialog.content',\n 'dialog--resolver__content',\n {},\n 'p-2 bs-72 flex flex-col shadow-none bg-transparent',\n )}\n >\n <ResolverDialog handleCreateSpace={handleCreateSpace} handleJoinSpace={handleJoinSpace} />\n </div>\n </div>\n </Dialog.Root>\n ) : null}\n {space && (\n <Dialog.Root open={renameDialogOpen} onOpenChange={setRenameDialogOpen}>\n <Dialog.Overlay classNames='backdrop-blur'>\n <Dialog.Content>\n <Surface role='dialog' data={{ content: 'dxos.org/plugin/space/RenameSpaceDialog', subject: space }} />\n </Dialog.Content>\n </Dialog.Overlay>\n </Dialog.Root>\n )}\n <Dialog.Root open={resolverDialogOpen} onOpenChange={setResolverDialogOpen}>\n <Dialog.Overlay classNames='backdrop-blur'>\n <Dialog.Content>\n <ResolverDialog handleCreateSpace={handleCreateSpace} handleJoinSpace={handleJoinSpace} />\n </Dialog.Content>\n </Dialog.Overlay>\n </Dialog.Root>\n </DensityProvider>\n </>\n );\n};\n\nexport const EmbeddedMain = () => {\n return (\n <SpaceResolverProvider>\n <DocumentResolverProvider>\n <EmbeddedLayoutImpl />\n </DocumentResolverProvider>\n </SpaceResolverProvider>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport 'github-markdown-css/github-markdown.css';\nimport DOMPurify from 'dompurify';\nimport React, { useEffect, useState } from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\n\nimport { GITHUB_PLUGIN } from '../../meta';\nimport { GitHubSettings, useOctokitContext } from '../GithubApiProviders';\nimport { Loading } from '../Loading';\n\nconst defaultOptions: Parameters<typeof DOMPurify.sanitize>[1] = {\n ALLOWED_TAGS: [\n 'span',\n 'div',\n 'b',\n 'i',\n 'em',\n 'strong',\n 'a',\n 'p',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'table',\n 'td',\n 'th',\n 'tr',\n 'blockquote',\n 'ul',\n 'ol',\n 'li',\n 'dd',\n 'tt',\n 'dl',\n 'dt',\n 'details',\n 'figcaption',\n 'figure',\n 'summary',\n 'abbr',\n 'dfn',\n 'mark',\n 'sub',\n 'sup',\n 'img',\n 'code',\n 'kbd',\n 'pre',\n 'samp',\n 'hr',\n 'input',\n 'pre',\n 'del',\n 'g-emoji',\n 'label',\n ],\n ALLOWED_ATTR: ['class', 'href', 'target', 'hidden', 'title', 'type', 'role', 'align', 'data-footnote-ref'],\n};\n\nconst sanitize = (dirty: string, options: Partial<Parameters<typeof DOMPurify.sanitize>[1]>) => ({\n __html: DOMPurify.sanitize(dirty, { ...defaultOptions, ...options }) as string,\n});\n\nexport type GfmPreviewProps = {\n markdown: string;\n owner?: string;\n repo?: string;\n};\n\nexport const GfmPreview = ({ markdown, owner, repo }: GfmPreviewProps) => {\n const [html, setHtml] = useState('');\n const { octokit } = useOctokitContext();\n const { t } = useTranslation(GITHUB_PLUGIN);\n\n useEffect(() => {\n if (octokit && markdown) {\n void octokit\n .request('POST /markdown', {\n text: markdown,\n ...(owner && repo && { context: `${owner}/${repo}` }),\n })\n .then(\n ({ data }) => setHtml(data),\n () => {},\n );\n }\n }, [markdown, octokit]);\n\n return html ? (\n <>\n <style>{'.markdown-body ol, .markdown-body ul {list-style-type: disc; list-style-position: outside;}'}</style>\n <div\n className='markdown-body grow is-full max-is-[980px] mli-auto p-[15px] sm:pli-[45px] sm:plb-[30px]'\n dangerouslySetInnerHTML={sanitize(html, {})}\n />\n </>\n ) : (\n <div role='none' className='mli-auto max-is-md pli-2 text-center'>\n {!octokit && <p className='mlb-4 text-lg font-medium'>{t('empty github pat message')}</p>}\n {octokit ? <Loading label={t('loading preview message')} /> : <GitHubSettings />}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ArrowSquareOut } from '@phosphor-icons/react';\nimport React, { type PropsWithChildren, useEffect, useState } from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Link, Input, Trans, useTranslation, useId } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { useOctokitContext } from './OctokitProvider';\nimport { GITHUB_PLUGIN } from '../../meta';\n\n// TODO(burdon): Factor out with PluginList.\nconst ExternalLink = ({ children }: PropsWithChildren<{}>) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const descriptionId = useId('link--external');\n return (\n <>\n <Link href={t('github pat description href')} target='_blank' rel='noreferrer' aria-describedby={descriptionId}>\n {children}\n <ArrowSquareOut weight='bold' className={mx(getSize(3), 'inline-block leading-none -mbs-0.5 mli-px')} />\n </Link>\n <span className='sr-only' id={descriptionId}>\n {t('target blank description', { ns: GITHUB_PLUGIN })}\n </span>\n </>\n );\n};\n\n// TODO(burdon): Pass in settings.\nexport const GitHubSettings = () => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { pat, setPat } = useOctokitContext();\n const [patValue, setPatValue] = useState(pat);\n\n useEffect(() => {\n setPatValue(pat);\n }, [pat]);\n\n useEffect(() => {\n void setPat(patValue);\n }, [patValue]);\n\n return (\n <>\n <SettingsValue\n label={t('github pat label')}\n description={\n <Trans\n {...{\n t,\n i18nKey: 'github pat description',\n components: {\n docsLink: <ExternalLink />,\n },\n }}\n />\n }\n >\n <Input.TextInput\n autoFocus\n spellCheck={false}\n classNames='font-mono mlb-1'\n value={patValue ?? ''}\n onChange={({ target: { value } }) => setPatValue(value)}\n />\n </SettingsValue>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Octokit } from 'octokit';\nimport React, { type Context, createContext, type PropsWithChildren, useContext, useEffect, useState } from 'react';\n\nimport { log } from '@dxos/log';\n\nexport type OctokitContextValue = {\n pat?: string;\n setPat: (pat?: string) => void;\n patError: 'failed' | null; // TODO(burdon): Remove/generalize?\n octokit: Octokit | null;\n};\n\nexport const OctokitContext: Context<OctokitContextValue> = createContext<OctokitContextValue>({\n setPat: () => {},\n patError: null,\n octokit: null,\n});\n\nexport const useOctokitContext = () => useContext(OctokitContext);\n\nexport const OctokitProvider = ({\n pat,\n onPatChanged,\n children,\n}: PropsWithChildren<{ pat?: string; onPatChanged?: (pat: string | undefined) => void }>) => {\n const [octokit, setOctokit] = useState<Octokit | null>(null);\n const [patError, setPatError] = useState<OctokitContextValue['patError']>(null);\n\n useEffect(() => {\n if (pat && !octokit) {\n void setPat(pat);\n }\n }, [pat, octokit]);\n\n const setPat = async (pat?: string) => {\n onPatChanged?.(pat);\n if (pat) {\n const octokit = new Octokit({ auth: pat });\n return octokit.rest.users.getAuthenticated().then(\n () => {\n setPatError(null);\n setOctokit(octokit);\n },\n (err) => {\n log.warn('Failed to authenticate Octokit from PAT', err);\n setPatError('failed');\n setOctokit(null);\n },\n );\n } else {\n setOctokit(null);\n }\n };\n\n return <OctokitContext.Provider value={{ pat, setPat, patError, octokit }}>{children}</OctokitContext.Provider>;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport React, { type ComponentProps } from 'react';\n\nimport { useId } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type LoadingSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport type LoadingColor = 'primary' | 'neutral';\n\nexport interface LoadingSlots {\n root?: Omit<ComponentProps<'div'>, 'children'>;\n svg?: Pick<ComponentProps<'svg'>, 'className'>;\n}\n\nexport interface LoadingProps {\n label: string;\n size?: LoadingSize;\n color?: LoadingColor;\n slots?: LoadingSlots;\n}\n\nconst sizeMap = new Map<LoadingSize, string>([\n ['sm', 'w-4 h-4'],\n ['md', 'w-8 h-8'],\n ['lg', 'w-12 h-12'],\n ['xl', 'w-16 h-16'],\n]);\n\n// TODO(wittjosiah): Factor out.\nexport const Loading = ({ size, color, label, slots = {} }: LoadingProps) => {\n const labelId = useId('loading-label');\n const sizeClassName = sizeMap.get(size ?? 'md');\n return (\n <div\n {...slots.root}\n className={mx('flex justify-center p-4', slots.root?.className)}\n role='status'\n aria-labelledby={labelId}\n >\n <svg\n role='none'\n className={mx(\n sizeClassName,\n 'text-neutral-200/50 animate-spin dark:text-neutral-600/50',\n color === 'neutral' ? 'fill-neutral-400' : 'fill-primary-400',\n slots.svg?.className,\n )}\n viewBox='0 0 100 101'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z'\n fill='currentColor'\n />\n <path\n d='M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z'\n fill='currentFill'\n />\n </svg>\n <span className='sr-only' id={labelId}>\n {label}\n </span>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { log } from '@dxos/log';\n\nimport { type GhIdentifier } from '../types';\n\nexport const useDocGhId = (keys: { source?: string; id?: string }[]) => {\n return useMemo<GhIdentifier | null>(() => {\n try {\n const key = keys?.find((key) => key.source === 'github.com');\n const [owner, repo, type, ...rest] = key?.id?.split('/') ?? [];\n if (type === 'issues') {\n return {\n owner,\n repo,\n issueNumber: parseInt(rest[0], 10),\n };\n } else if (type === 'blob') {\n const [ref, ...pathParts] = rest;\n return {\n owner,\n repo,\n ref,\n path: pathParts.join('/'),\n };\n } else {\n return null;\n }\n } catch (err) {\n log.catch(err);\n return null;\n }\n }, [keys]);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nexport const useGhIdFromUrl = (ghUrlValue: string) =>\n useMemo<string | null>(() => {\n try {\n const url = new URL(ghUrlValue);\n const [_, owner, repo, type, ...rest] = url.pathname.split('/');\n if (type === 'blob') {\n const [ref, ...pathParts] = rest;\n const path = pathParts.join('/');\n const ext = pathParts[pathParts.length - 1].split('.')[1];\n return ext === 'md' ? `${owner}/${repo}/blob/${ref}/${path}` : null;\n } else if (type === 'issues') {\n const [issueNumberString] = rest;\n return `${owner}/${repo}/issues/${issueNumberString}`;\n } else {\n return null;\n }\n } catch (e) {\n return null;\n }\n }, [ghUrlValue]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Button, useTranslation } from '@dxos/react-ui';\n\nimport { ResolverTree } from './ResolverTree';\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const ResolverDialog = ({\n handleJoinSpace,\n handleCreateSpace,\n}: {\n handleJoinSpace?: () => void;\n handleCreateSpace?: () => void;\n}) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n\n return (\n <>\n <ResolverTree />\n <div role='group' className='shrink-0 flex is-full gap-2'>\n <Button classNames='grow' onClick={handleCreateSpace}>\n {t('create space label', { ns: 'appkit' })}\n </Button>\n <Button classNames='grow' onClick={handleJoinSpace}>\n {t('join space label', { ns: 'appkit' })}\n </Button>\n </div>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useContext } from 'react';\n\nimport { useClient } from '@dxos/react-client';\nimport { useSpaces, type Space } from '@dxos/react-client/echo';\nimport { Button, Dialog, Tree, useId, useTranslation } from '@dxos/react-ui';\n\nimport { SpaceResolverContext } from './ResolverContext';\nimport { SpacePickerTreeItem } from './SpacePickerTreeItem';\nimport { bindSpace, unbindSpace } from './spaceResolvers';\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const ResolverTree = () => {\n const client = useClient();\n const spaces = useSpaces({ all: true });\n const treeLabel = useId('treeLabel');\n const { t } = useTranslation(GITHUB_PLUGIN);\n const {\n space: selectedSpace,\n setSpace: setSelectedSpace,\n source,\n id,\n identityHex,\n } = useContext(SpaceResolverContext);\n const setSpace = useCallback(\n (nextSpace: Space | null) => {\n if (identityHex && source && id) {\n selectedSpace && unbindSpace(selectedSpace, identityHex, source, id);\n nextSpace && bindSpace(nextSpace, identityHex, source, id);\n }\n setSelectedSpace(nextSpace);\n },\n [selectedSpace, setSelectedSpace, identityHex, source, id],\n );\n return spaces.length ? (\n <>\n {' '}\n <Dialog.Title tabIndex={-1} classNames='shrink-0'>\n {t('resolver tree label')}\n </Dialog.Title>\n <Dialog.Description>{t('resolver tree description')}</Dialog.Description>\n <div role='separator' className='shrink-0 bs-px bg-neutral-500/20 mlb-1' />\n <Tree.Root\n aria-label={t('resolver tree label')}\n data-testid='composer.sidebarTree'\n classNames='overflow-y-auto -mli-2 p-2'\n >\n {spaces.map((space) => {\n return (\n <SpacePickerTreeItem\n key={space.key.toHex()}\n {...{\n space,\n selected: selectedSpace === space,\n setSpace,\n identityHex: identityHex!,\n source: source!,\n id: id!,\n }}\n />\n );\n })}\n </Tree.Root>\n </>\n ) : (\n <>\n <h1 className='text-lg font-normal' id={treeLabel}>\n {t('resolver no spaces message')}\n </h1>\n <div role='separator' className='bs-px bg-neutral-500/20 mlb-2' />\n <Button\n classNames='block is-full'\n onClick={async () => {\n const space = await client.spaces.create();\n bindSpace(space, identityHex!, source!, id!);\n setSpace(space);\n }}\n >\n {t('resolver create space label')}\n </Button>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, {\n type Context,\n createContext,\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { create } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { DocumentType, TextType } from '@dxos/plugin-markdown/types';\nimport { useMulticastObservable } from '@dxos/react-client';\nimport { getMeta, type Space, SpaceState, useQuery, useSpaces } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\n\nimport { type DocumentResolverProps, type SpaceResolverProps } from './ResolverProps';\nimport { displayName, matchSpace } from './spaceResolvers';\n\nconst getLocationIdentifier = () => {\n const searchParams = new URLSearchParams(window.location.search);\n const location = searchParams.get('location');\n let source, id;\n try {\n const url = location ? new URL(location) : undefined;\n source = url?.hostname.split('.').reverse().join('.');\n id = url?.pathname.slice(1);\n } catch (err) {\n log.catch(err);\n }\n return [source, id];\n};\n\nexport const SpaceResolverContext: Context<SpaceResolverProps> = createContext<SpaceResolverProps>({\n space: null,\n setSpace: (_space) => {},\n});\n\nexport const SpaceResolverProvider = ({ children }: PropsWithChildren<{}>) => {\n const identity = useIdentity();\n const identityHex = identity?.identityKey.toHex();\n const [source, id] = getLocationIdentifier();\n const spaces = useSpaces({ all: true });\n\n const [nextSpace, setSpace] = useState<Space | null>(null);\n\n const space = useMemo(\n () =>\n nextSpace ?? (identityHex ? spaces.find((space) => matchSpace(space, identityHex, source, id)) ?? null : null),\n [spaces, nextSpace, identityHex, source, id],\n );\n\n return (\n <SpaceResolverContext.Provider value={{ space, setSpace, source, id, identityHex }}>\n {children}\n </SpaceResolverContext.Provider>\n );\n};\n\nconst defaultDocumentResolverContext: DocumentResolverProps = {\n document: null,\n setDocument: (_document) => {},\n};\n\nexport const DocumentResolverContext: Context<DocumentResolverProps> =\n createContext<DocumentResolverProps>(defaultDocumentResolverContext);\n\nconst DocumentResolverProviderImpl = ({\n space,\n source,\n id,\n children,\n}: PropsWithChildren<{ space: Space; source: string; id: string }>) => {\n const spaceState = useMulticastObservable(space.state);\n const [document, setDocument] = useState<DocumentType | null>(null);\n const defaultDisplayName = displayName(source, id);\n\n const documents = useQuery(space, (obj) => {\n const keys = getMeta(obj)?.keys;\n return keys?.find((key: any) => key.source === source && key.id === id);\n });\n\n useEffect(() => {\n const handler = (event: MessageEvent) => {\n if (event.source !== window.parent || spaceState !== SpaceState.SPACE_READY) {\n return;\n }\n\n if (event.data.type === 'initial-data') {\n const nextDocument = space.db.add(\n create(\n DocumentType,\n {\n name: defaultDisplayName,\n content: create(TextType, { content: event.data.content }),\n threads: [],\n },\n {\n keys: [{ source, id }],\n },\n ),\n );\n\n setDocument(nextDocument);\n }\n };\n\n // todo(thure): Won't this always be the case initially?\n if (documents.length === 0) {\n window.addEventListener('message', handler);\n window.parent.postMessage({ type: 'request-initial-data' }, 'https://github.com');\n return () => window.removeEventListener('message', handler);\n } else {\n setDocument(documents[0] as DocumentType);\n }\n }, [spaceState, space, documents]);\n\n return (\n <DocumentResolverContext.Provider value={{ document, setDocument }}>{children}</DocumentResolverContext.Provider>\n );\n};\n\nexport const DocumentResolverProvider = ({ children }: PropsWithChildren<{}>) => {\n const { space, source, id } = useContext(SpaceResolverContext);\n\n return space && source && id ? (\n <DocumentResolverProviderImpl space={space} source={source} id={id}>\n {children}\n </DocumentResolverProviderImpl>\n ) : (\n <DocumentResolverContext.Provider value={defaultDocumentResolverContext}>\n {children}\n </DocumentResolverContext.Provider>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport get from 'lodash.get';\nimport update from 'lodash.update';\n\nimport { type Space } from '@dxos/react-client/echo';\n\n// todo(thure): Why is the value that gets set in `ghBind` always undefined by the time this is called?\nconst ghMatch = (space: Space, identityHex: string, id: string): boolean => {\n const [ghOwner, ghRepo, ..._ghEtc] = id.split('/');\n return get(space.properties, ['members', identityHex, 'github', 'repos'], []).includes(`${ghOwner}/${ghRepo}`);\n};\n\nexport const matchSpace = (space: Space, identityHex: string, source?: string, id?: string) => {\n if (!id) {\n return false;\n }\n switch (source) {\n case 'github.com':\n return ghMatch(space, identityHex, id);\n default:\n return false;\n }\n};\n\n// todo(thure): Why does the new space.properties value not propagate?\nconst ghBind = (space: Space, identityHex: string, id: string): string[] => {\n const [ghOwner, ghRepo, ..._ghEtc] = id.split('/');\n update(space.properties, ['members', identityHex, 'github', 'repos'], (ghBindings) => {\n return [...(ghBindings ?? []), `${ghOwner}/${ghRepo}`];\n });\n return space.properties.members?.[identityHex]?.github?.repos ?? [];\n};\n\nexport const bindSpace = (space: Space, identityHex: string, source: string, id: string): string[] => {\n switch (source) {\n case 'github.com':\n return ghBind(space, identityHex, id);\n default:\n return [];\n }\n};\nconst ghUnbind = (space: Space, identityHex: string, id: string): string[] => {\n const [ghOwner, ghRepo, ..._ghEtc] = id.split('/');\n update(space.properties, ['members', identityHex, 'github', 'repos'], (ghBindings) => {\n const index = ghBindings.indexOf(`${ghOwner}/${ghRepo}`);\n if (index >= 0) {\n const result = [...ghBindings];\n result.splice(index, 1);\n return result;\n } else {\n return ghBindings;\n }\n });\n return space.properties.members?.[identityHex]?.github?.repos ?? [];\n};\n\nexport const unbindSpace = (space: Space, identityHex: string, source: string, id: string): string[] => {\n switch (source) {\n case 'github.com':\n return ghUnbind(space, identityHex, id);\n default:\n return [];\n }\n};\n\nconst ghDisplayName = (id: string): string => {\n const [ghOwner, ghRepo, ghResource, ...etc] = id.split('/');\n switch (ghResource) {\n case 'issues':\n return `${ghOwner}/${ghRepo} #${etc[0]}`;\n default:\n return `${ghOwner}/${ghRepo} ${[ghResource, ...etc].join('/')}`;\n }\n};\n\nexport const displayName = (source: string, id: string): string => {\n switch (source) {\n case 'github.com':\n return ghDisplayName(id);\n default:\n return id;\n }\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CaretDown, CaretRight } from '@phosphor-icons/react';\nimport React, { useMemo, useState } from 'react';\n\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { getSpaceDisplayName } from '@dxos/plugin-space';\nimport { useMulticastObservable } from '@dxos/react-client';\nimport { type Space, SpaceState, useQuery, Filter } from '@dxos/react-client/echo';\nimport { Button, Tag, Tooltip, Tree, TreeItem, useTranslation } from '@dxos/react-ui';\nimport { staticDisabled } from '@dxos/react-ui-theme';\n\nimport { DocumentTreeItem } from './DocumentTreeItem';\nimport { matchSpace } from './spaceResolvers';\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const SpacePickerTreeItem = ({\n identityHex,\n space,\n source,\n id,\n setSpace,\n selected,\n}: {\n identityHex: string;\n space: Space;\n setSpace: (nextSpace: Space | null) => void;\n source: string;\n id: string;\n selected?: boolean;\n}) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const spaceSate = useMulticastObservable(space.state);\n const disabled = spaceSate !== SpaceState.SPACE_READY;\n const spaceDisplayName = getSpaceDisplayName(space);\n const documents = useQuery(space, Filter.schema(DocumentType));\n const hasDocuments = documents.length > 0;\n\n const [open, setOpen] = useState(false);\n\n const nBoundMembers = useMemo(() => {\n return Object.keys(space.properties.members ?? {}).filter((identityHex) =>\n matchSpace(space, identityHex, source, id),\n ).length;\n }, [source, id, space.properties]);\n\n const OpenTriggerIcon = open ? CaretDown : CaretRight;\n\n return (\n <TreeItem.Root\n collapsible\n open={open}\n onOpenChange={setOpen}\n classNames={['mbe-2 block', disabled && staticDisabled]}\n {...(disabled && { 'aria-disabled': true })}\n >\n <div role='none' className='flex items-center gap-2'>\n {hasDocuments ? (\n <TreeItem.OpenTrigger>\n <OpenTriggerIcon />\n </TreeItem.OpenTrigger>\n ) : (\n <TreeItem.OpenTrigger disabled classNames={staticDisabled}>\n <CaretRight />\n </TreeItem.OpenTrigger>\n )}\n <TreeItem.Heading\n classNames='grow break-words pbs-1 text-baseText font-medium'\n data-testid='composer.spaceTreeItemHeading'\n >\n {Array.isArray(spaceDisplayName) ? t(...spaceDisplayName) : spaceDisplayName}\n </TreeItem.Heading>\n {nBoundMembers > 0 && (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Tag palette='info' aria-label={t('bound members message', { count: nBoundMembers })}>\n {nBoundMembers}\n </Tag>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>\n <Tooltip.Arrow />\n {t('bound members message', { count: nBoundMembers })}\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n )}\n <Button disabled={selected} density='fine' classNames='shrink-0' onClick={() => setSpace(space)}>\n {t(selected ? 'selected label' : 'select label')}\n </Button>\n </div>\n <TreeItem.Body className='pis-4'>\n {hasDocuments && (\n <Tree.Branch>\n {documents.map((document) => (\n <DocumentTreeItem key={document.id} document={document} />\n ))}\n </Tree.Branch>\n )}\n </TreeItem.Body>\n </TreeItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { TextAa } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { type DocumentType } from '@dxos/plugin-markdown/types';\nimport { useTranslation, TreeItem } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { GITHUB_PLUGIN } from '../../meta';\n\nexport const DocumentTreeItem = ({ document }: { document: DocumentType }) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n return (\n <TreeItem.Root classNames='flex gap-2'>\n <TreeItem.Heading classNames='contents'>\n <TextAa weight='regular' className={mx(getSize(4), 'shrink-0 mbs-2')} />\n <span className='grow mbs-2 text-sm no-leading'>\n {document.name || t('document title placeholder', { ns: 'dxos.org/plugin/markdown' })}\n </span>\n </TreeItem.Heading>\n </TreeItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useState } from 'react';\n\nimport { log } from '@dxos/log';\nimport { Button, Dialog, Input, Trans, useTranslation } from '@dxos/react-ui';\n\nimport { useOctokitContext } from './GithubApiProviders';\nimport { GITHUB_PLUGIN } from '../meta';\nimport type { ExportViewState, GhFileIdentifier, GhIdentifier } from '../types';\n\nexport const ExportDialog = ({\n type,\n target,\n docGhId,\n}: {\n type: ExportViewState;\n target: string | null;\n docGhId: GhIdentifier;\n}) => {\n // TODO(burdon): Model removed.\n const content = '';\n\n const { octokit } = useOctokitContext();\n const { t } = useTranslation(GITHUB_PLUGIN);\n const [exportViewState, setExportViewState] = useState<ExportViewState>(type);\n const [ghResponseUrl, setGhResponseUrl] = useState<string | null>(target);\n const [ghBranchValue, setGhBranchValue] = useState('');\n const [ghMessageValue, setGhMessageValue] = useState('');\n\n const exportGhFileContent = useCallback(async () => {\n if (octokit && docGhId && 'path' in docGhId && content) {\n const branchName = ghBranchValue || t('github branch name placeholder');\n const commitMessage = ghMessageValue || t('github commit message placeholder');\n setExportViewState('pending');\n try {\n const { owner, repo, path, ref } = docGhId as GhFileIdentifier;\n const { data: fileData } = await octokit.rest.repos.getContent({ owner, repo, path });\n if (Array.isArray(fileData) || fileData.type !== 'file') {\n log.error('Attempted to export to a destination in Github that is not a file.');\n return;\n }\n const { sha: fileSha } = fileData;\n const {\n data: {\n object: { sha: baseSha },\n },\n } = await octokit.rest.git.getRef({ owner, repo, ref: `heads/${ref}` });\n await octokit.rest.git.createRef({\n owner,\n repo,\n ref: `refs/heads/${branchName}`,\n sha: baseSha,\n });\n await octokit.rest.repos.createOrUpdateFileContents({\n owner,\n repo,\n path,\n message: commitMessage,\n branch: branchName,\n sha: fileSha,\n content: btoa(content),\n });\n const {\n data: { html_url: prUrl },\n } = await octokit.rest.pulls.create({\n owner,\n repo,\n head: branchName,\n base: ref,\n title: commitMessage,\n });\n setGhResponseUrl(prUrl);\n setExportViewState('response');\n } catch (err) {\n log.error('Failed to export to Github file', err);\n setExportViewState('create-pr');\n setGhResponseUrl(null);\n }\n } else {\n log.error('Not prepared to export to Github file when requested.');\n setGhResponseUrl(null);\n }\n }, [octokit, docGhId, content, ghBranchValue, ghMessageValue, t]);\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t('confirm export title')}</Dialog.Title>\n {exportViewState === 'response' ? (\n <>\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'export to github success message',\n values: { linkText: ghResponseUrl },\n components: {\n resultStyle: <span className='text-success-600 dark:text-success-300'>_</span>,\n prLink: (\n <a\n href={ghResponseUrl!}\n target='_blank'\n rel='noreferrer'\n className='text-primary-600 dark:text-primary-300 hover:text-primary-700 dark:hover:text-primary-400'\n >\n _\n </a>\n ),\n },\n }}\n />\n </p>\n <div role='none' className='flex justify-end'>\n <Dialog.Close asChild>\n <Button variant='primary' onClick={() => setExportViewState(null)}>\n {t('done label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </div>\n </>\n ) : (\n <div role='none' className='mbs-2 space-b-2'>\n <Input.Root>\n <Input.Label>{t('github branch name label')}</Input.Label>\n <Input.TextInput\n autoFocus\n classNames='font-mono'\n disabled={exportViewState === 'pending'}\n placeholder={t('github branch name placeholder')}\n value={ghBranchValue}\n onChange={({ target: { value } }) => setGhBranchValue(value)}\n />\n </Input.Root>\n <Input.Root>\n <Input.Label>{t('github commit message label')}</Input.Label>\n <Input.TextArea\n disabled={exportViewState === 'pending'}\n placeholder={t('github commit message placeholder')}\n value={ghMessageValue}\n onChange={({ target: { value } }) => setGhMessageValue(value)}\n />\n </Input.Root>\n <div role='none' className='flex justify-end gap-2'>\n <Dialog.Close asChild>\n <Button onClick={() => setExportViewState(null)}>{t('close label', { ns: 'os' })}</Button>\n </Dialog.Close>\n <Button disabled={exportViewState === 'pending'} variant='primary' onClick={() => exportGhFileContent()}>\n {t('continue label', { ns: 'os' })}\n </Button>\n </div>\n </div>\n )}\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { log } from '@dxos/log';\nimport { Button, Dialog, useTranslation } from '@dxos/react-ui';\n\nimport { useOctokitContext } from './GithubApiProviders';\nimport { GITHUB_PLUGIN } from '../meta';\nimport type { GhFileIdentifier, GhIdentifier, GhIssueIdentifier } from '../types';\n\nexport const ImportDialog = ({ docGhId, onUpdate }: { docGhId: GhIdentifier; onUpdate: (content: string) => void }) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { octokit } = useOctokitContext();\n\n const importGhIssueContent = useCallback(async () => {\n if (octokit && docGhId && 'issueNumber') {\n try {\n const { owner, repo, issueNumber } = docGhId as GhIssueIdentifier;\n const { data } = await octokit.rest.issues.get({ owner, repo, issue_number: issueNumber });\n onUpdate(data.body ?? '');\n } catch (err) {\n log.error('Failed to import from Github issue', err);\n }\n } else {\n log.error('Not prepared to import from Github issue when requested.');\n }\n }, [octokit, docGhId]);\n\n const importGhFileContent = useCallback(async () => {\n if (octokit && docGhId && 'path' in docGhId) {\n try {\n const { owner, repo, path } = docGhId as GhFileIdentifier;\n const { data } = await octokit.rest.repos.getContent({ owner, repo, path });\n if (!Array.isArray(data) && data.type === 'file') {\n onUpdate(atob(data.content));\n } else {\n log.error('Did not receive file with content from Github.');\n }\n } catch (err) {\n log.error('Failed to import from Github file', err);\n }\n } else {\n log.error('Not prepared to import from Github file when requested.');\n }\n }, [octokit, docGhId]);\n\n const handleGhImport = useCallback(() => {\n return (\n docGhId && ('issueNumber' in docGhId ? importGhIssueContent() : 'path' in docGhId ? importGhFileContent() : null)\n );\n }, [importGhIssueContent, importGhFileContent, docGhId]);\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t('confirm import title')}</Dialog.Title>\n <p className='plb-2'>{t('confirm import body')}</p>\n <div role='none' className='flex justify-end gap-2'>\n <Dialog.Close asChild>\n <Button>{t('cancel label', { ns: 'appkit' })}</Button>\n </Dialog.Close>\n <Dialog.Close asChild>\n <Button variant='primary' onClick={handleGhImport}>\n {t('import from github label')}\n </Button>\n </Dialog.Close>\n </div>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type IconWeight, IconBase, type IconProps } from '@phosphor-icons/react';\nimport React, { forwardRef, type ReactElement } from 'react';\n\n// TODO(wittjosiah): This is a workaround until we have utilities to compose icons.\n// This is a combination of the Circle and Dot icons.\n\nconst weights = new Map<IconWeight, ReactElement>([\n [\n 'bold',\n <>\n <path d='M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z' />\n <path d='M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128Z' />\n </>,\n ],\n [\n 'duotone',\n <>\n <path d='M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z' opacity='0.2' />\n <path d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z' />\n <path d='M176,128a48,48,0,1,1-48-48A48,48,0,0,1,176,128Z' opacity='0.2' />\n <path d='M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z' />\n </>,\n ],\n [\n 'fill',\n <>\n <path d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z' />\n <path d='M128,80a48,48,0,1,0,48,48A48,48,0,0,0,128,80Zm0,60a12,12,0,1,1,12-12A12,12,0,0,1,128,140Z' />\n </>,\n ],\n [\n 'light',\n <>\n <path d='M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z' />\n <path d='M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128Z' />\n </>,\n ],\n [\n 'regular',\n <>\n <path d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z' />\n <path d='M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z' />\n </>,\n ],\n [\n 'thin',\n <>\n <path d='M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z' />\n <path d='M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Z' />\n </>,\n ],\n]);\n\nconst Issue = forwardRef<SVGSVGElement, IconProps>((props, ref) => <IconBase ref={ref} {...props} weights={weights} />);\n\nIssue.displayName = 'Issue';\n\nexport { Issue };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ArrowSquareOut, FileArrowDown, FileArrowUp, Link, LinkBreak } from '@phosphor-icons/react';\nimport React, { useCallback } from 'react';\n\nimport { LayoutAction, useIntent } from '@dxos/app-framework';\nimport { log } from '@dxos/log';\nimport { type MarkdownProperties } from '@dxos/plugin-markdown';\nimport { getMeta } from '@dxos/react-client/echo';\nimport { DropdownMenu, useTranslation } from '@dxos/react-ui';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { useOctokitContext } from './GithubApiProviders';\nimport { useDocGhId } from '../hooks';\nimport { GITHUB_PLUGIN } from '../meta';\nimport { type GhIssueIdentifier } from '../types';\n\n// TODO(burdon): Requires test; very likely out of date.\n// TODO(burdon): Where do \"properties\" come from? Is this the graph node datum?\nexport const MarkdownActions = ({ content, properties }: { content: string; properties: MarkdownProperties }) => {\n // TODO(burdon): Ad hoc assumption that underlying object is ECHO?\n const ghId = getMeta(properties)?.keys?.find((key) => key.source === 'github.com')?.id;\n const { octokit } = useOctokitContext();\n const { t } = useTranslation(GITHUB_PLUGIN);\n const { dispatch } = useIntent();\n\n const docGhId = useDocGhId(properties.__meta?.keys ?? []);\n\n const updateIssueContent = useCallback(() => {\n const { owner, repo, issueNumber } = docGhId as GhIssueIdentifier;\n return octokit!.rest.issues.update({\n owner,\n repo,\n issue_number: issueNumber,\n body: content,\n });\n }, [octokit, docGhId, content]);\n\n const exportGhIssueContent = useCallback(async () => {\n if (octokit && docGhId && 'issueNumber' in docGhId && content) {\n try {\n const {\n data: { html_url: issueUrl },\n } = await updateIssueContent();\n await dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/github/ExportDialog',\n subject: { type: 'response', target: issueUrl, docGhId, content },\n },\n });\n } catch (err) {\n log.error('Failed to export to Github issue');\n }\n } else {\n log.error('Not prepared to export to Github issue when requested.');\n }\n }, [octokit, docGhId, content]);\n\n const handleGhExport = useCallback(() => {\n if ('issueNumber' in docGhId!) {\n void exportGhIssueContent();\n } else if ('path' in docGhId!) {\n void dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/github/ExportDialog',\n subject: { type: 'create-pr', content, docGhId },\n },\n });\n }\n }, [exportGhIssueContent, docGhId]);\n\n return (\n <>\n <DropdownMenu.GroupLabel>{t('markdown actions label')}</DropdownMenu.GroupLabel>\n {docGhId ? (\n <>\n <DropdownMenu.Item\n classNames='gap-2'\n disabled={!docGhId}\n onClick={() =>\n // TODO(burdon): Intent should return content value from dialog.\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: { element: 'dialog', component: 'dxos.org/plugin/github/ImportDialog', subject: { docGhId } },\n })\n }\n >\n <FileArrowDown className={getSize(4)} />\n <span className='grow'>{t('import from github label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item classNames='gap-2' disabled={!docGhId} onClick={() => docGhId && handleGhExport()}>\n <FileArrowUp className={getSize(4)} />\n <span className='grow'>{t('export to github label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item asChild classNames='gap-2' disabled={!ghId}>\n <a\n {...(ghId ? { href: `https://github.com/${ghId}`, target: '_blank', rel: 'noreferrer' } : { href: '#' })}\n >\n <ArrowSquareOut className={getSize(4)} />\n <span className='grow'>{t('open in github label')}</span>\n </a>\n </DropdownMenu.Item>\n <DropdownMenu.Item\n classNames='gap-2'\n onClick={() => {\n const index = getMeta(properties)?.keys?.findIndex((key) => key.source === 'github.com');\n typeof index !== 'undefined' && index >= 0 && properties.__meta?.keys?.splice(index, 1);\n }}\n >\n <LinkBreak className={getSize(4)} />\n <span className='grow'>{t('unbind to file in github label')}</span>\n </DropdownMenu.Item>\n </>\n ) : (\n <DropdownMenu.Item\n classNames='gap-2'\n onClick={() =>\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: { element: 'dialog', component: 'dxos.org/plugin/github/BindDialog', subject: properties },\n })\n }\n >\n <Link className={getSize(4)} />\n <span className='grow'>{t('bind to file in github label')}</span>\n </DropdownMenu.Item>\n )}\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { type MarkdownProperties } from '@dxos/plugin-markdown';\nimport { Dialog, Button, useTranslation, Input } from '@dxos/react-ui';\n\nimport { useGhIdFromUrl } from '../hooks';\nimport { GITHUB_PLUGIN } from '../meta';\n\nexport const UrlDialog = ({ properties }: { properties: MarkdownProperties }) => {\n const { t } = useTranslation(GITHUB_PLUGIN);\n const [ghUrlValue, setGhUrlValue] = useState('');\n const ghId = useGhIdFromUrl(ghUrlValue);\n\n return (\n <>\n <Dialog.Title classNames='mbe-2'>{t('bind to file in github label')}</Dialog.Title>\n <Input.Root validationValence='error'>\n <Input.Label>{t('paste url to file in github label')}</Input.Label>\n <Input.TextInput\n placeholder={t('paste url to file in github placeholder')}\n value={ghUrlValue}\n onChange={({ target: { value } }) => setGhUrlValue(value)}\n />\n <Input.DescriptionAndValidation>\n {ghUrlValue.length > 0 && !ghId && (\n <Input.Validation>{t('error github markdown path message')}</Input.Validation>\n )}\n <Input.Description>{t('paste url to file in github description')}</Input.Description>\n </Input.DescriptionAndValidation>\n </Input.Root>\n <div role='none' className='flex justify-end gap-2'>\n <Dialog.Close asChild>\n <Button\n classNames='mbs-2'\n onClick={() => {\n if (ghId && document) {\n // TODO(burdon): Meta should be immutable.\n properties.__meta.keys.push({ source: 'github.com', id: ghId });\n }\n }}\n >\n {t('done label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </div>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GITHUB_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [GITHUB_PLUGIN]: {\n 'plugin name': 'GitHub',\n 'markdown actions label': 'GitHub actions',\n 'unbind to file in github label': 'Disconnect from GitHub',\n 'bind to file in github label': 'Connect to issue or file in GitHub',\n 'github pat label': 'GitHub personal access token:',\n 'github pat description':\n 'Composer needs this in order to communicate with GitHub. <docsLink>GitHub’s documentation describes how to create a token.</docsLink> Composer only needs write access to issues, contents, and pull requests.',\n 'github pat description href':\n 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens',\n 'empty github pat message': 'Set a GitHub personal access token to continue.',\n 'set github pat label': 'Set GitHub token',\n 'error github pat message':\n 'There was a problem authenticating with GitHub using the personal access token provided.',\n 'error github markdown path message': 'This is not a valid path to a Markdown file or Issue in GitHub.',\n 'paste url to file in github label': 'Paste the URL to the Issue or Markdown file in GitHub.',\n 'paste url to file in github description':\n 'Navigate to the issue or file in GitHub, then copy the URL in your browser and paste it here.',\n 'paste url to file in github placeholder': 'https://github.com/owner/repo/blob/main/path/to/README.md',\n 'confirm export title': 'Export to GitHub',\n 'export to github success message':\n '<resultStyle>Success!</resultStyle> Your changes are now live here: <prLink>{{linkText}}</prLink>',\n 'github branch name label': 'Name of the branch to create',\n 'github branch name placeholder': 'update-readme',\n 'github commit message label': 'Commit message',\n 'github commit message placeholder': 'Updated README.md',\n 'save and close description': 'Save changes to GitHub and close the editor',\n 'close embed description':\n 'Close the editor without saving changes to GitHub. Your changes will still persist in Composer.',\n 'resolver init document message': 'Syncing this document, one moment…',\n 'comment stale title': 'No longer in-sync',\n 'comment stale body':\n 'The document in GitHub was updated in another session. To re-sync, please save your changes, reload the page, and choose to edit from GitHub again.',\n 'open in github label': 'Open in GitHub',\n 'stale rescue title': 'Set a personal access token',\n 'stale rescue description':\n 'Another user has recently updated this issue, so GitHub won’t accept your changes unless you set a personal access token (a PAT) here, or refresh the page.',\n 'embedded options label': 'Options',\n 'unset repo space label': 'Select a different space for this repository',\n 'loading preview message': 'Loading preview…',\n 'preview gfm label': 'Preview Markdown',\n 'exit gfm preview label': 'Exit preview',\n 'save and close label': 'Save & close',\n 'export to github label': 'Export to GitHub',\n 'import from github label': 'Import from GitHub',\n 'resolver tree label': 'Choose a Space',\n 'resolver tree description':\n 'To collaborate on documents in this repository, choose the Space that will store and control access to the documents.',\n 'resolver no spaces message': 'You aren’t in any spaces yet',\n 'resolver create space label': 'Create a space for this repository',\n 'bound members message_one': 'One member uses this space for this repository',\n 'bound members message_other': '{{count}} members use this space for this repository',\n 'select label': 'Select',\n 'selected label': 'Selected',\n 'open in composer label': 'Open in Composer',\n 'confirm import title': 'Overwrite this document’s content?',\n 'confirm import body':\n 'Importing will overwrite this document’s content. If you’d rather import into a new document, first create a new document and then import into it.',\n 'target blank description': 'Link opens in a new tab.',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GithubPlugin } from './GithubPlugin';\n\nexport default GithubPlugin;\n\nexport * from './GithubPlugin';\n"],
5
+ "mappings": ";;;;;;;AAIA,OAAOA,aAAW;AAElB,SAASC,qBAA4C;AACrD,SAASC,yBAAyB;AAClC,SAASC,OAAAA,YAAW;AACpB,SAASC,yBAAyB;AAClC,SAASC,uBAAkC;AAC3C,SAASC,4BAA4B;AACrC,SAASC,gBAAAA,qBAAoB;AAC7B,SAASC,oBAAoB;AAC7B,SAASC,WAAAA,UAASC,SAASC,UAAAA,eAA0B;;;ACRrD,SACEC,kBAAAA,iBACAC,aAAAA,YACAC,mBACAC,KACAC,QACAC,kBACAC,gBACK;AACP,OAAOC,WAASC,eAAAA,cAAaC,cAAAA,aAAYC,QAAQC,YAAAA,iBAAgB;AAEjE,SAASC,SAASC,iBAAiB;AACnC,SAASC,cAAcC,aAAaC,uBAAAA,4BAA2B;AAC/D,SAASC,aAAAA,kBAAiB;AAC1B,SAASC,WAAAA,gBAAe;AACxB,SACEC,QACAC,UAAAA,SACAC,aACAC,iBACAC,UAAAA,SACAC,cACAC,MACAC,QACAC,WAAAA,UACAC,mBACAC,kBAAAA,uBACK;AACP,SAASC,WAAWC,iBAAiBC,WAAAA,UAASC,MAAAA,WAAU;AACxD,SAASC,qBAAqB;;;AC/B9B,OAAO;AACP,OAAOC,eAAe;AACtB,OAAOC,UAASC,aAAAA,YAAWC,YA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GAAGH;;MAErGK,SAAS;QACPC,WAAW,CAAC,EAAE1B,MAAM2B,KAAI,MAAE;AACxB,kBAAQ3B,KAAK0B,WAAS;YACpB,KAAK,GAAGlD,aAAAA;AACN,qBAAO,gBAAA6C,QAAA,cAACO,cAAAA,IAAAA;UACZ;AAEA,kBAAQD,MAAAA;YACN,KAAK;AACH,sBAAQ3B,KAAK6B,SAAO;gBAClB,KAAK;AACH,yBAAOC,qBAAqB9B,KAAKe,UAAU,IAAI,gBAAAM,QAAA,cAACU,WAAAA;oBAAUhB,YAAYf,KAAKe;uBAAiB;;;;;;;;;;gBAU9F,KAAK;AACH,yBAAO;gBACT,KAAK;AACH,yBACE,gBAAAM,QAAA,cAACW,cAAAA;oBACCC,SAASjC,KAAKiC;oBACdC,UAAU,CAACL,YAAAA;AAETM,sBAAAA,KAAIC,KAAK,YAAYP,SAAAA;;;;;;oBACvB;;gBAGN;AACE,yBAAO;cACX;YACF,KAAK;AACH,qBAAO,OAAO7B,KAAK6B,YAAY,YAC7BC,qBAAqB9B,KAAKe,UAAU,KACpC,CAACf,KAAKe,WAAWsB,WACjB,gBAAAhB,QAAA,cAACiB,iBAAAA;gBAAgBT,SAAS7B,KAAK6B;gBAASd,YAAYf,KAAKe;mBACvD;YACN,KAAK;AACH,qBAAOf,KAAKuC,WAAW9D,aAAKmB,KAAK,gBAAAyB,QAAA,cAACmB,gBAAAA,IAAAA,IAAoB;YACxD;AACE,qBAAO;UACX;QACF;MACF;IACF;EACF;AACF;;;AoBxHA,IAAA,cAAeC;",
6
+ "names": ["React", "resolvePlugin", "LocalStorageStore", "log", "parseClientPlugin", "createExtension", "isMarkdownProperties", "DocumentType", "memoizeQuery", "getMeta", "isSpace", "Filter", "ArrowSquareOut", "CaretDown", "DotsThreeVertical", "Eye", "Option", "PencilSimpleLine", "UserPlus", "React", "useCallback", "useContext", "useRef", "useState", "Surface", "useIntent", "SPACE_PLUGIN", "SpaceAction", "getSpaceDisplayName", "useClient", "getMeta", "Avatar", "Button", "ButtonGroup", "DensityProvider", "Dialog", "DropdownMenu", "Main", "Toggle", "Tooltip", "toLocalizedString", "useTranslation", "defaultTx", "descriptionText", "getSize", "mx", "hexToFallback", "DOMPurify", "React", "useEffect", "useState", "useTranslation", "ArrowSquareOut", "React", "useEffect", "useState", "SettingsValue", "Link", "Input", "Trans", "useTranslation", "useId", "getSize", "mx", "Octokit", "React", "createContext", "useContext", "useEffect", "useState", "log", "OctokitContext", "setPat", "patError", "octokit", "useOctokitContext", "OctokitProvider", "pat", "onPatChanged", "children", "setOctokit", "setPatError", "auth", "rest", "users", "getAuthenticated", "then", "err", "warn", "Provider", "value", "ExternalLink", "children", "t", "useTranslation", "GITHUB_PLUGIN", "descriptionId", "useId", "React", "Link", "href", "target", "rel", "aria-describedby", "ArrowSquareOut", "weight", "className", "mx", "getSize", "span", "id", "ns", "GitHubSettings", "pat", "setPat", "useOctokitContext", "patValue", "setPatValue", "useState", "useEffect", "SettingsValue", "label", "description", "Trans", "i18nKey", "components", "docsLink", "Input", "TextInput", "autoFocus", "spellCheck", "classNames", "value", "onChange", "React", "useId", "mx", "sizeMap", "Map", "Loading", "size", "color", "label", "slots", "labelId", "useId", "sizeClassName", "get", "React", "div", "root", "className", "mx", "role", "aria-labelledby", "svg", "viewBox", "fill", "xmlns", "path", "d", "span", "id", "defaultOptions", "ALLOWED_TAGS", "ALLOWED_ATTR", "sanitize", "dirty", "options", "__html", "DOMPurify", "GfmPreview", "markdown", "owner", "repo", "html", "setHtml", "useState", "octokit", "useOctokitContext", "t", "useTranslation", "GITHUB_PLUGIN", "useEffect", "request", "text", "context", "then", "data", "React", "style", "div", "className", "dangerouslySetInnerHTML", "role", "p", "Loading", "label", "GitHubSettings", "useMemo", "log", "useDocGhId", "keys", "key", "find", "source", "owner", "repo", "type", "rest", "id", "split", "issueNumber", "parseInt", "ref", "pathParts", "path", "join", "err", "catch", "useMemo", "useGhIdFromUrl", "ghUrlValue", "useMemo", "url", "URL", "_", "owner", "repo", "type", "rest", "pathname", "split", "ref", "pathParts", "path", "join", "ext", "length", "issueNumberString", "e", "React", "Button", "useTranslation", "React", "useCallback", "useContext", "useClient", "useSpaces", "Button", "Dialog", "Tree", "useId", "useTranslation", "React", "createContext", "useContext", "useEffect", "useMemo", "useState", "create", "log", "DocumentType", "TextType", "useMulticastObservable", "getMeta", "SpaceState", "useQuery", "useSpaces", "useIdentity", "get", "update", "ghMatch", "space", "identityHex", "id", "ghOwner", "ghRepo", "_ghEtc", "split", "get", "properties", "includes", "matchSpace", "source", "ghBind", "update", "ghBindings", "members", "github", "repos", "bindSpace", "ghUnbind", "index", "indexOf", "result", "splice", "unbindSpace", "ghDisplayName", "ghResource", "etc", "join", "displayName", "getLocationIdentifier", "searchParams", "URLSearchParams", "window", "location", "search", "get", "source", "id", "url", "URL", "undefined", "hostname", "split", "reverse", "join", "pathname", "slice", "err", "log", "catch", "SpaceResolverContext", "createContext", "space", "setSpace", "_space", "SpaceResolverProvider", "children", "identity", "useIdentity", "identityHex", "identityKey", "toHex", "spaces", "useSpaces", "all", "nextSpace", "useState", "useMemo", "find", "matchSpace", "React", "Provider", "value", "defaultDocumentResolverContext", "document", "setDocument", "_document", "DocumentResolverContext", "DocumentResolverProviderImpl", "spaceState", "useMulticastObservable", "state", "defaultDisplayName", "displayName", "documents", "useQuery", "obj", "keys", "getMeta", "key", "useEffect", "handler", "event", "parent", "SpaceState", "SPACE_READY", "data", "type", "nextDocument", "db", "add", "create", "DocumentType", "name", "content", "TextType", "threads", "length", "addEventListener", "postMessage", "removeEventListener", "DocumentResolverProvider", "useContext", "CaretDown", "CaretRight", "React", "useMemo", "useState", "DocumentType", "getSpaceDisplayName", "useMulticastObservable", "SpaceState", "useQuery", "Filter", "Button", "Tag", "Tooltip", "Tree", "TreeItem", "useTranslation", "staticDisabled", "TextAa", "React", "useTranslation", "TreeItem", "getSize", "mx", "DocumentTreeItem", "document", "t", "useTranslation", "GITHUB_PLUGIN", "React", "TreeItem", "Root", "classNames", "Heading", "TextAa", "weight", "className", "mx", "getSize", "span", "name", "ns", "SpacePickerTreeItem", "identityHex", "space", "source", "id", "setSpace", "selected", "t", "useTranslation", "GITHUB_PLUGIN", "spaceSate", "useMulticastObservable", "state", "disabled", "SpaceState", "SPACE_READY", "spaceDisplayName", "getSpaceDisplayName", "documents", "useQuery", "Filter", "schema", "DocumentType", "hasDocuments", "length", "open", "setOpen", "useState", "nBoundMembers", "useMemo", "Object", "keys", "properties", "members", "filter", "matchSpace", "OpenTriggerIcon", "CaretDown", "CaretRight", "React", "TreeItem", "Root", "collapsible", "onOpenChange", "classNames", "staticDisabled", "div", "role", "className", "OpenTrigger", "Heading", "data-testid", "Array", "isArray", "Tooltip", "Trigger", "asChild", "Tag", "palette", "aria-label", "count", "Portal", "Content", "side", "Arrow", "Button", "density", "onClick", "Body", "Tree", "Branch", "map", "document", "DocumentTreeItem", "key", "ResolverTree", "client", "useClient", "spaces", "useSpaces", "all", "treeLabel", "useId", "t", "useTranslation", "GITHUB_PLUGIN", "space", "selectedSpace", "setSpace", "setSelectedSpace", "source", "id", "identityHex", "useContext", "SpaceResolverContext", "useCallback", "nextSpace", "unbindSpace", "bindSpace", "length", "React", "Dialog", "Title", "tabIndex", "classNames", "Description", "div", "role", "className", "Tree", "Root", "aria-label", "data-testid", "map", "SpacePickerTreeItem", "key", "toHex", "selected", "h1", "Button", "onClick", "create", "ResolverDialog", "handleJoinSpace", "handleCreateSpace", "t", "useTranslation", "GITHUB_PLUGIN", "React", "ResolverTree", "div", "role", "className", "Button", "classNames", "onClick", "ns", "overlayAttrs", "side", "sideOffset", "EmbeddedLayoutImpl", "t", "useTranslation", "GITHUB_PLUGIN", "space", "source", "id", "identityHex", "useContext", "SpaceResolverContext", "document", "DocumentResolverContext", "dispatch", "useIntent", "client", "useClient", "handleCloseEmbed", "useCallback", "window", "parent", "postMessage", "type", "handleSaveAndCloseEmbed", "content", "handleCreateSpace", "action", "SpaceAction", "CREATE", "handleJoinSpace", "JOIN", "handleInvite", "shell", "shareSpace", "spaceKey", "key", "editorViewState", "setEditorViewState", "useState", "isPreviewing", "suppressNextTooltip", "useRef", "optionsTooltipOpen", "setOptionsTooltipOpen", "optionsMenuOpen", "setOptionsMenuOpen", "renameDialogOpen", "setRenameDialogOpen", "resolverDialogOpen", "setResolverDialogOpen", "spaceFallbackValue", "hexToFallback", "toHex", "docGhId", "useDocGhId", "getMeta", "keys", "name", "getSpaceDisplayName", "React", "style", "DensityProvider", "density", "div", "role", "className", "Tooltip", "Root", "Trigger", "asChild", "Button", "disabled", "onClick", "span", "ns", "UserPlus", "getSize", "Content", "Arrow", "Toggle", "pressed", "onPressedChange", "nextPressed", "PencilSimpleLine", "Eye", "open", "onOpenChange", "nextOpen", "current", "DropdownMenu", "modal", "DotsThreeVertical", "Viewport", "Item", "a", "target", "rel", "href", "location", "origin", "ArrowSquareOut", "mx", "Separator", "GroupLabel", "SPACE_PLUGIN", "Avatar", "size", "variant", "Frame", "Fallback", "text", "emoji", "Label", "classNames", "toLocalizedString", "Option", "ButtonGroup", "CaretDown", "Portal", "p", "descriptionText", "Main", "GfmPreview", "markdown", "toString", "owner", "repo", "Surface", "data", "properties", "view", "Dialog", "defaultTx", "ResolverDialog", "Overlay", "subject", "EmbeddedMain", "SpaceResolverProvider", "DocumentResolverProvider", "React", "useCallback", "useState", "log", "Button", "Dialog", "Input", "Trans", "useTranslation", "React", "useCallback", "log", "Button", "Dialog", "useTranslation", "ImportDialog", "docGhId", "onUpdate", "t", "useTranslation", "GITHUB_PLUGIN", "octokit", "useOctokitContext", "importGhIssueContent", "useCallback", "owner", "repo", "issueNumber", "data", "rest", "issues", "get", "issue_number", "body", "err", "log", "error", "importGhFileContent", "path", "repos", "getContent", "Array", "isArray", "type", "atob", "content", "handleGhImport", "React", "Dialog", "Content", "Title", "p", "className", "div", "role", "Close", "asChild", "Button", "ns", "variant", "onClick", "IconBase", "React", "forwardRef", "weights", "Map", "React", "path", "d", "opacity", "Issue", "forwardRef", "props", "ref", "IconBase", "displayName", "ArrowSquareOut", "FileArrowDown", "FileArrowUp", "Link", "LinkBreak", "React", "useCallback", "LayoutAction", "useIntent", "log", "getMeta", "DropdownMenu", "useTranslation", "getSize", "MarkdownActions", "content", "properties", "ghId", "getMeta", "keys", "find", "key", "source", "id", "octokit", "useOctokitContext", "t", "useTranslation", "GITHUB_PLUGIN", "dispatch", "useIntent", "docGhId", "useDocGhId", "__meta", "updateIssueContent", "useCallback", "owner", "repo", "issueNumber", "rest", "issues", "update", "issue_number", "body", "exportGhIssueContent", "data", "html_url", "issueUrl", "action", "LayoutAction", "SET_LAYOUT", "element", "component", "subject", "type", "target", "err", "log", "error", "handleGhExport", "React", "DropdownMenu", "GroupLabel", "Item", "classNames", "disabled", "onClick", "FileArrowDown", "className", "getSize", "span", "FileArrowUp", "asChild", "a", "href", "rel", "ArrowSquareOut", "index", "findIndex", "splice", "LinkBreak", "Link", "React", "useState", "Dialog", "Button", "useTranslation", "Input", "UrlDialog", "properties", "t", "useTranslation", "GITHUB_PLUGIN", "ghUrlValue", "setGhUrlValue", "useState", "ghId", "useGhIdFromUrl", "React", "Dialog", "Title", "classNames", "Input", "Root", "validationValence", "Label", "TextInput", "placeholder", "value", "onChange", "target", "DescriptionAndValidation", "length", "Validation", "Description", "div", "role", "className", "Close", "asChild", "Button", "onClick", "document", "__meta", "keys", "push", "source", "id", "ns", "GITHUB_PLUGIN", "GithubPlugin", "settings", "LocalStorageStore", "GITHUB_PLUGIN", "meta", "ready", "prop", "key", "type", "string", "allowUndefined", "unload", "close", "provides", "values", "translations", "graph", "builder", "plugins", "client", "resolvePlugin", "parseClientPlugin", "createExtension", "id", "filter", "node", "isSpace", "data", "connector", "documents", "memoizeQuery", "Filter", "schema", "DocumentType", "doc", "getMeta", "keys", "find", "source", "includes", "length", "GITHUB_PLUGIN_SHORT_ID", "properties", "label", "ns", "icon", "context", "props", "React", "OctokitProvider", "pat", "onPatChanged", "surface", "component", "role", "EmbeddedMain", "content", "isMarkdownProperties", "UrlDialog", "ImportDialog", "docGhId", "onUpdate", "log", "info", "readonly", "MarkdownActions", "plugin", "GitHubSettings", "GithubPlugin"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css":{"bytes":38,"imports":[]},"packages/plugins/experimental/plugin-github/src/meta.tsx":{"bytes":2314,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx":{"bytes":5894,"imports":[{"path":"octokit","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/GitHubSettings.tsx":{"bytes":7690,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx","kind":"import-statement","original":"./OctokitProvider"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts":{"bytes":670,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/GitHubSettings.tsx","kind":"import-statement","original":"./GitHubSettings"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx","kind":"import-statement","original":"./OctokitProvider"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/Loading/Loading.tsx":{"bytes":7641,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/Loading/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/Loading/Loading.tsx","kind":"import-statement","original":"./Loading"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/GfmPreview.tsx":{"bytes":9291,"imports":[{"path":"github-markdown-css/github-markdown.css","kind":"import-statement","external":true},{"path":"dompurify","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"../GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/components/Loading/index.ts","kind":"import-statement","original":"../Loading"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/hooks/useDocGhId.ts":{"bytes":3745,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/hooks/useGhIdFromUrl.ts":{"bytes":3498,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/hooks/index.ts":{"bytes":633,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/hooks/useDocGhId.ts","kind":"import-statement","original":"./useDocGhId"},{"path":"packages/plugins/experimental/plugin-github/src/hooks/useGhIdFromUrl.ts","kind":"import-statement","original":"./useGhIdFromUrl"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts":{"bytes":9895,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.update","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx":{"bytes":15909,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts","kind":"import-statement","original":"./spaceResolvers"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx":{"bytes":3374,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx":{"bytes":12699,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx","kind":"import-statement","original":"./DocumentTreeItem"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts","kind":"import-statement","original":"./spaceResolvers"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverTree.tsx":{"bytes":9525,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx","kind":"import-statement","original":"./ResolverContext"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx","kind":"import-statement","original":"./SpacePickerTreeItem"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts","kind":"import-statement","original":"./spaceResolvers"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverDialog.tsx":{"bytes":3287,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverTree.tsx","kind":"import-statement","original":"./ResolverTree"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts":{"bytes":679,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverDialog.tsx","kind":"import-statement","original":"./ResolverDialog"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx","kind":"import-statement","original":"./ResolverContext"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/EmbeddedMain.tsx":{"bytes":39375,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css","kind":"import-statement","original":"./embedded.css"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/GfmPreview.tsx","kind":"import-statement","original":"./GfmPreview"},{"path":"packages/plugins/experimental/plugin-github/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts","kind":"import-statement","original":"../GithubEchoResolverProviders"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/index.ts":{"bytes":551,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/EmbeddedMain.tsx","kind":"import-statement","original":"./EmbeddedMain"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/ExportDialog.tsx":{"bytes":20110,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/ImportDialog.tsx":{"bytes":10693,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/Issue.tsx":{"bytes":7736,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/MarkdownActions.tsx":{"bytes":18699,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/UrlDialog.tsx":{"bytes":6702,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/index.ts":{"bytes":1276,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/index.ts","kind":"import-statement","original":"./EmbeddedMain"},{"path":"packages/plugins/experimental/plugin-github/src/components/ExportDialog.tsx","kind":"import-statement","original":"./ExportDialog"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts","kind":"import-statement","original":"./GithubEchoResolverProviders"},{"path":"packages/plugins/experimental/plugin-github/src/components/ImportDialog.tsx","kind":"import-statement","original":"./ImportDialog"},{"path":"packages/plugins/experimental/plugin-github/src/components/Issue.tsx","kind":"import-statement","original":"./Issue"},{"path":"packages/plugins/experimental/plugin-github/src/components/MarkdownActions.tsx","kind":"import-statement","original":"./MarkdownActions"},{"path":"packages/plugins/experimental/plugin-github/src/components/UrlDialog.tsx","kind":"import-statement","original":"./UrlDialog"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/translations.ts":{"bytes":12192,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx":{"bytes":18013,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-github/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-github/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/index.ts":{"bytes":795,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx","kind":"import-statement","original":"./GithubPlugin"},{"path":"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx","kind":"import-statement","original":"./GithubPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-github/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":110072},"packages/plugins/experimental/plugin-github/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-NJP5BGD2.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"github-markdown-css/github-markdown.css","kind":"import-statement","external":true},{"path":"dompurify","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"octokit","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.update","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["GithubPlugin","default"],"entryPoint":"packages/plugins/experimental/plugin-github/src/index.ts","cssBundle":"packages/plugins/experimental/plugin-github/dist/lib/browser/index.css","inputs":{"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx":{"bytesInOutput":4887},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/EmbeddedMain.tsx":{"bytesInOutput":11800},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/GfmPreview.tsx":{"bytesInOutput":2429},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/GitHubSettings.tsx":{"bytesInOutput":1961},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx":{"bytesInOutput":1477},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/Loading/Loading.tsx":{"bytesInOutput":2230},"packages/plugins/experimental/plugin-github/src/components/Loading/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/hooks/useDocGhId.ts":{"bytesInOutput":969},"packages/plugins/experimental/plugin-github/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/hooks/useGhIdFromUrl.ts":{"bytesInOutput":694},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverDialog.tsx":{"bytesInOutput":789},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverTree.tsx":{"bytesInOutput":2482},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx":{"bytesInOutput":4092},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts":{"bytesInOutput":2215},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx":{"bytesInOutput":3435},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx":{"bytesInOutput":837},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/ExportDialog.tsx":{"bytesInOutput":266},"packages/plugins/experimental/plugin-github/src/components/ImportDialog.tsx":{"bytesInOutput":3339},"packages/plugins/experimental/plugin-github/src/components/Issue.tsx":{"bytesInOutput":2881},"packages/plugins/experimental/plugin-github/src/components/MarkdownActions.tsx":{"bytesInOutput":5529},"packages/plugins/experimental/plugin-github/src/components/UrlDialog.tsx":{"bytesInOutput":1760},"packages/plugins/experimental/plugin-github/src/translations.ts":{"bytesInOutput":4324},"packages/plugins/experimental/plugin-github/src/index.ts":{"bytesInOutput":32}},"bytes":61286},"packages/plugins/experimental/plugin-github/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-github/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-NJP5BGD2.mjs","kind":"import-statement"}],"exports":["GITHUB_PLUGIN","GITHUB_PLUGIN_SHORT_ID","default"],"entryPoint":"packages/plugins/experimental/plugin-github/src/meta.tsx","inputs":{},"bytes":213},"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-NJP5BGD2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1144},"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-NJP5BGD2.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["GITHUB_PLUGIN","GITHUB_PLUGIN_SHORT_ID","meta_default"],"inputs":{"packages/plugins/experimental/plugin-github/src/meta.tsx":{"bytesInOutput":521}},"bytes":696},"packages/plugins/experimental/plugin-github/dist/lib/browser/index.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":223},"packages/plugins/experimental/plugin-github/dist/lib/browser/index.css":{"imports":[],"inputs":{"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css":{"bytesInOutput":38}},"bytes":167}}}
1
+ {"inputs":{"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css":{"bytes":38,"imports":[]},"packages/plugins/experimental/plugin-github/src/meta.ts":{"bytes":1612,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx":{"bytes":5894,"imports":[{"path":"octokit","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/GitHubSettings.tsx":{"bytes":7690,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx","kind":"import-statement","original":"./OctokitProvider"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts":{"bytes":670,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/GitHubSettings.tsx","kind":"import-statement","original":"./GitHubSettings"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx","kind":"import-statement","original":"./OctokitProvider"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/Loading/Loading.tsx":{"bytes":7641,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/Loading/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/Loading/Loading.tsx","kind":"import-statement","original":"./Loading"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/GfmPreview.tsx":{"bytes":9267,"imports":[{"path":"github-markdown-css/github-markdown.css","kind":"import-statement","external":true},{"path":"dompurify","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"../GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/components/Loading/index.ts","kind":"import-statement","original":"../Loading"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/hooks/useDocGhId.ts":{"bytes":3745,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/hooks/useGhIdFromUrl.ts":{"bytes":3498,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/hooks/index.ts":{"bytes":633,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/hooks/useDocGhId.ts","kind":"import-statement","original":"./useDocGhId"},{"path":"packages/plugins/experimental/plugin-github/src/hooks/useGhIdFromUrl.ts","kind":"import-statement","original":"./useGhIdFromUrl"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts":{"bytes":9895,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.update","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx":{"bytes":15909,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts","kind":"import-statement","original":"./spaceResolvers"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx":{"bytes":3374,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx":{"bytes":12699,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx","kind":"import-statement","original":"./DocumentTreeItem"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts","kind":"import-statement","original":"./spaceResolvers"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverTree.tsx":{"bytes":9525,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx","kind":"import-statement","original":"./ResolverContext"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx","kind":"import-statement","original":"./SpacePickerTreeItem"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts","kind":"import-statement","original":"./spaceResolvers"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverDialog.tsx":{"bytes":3287,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverTree.tsx","kind":"import-statement","original":"./ResolverTree"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts":{"bytes":679,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverDialog.tsx","kind":"import-statement","original":"./ResolverDialog"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx","kind":"import-statement","original":"./ResolverContext"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/EmbeddedMain.tsx":{"bytes":39375,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css","kind":"import-statement","original":"./embedded.css"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/GfmPreview.tsx","kind":"import-statement","original":"./GfmPreview"},{"path":"packages/plugins/experimental/plugin-github/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts","kind":"import-statement","original":"../GithubEchoResolverProviders"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/index.ts":{"bytes":551,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/EmbeddedMain.tsx","kind":"import-statement","original":"./EmbeddedMain"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/ExportDialog.tsx":{"bytes":20110,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/ImportDialog.tsx":{"bytes":10693,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/Issue.tsx":{"bytes":7736,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/MarkdownActions.tsx":{"bytes":18699,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/UrlDialog.tsx":{"bytes":6702,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/components/index.ts":{"bytes":1276,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/index.ts","kind":"import-statement","original":"./EmbeddedMain"},{"path":"packages/plugins/experimental/plugin-github/src/components/ExportDialog.tsx","kind":"import-statement","original":"./ExportDialog"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts","kind":"import-statement","original":"./GithubApiProviders"},{"path":"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts","kind":"import-statement","original":"./GithubEchoResolverProviders"},{"path":"packages/plugins/experimental/plugin-github/src/components/ImportDialog.tsx","kind":"import-statement","original":"./ImportDialog"},{"path":"packages/plugins/experimental/plugin-github/src/components/Issue.tsx","kind":"import-statement","original":"./Issue"},{"path":"packages/plugins/experimental/plugin-github/src/components/MarkdownActions.tsx","kind":"import-statement","original":"./MarkdownActions"},{"path":"packages/plugins/experimental/plugin-github/src/components/UrlDialog.tsx","kind":"import-statement","original":"./UrlDialog"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/translations.ts":{"bytes":12192,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx":{"bytes":17506,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-github/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-github/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-github/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/experimental/plugin-github/src/index.ts":{"bytes":795,"imports":[{"path":"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx","kind":"import-statement","original":"./GithubPlugin"},{"path":"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx","kind":"import-statement","original":"./GithubPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-github/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":109787},"packages/plugins/experimental/plugin-github/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-KVP4SDH2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"github-markdown-css/github-markdown.css","kind":"import-statement","external":true},{"path":"dompurify","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"octokit","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.update","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["GithubPlugin","default"],"entryPoint":"packages/plugins/experimental/plugin-github/src/index.ts","cssBundle":"packages/plugins/experimental/plugin-github/dist/lib/browser/index.css","inputs":{"packages/plugins/experimental/plugin-github/src/GithubPlugin.tsx":{"bytesInOutput":4732},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/EmbeddedMain.tsx":{"bytesInOutput":11800},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/GfmPreview.tsx":{"bytesInOutput":2425},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/GitHubSettings.tsx":{"bytesInOutput":1961},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/OctokitProvider.tsx":{"bytesInOutput":1477},"packages/plugins/experimental/plugin-github/src/components/GithubApiProviders/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/Loading/Loading.tsx":{"bytesInOutput":2230},"packages/plugins/experimental/plugin-github/src/components/Loading/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/hooks/useDocGhId.ts":{"bytesInOutput":969},"packages/plugins/experimental/plugin-github/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/hooks/useGhIdFromUrl.ts":{"bytesInOutput":694},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverDialog.tsx":{"bytesInOutput":789},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverTree.tsx":{"bytesInOutput":2482},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/ResolverContext.tsx":{"bytesInOutput":4092},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/spaceResolvers.ts":{"bytesInOutput":2215},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx":{"bytesInOutput":3435},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx":{"bytesInOutput":837},"packages/plugins/experimental/plugin-github/src/components/GithubEchoResolverProviders/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-github/src/components/ExportDialog.tsx":{"bytesInOutput":266},"packages/plugins/experimental/plugin-github/src/components/ImportDialog.tsx":{"bytesInOutput":3339},"packages/plugins/experimental/plugin-github/src/components/Issue.tsx":{"bytesInOutput":2881},"packages/plugins/experimental/plugin-github/src/components/MarkdownActions.tsx":{"bytesInOutput":5529},"packages/plugins/experimental/plugin-github/src/components/UrlDialog.tsx":{"bytesInOutput":1760},"packages/plugins/experimental/plugin-github/src/translations.ts":{"bytesInOutput":4324},"packages/plugins/experimental/plugin-github/src/index.ts":{"bytesInOutput":32}},"bytes":61127},"packages/plugins/experimental/plugin-github/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-github/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-KVP4SDH2.mjs","kind":"import-statement"}],"exports":["GITHUB_PLUGIN","GITHUB_PLUGIN_SHORT_ID","default"],"entryPoint":"packages/plugins/experimental/plugin-github/src/meta.ts","inputs":{},"bytes":213},"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-KVP4SDH2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":773},"packages/plugins/experimental/plugin-github/dist/lib/browser/chunk-KVP4SDH2.mjs":{"imports":[],"exports":["GITHUB_PLUGIN","GITHUB_PLUGIN_SHORT_ID","meta_default"],"inputs":{"packages/plugins/experimental/plugin-github/src/meta.ts":{"bytesInOutput":290}},"bytes":464},"packages/plugins/experimental/plugin-github/dist/lib/browser/index.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":223},"packages/plugins/experimental/plugin-github/dist/lib/browser/index.css":{"imports":[],"inputs":{"packages/plugins/experimental/plugin-github/src/components/EmbeddedMain/embedded.css":{"bytesInOutput":38}},"bytes":167}}}
@@ -2,7 +2,7 @@ import {
2
2
  GITHUB_PLUGIN,
3
3
  GITHUB_PLUGIN_SHORT_ID,
4
4
  meta_default
5
- } from "./chunk-NJP5BGD2.mjs";
5
+ } from "./chunk-KVP4SDH2.mjs";
6
6
  export {
7
7
  GITHUB_PLUGIN,
8
8
  GITHUB_PLUGIN_SHORT_ID,
@@ -1 +1 @@
1
- {"version":3,"file":"GithubPlugin.d.ts","sourceRoot":"","sources":["../../../src/GithubPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAa3E,OAAO,EAAqB,KAAK,oBAAoB,EAA4B,MAAM,SAAS,CAAC;AAEjG,eAAO,MAAM,YAAY,QAAO,gBAAgB,CAAC,oBAAoB,CA0GpE,CAAC"}
1
+ {"version":3,"file":"GithubPlugin.d.ts","sourceRoot":"","sources":["../../../src/GithubPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAa3E,OAAO,EAAqB,KAAK,oBAAoB,EAA4B,MAAM,SAAS,CAAC;AAEjG,eAAO,MAAM,YAAY,QAAO,gBAAgB,CAAC,oBAAoB,CAyGpE,CAAC"}
@@ -1,16 +1,12 @@
1
- import { type IconProps } from '@phosphor-icons/react';
2
- import React from 'react';
3
1
  export declare const GITHUB_PLUGIN = "dxos.org/plugin/github";
4
2
  export declare const GITHUB_PLUGIN_SHORT_ID = "github";
5
3
  declare const _default: {
6
4
  id: string;
7
- shortId?: string;
8
- name?: string;
9
- description?: string;
10
- homePage?: string;
11
- tags?: string[];
12
- iconComponent?: React.FC<IconProps>;
13
- iconSymbol?: string;
5
+ shortId: string;
6
+ name: string;
7
+ description: string;
8
+ tags: string[];
9
+ icon: string;
14
10
  };
15
11
  export default _default;
16
12
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,sBAAsB,WAAW,CAAC;;;;;;;;;;;AAE/C,wBAQG"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,sBAAsB,WAAW,CAAC;;;;;;;;;AAE/C,wBAOuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-github",
3
- "version": "0.6.11",
3
+ "version": "0.6.12-main.2d19bf1",
4
4
  "description": "DXOS Surface plugin for integrating with GitHub",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -35,19 +35,19 @@
35
35
  "lodash.get": "^4.4.2",
36
36
  "lodash.update": "^4.10.2",
37
37
  "octokit": "^2.0.14",
38
- "@dxos/app-framework": "0.6.11",
39
- "@dxos/echo-schema": "0.6.11",
40
- "@dxos/async": "0.6.11",
41
- "@dxos/local-storage": "0.6.11",
42
- "@dxos/plugin-client": "0.6.11",
43
- "@dxos/log": "0.6.11",
44
- "@dxos/plugin-graph": "0.6.11",
45
- "@dxos/plugin-markdown": "0.6.11",
46
- "@dxos/plugin-settings": "0.6.11",
47
- "@dxos/plugin-space": "0.6.11",
48
- "@dxos/react-client": "0.6.11",
49
- "@dxos/util": "0.6.11",
50
- "@dxos/react-ui-editor": "0.6.11"
38
+ "@dxos/app-framework": "0.6.12-main.2d19bf1",
39
+ "@dxos/async": "0.6.12-main.2d19bf1",
40
+ "@dxos/echo-schema": "0.6.12-main.2d19bf1",
41
+ "@dxos/local-storage": "0.6.12-main.2d19bf1",
42
+ "@dxos/log": "0.6.12-main.2d19bf1",
43
+ "@dxos/plugin-client": "0.6.12-main.2d19bf1",
44
+ "@dxos/plugin-graph": "0.6.12-main.2d19bf1",
45
+ "@dxos/plugin-markdown": "0.6.12-main.2d19bf1",
46
+ "@dxos/plugin-settings": "0.6.12-main.2d19bf1",
47
+ "@dxos/plugin-space": "0.6.12-main.2d19bf1",
48
+ "@dxos/react-client": "0.6.12-main.2d19bf1",
49
+ "@dxos/react-ui-editor": "0.6.12-main.2d19bf1",
50
+ "@dxos/util": "0.6.12-main.2d19bf1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@phosphor-icons/react": "^2.1.5",
@@ -58,17 +58,17 @@
58
58
  "@types/react-dom": "~18.2.0",
59
59
  "react": "~18.2.0",
60
60
  "react-dom": "~18.2.0",
61
- "vite": "^5.3.4",
62
- "@dxos/react-ui": "0.6.11",
63
- "@dxos/react-ui-theme": "0.6.11",
64
- "@dxos/storybook-utils": "0.6.11"
61
+ "vite": "5.4.7",
62
+ "@dxos/react-ui-theme": "0.6.12-main.2d19bf1",
63
+ "@dxos/storybook-utils": "0.6.12-main.2d19bf1",
64
+ "@dxos/react-ui": "0.6.12-main.2d19bf1"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@phosphor-icons/react": "^2.1.5",
68
- "react": "^18.0.0",
69
- "react-dom": "^18.0.0",
70
- "@dxos/react-ui-theme": "0.6.11",
71
- "@dxos/react-ui": "0.6.11"
68
+ "react": "~18.2.0",
69
+ "react-dom": "~18.2.0",
70
+ "@dxos/react-ui": "0.6.12-main.2d19bf1",
71
+ "@dxos/react-ui-theme": "0.6.12-main.2d19bf1"
72
72
  },
73
73
  "publishConfig": {
74
74
  "access": "public"
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { GithubLogo, type IconProps } from '@phosphor-icons/react';
6
5
  import React from 'react';
7
6
 
8
7
  import { resolvePlugin, type PluginDefinition } from '@dxos/app-framework';
@@ -60,8 +59,7 @@ export const GithubPlugin = (): PluginDefinition<GithubPluginProvides> => {
60
59
  type: GITHUB_PLUGIN,
61
60
  properties: {
62
61
  label: ['plugin name', { ns: GITHUB_PLUGIN }],
63
- icon: (props: IconProps) => <GithubLogo {...props} />,
64
- iconSymbol: 'ph--github-logo--regular',
62
+ icon: 'ph--github-logo--regular',
65
63
  },
66
64
  // TODO(wittjosiah): Add documents.
67
65
  // nodes: documents.map((doc) => ({}),
@@ -96,7 +96,7 @@ export const GfmPreview = ({ markdown, owner, repo }: GfmPreviewProps) => {
96
96
  return html ? (
97
97
  <>
98
98
  <style>{'.markdown-body ol, .markdown-body ul {list-style-type: disc; list-style-position: outside;}'}</style>
99
- <article
99
+ <div
100
100
  className='markdown-body grow is-full max-is-[980px] mli-auto p-[15px] sm:pli-[45px] sm:plb-[30px]'
101
101
  dangerouslySetInnerHTML={sanitize(html, {})}
102
102
  />
package/src/meta.ts ADDED
@@ -0,0 +1,17 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { type PluginMeta } from '@dxos/app-framework';
6
+
7
+ export const GITHUB_PLUGIN = 'dxos.org/plugin/github';
8
+ export const GITHUB_PLUGIN_SHORT_ID = 'github';
9
+
10
+ export default {
11
+ id: GITHUB_PLUGIN,
12
+ shortId: GITHUB_PLUGIN_SHORT_ID,
13
+ name: 'GitHub',
14
+ description: 'GitHub integration.',
15
+ tags: ['experimental'],
16
+ icon: 'ph--github-logo--regular',
17
+ } satisfies PluginMeta;
@@ -1,24 +0,0 @@
1
- // packages/plugins/experimental/plugin-github/src/meta.tsx
2
- import { GithubLogo } from "@phosphor-icons/react";
3
- import React from "react";
4
- import { pluginMeta } from "@dxos/app-framework";
5
- var GITHUB_PLUGIN = "dxos.org/plugin/github";
6
- var GITHUB_PLUGIN_SHORT_ID = "github";
7
- var meta_default = pluginMeta({
8
- id: GITHUB_PLUGIN,
9
- shortId: GITHUB_PLUGIN_SHORT_ID,
10
- name: "GitHub",
11
- description: "GitHub integration.",
12
- tags: [
13
- "experimental"
14
- ],
15
- iconComponent: (props) => /* @__PURE__ */ React.createElement(GithubLogo, props),
16
- iconSymbol: "ph--github-logo--regular"
17
- });
18
-
19
- export {
20
- GITHUB_PLUGIN,
21
- GITHUB_PLUGIN_SHORT_ID,
22
- meta_default
23
- };
24
- //# sourceMappingURL=chunk-NJP5BGD2.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { GithubLogo, type IconProps } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { pluginMeta } from '@dxos/app-framework';\n\nexport const GITHUB_PLUGIN = 'dxos.org/plugin/github';\nexport const GITHUB_PLUGIN_SHORT_ID = 'github';\n\nexport default pluginMeta({\n id: GITHUB_PLUGIN,\n shortId: GITHUB_PLUGIN_SHORT_ID,\n name: 'GitHub',\n description: 'GitHub integration.',\n tags: ['experimental'],\n iconComponent: (props: IconProps) => <GithubLogo {...props} />,\n iconSymbol: 'ph--github-logo--regular',\n});\n"],
5
- "mappings": ";AAIA,SAASA,kBAAkC;AAC3C,OAAOC,WAAW;AAElB,SAASC,kBAAkB;AAEpB,IAAMC,gBAAgB;AACtB,IAAMC,yBAAyB;AAEtC,IAAA,eAAeC,WAAW;EACxBC,IAAIH;EACJI,SAASH;EACTI,MAAM;EACNC,aAAa;EACbC,MAAM;IAAC;;EACPC,eAAe,CAACC,UAAqB,sBAAA,cAACC,YAAeD,KAAAA;EACrDE,YAAY;AACd,CAAA;",
6
- "names": ["GithubLogo", "React", "pluginMeta", "GITHUB_PLUGIN", "GITHUB_PLUGIN_SHORT_ID", "pluginMeta", "id", "shortId", "name", "description", "tags", "iconComponent", "props", "GithubLogo", "iconSymbol"]
7
- }
package/src/meta.tsx DELETED
@@ -1,21 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { GithubLogo, type IconProps } from '@phosphor-icons/react';
6
- import React from 'react';
7
-
8
- import { pluginMeta } from '@dxos/app-framework';
9
-
10
- export const GITHUB_PLUGIN = 'dxos.org/plugin/github';
11
- export const GITHUB_PLUGIN_SHORT_ID = 'github';
12
-
13
- export default pluginMeta({
14
- id: GITHUB_PLUGIN,
15
- shortId: GITHUB_PLUGIN_SHORT_ID,
16
- name: 'GitHub',
17
- description: 'GitHub integration.',
18
- tags: ['experimental'],
19
- iconComponent: (props: IconProps) => <GithubLogo {...props} />,
20
- iconSymbol: 'ph--github-logo--regular',
21
- });