social components inlay.at
atproto components sdui
86
fork

Configure Feed

Select the types of activity you want to include in your feed.

flatten folder structure

+165 -190
+2 -7
app/auth-chip-client.tsx
··· 2 2 3 3 import { usePathname } from "next/navigation"; 4 4 import { logout } from "@/auth/actions"; 5 - import { PrimaryButton } from "./sandbox/ui/primary-button"; 6 - import { 7 - Dropdown, 8 - DropdownItem, 9 - DropdownLabel, 10 - DropdownSep, 11 - } from "./ui/dropdown"; 5 + import { PrimaryButton } from "@/app/primary-button"; 6 + import { Dropdown, DropdownItem, DropdownLabel, DropdownSep } from "./dropdown"; 12 7 import s from "./auth-chip.module.css"; 13 8 14 9 export function AuthChipClient({
+1 -1
app/canvas/at/[did]/[collection]/[rkey]/canvas-actions.tsx
··· 3 3 import { after } from "next/server"; 4 4 import { TID } from "@atproto/common"; 5 5 import { getCurrentDid, getSessionAgent } from "@/auth"; 6 - import { renderNode, renderOptions } from "@/app/sandbox/render/render"; 6 + import { renderNode, renderOptions } from "@/app/(render)/render"; 7 7 import { render as resolveInlay, type RenderOptions } from "@inlay/render"; 8 8 import { 9 9 resolveView,
+1 -1
app/canvas/at/[did]/[collection]/[rkey]/canvas-context.tsx
··· 1 - import { createContext, renderOptions } from "@/app/sandbox/render/render"; 1 + import { createContext, renderOptions } from "@/app/(render)/render"; 2 2 import type { RenderOptions } from "@inlay/render"; 3 3 import { CardSlot } from "./card-slot"; 4 4 import { deepResolveBindings } from "./resolve-bindings";
+4 -7
app/canvas/at/[did]/[collection]/[rkey]/canvas-shell.tsx
··· 15 15 } from "react"; 16 16 import { usePathname, useSearchParams } from "next/navigation"; 17 17 import Link from "@/app/link"; 18 - import { Dropdown } from "@/app/ui/dropdown"; 18 + import { Dropdown } from "@/app/dropdown"; 19 19 import { 20 20 saveCanvasAction, 21 21 addWindowAction, ··· 23 23 type ComponentSchema, 24 24 type PropSchema, 25 25 } from "./canvas-actions"; 26 - import { 27 - NavigationProvider, 28 - DragUriProvider, 29 - } from "@/app/sandbox/render/client"; 26 + import { NavigationProvider, DragUriProvider } from "@/app/(render)/client"; 30 27 import { XrayProvider, SpawnProvider, type SpawnPayload } from "./card-slot"; 31 28 import { useDrag } from "./drag-state"; 32 29 import { TID } from "@atproto/common-web"; 33 - import { useReorder } from "@/app/sandbox/editor/use-reorder"; 30 + import { useReorder } from "./use-reorder"; 34 31 import { 35 32 COLORS, 36 33 SPACING, ··· 40 37 FONT, 41 38 } from "@/app/canvas/styles"; 42 39 import { NodeTreeView } from "./node-tree-view"; 43 - import { PreviewCard, ErrorBox } from "@/app/sandbox/ui/preview"; 40 + import { PreviewCard, ErrorBox } from "@/app/preview"; 44 41 import type { inlay } from "@/generated/at"; 45 42 import { parseAtUri } from "@/data/uri"; 46 43 import chrome from "./canvas-chrome.module.css";
+2 -2
app/canvas/at/[did]/[collection]/[rkey]/page.tsx
··· 2 2 import { redirect } from "next/navigation"; 3 3 import { getCurrentDid } from "@/auth"; 4 4 import { TID } from "@atproto/common"; 5 - import { renderNode, renderOptions } from "@/app/sandbox/render/render"; 5 + import { renderNode, renderOptions } from "@/app/(render)/render"; 6 6 import { render as resolveInlay, type RenderOptions } from "@inlay/render"; 7 7 8 8 import { ··· 25 25 import { deepResolveBindings } from "./resolve-bindings"; 26 26 import { viewRecord as viewRecordSchema } from "@/generated/at/inlay/component.defs"; 27 27 import type { inlay } from "@/generated/at"; 28 - import "@/app/sandbox/render/client"; 28 + import "@/app/(render)/client"; 29 29 30 30 type CanvasRecord = inlay.canvas.Main; 31 31 type CanvasWindow = inlay.canvas.Window;
+4 -7
app/edit/at/[did]/[collection]/[rkey]/page.tsx
··· 1 1 import { resolveHandleToDid } from "@/data"; 2 2 import { redirect } from "next/navigation"; 3 3 import { fetchComponentByUri } from "@/data/queries"; 4 - import { 5 - prepareEditorData, 6 - findSourceRecord, 7 - } from "@/app/sandbox/editor/editor-data"; 4 + import { prepareEditorData, findSourceRecord } from "@/app/edit/editor-data"; 8 5 import { parseAtUri } from "@/data/uri"; 9 - import { SandboxClient } from "@/app/sandbox/editor/sandbox-client"; 10 - import { BrowseProvider } from "@/app/sandbox/render/client"; 11 - import "@/app/sandbox/render/client"; 6 + import { SandboxClient } from "@/app/edit/sandbox-client"; 7 + import { BrowseProvider } from "@/app/(render)/client"; 8 + import "@/app/(render)/client"; 12 9 13 10 export default async function EditPage({ 14 11 params,
+2 -2
app/embed/page.tsx
··· 1 1 import { createElement } from "react"; 2 - import { renderNode, toHostContext } from "@/app/sandbox/render/render"; 2 + import { renderNode, toHostContext } from "@/app/(render)/render"; 3 3 import { $, deserializeTree } from "@inlay/core"; 4 4 import { EmbedResize } from "./resize"; 5 - import { BrowseProvider } from "@/app/sandbox/render/client"; 5 + import { BrowseProvider } from "@/app/(render)/client"; 6 6 import type { RenderContext } from "@inlay/render"; 7 7 import type { DidString } from "@atproto/syntax"; 8 8
+34
app/list/actions.ts
··· 1 + "use server"; 2 + 3 + import { resolveDidToService, resolveHandleToDid } from "@/data/resolve"; 4 + 5 + export async function resolveHandleForNav( 6 + handle: string 7 + ): Promise<{ did: string; collection: string; rkey: string } | null> { 8 + const did = handle.startsWith("did:") 9 + ? handle 10 + : await resolveHandleToDid(handle); 11 + if (!did) return null; 12 + const pds = await resolveDidToService(did); 13 + const descRes = await fetch( 14 + `${pds}/xrpc/com.atproto.repo.describeRepo?repo=${encodeURIComponent(did)}` 15 + ); 16 + const { collections } = await descRes.json(); 17 + const collection = collections?.[0]; 18 + if (!collection) return null; 19 + return resolveFirstRkey(did, pds, collection); 20 + } 21 + 22 + export async function resolveFirstRkey( 23 + did: string, 24 + pds: string, 25 + collection: string 26 + ): Promise<{ did: string; collection: string; rkey: string } | null> { 27 + const listRes = await fetch( 28 + `${pds}/xrpc/com.atproto.repo.listRecords?repo=${encodeURIComponent(did)}&collection=${encodeURIComponent(collection)}&limit=1` 29 + ); 30 + const { records } = await listRes.json(); 31 + const rkey = records?.[0]?.uri.split("/").pop(); 32 + if (!rkey) return null; 33 + return { did, collection, rkey }; 34 + }
+1 -1
app/list/at/[did]/[collection]/[rkey]/layout.tsx
··· 1 - import "@/app/sandbox/render/client"; 1 + import "@/app/(render)/client"; 2 2 3 3 export default function RecordLayout({ 4 4 children,
+1 -1
app/list/at/[did]/[collection]/[rkey]/page.tsx
··· 1 1 import { resolveHandleToDid } from "@/data"; 2 - import { BrowsePreview } from "@/app/sandbox/browse/browse"; 2 + import { BrowsePreview } from "@/app/list/browse"; 3 3 import { redirect } from "next/navigation"; 4 4 import { getCurrentDid } from "@/auth"; 5 5
+2 -2
app/list/at/[did]/[collection]/layout.tsx
··· 1 - import { BrowseShell } from "@/app/sandbox/browse/browse-shell"; 1 + import { BrowseShell } from "@/app/list/browse-shell"; 2 2 import { 3 3 listComponentsByCollection, 4 4 listFamiliesForCollection, 5 5 } from "@/data/queries"; 6 6 import { resolveDidToHandle } from "@/data/resolve"; 7 7 import { getCurrentDid } from "@/auth"; 8 - import type { BrowseComponentCard } from "@/app/sandbox/browse/browse"; 8 + import type { BrowseComponentCard } from "@/app/list/browse"; 9 9 10 10 export default async function CollectionLayout({ 11 11 children,
+1 -1
app/list/at/[did]/[collection]/page.tsx
··· 1 - import { resolveFirstRkey } from "@/app/sandbox/actions"; 1 + import { resolveFirstRkey } from "@/app/list/actions"; 2 2 import { resolveHandleToDid } from "@/data"; 3 3 import { resolveDidToService } from "@/data/resolve"; 4 4 import { redirect } from "next/navigation";
+2 -2
app/login/login-form.tsx
··· 2 2 3 3 import { useFormStatus } from "react-dom"; 4 4 import { login } from "@/auth/actions"; 5 - import inputStyles from "@/app/sandbox/ui/text-input.module.css"; 6 - import buttonStyles from "@/app/sandbox/ui/primary-button.module.css"; 5 + import inputStyles from "@/app/text-input.module.css"; 6 + import buttonStyles from "@/app/primary-button.module.css"; 7 7 8 8 function FormFields({ returnUrl }: { returnUrl: string }) { 9 9 const { pending } = useFormStatus();
app/sandbox/accepts.ts data/accepts.ts
+7 -49
app/sandbox/actions.tsx app/edit/actions.tsx
··· 2 2 3 3 import type { ReactNode } from "react"; 4 4 import { updateTag } from "next/cache"; 5 - import { renderNode, createContext } from "./render/render"; 5 + import { renderNode, createContext } from "@/app/(render)/render"; 6 6 import type { ComponentRecord } from "@/data/types"; 7 7 import { $, deserializeTree } from "@inlay/core"; 8 8 import { fetchComponentByUri } from "@/data/queries"; 9 - import { 10 - resolveDidToService, 11 - resolveDidToHandle, 12 - resolveHandleToDid, 13 - } from "@/data/resolve"; 9 + import { resolveDidToHandle } from "@/data/resolve"; 14 10 import { parseLexiconDoc } from "@atproto/lexicon"; 15 11 import { getCurrentDid } from "@/auth"; 16 12 import { parseAtUri } from "@/data/uri"; 17 13 import { callComponent } from "@/data/xrpc"; 18 - import { nodeToJsx } from "./render/node-to-jsx"; 14 + import { nodeToJsx } from "@/app/(render)/node-to-jsx"; 19 15 import { resolveNamespaceOwner, resolveLexicon } from "@/data/lexicon"; 20 16 import { getSessionAgent, getServiceJwt } from "@/auth"; 17 + import type { LexiconPropSchema, LexiconDoc } from "./lexicons"; 21 18 22 19 export type NamespaceCheck = "owned" | "other" | "unclaimed"; 23 20 ··· 131 128 } 132 129 133 130 // ============================================================================= 134 - // Navigation helpers 135 - // ============================================================================= 136 - 137 - export async function resolveHandleForNav( 138 - handle: string 139 - ): Promise<{ did: string; collection: string; rkey: string } | null> { 140 - const did = handle.startsWith("did:") 141 - ? handle 142 - : await resolveHandleToDid(handle); 143 - if (!did) return null; 144 - const pds = await resolveDidToService(did); 145 - const descRes = await fetch( 146 - `${pds}/xrpc/com.atproto.repo.describeRepo?repo=${encodeURIComponent(did)}` 147 - ); 148 - const { collections } = await descRes.json(); 149 - const collection = collections?.[0]; 150 - if (!collection) return null; 151 - return resolveFirstRkey(did, pds, collection); 152 - } 153 - 154 - export async function resolveFirstRkey( 155 - did: string, 156 - pds: string, 157 - collection: string 158 - ): Promise<{ did: string; collection: string; rkey: string } | null> { 159 - const listRes = await fetch( 160 - `${pds}/xrpc/com.atproto.repo.listRecords?repo=${encodeURIComponent(did)}&collection=${encodeURIComponent(collection)}&limit=1` 161 - ); 162 - const { records } = await listRes.json(); 163 - const rkey = records?.[0]?.uri.split("/").pop(); 164 - if (!rkey) return null; 165 - return { did, collection, rkey }; 166 - } 167 - 168 - // ============================================================================= 169 - // Record scope 170 - // ============================================================================= 171 - 172 - // ============================================================================= 173 131 // Rendering 174 132 // ============================================================================= 175 133 ··· 177 135 rendered: ReactNode; 178 136 resolvedProps: Record<string, unknown>; 179 137 lexiconDoc: Record<string, unknown> | null; 180 - lexiconProperties?: Record<string, import("./lexicons").LexiconPropSchema>; 138 + lexiconProperties?: Record<string, LexiconPropSchema>; 181 139 lexiconRequired?: string[]; 182 140 namespaceCheck?: NamespaceCheck; 183 141 namespaceOwner?: string | null; ··· 266 224 fetched: unknown, 267 225 view: ComponentRecord["view"] | undefined 268 226 ): { 269 - properties: Record<string, import("./lexicons").LexiconPropSchema>; 227 + properties: Record<string, LexiconPropSchema>; 270 228 required: string[]; 271 229 } { 272 230 if (fetched && typeof fetched === "object") { 273 - const doc = fetched as import("./lexicons").LexiconDoc; 231 + const doc = fetched as LexiconDoc; 274 232 const schema = doc.defs?.main?.input?.schema; 275 233 return { 276 234 properties: schema?.properties ?? {},
app/sandbox/browse/browse-shell.module.css app/list/browse-shell.module.css
+8 -8
app/sandbox/browse/browse-shell.tsx app/list/browse-shell.tsx
··· 3 3 import { useState, type ReactNode } from "react"; 4 4 import Link from "@/app/link"; 5 5 import { useSearchParams, usePathname } from "next/navigation"; 6 - import { useNav, useRecordParams } from "../../nav"; 6 + import { useNav, useRecordParams } from "@/app/nav"; 7 7 import { parseAtUri } from "@/data/uri"; 8 8 import type { FamilyInfo } from "@/data/queries"; 9 9 import type { BrowseComponentCard } from "./browse"; 10 - import { BrowseProvider } from "../render/client"; 10 + import { BrowseProvider } from "@/app/(render)/client"; 11 11 import s from "./browse-shell.module.css"; 12 12 import { 13 13 PreviewCard, 14 14 PreviewToolbar, 15 15 ExternalLinkIcon, 16 16 NavArrow, 17 - } from "../ui/preview"; 18 - import { PrimaryButton } from "../ui/primary-button"; 19 - import { BrowsePill } from "../ui/browse-pill"; 20 - import { BrowseCard } from "../ui/browse-card"; 21 - import { EmbedButton } from "../ui/embed-button"; 22 - import { DotGrid } from "../ui/dot-grid"; 17 + } from "@/app/preview"; 18 + import { PrimaryButton } from "@/app/primary-button"; 19 + import { BrowsePill } from "./browse-pill"; 20 + import { BrowseCard } from "./browse-card"; 21 + import { EmbedButton } from "./embed-button"; 22 + import { DotGrid } from "@/app/dot-grid"; 23 23 24 24 export function BrowseShell({ 25 25 families,
+1 -1
app/sandbox/browse/browse.tsx app/list/browse.tsx
··· 1 1 import type { ReactNode } from "react"; 2 - import { renderNode, createContext } from "../render/render"; 2 + import { renderNode, createContext } from "@/app/(render)/render"; 3 3 import { $ } from "@inlay/core"; 4 4 import { resolveView } from "@/data/queries"; 5 5 import type { ComponentRecord } from "@/data/types";
+9 -9
app/sandbox/editor/editor-data.ts app/edit/editor-data.ts
··· 11 11 } from "@/data/queries"; 12 12 import { resolveLexicon } from "@/data/lexicon"; 13 13 import { resolveDidToService } from "@/data/resolve"; 14 - import { fetchRecordCached } from "../render/record-cache"; 15 - import { renderNodeAction, type InspectResult } from "../actions"; 14 + import { fetchRecordCached } from "@/app/(render)/record-cache"; 15 + import { renderNodeAction, type InspectResult } from "./actions"; 16 16 import type { ComponentRecord } from "@/data/types"; 17 - import type { RenderResult } from "../actions"; 17 + import type { RenderResult } from "./actions"; 18 18 import { parseAtUri } from "@/data/uri"; 19 19 import { ensureValidNsid, isValidNsid } from "@atproto/syntax"; 20 20 import { viewRecord as viewRecordSchema } from "@/generated/at/inlay/component.defs"; 21 - import { generateScaffold } from "../render/scaffold"; 22 - import { nodeToJsx } from "../render/node-to-jsx"; 21 + import { generateScaffold } from "@/app/(render)/scaffold"; 22 + import { nodeToJsx } from "@/app/(render)/node-to-jsx"; 23 23 import { serializeTree, deserializeTree, $ } from "@inlay/core"; 24 24 import { deriveView, HOST_DID } from "./sandbox-transform"; 25 - import { builtins } from "../render/builtins"; 26 - import type { ToolboxPack, ExportMeta } from "../sandbox-types"; 27 - import type { LexiconDoc } from "../lexicons"; 25 + import { builtins } from "@/app/(render)/builtins"; 26 + import type { ToolboxPack, ExportMeta } from "./sandbox-types"; 27 + import type { LexiconDoc } from "./lexicons"; 28 28 import type { FamilyInfo } from "@/data/queries"; 29 29 30 30 // Well-known DID for core component author ··· 430 430 // Pre-compute inspect result for external components 431 431 let initialInspectResult: InspectResult | null = null; 432 432 if (isExternalComponent && editingComponentUri && sourceUri) { 433 - const { inspectExternalCallAction } = await import("../actions"); 433 + const { inspectExternalCallAction } = await import("./actions"); 434 434 initialInspectResult = await inspectExternalCallAction({ 435 435 componentUri: editingComponentUri, 436 436 recordUri: sourceUri,
+4 -4
app/sandbox/editor/editor.tsx app/edit/editor.tsx
··· 31 31 } from "@codemirror/autocomplete"; 32 32 import { defaultKeymap } from "@codemirror/commands"; 33 33 import { insertNewlineAndIndent } from "@codemirror/commands"; 34 - import type { LexiconDoc, ComponentPropInfo, FlatEntry } from "../lexicons"; 35 - import { resolveComponentInfo } from "../lexicons"; 36 - import type { AcceptsEntry } from "../accepts"; 34 + import type { LexiconDoc, ComponentPropInfo, FlatEntry } from "./lexicons"; 35 + import { resolveComponentInfo } from "./lexicons"; 36 + import type { AcceptsEntry } from "@/data/accepts"; 37 37 import { 38 38 inferDataType, 39 39 formatCompatible, 40 40 matchesAccepts, 41 41 deriveUriAccepts, 42 - } from "../accepts"; 42 + } from "@/data/accepts"; 43 43 import { generateSnippet } from "./snippets"; 44 44 45 45 const highlightStyle = HighlightStyle.define([
+6 -6
app/sandbox/editor/lexicon-modal.tsx app/edit/lexicon-modal.tsx
··· 2 2 3 3 import { useState, useCallback, useActionState, startTransition } from "react"; 4 4 import { parseLexiconDoc } from "@atproto/lexicon"; 5 - import { buildEffectiveLexicon } from "../effective-lexicon"; 6 - import type { LexiconPropSchema } from "../lexicons"; 5 + import { buildEffectiveLexicon } from "./effective-lexicon"; 6 + import type { LexiconPropSchema } from "./lexicons"; 7 7 import { Editor } from "./editor"; 8 8 import { 9 9 saveLexiconAction, 10 10 deleteLexiconAction, 11 11 recheckNamespaceAction, 12 - } from "../actions"; 13 - import { GhostButton } from "../ui/ghost-button"; 14 - import { PrimaryButton } from "../ui/primary-button"; 12 + } from "./actions"; 13 + import { GhostButton } from "@/app/ghost-button"; 14 + import { PrimaryButton } from "@/app/primary-button"; 15 15 import { 16 16 Modal, 17 17 ModalRow, ··· 25 25 DnsBlock, 26 26 DnsLabel, 27 27 DnsValue, 28 - } from "../ui/modal"; 28 + } from "./modal"; 29 29 30 30 function buildLexiconDoc( 31 31 nsid: string,
+2 -2
app/sandbox/editor/pack-maps.ts app/edit/pack-maps.ts
··· 1 - import type { ToolboxPack } from "../sandbox-types"; 2 - import type { AcceptsEntry } from "../accepts"; 1 + import type { ToolboxPack } from "./sandbox-types"; 2 + import type { AcceptsEntry } from "@/data/accepts"; 3 3 import { HOST_DID } from "./sandbox-transform"; 4 4 5 5 /**
app/sandbox/editor/publish-dialog.tsx app/edit/publish-dialog.tsx
+2 -2
app/sandbox/editor/publish.ts app/edit/publish.ts
··· 1 - // app/sandbox/publish.ts 1 + // app/edit/(editor)/publish.ts 2 2 "use server"; 3 3 4 4 import { ensureValidNsid, ensureValidAtUri } from "@atproto/syntax"; 5 5 import { after } from "next/server"; 6 6 import { refresh } from "next/cache"; 7 7 import { getCurrentDid, getSessionAgent } from "@/auth"; 8 - import { deployToValTown } from "../valtown"; 8 + import { deployToValTown } from "./valtown"; 9 9 import { fetchComponentByUri } from "@/data/queries"; 10 10 import { 11 11 upsertComponent,
+17 -21
app/sandbox/editor/sandbox-client.tsx app/edit/sandbox-client.tsx
··· 13 13 useRef, 14 14 } from "react"; 15 15 import { flushSync } from "react-dom"; 16 - import { inspectExternalCallAction, type InspectResult } from "../actions"; 16 + import { inspectExternalCallAction, type InspectResult } from "./actions"; 17 17 import { Editor, type EditorMode, type EditorHandle } from "./editor"; 18 18 import { serializeTree, $ } from "@inlay/core"; 19 - import { useReorder } from "./use-reorder"; 19 + import { useReorder } from "@/app/canvas/at/[did]/[collection]/[rkey]/use-reorder"; 20 20 21 21 import type { FamilyInfo } from "@/data/queries"; 22 22 import type { ComponentRecord } from "@/data/types"; 23 - import type { ToolboxPack } from "../sandbox-types"; 24 - import { ModeToggle } from "../ui/mode-toggle"; 25 - import { SandboxTopBar } from "../ui/top-bar"; 26 - import { 27 - ViewSection, 28 - PropsSection, 29 - RecordSection, 30 - } from "../ui/sidebar-sections"; 31 - import { FilterInput, UnresolvedBar, PackPalette } from "../ui/palette"; 32 - import { PreviewPane } from "../ui/preview"; 33 - import { ExternalComponentInspector } from "../ui/external-inspector"; 34 - import { SettingsModal } from "../ui/settings-modal"; 23 + import type { ToolboxPack } from "./sandbox-types"; 24 + import { ModeToggle } from "./mode-toggle"; 25 + import { SandboxTopBar } from "./top-bar"; 26 + import { ViewSection, PropsSection, RecordSection } from "./sidebar-sections"; 27 + import { FilterInput, UnresolvedBar, PackPalette } from "./palette"; 28 + import { PreviewPane } from "@/app/preview"; 29 + import { ExternalComponentInspector } from "./external-inspector"; 30 + import { SettingsModal } from "./settings-modal"; 35 31 import { LexiconModal } from "./lexicon-modal"; 36 32 import { SaveDialog } from "./save-dialog"; 37 33 import { deleteComponentAction, ejectComponentAction } from "./publish"; 38 34 import { updateComponentAction } from "./save-component"; 39 35 import { generateValCode } from "./publish-dialog"; 40 - import { inferDataType, type InferredType } from "../accepts"; 36 + import { inferDataType, type InferredType } from "@/data/accepts"; 41 37 import { buildInsertResult, placeSnippet } from "./snippets"; 42 38 import { useRouter, useSearchParams } from "next/navigation"; 43 39 import { useNavigationBlocker } from "@/app/link"; 44 - import type { LexiconDoc } from "../lexicons"; 40 + import type { LexiconDoc } from "./lexicons"; 45 41 import { parseAtUri } from "@/data/uri"; 46 - import { generateScaffold } from "../render/scaffold"; 42 + import { generateScaffold } from "@/app/(render)/scaffold"; 47 43 // PropsModal removed — props are edited via call expression editor 48 - import type { RenderResult } from "../actions"; 49 - import { nodeToJsx } from "../render/node-to-jsx"; 44 + import type { RenderResult } from "./actions"; 45 + import { nodeToJsx } from "@/app/(render)/node-to-jsx"; 50 46 import { useSourceRecord } from "./use-source-record"; 51 47 import { 52 48 HOST_DID, ··· 66 62 deriveImportStack, 67 63 resolveInsertImports, 68 64 } from "./pack-maps"; 69 - import { ErrorBox } from "../ui/preview"; 70 - import { EditorLayout } from "../ui/editor-layout"; 65 + import { ErrorBox } from "@/app/preview"; 66 + import { EditorLayout } from "./editor-layout"; 71 67 72 68 /** Build a resolved RenderResult whose `rendered` shows an error in the preview. */ 73 69 function errorResult(
+3 -3
app/sandbox/editor/sandbox-transform.ts app/edit/sandbox-transform.ts
··· 1 - import { renderNodeAction } from "../actions"; 1 + import { renderNodeAction } from "./actions"; 2 2 import * as Babel from "@babel/standalone"; 3 3 import * as jsxRuntime from "@inlay/core/jsx-runtime"; 4 4 import { $, serializeTree, deserializeTree } from "@inlay/core"; 5 - import { nodeToJsx } from "../render/node-to-jsx"; 5 + import { nodeToJsx } from "@/app/(render)/node-to-jsx"; 6 6 import type { ComponentRecord } from "@/data/types"; 7 - import type { FlatEntry } from "../lexicons"; 7 + import type { FlatEntry } from "./lexicons"; 8 8 import { parseAtUri } from "@/data/uri"; 9 9 import { ensureValidNsid, type DidString } from "@atproto/syntax"; 10 10
+1 -1
app/sandbox/editor/save-component.ts app/edit/save-component.ts
··· 1 - // app/sandbox/save-component.ts 1 + // app/edit/(editor)/save-component.ts 2 2 "use server"; 3 3 4 4 import { ensureValidNsid, ensureValidAtUri } from "@atproto/syntax";
app/sandbox/editor/save-dialog.module.css app/edit/save-dialog.module.css
+6 -6
app/sandbox/editor/save-dialog.tsx app/edit/save-dialog.tsx
··· 1 - // app/sandbox/save-dialog.tsx 1 + // app/edit/(editor)/save-dialog.tsx 2 2 "use client"; 3 3 4 4 import { useState, useMemo } from "react"; 5 5 import { isValidNsid } from "@atproto/syntax"; 6 6 import { saveComponentAction } from "./save-component"; 7 7 import type { FamilyInfo } from "@/data/queries"; 8 - import { GhostButton } from "../ui/ghost-button"; 9 - import { PrimaryButton } from "../ui/primary-button"; 10 - import { TextInput } from "../ui/text-input"; 11 - import { OptionRow } from "../ui/option-row"; 8 + import { GhostButton } from "@/app/ghost-button"; 9 + import { PrimaryButton } from "@/app/primary-button"; 10 + import { TextInput } from "@/app/text-input"; 11 + import { OptionRow } from "./option-row"; 12 12 import { 13 13 Modal, 14 14 ModalActions, 15 15 ModalSubtitle, 16 16 ModalLabel, 17 17 DangerButton, 18 - } from "../ui/modal"; 18 + } from "./modal"; 19 19 import s from "./save-dialog.module.css"; 20 20 21 21 // Group families by short name, sorted by total count (popularity)
+5 -5
app/sandbox/editor/snippets.ts app/edit/snippets.ts
··· 1 - import type { LexiconDoc } from "../lexicons"; 2 - import { resolveComponentInfo } from "../lexicons"; 3 - import type { AcceptsEntry, InferredType } from "../accepts"; 1 + import type { LexiconDoc } from "./lexicons"; 2 + import { resolveComponentInfo } from "./lexicons"; 3 + import type { AcceptsEntry, InferredType } from "@/data/accepts"; 4 4 import { 5 5 matchesAccepts, 6 6 bestMatchSpecificity, 7 7 inferDataType, 8 8 deriveUriAccepts, 9 - } from "../accepts"; 10 - import type { ExportMeta } from "../sandbox-types"; 9 + } from "@/data/accepts"; 10 + import type { ExportMeta } from "./sandbox-types"; 11 11 12 12 // Sentinel character for cursor position in snippets 13 13 const CURSOR = "\x00";
app/sandbox/editor/use-reorder.ts app/canvas/at/[did]/[collection]/[rkey]/use-reorder.ts
app/sandbox/editor/use-source-record.ts app/edit/use-source-record.ts
+1 -1
app/sandbox/effective-lexicon.ts app/edit/effective-lexicon.ts
··· 1 - // app/sandbox/effective-lexicon.ts 1 + // app/edit/effective-lexicon.ts 2 2 import { 3 3 Lexicons, 4 4 type LexiconDoc as AtProtoLexiconDoc,
app/sandbox/errors.ts app/(render)/errors.ts
app/sandbox/lexicons.ts app/edit/lexicons.ts
-2
app/sandbox/packs.ts
··· 1 - // Packs are no longer a concept — this file is kept for compatibility. 2 - export {};
app/sandbox/render/binding.ts app/(render)/binding.ts
app/sandbox/render/builtins.ts app/(render)/builtins.ts
+2 -2
app/sandbox/render/client.tsx app/(render)/client.tsx
··· 9 9 type DragEvent, 10 10 } from "react"; 11 11 import NextLink from "@/app/link"; 12 - import { isMissing } from "../errors"; 13 - import { ErrorBox } from "../ui/preview"; 12 + import { isMissing } from "./errors"; 13 + import { ErrorBox } from "@/app/preview"; 14 14 15 15 // Navigation context — each mode (canvas, browse, view) provides its own handler. 16 16 // Handler receives an AT URI and returns true if it handled the navigation.
app/sandbox/render/list-client.tsx app/(render)/list-client.tsx
+1 -1
app/sandbox/render/list.tsx app/(render)/list.tsx
··· 7 7 } from "./render"; 8 8 import { deserializeTree } from "@inlay/core"; 9 9 import { resolveEndpoint } from "@inlay/render"; 10 - import { rethrowMissing } from "../errors"; 10 + import { rethrowMissing } from "./errors"; 11 11 import { MaybeBoundary } from "./client"; 12 12 import { ListClient } from "./list-client"; 13 13
app/sandbox/render/node-to-jsx.ts app/(render)/node-to-jsx.ts
+2 -2
app/sandbox/render/primitives.tsx app/(render)/primitives.tsx
··· 1 1 import React, { createElement, Suspense } from "react"; 2 2 import { renderNode, type HostContext } from "./render"; 3 3 import { fetchRecordCached } from "./record-cache"; 4 - import { withDigest } from "../errors"; 4 + import { withDigest } from "./errors"; 5 5 import { MaybeBoundary, RecordLink } from "./client"; 6 6 import { TimestampClient } from "./timestamp-client"; 7 7 import { isValidElement, $ } from "@inlay/core"; 8 - import { throwDigest } from "../errors"; 8 + import { throwDigest } from "./errors"; 9 9 10 10 export function Throw({ 11 11 ctx,
app/sandbox/render/record-cache.ts app/(render)/record-cache.ts
+1 -1
app/sandbox/render/render.tsx app/(render)/render.tsx
··· 3 3 import { inlay } from "@/generated/at"; 4 4 import { tagRecord, tagLink } from "@/generated/at/inlay/defs.defs"; 5 5 import { ErrorBoundary } from "./client"; 6 - import { throwDigest, rethrowMissing } from "../errors"; 6 + import { throwDigest, rethrowMissing } from "./errors"; 7 7 import { componentMap } from "./builtins"; 8 8 import { isValidElement } from "@inlay/core"; 9 9 import {
app/sandbox/render/scaffold.ts app/(render)/scaffold.ts
app/sandbox/render/tabs-client.tsx app/(render)/tabs-client.tsx
+1 -1
app/sandbox/render/tabs.tsx app/(render)/tabs.tsx
··· 1 1 import { createElement, type ReactNode } from "react"; 2 2 import { renderNode, type HostContext } from "./render"; 3 3 import { isValidElement } from "@inlay/core"; 4 - import { withDigest } from "../errors"; 4 + import { withDigest } from "./errors"; 5 5 import { MaybeBoundary } from "./client"; 6 6 import { TabsClient } from "./tabs-client"; 7 7
app/sandbox/render/timestamp-client.tsx app/(render)/timestamp-client.tsx
+1 -1
app/sandbox/sandbox-types.ts app/edit/sandbox-types.ts
··· 1 - import type { AcceptsEntry } from "./accepts"; 1 + import type { AcceptsEntry } from "@/data/accepts"; 2 2 3 3 export type ExportMeta = { 4 4 componentUri: string;
app/sandbox/ui/browse-card.module.css app/list/browse-card.module.css
app/sandbox/ui/browse-card.tsx app/list/browse-card.tsx
app/sandbox/ui/browse-pill.module.css app/list/browse-pill.module.css
app/sandbox/ui/browse-pill.tsx app/list/browse-pill.tsx
app/sandbox/ui/dot-grid.module.css app/dot-grid.module.css
app/sandbox/ui/dot-grid.tsx app/dot-grid.tsx
app/sandbox/ui/editor-layout.module.css app/edit/editor-layout.module.css
app/sandbox/ui/editor-layout.tsx app/edit/editor-layout.tsx
+2 -2
app/sandbox/ui/embed-button.tsx app/list/embed-button.tsx
··· 1 1 "use client"; 2 2 3 3 import { useState, useRef } from "react"; 4 - import { Dropdown } from "@/app/ui/dropdown"; 4 + import { Dropdown } from "@/app/dropdown"; 5 5 import { parseAtUri } from "@/data/uri"; 6 - import s from "./preview.module.css"; 6 + import s from "@/app/preview.module.css"; 7 7 8 8 export function EmbedButton({ 9 9 componentUri,
app/sandbox/ui/external-inspector.module.css app/edit/external-inspector.module.css
+6 -6
app/sandbox/ui/external-inspector.tsx app/edit/external-inspector.tsx
··· 1 1 "use client"; 2 2 3 3 import { useState, useEffect } from "react"; 4 - import { Editor } from "../editor/editor"; 5 - import type { InspectResult } from "../actions"; 6 - import { PrimaryButton } from "./primary-button"; 7 - import { GhostButton } from "./ghost-button"; 8 - import { TextInput } from "./text-input"; 4 + import { Editor } from "./editor"; 5 + import type { InspectResult } from "./actions"; 6 + import { PrimaryButton } from "@/app/primary-button"; 7 + import { GhostButton } from "@/app/ghost-button"; 8 + import { TextInput } from "@/app/text-input"; 9 9 import { Modal, ModalLabel, ModalHint, ModalError } from "./modal"; 10 10 import { ModeToggle } from "./mode-toggle"; 11 - import { resolveValUrl, getValLabel } from "../valtown"; 11 + import { resolveValUrl, getValLabel } from "./valtown"; 12 12 import s from "./external-inspector.module.css"; 13 13 14 14 const GearIcon = () => (
app/sandbox/ui/ghost-button.module.css app/ghost-button.module.css
app/sandbox/ui/ghost-button.tsx app/ghost-button.tsx
app/sandbox/ui/icon-button.module.css app/edit/icon-button.module.css
app/sandbox/ui/icon-button.tsx app/edit/icon-button.tsx
app/sandbox/ui/modal.module.css app/edit/modal.module.css
app/sandbox/ui/modal.tsx app/edit/modal.tsx
app/sandbox/ui/mode-toggle.module.css app/edit/mode-toggle.module.css
app/sandbox/ui/mode-toggle.tsx app/edit/mode-toggle.tsx
app/sandbox/ui/option-row.module.css app/edit/option-row.module.css
app/sandbox/ui/option-row.tsx app/edit/option-row.tsx
app/sandbox/ui/palette.module.css app/edit/palette.module.css
+5 -5
app/sandbox/ui/palette.tsx app/edit/palette.tsx
··· 1 1 "use client"; 2 2 3 3 import type { ReactNode } from "react"; 4 - import type { ToolboxPack } from "../sandbox-types"; 5 - import type { InferredType } from "../accepts"; 6 - import { matchesAccepts, bestMatchSpecificity } from "../accepts"; 4 + import type { ToolboxPack } from "./sandbox-types"; 5 + import type { InferredType } from "@/data/accepts"; 6 + import { matchesAccepts, bestMatchSpecificity } from "@/data/accepts"; 7 7 import { IconButton } from "./icon-button"; 8 - import type { useReorder } from "../editor/use-reorder"; 9 - import { HOST_DID } from "../editor/sandbox-transform"; 8 + import type { useReorder } from "@/app/canvas/at/[did]/[collection]/[rkey]/use-reorder"; 9 + import { HOST_DID } from "./sandbox-transform"; 10 10 import s from "./palette.module.css"; 11 11 12 12 // =============================================================================
app/sandbox/ui/preview.module.css app/preview.module.css
+2 -2
app/sandbox/ui/preview.tsx app/preview.tsx
··· 10 10 type ReactNode, 11 11 } from "react"; 12 12 import Link from "@/app/link"; 13 - import { isMissing, missingPath } from "../errors"; 14 - import type { RenderResult } from "../actions"; 13 + import { isMissing, missingPath } from "@/app/(render)/errors"; 14 + import type { RenderResult } from "@/app/edit/actions"; 15 15 import { GhostButton } from "./ghost-button"; 16 16 import { DotGrid } from "./dot-grid"; 17 17 import s from "./preview.module.css";
app/sandbox/ui/primary-button.module.css app/primary-button.module.css
app/sandbox/ui/primary-button.tsx app/primary-button.tsx
app/sandbox/ui/select.module.css app/edit/select.module.css
app/sandbox/ui/select.tsx app/edit/select.tsx
+4 -4
app/sandbox/ui/settings-modal.tsx app/edit/settings-modal.tsx
··· 1 1 "use client"; 2 2 3 3 import { useState } from "react"; 4 - import { saveValTownToken } from "../../settings/actions"; 5 - import { GhostButton } from "./ghost-button"; 6 - import { PrimaryButton } from "./primary-button"; 7 - import { TextInput } from "./text-input"; 4 + import { saveValTownToken } from "@/app/settings/actions"; 5 + import { GhostButton } from "@/app/ghost-button"; 6 + import { PrimaryButton } from "@/app/primary-button"; 7 + import { TextInput } from "@/app/text-input"; 8 8 import { Modal, ModalActions, ModalHint, ModalError } from "./modal"; 9 9 10 10 export function SettingsModal({ onClose }: { onClose: () => void }) {
app/sandbox/ui/sidebar-sections.module.css app/edit/sidebar-sections.module.css
+4 -4
app/sandbox/ui/sidebar-sections.tsx app/edit/sidebar-sections.tsx
··· 1 1 "use client"; 2 2 3 3 import type { ReactNode } from "react"; 4 - import type { FlatEntry } from "../lexicons"; 4 + import type { FlatEntry } from "./lexicons"; 5 5 import type { ComponentRecord } from "@/data/types"; 6 - import { nodeToJsx } from "../render/node-to-jsx"; 6 + import { nodeToJsx } from "@/app/(render)/node-to-jsx"; 7 7 import { serializeTree } from "@inlay/core"; 8 - import { GhostButton } from "./ghost-button"; 8 + import { GhostButton } from "@/app/ghost-button"; 9 9 import { IconButton } from "./icon-button"; 10 - import { TextInput } from "./text-input"; 10 + import { TextInput } from "@/app/text-input"; 11 11 import { Select } from "./select"; 12 12 import s from "./sidebar-sections.module.css"; 13 13
app/sandbox/ui/text-input.module.css app/text-input.module.css
app/sandbox/ui/text-input.tsx app/text-input.tsx
app/sandbox/ui/top-bar.module.css app/edit/top-bar.module.css
+2 -2
app/sandbox/ui/top-bar.tsx app/edit/top-bar.tsx
··· 1 1 "use client"; 2 2 3 - import { GhostButton } from "./ghost-button"; 4 - import { PrimaryButton } from "./primary-button"; 3 + import { GhostButton } from "@/app/ghost-button"; 4 + import { PrimaryButton } from "@/app/primary-button"; 5 5 import s from "./top-bar.module.css"; 6 6 7 7 const ScrollIcon = () => (
+1 -1
app/sandbox/valtown.ts app/edit/valtown.ts
··· 1 - // app/sandbox/valtown.ts 1 + // app/edit/valtown.ts 2 2 "use server"; 3 3 4 4 import { getValTownToken } from "@/app/settings/actions";
app/ui/dropdown.module.css app/dropdown.module.css
app/ui/dropdown.tsx app/dropdown.tsx
+1 -1
data/queries.ts
··· 130 130 } 131 131 132 132 // Batch-fetch via + view-derived accepts for a set of component URIs (single query) 133 - import type { AcceptsEntry } from "@/app/sandbox/accepts"; 133 + import type { AcceptsEntry } from "@/data/accepts"; 134 134 135 135 export async function fetchComponentMeta(componentUris: string[]): Promise<{ 136 136 via: Map<string, ComponentRecord["via"]>;
+1 -1
proto/src/cache.ts
··· 46 46 }; 47 47 48 48 // Convert inlay cache tags to the string format used by the reverse index. 49 - // Must match the format in app/sandbox/render.tsx (callComponentCached) 49 + // Must match the format in app/(render)/render.tsx (callComponentCached) 50 50 // and invalidator/src/cache-invalidation.ts (getRecordPatterns, getLinkPatterns). 51 51 function tagToIndexKeys(tag: CacheTag): string[] { 52 52 if (tag.$type === "at.inlay.defs#tagRecord") {