From 4d9a200465989aab4b0ae07e48ced4c52faab9a1 Mon Sep 17 00:00:00 2001
From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
Date: Fri, 23 Feb 2024 22:48:06 -0500
Subject: [PATCH] fix: docs preview import paths (#810)
---
apps/www/mdsx.config.js | 10 ++++++++--
apps/www/static/registry/index.json | 4 +++-
.../static/registry/styles/default-js/resizable.json | 6 ++++--
apps/www/static/registry/styles/default/resizable.json | 6 ++++--
.../static/registry/styles/new-york-js/resizable.json | 6 ++++--
.../www/static/registry/styles/new-york/resizable.json | 6 ++++--
6 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/apps/www/mdsx.config.js b/apps/www/mdsx.config.js
index d351dd610..aec8ac31f 100644
--- a/apps/www/mdsx.config.js
+++ b/apps/www/mdsx.config.js
@@ -166,10 +166,16 @@ export function rehypeComponentExample() {
const component = Index[style.name][name];
const src = component.files[0];
let sourceCode = getComponentSourceFileContent(src);
- if (!sourceCode) return;
+ if (!sourceCode || sourceCode === null) return;
+
+ // @ts-expect-error - not dealing with this rn
+ sourceCode = sourceCode.replaceAll(
+ "@/registry/new-york/",
+ "$lib/components/"
+ );
// @ts-expect-error - not dealing with this rn
sourceCode = sourceCode.replaceAll(
- `@/registry/${style.name}/`,
+ "@/registry/default/",
"$lib/components/"
);
diff --git a/apps/www/static/registry/index.json b/apps/www/static/registry/index.json
index 6e0463fa8..5b84133d5 100644
--- a/apps/www/static/registry/index.json
+++ b/apps/www/static/registry/index.json
@@ -447,7 +447,9 @@
},
{
"name": "resizable",
- "dependencies": [],
+ "dependencies": [
+ "paneforge"
+ ],
"registryDependencies": [],
"files": [
"ui/resizable/index.ts",
diff --git a/apps/www/static/registry/styles/default-js/resizable.json b/apps/www/static/registry/styles/default-js/resizable.json
index f46aa4774..d928bea83 100644
--- a/apps/www/static/registry/styles/default-js/resizable.json
+++ b/apps/www/static/registry/styles/default-js/resizable.json
@@ -1,6 +1,8 @@
{
"name": "resizable",
- "dependencies": [],
+ "dependencies": [
+ "paneforge"
+ ],
"registryDependencies": [],
"files": [
{
@@ -9,7 +11,7 @@
},
{
"name": "resizable-handle.svelte",
- "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
+ "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
},
{
"name": "resizable-pane-group.svelte",
diff --git a/apps/www/static/registry/styles/default/resizable.json b/apps/www/static/registry/styles/default/resizable.json
index 65e8cf0ce..81e70f1fc 100644
--- a/apps/www/static/registry/styles/default/resizable.json
+++ b/apps/www/static/registry/styles/default/resizable.json
@@ -1,6 +1,8 @@
{
"name": "resizable",
- "dependencies": [],
+ "dependencies": [
+ "paneforge"
+ ],
"registryDependencies": [],
"files": [
{
@@ -9,7 +11,7 @@
},
{
"name": "resizable-handle.svelte",
- "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
+ "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
},
{
"name": "resizable-pane-group.svelte",
diff --git a/apps/www/static/registry/styles/new-york-js/resizable.json b/apps/www/static/registry/styles/new-york-js/resizable.json
index bfc710310..3776b4e58 100644
--- a/apps/www/static/registry/styles/new-york-js/resizable.json
+++ b/apps/www/static/registry/styles/new-york-js/resizable.json
@@ -1,6 +1,8 @@
{
"name": "resizable",
- "dependencies": [],
+ "dependencies": [
+ "paneforge"
+ ],
"registryDependencies": [],
"files": [
{
@@ -9,7 +11,7 @@
},
{
"name": "resizable-handle.svelte",
- "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
+ "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
},
{
"name": "resizable-pane-group.svelte",
diff --git a/apps/www/static/registry/styles/new-york/resizable.json b/apps/www/static/registry/styles/new-york/resizable.json
index 97ed2ffc3..31cbef11d 100644
--- a/apps/www/static/registry/styles/new-york/resizable.json
+++ b/apps/www/static/registry/styles/new-york/resizable.json
@@ -1,6 +1,8 @@
{
"name": "resizable",
- "dependencies": [],
+ "dependencies": [
+ "paneforge"
+ ],
"registryDependencies": [],
"files": [
{
@@ -9,7 +11,7 @@
},
{
"name": "resizable-handle.svelte",
- "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
+ "content": "\n\ndiv]:rotate-90\",\n\t\tclassName\n\t)}\n>\n\t{#if withHandle}\n\t\t\n\t\t\t\n\t\t
\n\t{/if}\n\n"
},
{
"name": "resizable-pane-group.svelte",