Skip to content

Commit

Permalink
refactor: changes name of dev directory to tests, adds separate playg…
Browse files Browse the repository at this point in the history
…round directory for nuxt and next
  • Loading branch information
sashamilenkovic committed Apr 1, 2024
1 parent cdac90d commit 0b5658a
Show file tree
Hide file tree
Showing 184 changed files with 5,638 additions and 2,436 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
version: 8
- run: pnpm install --frozen-lockfile
- name: Build Dev Frameworks
run: cd dev-frameworks && pnpm install && cd ..
run: cd tests-frameworks && pnpm install && cd ..
- name: Build Dev
run: cd dev && pnpm install && cd ..
- name: Install Playwright
run: pnpm exec playwright install --with-deps
- name: Spin up dev-frameworks
run: pnpm dev-frameworks &
- name: Spin up tests-frameworks
run: pnpm tests-frameworks &
- name: Spin up dev
run: pnpm dev &
- name: Run Playwright tests
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ Created by the <a href="https://formkit.com">FormKit team</a>.

> [!NOTE]
> Unlike many projects this repository includes the `dist` directory since the documentation extracts TypeScript types from the build source code.
## About this repository
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions dev/pages/sort.vue → dev-old/pages/sort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@ const [parent, values] = useDragAndDrop(["Apple", "Banana", "Orange"]);
</script>

<template>
<h1 class="text-2xl my-4">Sorting</h1>
<h1>Sorting</h1>
<div>
<h3>Vertical sort</h3>
<ul ref="parent">
<li
v-for="value in values"
:id="value"
:key="value"
class="border-2 border-indigo-600 w-1/4 text-center my-2"
>
<li v-for="value in values" :id="value" :key="value">
{{ value }}
</li>
</ul>
<span id="sort_values">
{{ values.map((x) => x).join(" ") }}
</span>
<h3>Horizontal sort</h3>
<ul ref="parent">
<li v-for="value in values" :id="value" :key="value">
{{ value }}
</li>
</ul>
</div>
</template>
19 changes: 19 additions & 0 deletions dev-old/pages/sort/vertical.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script setup lang="ts">
import { useDragAndDrop } from "../../../src/vue/index";
const [parent, values] = useDragAndDrop(["Apple", "Banana", "Orange"]);
</script>

<template>
<h1 class="text-sm">Vertical Sort</h1>
<div>
<ul ref="parent">
<li v-for="value in values" :id="value" :key="value">
{{ value }}
</li>
</ul>
<span id="sort_values">
{{ values.map((x) => x).join(" ") }}
</span>
</div>
</template>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"dev": "cd dev && pnpm run dev",
"dev-frameworks": "cd dev-frameworks && pnpm run dev",
"tests-frameworks": "cd tests-frameworks && pnpm run dev",
"docs": "cd docs && pnpm run dev",
"build": "jiti build.ts",
"release": "npx bumpp --no-tag --no-push --no-commit && pnpm run build && cd dist && npx publint && pnpm publish --no-git-checks",
Expand Down Expand Up @@ -49,4 +49,4 @@
}
}
}
}
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"types": "./index.d.cts",
"type": "module",
"scripts": {
"dev": "cd dev && pnpm run dev",
"dev-frameworks": "cd dev-frameworks && pnpm run dev",
"tests": "cd tests && pnpm run dev",
"tests-frameworks": "cd tests-frameworks && pnpm run dev",
"playground-nuxt": "cd playground/nuxt && pnpm run dev",
"playground-next": "cd playground/next && pnpm run dev",
"docs": "cd docs && pnpm run dev",
"build": "jiti build.ts",
"release": "npx bumpp --no-tag --no-push --no-commit && pnpm run build && cd dist && npx publint && pnpm publish --no-git-checks",
Expand Down
3 changes: 3 additions & 0 deletions playground/next/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions playground/next/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions playground/next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Binary file added playground/next/app/favicon.ico
Binary file not shown.
107 changes: 107 additions & 0 deletions playground/next/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
"Fira Mono", "Droid Sans Mono", "Courier New", monospace;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;

--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(
rgba(255, 255, 255, 1),
rgba(255, 255, 255, 0)
);

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;

--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
--secondary-glow: linear-gradient(
to bottom right,
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0.3)
);

--tile-start-rgb: 2, 13, 46;
--tile-end-rgb: 2, 5, 19;
--tile-border: conic-gradient(
#ffffff80,
#ffffff40,
#ffffff30,
#ffffff20,
#ffffff10,
#ffffff10,
#ffffff80
);

--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
--card-rgb: 100, 100, 100;
--card-border-rgb: 200, 200, 200;
}
}

* {
box-sizing: border-box;
padding: 0;
margin: 0;
}

html,
body {
max-width: 100vw;
overflow-x: hidden;
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}

a {
color: inherit;
text-decoration: none;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
}
22 changes: 22 additions & 0 deletions playground/next/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
);
}

0 comments on commit 0b5658a

Please sign in to comment.