@dyrected/core 1.0.4 → 1.0.5
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.
- package/dist/index.cjs +16 -5
- package/dist/index.js +16 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -221,9 +221,9 @@ STEP ${isSelfHosted ? "3" : "4"} \u2014 FRONTEND IMPLEMENTATION
|
|
|
221
221
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
222
222
|
`;
|
|
223
223
|
const frameworks = {
|
|
224
|
-
next: `Install \`@dyrected/
|
|
224
|
+
next: `Install \`@dyrected/next\` and \`@dyrected/admin\`.
|
|
225
225
|
|
|
226
|
-
SDK
|
|
226
|
+
1. **SDK Setup** (\`lib/dyrected.ts\`):
|
|
227
227
|
\`\`\`ts
|
|
228
228
|
import { createClient } from '@dyrected/sdk'
|
|
229
229
|
|
|
@@ -232,7 +232,17 @@ export const dyrected = createClient({
|
|
|
232
232
|
apiKey: '${config.apiKey}',
|
|
233
233
|
siteId: '${config.siteId}',`}
|
|
234
234
|
})
|
|
235
|
-
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
2. **Admin Dashboard** (\`app/admin/[[...slug]]/page.tsx\`):
|
|
238
|
+
\`\`\`tsx
|
|
239
|
+
import { DyrectedAdmin } from '@dyrected/next/admin'
|
|
240
|
+
|
|
241
|
+
export default function AdminPage() {
|
|
242
|
+
return <DyrectedAdmin basename="/admin" />
|
|
243
|
+
}
|
|
244
|
+
\`\`\`
|
|
245
|
+
`,
|
|
236
246
|
nuxt: `Install \`@dyrected/nuxt\` and add it to \`nuxt.config.ts\`:
|
|
237
247
|
\`\`\`ts
|
|
238
248
|
export default defineNuxtConfig({
|
|
@@ -245,15 +255,16 @@ export default defineNuxtConfig({
|
|
|
245
255
|
})
|
|
246
256
|
\`\`\`
|
|
247
257
|
|
|
248
|
-
MOUNTING THE ADMIN DASHBOARD (\`pages/
|
|
258
|
+
MOUNTING THE ADMIN DASHBOARD (\`pages/admin.vue\`):
|
|
249
259
|
\`\`\`vue
|
|
250
260
|
<script setup lang="ts">
|
|
261
|
+
// DyrectedAdmin is auto-imported by the module
|
|
251
262
|
definePageMeta({ layout: false })
|
|
252
263
|
</script>
|
|
253
264
|
|
|
254
265
|
<template>
|
|
255
266
|
<ClientOnly>
|
|
256
|
-
<DyrectedAdmin basename="/
|
|
267
|
+
<DyrectedAdmin basename="/admin" />
|
|
257
268
|
</ClientOnly>
|
|
258
269
|
</template>
|
|
259
270
|
\`\`\`
|
package/dist/index.js
CHANGED
|
@@ -195,9 +195,9 @@ STEP ${isSelfHosted ? "3" : "4"} \u2014 FRONTEND IMPLEMENTATION
|
|
|
195
195
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
196
196
|
`;
|
|
197
197
|
const frameworks = {
|
|
198
|
-
next: `Install \`@dyrected/
|
|
198
|
+
next: `Install \`@dyrected/next\` and \`@dyrected/admin\`.
|
|
199
199
|
|
|
200
|
-
SDK
|
|
200
|
+
1. **SDK Setup** (\`lib/dyrected.ts\`):
|
|
201
201
|
\`\`\`ts
|
|
202
202
|
import { createClient } from '@dyrected/sdk'
|
|
203
203
|
|
|
@@ -206,7 +206,17 @@ export const dyrected = createClient({
|
|
|
206
206
|
apiKey: '${config.apiKey}',
|
|
207
207
|
siteId: '${config.siteId}',`}
|
|
208
208
|
})
|
|
209
|
-
|
|
209
|
+
\`\`\`
|
|
210
|
+
|
|
211
|
+
2. **Admin Dashboard** (\`app/admin/[[...slug]]/page.tsx\`):
|
|
212
|
+
\`\`\`tsx
|
|
213
|
+
import { DyrectedAdmin } from '@dyrected/next/admin'
|
|
214
|
+
|
|
215
|
+
export default function AdminPage() {
|
|
216
|
+
return <DyrectedAdmin basename="/admin" />
|
|
217
|
+
}
|
|
218
|
+
\`\`\`
|
|
219
|
+
`,
|
|
210
220
|
nuxt: `Install \`@dyrected/nuxt\` and add it to \`nuxt.config.ts\`:
|
|
211
221
|
\`\`\`ts
|
|
212
222
|
export default defineNuxtConfig({
|
|
@@ -219,15 +229,16 @@ export default defineNuxtConfig({
|
|
|
219
229
|
})
|
|
220
230
|
\`\`\`
|
|
221
231
|
|
|
222
|
-
MOUNTING THE ADMIN DASHBOARD (\`pages/
|
|
232
|
+
MOUNTING THE ADMIN DASHBOARD (\`pages/admin.vue\`):
|
|
223
233
|
\`\`\`vue
|
|
224
234
|
<script setup lang="ts">
|
|
235
|
+
// DyrectedAdmin is auto-imported by the module
|
|
225
236
|
definePageMeta({ layout: false })
|
|
226
237
|
</script>
|
|
227
238
|
|
|
228
239
|
<template>
|
|
229
240
|
<ClientOnly>
|
|
230
|
-
<DyrectedAdmin basename="/
|
|
241
|
+
<DyrectedAdmin basename="/admin" />
|
|
231
242
|
</ClientOnly>
|
|
232
243
|
</template>
|
|
233
244
|
\`\`\`
|