create-prez-app 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, RDFLib Team
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # Prez UI starter template
2
+ A starter template for creating your own themed Prez UI instance
3
+
4
+ Run the command below to get started, replacing `<project_name>` with your project name:
5
+
6
+ ```bash
7
+ npx create-prez-app@latest <project_name>
8
+ ```
9
+
10
+ or
11
+
12
+ ```bash
13
+ npm create prez-app@latest <project_name>
14
+ ```
15
+
16
+ ## Usage
17
+ Follow the README in the starter template to get started. For more in-depth instructions on theming Prez UI, see our [theming documentation](https://github.com/rdflib/prez-ui/blob/main/docs/theming.md).
package/index.js ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+
3
+ // const spawn = require('cross-spawn');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ // The first argument will be the project name.
8
+ const projectName = process.argv[2];
9
+
10
+ // Create a project directory with the project name.
11
+ const currentDir = process.cwd();
12
+ const projectDir = path.resolve(currentDir, projectName);
13
+ fs.mkdirSync(projectDir, { recursive: true });
14
+
15
+ // A common approach to building a starter template is to
16
+ // create a `template` folder which will house the template
17
+ // and the files we want to create.
18
+ const templateDir = path.resolve(__dirname, 'template');
19
+ fs.cpSync(templateDir, projectDir, { recursive: true });
20
+
21
+ // It is good practice to have dotfiles stored in the
22
+ // template without the dot (so they do not get picked
23
+ // up by the starter template repository). We can rename
24
+ // the dotfiles after we have copied them over to the
25
+ // new project directory.
26
+ const dotFiles = [
27
+ "gitignore",
28
+ "env.example",
29
+ "vscode",
30
+ ];
31
+
32
+ dotFiles.forEach(file => {
33
+ fs.renameSync(
34
+ path.join(projectDir, file),
35
+ path.join(projectDir, `.${file}`)
36
+ );
37
+ });
38
+
39
+ const projectPackageJson = require(path.join(projectDir, 'package.json'));
40
+
41
+ // Update the project's package.json with the new project name
42
+ projectPackageJson.name = projectName;
43
+
44
+ fs.writeFileSync(
45
+ path.join(projectDir, 'package.json'),
46
+ JSON.stringify(projectPackageJson, null, 2)
47
+ );
48
+
49
+ // Run `npm install` in the project directory to install
50
+ // the dependencies. We are using a third-party library
51
+ // called `cross-spawn` for cross-platform support.
52
+ // (Node has issues spawning child processes in Windows).
53
+ // spawn.sync('npm', ['install'], { stdio: 'inherit' });
54
+
55
+ console.log('Success! Your new project is ready.');
56
+ console.log(`Created ${projectName} at ${projectDir}`);
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "create-prez-app",
3
+ "version": "4.0.0",
4
+ "description": "A starter template for creating your own themed Prez UI instance",
5
+ "license": "BSD-3-Clause",
6
+ "bin": {
7
+ "create-prez-app": "./index.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/rdflib/prez-ui.git",
12
+ "directory": "packages/create-prez-app"
13
+ },
14
+ "keywords": [
15
+ "template"
16
+ ],
17
+ "bugs": {
18
+ "url": "https://github.com/rdflib/prez-ui/issues"
19
+ },
20
+ "homepage": "https://github.com/rdflib/prez-ui/tree/main/packages/create-prez-app#readme"
21
+ }
@@ -0,0 +1,84 @@
1
+ # Prez UI v4 Theme Starter Template
2
+ This project was bootstrapped by `create-prez-app`.
3
+
4
+ ## Quick start
5
+ In the project root directory, install with your NPM package manager of choice (we recommend [pnpm](https://pnpm.io)):
6
+
7
+ ```bash
8
+ npm install
9
+ ```
10
+
11
+ Then preview your theme by running:
12
+
13
+ ```bash
14
+ npm run dev
15
+ ```
16
+
17
+ ## Configuration
18
+ ### Environment Variables
19
+ The main configuration required for running Prez UI are done with environment variables:
20
+
21
+ Variable|Description|Type|Default
22
+ -|-|-|-
23
+ `NUXT_PUBLIC_PREZ_API_ENDPOINT` (required)|Configures the Prez API endpoint|string|-
24
+ `NUXT_PUBLIC_PREZ_AUTO_DETECT_HTML`|Enables rendering HTML in data|boolean|`false`
25
+ `NUXT_PUBLIC_PREZ_AUTO_DETECT_MARKDOWN`|Enables rendering markdown & mermaid diagrams in data|boolean|`false`
26
+
27
+ You can create an `.env` file in the project root to set these environment variable. See `.env.example` for all environment variable options and defaults. See [Nuxt Environment Variables](https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables) for more info on environment variables in Nuxt.
28
+
29
+ ### Nuxt Config
30
+ The `nuxt.config.ts` file contains your configuration for Nuxt, which extends upon Prez UI's [base layer Nuxt config](https://github.com/rdflib/prez-ui/blob/main/packages/prez-ui/nuxt.config.ts). This is also where you can customise things like the HTML `<head>` content, such as setting the document title, adding extra CSS files, etc. This is also where you can set Vite config.
31
+
32
+ > [!NOTE]
33
+ > Server-side rendering (SSR) is currently not supported, but will be implemented in the near future.
34
+
35
+ See the [Nuxt config docs](https://nuxt.com/docs/getting-started/configuration) for more info on how to configure Nuxt.
36
+
37
+ ### App Config
38
+ The `app.config.ts` file contains your app-level config, where you can customise the navigation items, renaming items throughout the application, customising prepended items in the breadcrumbs, and pagination config. This app config extends upon Prez UI's [base layer app config](https://github.com/rdflib/prez-ui/blob/main/packages/prez-ui/app.config.ts).
39
+
40
+ ## Extending your theme
41
+ This starter template uses [Nuxt](https://nuxt.com) [layers](https://nuxt.com/docs/getting-started/layers) to extend upon the base Prez UI layer application, so you only need to customise what you need.
42
+
43
+ Overriding pages, components, layouts, composables and utils can be done by simply creating a file of the same name in the same directory structure for Nuxt to automatically replace it with your version in the application. Refer to Prez UI's base layer [source code](https://github.com/rdflib/prez-ui/tree/main/packages/prez-ui) to help you override files.
44
+
45
+ > [!NOTE]
46
+ > When updating to a newer version of `prez-ui`, ensure any overridden files that contain core logic are kept up-to-date.
47
+
48
+ See our [theming documentation](https://github.com/rdflib/prez-ui/blob/main/docs/theming.md) for a more in-depth guide on customising Prez UI.
49
+
50
+ ### Tailwind & CSS
51
+ Prez UI uses [Tailwind](https://tailwindcss.com) for most of its styling, which you can use in this starter template to easily style using classes.
52
+
53
+ To override Prez UI's colour scheme (e.g. `primary`, `secondary`, etc.), or add your own variables to use in Tailwind, simply add a CSS variable of the same name in `assets/css/tailwind.css` under `:root` with its colour values in HSL **without** the `hsl()` function. Then register those variables in `tailwind.config.js` wrapped in the `hsl()` function under `theme.extend.colors`, e.g.:
54
+
55
+ ```javascript
56
+ // tailwind.config.js
57
+ module.exports = {
58
+ ...
59
+ theme: {
60
+ extend: {
61
+ colors: {
62
+ // add your CSS variables here, e.g.:
63
+ primary: {
64
+ DEFAULT: "hsl(var(--primary))",
65
+ foreground: "hsl(var(--primary-foreground))",
66
+ },
67
+ }
68
+ }
69
+ }
70
+ ...
71
+ }
72
+ ```
73
+
74
+ You can also style your Prez UI theme using normal CSS by adding your styles to `assets/css/theme.css`.
75
+
76
+ ### Shadcn Components
77
+ Prez UI uses the [prez-components](https://github.com/rdflib/prez-ui/tree/main/packages/prez-components) component library, which is based on the [shadcn-vue](https://www.shadcn-vue.com) component library. Shad comes preinstalled in this starter template, but if you need to add shadcn components in your theme, run a command like the following:
78
+
79
+ ```bash
80
+ npx shadcn-vue@latest add button
81
+ ```
82
+ *(Note: for pnpm, run `pnpm dlx` instead of `npx`)*
83
+
84
+ These components are stored in `components/ui`, which should be kept separate to your theme's components.
@@ -0,0 +1,12 @@
1
+ export default defineAppConfig({
2
+ // nav menu, name substitutions, breadcrumbs prepend & pagination config goes here
3
+ });
4
+
5
+ declare module '@nuxt/schema' {
6
+ interface AppConfigInput {
7
+ menu?: Array<{ label: string, url: string, active?: boolean }>,
8
+ nameSubstitutions?: Record<string, string>,
9
+ breadcrumbPrepend?: Array<{ label: string, url: string }>,
10
+ utilsMenu?: Array<{ label: string, url: string }>
11
+ }
12
+ }
@@ -0,0 +1,9 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ :root {
7
+ /* define your Tailwind CSS variables (in HSL values without the hsl()) here */
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ /* other CSS for your theme goes here */
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
+ import { type BadgeVariants, badgeVariants } from '.'
5
+
6
+ const props = defineProps<{
7
+ variant?: BadgeVariants['variant']
8
+ class?: HTMLAttributes['class']
9
+ }>()
10
+ </script>
11
+
12
+ <template>
13
+ <div :class="cn(badgeVariants({ variant }), props.class)">
14
+ <slot />
15
+ </div>
16
+ </template>
@@ -0,0 +1,25 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority'
2
+
3
+ export { default as Badge } from './Badge.vue'
4
+
5
+ export const badgeVariants = cva(
6
+ 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default:
11
+ 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
12
+ secondary:
13
+ 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
14
+ destructive:
15
+ 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
16
+ outline: 'text-foreground',
17
+ },
18
+ },
19
+ defaultVariants: {
20
+ variant: 'default',
21
+ },
22
+ },
23
+ )
24
+
25
+ export type BadgeVariants = VariantProps<typeof badgeVariants>
@@ -0,0 +1,26 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
+ import { Primitive, type PrimitiveProps } from 'radix-vue'
5
+ import { type ButtonVariants, buttonVariants } from '.'
6
+
7
+ interface Props extends PrimitiveProps {
8
+ variant?: ButtonVariants['variant']
9
+ size?: ButtonVariants['size']
10
+ class?: HTMLAttributes['class']
11
+ }
12
+
13
+ const props = withDefaults(defineProps<Props>(), {
14
+ as: 'button',
15
+ })
16
+ </script>
17
+
18
+ <template>
19
+ <Primitive
20
+ :as="as"
21
+ :as-child="asChild"
22
+ :class="cn(buttonVariants({ variant, size }), props.class)"
23
+ >
24
+ <slot />
25
+ </Primitive>
26
+ </template>
@@ -0,0 +1,35 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority'
2
+
3
+ export { default as Button } from './Button.vue'
4
+
5
+ export const buttonVariants = cva(
6
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default:
11
+ 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
12
+ destructive:
13
+ 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
14
+ outline:
15
+ 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
16
+ secondary:
17
+ 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
18
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
19
+ link: 'text-primary underline-offset-4 hover:underline',
20
+ },
21
+ size: {
22
+ default: 'h-9 px-4 py-2',
23
+ sm: 'h-8 rounded-md px-3 text-xs',
24
+ lg: 'h-10 rounded-md px-8',
25
+ icon: 'h-9 w-9',
26
+ },
27
+ },
28
+ defaultVariants: {
29
+ variant: 'default',
30
+ size: 'default',
31
+ },
32
+ },
33
+ )
34
+
35
+ export type ButtonVariants = VariantProps<typeof buttonVariants>
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
+ import { useVModel } from '@vueuse/core'
5
+
6
+ const props = defineProps<{
7
+ defaultValue?: string | number
8
+ modelValue?: string | number
9
+ class?: HTMLAttributes['class']
10
+ }>()
11
+
12
+ const emits = defineEmits<{
13
+ (e: 'update:modelValue', payload: string | number): void
14
+ }>()
15
+
16
+ const modelValue = useVModel(props, 'modelValue', emits, {
17
+ passive: true,
18
+ defaultValue: props.defaultValue,
19
+ })
20
+ </script>
21
+
22
+ <template>
23
+ <input v-model="modelValue" :class="cn('flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', props.class)">
24
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Input } from './Input.vue'
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils'
3
+ import { MoreHorizontal } from 'lucide-vue-next'
4
+ import { PaginationEllipsis, type PaginationEllipsisProps } from 'radix-vue'
5
+ import { computed, type HTMLAttributes } from 'vue'
6
+
7
+ const props = defineProps<PaginationEllipsisProps & { class?: HTMLAttributes['class'] }>()
8
+
9
+ const delegatedProps = computed(() => {
10
+ const { class: _, ...delegated } = props
11
+
12
+ return delegated
13
+ })
14
+ </script>
15
+
16
+ <template>
17
+ <PaginationEllipsis v-bind="delegatedProps" :class="cn('w-9 h-9 flex items-center justify-center', props.class)">
18
+ <slot>
19
+ <MoreHorizontal />
20
+ </slot>
21
+ </PaginationEllipsis>
22
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ Button,
4
+ } from '@/components/ui/button'
5
+ import { cn } from '@/lib/utils'
6
+ import { ChevronsLeft } from 'lucide-vue-next'
7
+ import { PaginationFirst, type PaginationFirstProps } from 'radix-vue'
8
+ import { computed, type HTMLAttributes } from 'vue'
9
+
10
+ const props = withDefaults(defineProps<PaginationFirstProps & { class?: HTMLAttributes['class'] }>(), {
11
+ asChild: true,
12
+ })
13
+
14
+ const delegatedProps = computed(() => {
15
+ const { class: _, ...delegated } = props
16
+
17
+ return delegated
18
+ })
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationFirst v-bind="delegatedProps">
23
+ <Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline">
24
+ <slot>
25
+ <ChevronsLeft class="h-4 w-4" />
26
+ </slot>
27
+ </Button>
28
+ </PaginationFirst>
29
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ Button,
4
+ } from '@/components/ui/button'
5
+ import { cn } from '@/lib/utils'
6
+ import { ChevronsRight } from 'lucide-vue-next'
7
+ import { PaginationLast, type PaginationLastProps } from 'radix-vue'
8
+ import { computed, type HTMLAttributes } from 'vue'
9
+
10
+ const props = withDefaults(defineProps<PaginationLastProps & { class?: HTMLAttributes['class'] }>(), {
11
+ asChild: true,
12
+ })
13
+
14
+ const delegatedProps = computed(() => {
15
+ const { class: _, ...delegated } = props
16
+
17
+ return delegated
18
+ })
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationLast v-bind="delegatedProps">
23
+ <Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline">
24
+ <slot>
25
+ <ChevronsRight class="h-4 w-4" />
26
+ </slot>
27
+ </Button>
28
+ </PaginationLast>
29
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ Button,
4
+ } from '@/components/ui/button'
5
+ import { cn } from '@/lib/utils'
6
+ import { ChevronRight } from 'lucide-vue-next'
7
+ import { PaginationNext, type PaginationNextProps } from 'radix-vue'
8
+ import { computed, type HTMLAttributes } from 'vue'
9
+
10
+ const props = withDefaults(defineProps<PaginationNextProps & { class?: HTMLAttributes['class'] }>(), {
11
+ asChild: true,
12
+ })
13
+
14
+ const delegatedProps = computed(() => {
15
+ const { class: _, ...delegated } = props
16
+
17
+ return delegated
18
+ })
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationNext v-bind="delegatedProps">
23
+ <Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline">
24
+ <slot>
25
+ <ChevronRight class="h-4 w-4" />
26
+ </slot>
27
+ </Button>
28
+ </PaginationNext>
29
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ Button,
4
+ } from '@/components/ui/button'
5
+ import { cn } from '@/lib/utils'
6
+ import { ChevronLeft } from 'lucide-vue-next'
7
+ import { PaginationPrev, type PaginationPrevProps } from 'radix-vue'
8
+ import { computed, type HTMLAttributes } from 'vue'
9
+
10
+ const props = withDefaults(defineProps<PaginationPrevProps & { class?: HTMLAttributes['class'] }>(), {
11
+ asChild: true,
12
+ })
13
+
14
+ const delegatedProps = computed(() => {
15
+ const { class: _, ...delegated } = props
16
+
17
+ return delegated
18
+ })
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationPrev v-bind="delegatedProps">
23
+ <Button :class="cn('w-10 h-10 p-0', props.class)" variant="outline">
24
+ <slot>
25
+ <ChevronLeft class="h-4 w-4" />
26
+ </slot>
27
+ </Button>
28
+ </PaginationPrev>
29
+ </template>
@@ -0,0 +1,10 @@
1
+ export { default as PaginationEllipsis } from './PaginationEllipsis.vue'
2
+ export { default as PaginationFirst } from './PaginationFirst.vue'
3
+ export { default as PaginationLast } from './PaginationLast.vue'
4
+ export { default as PaginationNext } from './PaginationNext.vue'
5
+ export { default as PaginationPrev } from './PaginationPrev.vue'
6
+ export {
7
+ PaginationList,
8
+ PaginationListItem,
9
+ PaginationRoot as Pagination,
10
+ } from 'radix-vue'
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://shadcn-vue.com/schema.json",
3
+ "style": "default",
4
+ "typescript": true,
5
+ "tsConfigPath": ".nuxt/tsconfig.json",
6
+ "tailwind": {
7
+ "config": "tailwind.config.js",
8
+ "css": "assets/css/tailwind.css",
9
+ "baseColor": "slate",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "framework": "nuxt",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils"
17
+ }
18
+ }
@@ -0,0 +1,37 @@
1
+ # ------------------------------------------------------------------------------------------------------
2
+ # ENV settings for the Prez core package.
3
+ #
4
+ # Create your own .env or .env.local file in the root of the core package to override these settings,
5
+ # alternatively you can set these variables in your hosting environment.
6
+ #
7
+ # The NUXT_PUBLIC_ prefix is used to expose the variables to the client side, this is a NUXT standard.
8
+ # NUXT_PUBLIC_ env variables are runtime variables that do not require a rebuild to update.
9
+ #
10
+ # NUXT_PUBLIC_PREZ_API_ENDPOINT = The endpoint for the API that the core package will use to fetch data.
11
+ # NUXT_PUBLIC_PREZ_UTILS_TEST_PATH = The path to a test data endpoint used in the /_prez/ tools mode.
12
+ #
13
+ #
14
+ # These non-NUXT_PUBLIC_ variables are used to configure the core package at build time.
15
+ # ------------------------------------------------------------------------------------------------------
16
+
17
+ NUXT_PUBLIC_PREZ_API_ENDPOINT=http://localhost:8000
18
+ NUXT_PUBLIC_PREZ_UTILS_TEST_PATH=/catalogs/ns:catId/collections/ns:colId/items/ns:itemId
19
+
20
+ # ------------------------------------------------------------------------------------------------------
21
+
22
+ # Show's debug info cog on the right side of the menubar
23
+ # When clicked it will show a profile panel
24
+ NUXT_PUBLIC_PREZ_DEBUG=false
25
+
26
+ # Allow the user to change the API endpoint to any URL (not just _ALT endpoints) in the UI through the _api query string param (?_api=...)
27
+ NUXT_PUBLIC_PREZ_ALLOW_API_ENDPOINT_CHANGE=false
28
+
29
+ # Alternate API endpoints, show's in the footer
30
+ NUXT_PUBLIC_PREZ_API_ENDPOINT_ALT=http://localhost:8001,http://localhost:8002,http://localhost:8003
31
+
32
+ # Names for the alternate API endpoints
33
+ NUXT_PUBLIC_PREZ_API_ENDPOINT_ALT_NAMES=localhost-1,localhost-2,localhost-3
34
+
35
+ # Set auto detection of markdown and html content in literals
36
+ NUXT_PUBLIC_PREZ_AUTO_DETECT_HTML=false
37
+ NUXT_PUBLIC_PREZ_AUTO_DETECT_MARKDOWN=false
@@ -0,0 +1,24 @@
1
+ # Nuxt dev/build outputs
2
+ .output
3
+ .data
4
+ .nuxt
5
+ .nitro
6
+ .cache
7
+ dist
8
+
9
+ # Node dependencies
10
+ node_modules
11
+
12
+ # Logs
13
+ logs
14
+ *.log
15
+
16
+ # Misc
17
+ .DS_Store
18
+ .fleet
19
+ .idea
20
+
21
+ # Local env files
22
+ .env
23
+ .env.*
24
+ !.env.example
@@ -0,0 +1,6 @@
1
+ import { type ClassValue, clsx } from 'clsx'
2
+ import { twMerge } from 'tailwind-merge'
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
@@ -0,0 +1,9 @@
1
+ // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ export default defineNuxtConfig({
3
+ compatibilityDate: "2024-04-03",
4
+ devtools: { enabled: true },
5
+ modules: ["@nuxtjs/tailwindcss", "shadcn-nuxt"],
6
+ extends: [
7
+ "prez-ui"
8
+ ],
9
+ });
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "prez-ui-starter",
3
+ "version": "4.0.0",
4
+ "private": true,
5
+ "license": "BSD-3-Clause",
6
+ "type": "module",
7
+ "scripts": {
8
+ "build": "nuxt build",
9
+ "dev": "nuxt dev",
10
+ "generate": "nuxt generate",
11
+ "types": "nuxt typecheck",
12
+ "preview": "nuxt preview",
13
+ "postinstall": "nuxt prepare"
14
+ },
15
+ "dependencies": {
16
+ "@nuxtjs/tailwindcss": "^6.12.2",
17
+ "@vueuse/core": "^12.0.0",
18
+ "class-variance-authority": "^0.7.1",
19
+ "clsx": "^2.1.1",
20
+ "lucide-vue-next": "^0.461.0",
21
+ "nuxt": "^3.13.2",
22
+ "radix-vue": "^1.9.10",
23
+ "shadcn-nuxt": "0.11.3",
24
+ "tailwind-merge": "^2.5.5",
25
+ "tailwindcss-animate": "^1.0.7",
26
+ "vue": "latest",
27
+ "vue-router": "latest"
28
+ },
29
+ "devDependencies": {
30
+ "prez-ui": "workspace:*",
31
+ "typescript": "^5.6.3"
32
+ }
33
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../.nuxt/tsconfig.server.json"
3
+ }
@@ -0,0 +1,10 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ theme: {
4
+ extend: {
5
+ colors: {
6
+ // any Tailwind CSS variable overrides you've defined in tailwind.css go here
7
+ },
8
+ },
9
+ },
10
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ // https://nuxt.com/docs/guide/concepts/typescript
3
+ "extends": "./.nuxt/tsconfig.json"
4
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "Vue.volar",
4
+ "nuxtr.nuxtr-vscode",
5
+ "antfu.goto-alias"
6
+ ]
7
+ }