Compare commits

...

49 commits

Author SHA1 Message Date
358288c03c
Merge branch 'astro-reactive:main' into main
Some checks failed
Build and Test / build-and-test (18.x) (push) Has been cancelled
Release / Release (push) Has been cancelled
2025-03-09 20:12:10 +01:00
Ayo Ayco
97b3342cf9
chore: add build.yml; update announcement link (#314)
* chore: add build.yml

* chore: update announcement link on readme

* chore: update readme

* chore: trigger build
2025-03-09 20:11:22 +01:00
c4e15708d2 chore: trigger build 2025-03-09 20:10:04 +01:00
0aeb2b7ec3 chore: update readme 2025-03-09 20:07:44 +01:00
9268f33ab6 chore: update announcement link on readme 2025-03-09 20:05:49 +01:00
d5f5ce808e chore: add build.yml 2025-03-09 20:03:38 +01:00
ac0a61d0ea chore: patch version 2025-01-08 14:19:04 +01:00
a9782bb50d chore: update peerdeps 2025-01-08 14:15:39 +01:00
Ayo Ayco
1efa01f4e3
chore: update README.md (#313) 2025-01-03 13:37:42 +01:00
Ayo
680e8c906b chore: update deps on site 2023-12-07 16:04:28 +01:00
Ayo
e7ec98b178 fix: remove logomark 2023-12-07 16:04:20 +01:00
Ayo
14f7760ff3 chore: support Astro 4 2023-12-07 15:47:28 +01:00
Ayo Ayco
5c8517266c
chore: add warning to README.md (#312) 2023-11-30 14:34:52 +01:00
Ayo Ayco
7ef5a41ec0
chore: update docs site URL (#311) 2023-11-13 14:24:05 +01:00
github-actions[bot]
4c67ac0e8c
chore: Update version for release (#310) 2023-11-11 20:56:38 +01:00
Ayo Ayco
a1cc4b006b
chore: update homepage to astro-reactive.js.org (#309) 2023-11-11 20:48:52 +01:00
Ayo Ayco
6298cadce2
feat(site): update docs link (#308) 2023-11-11 20:34:10 +01:00
Ayo Ayco
591b4eafe6
feat(landing-page): slower animation (#307) 2023-09-25 17:54:30 +02:00
Ayo Ayco
4f745b59b1
chore: update deps (#306) 2023-09-25 17:50:34 +02:00
Ayo
118f5cfa60 chore: add simulate ci scripts 2023-09-25 17:27:48 +02:00
Ayo
bf745dd7ce chore: update vitest 2023-09-25 17:23:44 +02:00
Ayo
643b1ff1e6 chore: add build to CI 2023-09-25 17:18:59 +02:00
Ayo
4bd37804a9 chore: update package-lock 2023-09-25 17:13:43 +02:00
Ayo
929f3a1e69 chore: remove netlify 2023-09-25 17:01:49 +02:00
Ayo
392eebd7d1 chore: add netlify 2023-09-25 16:59:58 +02:00
Ayo
29c25dde87 chore: use netlify() 2023-09-25 16:54:03 +02:00
Ayo
5ad276cbf9 chore: add netlify integration 2023-09-25 16:49:14 +02:00
Ayo
6f608e470e chore: clean up integrations 2023-09-25 16:47:28 +02:00
Ayo
e85bf59b0f chore: remove adapter 2023-09-25 16:45:30 +02:00
Ayo
633f94ce25 chore: remove unused functions 2023-09-25 16:43:32 +02:00
Ayo
81c1e1d1a9 chore: remove svgo dep 2023-09-25 16:41:42 +02:00
Ayo
af4c6e3253 chore: tailwind as dep 2023-09-25 16:38:43 +02:00
Ayo
78b9ae07cf chore: integrate netlify 2023-09-25 16:37:20 +02:00
github-actions[bot]
c0f3ca1fa3
chore: Update version for release (#295)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-25 16:29:43 +02:00
Ayo Ayco
4d2a577b0e
chore: update deps (#305)
* chore: update deps

* chore: update deps for apps/docs

* chore: update landing-page deps

* chore: update monorepo deps

* chore: add astro as dep to config

* chore: update package lock

* fix: tailwind import on landing-page

* chore: type module

* chore: remove ci run for node 16

* chore: ci run ci

* chore: remove astro check from ci

* chore: remove lint check from ci

* fix: tailwindcss import

* fix: check errors on apps

* chore: fix npm run check

* chore: updat emonorepo deps

* chore: not a module

* chore: use astro-iconify instead

* chore: update prettier

* chore: use prettier formatter

* chore: update lint deps

* chore: run lint on ci

* chore: add changeset
2023-09-25 16:27:50 +02:00
Ayo Ayco
92b11031c3
Update README.md (#302) 2023-05-16 12:40:06 +02:00
Ayo Ayco
6e27739d7e
feat(landing-page): shorter install script (#280) 2023-03-28 11:21:10 +02:00
github-actions[bot]
c2384944fb
chore: Update version for release (#293)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-25 21:15:40 +01:00
Ayo Ayco
334a4c552b
chore: move from release to changelog (#292) 2023-03-25 21:10:33 +01:00
Ayo
06d4ce1126 chore: move RELEASE content to CHANGELOG 2023-03-25 20:52:53 +01:00
github-actions[bot]
b07d926e02
chore: Update version for release (#291) 2023-03-25 20:36:19 +01:00
Ayo Ayco
fb11b738f4
feat: initialize create-astro-reactive package (#281) 2023-03-25 20:02:36 +01:00
Ayo Ayco
d50d8c1329
devops: fix last changeset (#289) 2023-03-25 10:13:29 +01:00
Ayo Ayco
e50aa4c5e9
update readme (#287)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2023-03-25 10:07:00 +01:00
Ayo Ayco
30de5161f2
feat(form): change validate on load to true by default (#284) 2023-03-25 09:47:46 +01:00
github-actions[bot]
b4901e87f9
chore: Update version for release (#276)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-24 22:34:47 +01:00
Ayo Ayco
414a0bd854
devops: fix dependencies for Astro v2+ support (#275) 2023-03-24 21:43:09 +01:00
Ayo Ayco
f3420f9272
Rollback publish (#274)
* chore: rollback release

* roll back deps

* update package-lock
2023-03-24 14:57:40 +01:00
Ayo Ayco
9bd2bde88c
chore: release form@0.7.0, validator@0.3.0, common@0.1.6 (#272) 2023-03-24 14:10:38 +01:00
56 changed files with 17806 additions and 10977 deletions

11
.build.yml Normal file
View file

@ -0,0 +1,11 @@
image: alpine/edge
secrets:
- bbfcb6dc-7c4a-42ee-a11a-022f0339a133
environment:
REPO: astro-reactive
GH_USER: ayoayco
tasks:
- push-mirror: |
cd ~/"${REPO}"
git config --global credential.helper store
git push --mirror "https://github.com/${GH_USER}/${REPO}"

View file

@ -23,6 +23,7 @@ Tag a reviewer: @
Tasks:
- [ ] I have ran the build command to make sure apps are working: `npm run build`
- [ ] I have ran the tests to make sure nothing is broken: `npm run test`
- [ ] I have ran the Astro checker: `npm run check`
- [ ] I have ran the linter to make sure code is clean: `npm run lint`
- [ ] I have reviewed my own code to remove changes that are not needed

View file

@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
@ -25,8 +25,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run clean
- run: npm ci
- run: npm run check
- run: npm run build
- run: npm run test
- run: npm run lint

1
.npmrc Normal file
View file

@ -0,0 +1 @@
legacy-peer-deps=true

View file

@ -4,5 +4,8 @@
"source.fixAll": true
},
"cSpell.words": ["Astro", "maxlength"],
"prettier.documentSelectors": ["**/*.astro"]
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
}
}

View file

@ -8,7 +8,7 @@ This is a library of components and utilities for building reactive user interfa
There's a lot of opportunity to contribute. A good start will be to understand what Astro is, and how to set up a basic Astro project. For this, the [Astro website](https://astro.build) and [documentation](https://docs.astro.build/en/getting-started/) are good places to start.
# Contributing
## Contributing
Any contribution is welcome. Feel free to look around to find something that interests you. :)
@ -18,7 +18,7 @@ If you don't find anything there, we are happy to help you get your contribution
You can always [create a new issue](https://github.com/astro-reactive/astro-reactive/issues/new/choose) for your own idea, [post on our discussions](https://github.com/astro-reactive/astro-reactive/discussions) or join our [Discord](https://discord.gg/kkvW7GYNAp).
# The Astro Reactive Library
## The Astro Reactive Library
This project aims to be a library that developers will use to create reactive UIs with Astro.
@ -26,7 +26,7 @@ The project is made up of [NPM workspaces](https://docs.npmjs.com/cli/v7/using-n
We are using [Turborepo](https://turbo.build/repo) as our monorepo build system.
Packages:
### Packages:
1. [demo](https://github.com/astro-reactive/astro-reactive/tree/main/apps/demo) in the directory `apps/demo`
- Astro web application that we use to test and demonstrate the library components
@ -34,6 +34,8 @@ Packages:
- component that allows developers to programmatically build a form
1. [validator](https://github.com/astro-reactive/astro-reactive/tree/main/packages/validator) in the directory `packages/astro-reactive-validator`
- component that allows developers to set up validators for their forms easily
### Apps
1. [docs](https://github.com/astro-reactive/astro-reactive/tree/main/apps/docs) - in the directory `apps/docs`
- Astro website for the library's extensive documentation
1. [landing-page](https://github.com/astro-reactive/astro-reactive/tree/main/apps/landing-page) - in the directory `apps/landing-page`
@ -42,7 +44,7 @@ Packages:
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/astro-reactive/astro-reactive.git)
# Running locally
## Running locally
We mainly use the `demo` app to see changes we make on the packages. Do the following to start hacking:
@ -90,7 +92,7 @@ npm run docs
npm run landing-page
```
# Running the linter and tests
## Running the linter and tests
Please run the linter and tests before creating a PR to avoid delays in PR reviews. Fix all linting errors or failing tests whey you run the following commands.
@ -108,7 +110,7 @@ npm test
npm run lint:fix
```
# Hacking with the packages
## Hacking with the packages
As mentioned above, this project involves packages that are intended to be used in Astro applications. The demo app is our way to test and play with the packages.
@ -116,7 +118,7 @@ If you plan to add features or fix bugs that are found in the packages, such as
Thank you again for your interest in contributing!
# Next Actions
## Next Actions
✍️ Read on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/); you'll see this used around issues, PRs, and commit messages

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Ayo Ayco
Copyright (c) 2022 Astro Reactive
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,9 +1,17 @@
> [!WARNING]
>
> Please read: [an important announcement about the project](https://github.com/astro-reactive/astro-reactive/discussions/304)
>
> *As of now we still are in an exploratory phase and the library is not ready for production. We appreciate the interest. We look forward to your feedback and welcome all kinds of contribution. :)*
<p align="center">
<img src="https://raw.githubusercontent.com/astro-reactive/astro-reactive/main/.github/assets/logo/min-banner.png" alt="Astro Reactive Library Logo">
<br />
<strong>Astro Reactive Library</strong>
<br />
Let your data build your UI with native <a href="https://astro.build">Astro</a> components and architecture.
Server-Side Rendered, Dynamic Components
<br />
Let your data build your UI with <a href="https://astro.build">Astro</a>
<br />
<br />
<a href="https://github.com/astro-reactive/astro-reactive/actions/workflows/build-and-test.yml">
@ -25,8 +33,8 @@
| Package | Release notes | Description |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [form](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](./packages/form/RELEASE.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](./packages/validator/RELEASE.md) | validators for editable fields |
| [form](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](./packages/form/CHANGELOG.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](./packages/validator/CHANGELOG.md) | validators for editable fields |
| data-grid | 🛠 | a dynamic data grid of values |
| themes | 🛠 | easy-to-use, accessible, consistent cross-browser styles |
| viz | 🛠 | data visualization that emits and responds to events |
@ -110,4 +118,4 @@ This project is only possible because of the support and contribution of our com
/>
</a>
-->
-->

View file

@ -6,12 +6,13 @@ module.exports = {
tabWidth: 2,
trailingComma: 'es5',
useTabs: true,
plugins: ['../../node_modules/prettier-plugin-astro'],
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
astroAllowShorthand: false,
},
},
{

36
apps/demo/CHANGELOG.md Normal file
View file

@ -0,0 +1,36 @@
# @astro-reactive/demo
## 0.1.1
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
- Updated dependencies [a1cc4b0]
- @astro-reactive/validator@0.4.1
- @astro-reactive/form@0.9.1
## 0.1.0
### Minor Changes
- 4d2a577: Support Astro 3
### Patch Changes
- Updated dependencies [4d2a577]
- @astro-reactive/validator@0.4.0
- @astro-reactive/form@0.9.0
## 0.0.2
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization
- 30de516: Change the default of `validateOnLoad` property to true, making server-side rendering validation the default behavior for the `Form` component.
Update the demo `index.astro` page by removing the `validateOnLoad` property/directive on the example which should still result to server-side rendered validation results.
- Updated dependencies [fb11b73]
- Updated dependencies [30de516]
- @astro-reactive/validator@0.3.3
- @astro-reactive/form@0.8.0

View file

@ -1,14 +1,13 @@
{
"name": "@astro-reactive/demo",
"description": "Demo App for Astro Reactive Library",
"type": "module",
"version": "0.0.1",
"author": "Ayo Ayco <ayo@ayco.io> (https://ayco.io)",
"version": "0.1.1",
"author": "astro-reactive",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"check": "astro check && tsc --noEmit && astro build",
"check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
@ -20,7 +19,9 @@
"dependencies": {
"@astro-reactive/form": "*",
"@astro-reactive/validator": "*",
"astro": "^2.1.3"
"@astrojs/check": "^0.2.0",
"astro": "^4.0.3",
"typescript": "^5.2.2"
},
"main": "index.js",
"repository": {
@ -31,15 +32,15 @@
"bugs": {
"url": "https://github.com/astro-reactive/astro-reactive/issues"
},
"homepage": "https://github.com/astro-reactive/astro-reactive#readme",
"homepage": "https://astro-reactive.js.org",
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
"@types/eslint": "^8.4.10",
"@types/prettier": "^2.7.2",
"eslint": "^8.31.0",
"prettier": "^2.8.3",
"prettier-plugin-astro": "^0.7.2",
"rimraf": "^3.0.2"
"@types/eslint": "^8.44.3",
"@types/prettier": "^3.0.0",
"eslint": "^8.50.0",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"rimraf": "^5.0.1"
}
}

View file

@ -1,6 +1,7 @@
---
import Form, { ControlConfig, FormGroup, FormControl } from '@astro-reactive/form';
import type { Submit } from '@astro-reactive/common/types';
import Form, { FormGroup, FormControl } from '@astro-reactive/form';
import type { ControlConfig } from '@astro-reactive/form';
import type { Submit } from '@astro-reactive/common';
import { Validators } from '@astro-reactive/validator';
import Layout from '../components/Layout.astro';
@ -103,7 +104,6 @@ const submit: Submit = {
<Layout title={title} theme={theme}>
<Form
validateOnLoad
showValidationHints
formGroups={form}
theme={theme}

View file

@ -1,5 +1,6 @@
---
import Form, { ControlConfig, FormControl, FormGroup } from '@astro-reactive/form';
import Form, { FormControl, FormGroup } from '@astro-reactive/form';
import type { ControlConfig } from '@astro-reactive/form';
import { Validators } from '@astro-reactive/validator';
import type { Submit } from '@astro-reactive/common';
import Layout from '../components/Layout.astro';

View file

@ -1,3 +1,6 @@
{
"extends": "@astro-reactive/tsconfig/base.json"
"extends": "@astro-reactive/tsconfig/base.json",
"compilerOptions": {
"skipLibCheck": true
}
}

View file

@ -6,7 +6,7 @@ module.exports = {
tabWidth: 2,
trailingComma: "es5",
useTabs: true,
plugins: ["../../node_modules/prettier-plugin-astro"],
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: "*.astro",

27
apps/docs/CHANGELOG.md Normal file
View file

@ -0,0 +1,27 @@
# @astro-reactive/docs
## 0.1.1
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
## 0.1.0
### Minor Changes
- 4d2a577: Support Astro 3
## 0.0.3
### Patch Changes
- 334a4c5: - Update documentation links to release notes
## 0.0.2
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization

View file

@ -10,5 +10,5 @@ export default defineConfig({
// Enable React for the Algolia search component.
react(),
],
site: `https://docs.astro-reactive.dev`,
site: `https://docs.astro-reactive.js.org`,
});

View file

@ -1,13 +1,13 @@
{
"name": "@astro-reactive/docs",
"type": "module",
"version": "0.0.1",
"version": "0.1.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"docs": "astro dev",
"check": "astro check && tsc --noEmit && astro build",
"check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
@ -17,18 +17,18 @@
"clean": "rimraf node_modules .turbo dist"
},
"dependencies": {
"@algolia/client-search": "^4.13.1",
"@astrojs/preact": "^1.1.1",
"@astrojs/react": "^1.1.4",
"@docsearch/css": "^3.1.0",
"@docsearch/react": "^3.1.0",
"@types/node": "^18.0.0",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.0",
"astro": "^2.1.3",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0"
"@algolia/client-search": "^4.20.0",
"@astrojs/preact": "^3.0.0",
"@astrojs/react": "^3.0.2",
"@docsearch/css": "^3.5.2",
"@docsearch/react": "^3.5.2",
"@types/node": "^20.6.5",
"@types/react": "^18.2.22",
"@types/react-dom": "^18.2.7",
"astro": "^4.0.3",
"preact": "^10.17.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"description": "```bash npm create astro@latest -- --template docs ```",
"main": "index.js",
@ -36,20 +36,20 @@
"type": "git",
"url": "git+https://github.com/astro-reactive/astro-reactive.git"
},
"author": "",
"author": "astro-reactive",
"license": "ISC",
"bugs": {
"url": "https://github.com/astro-reactive/astro-reactive/issues"
},
"homepage": "https://github.com/astro-reactive/astro-reactive#readme",
"homepage": "https://astro-reactive.js.org",
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
"@types/eslint": "^8.4.10",
"@types/prettier": "^2.7.2",
"eslint": "^8.31.0",
"prettier": "^2.8.3",
"prettier-plugin-astro": "^0.7.2",
"@types/eslint": "^8.44.3",
"@types/prettier": "^2.7.3",
"eslint": "^8.50.0",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"rimraf": "^3.0.2"
}
}

View file

@ -1,5 +1,6 @@
---
import { SITE, OPEN_GRAPH, Frontmatter } from '../config';
import { SITE, OPEN_GRAPH } from '../config';
import type { Frontmatter } from '../config';
export interface Props {
frontmatter: Frontmatter;

View file

@ -50,8 +50,8 @@ We will also make this clear in our library documentation as we see them.
| Package | Release notes | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [form](/en/api/form/form-component) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/RELEASE.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/RELEASE.md) | validators for editable fields |
| [form](/en/api/form/form-component) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/CHANGELOG.md) | a dynamic form which can be modified programmatically |
| [validator](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/validator)](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/CHANGELOG.md) | validators for editable fields |
| data-grid | 🛠 | a dynamic data grid of values |
| themes | 🛠 | easy-to-use, accessible, consistent cross-browser styles |
| viz | 🛠 | data visualization that emits and responds to events |

View file

@ -6,7 +6,7 @@ module.exports = {
tabWidth: 2,
trailingComma: 'es5',
useTabs: true,
plugins: ['../../node_modules/prettier-plugin-astro'],
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',

View file

@ -0,0 +1,25 @@
# @astro-reactive/landing-page
## 1.0.1
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
## 1.0.0
### Major Changes
- 6e27739: Make the npm install script shorter
### Minor Changes
- 4d2a577: Support Astro 3
## 0.0.2
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization

View file

@ -1,12 +1,7 @@
import tailwind from '@astrojs/tailwind';
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
export default defineConfig({
site: 'https://astro-reactive.dev',
integrations: [tailwind()],
vite: {
ssr: {
external: ['svgo'],
},
},
site: 'https://astro-reactive.js.org',
});

View file

@ -1,12 +1,12 @@
{
"name": "@astro-reactive/landing-page",
"version": "0.0.1",
"version": "1.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"landing-page": "astro dev",
"check": "astro check && tsc --noEmit && astro build",
"check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
@ -17,22 +17,22 @@
},
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astrojs/tailwind": "^3.1.1",
"@types/eslint": "^8.4.10",
"@types/eslint": "^8.44.3",
"@types/micromodal": "^0.3.3",
"@types/prettier": "^2.7.2",
"astro": "^2.1.3",
"astro-icon": "^0.8.0",
"eslint": "^8.31.0",
"prettier": "^2.7.1",
"prettier-plugin-astro": "^0.7.2",
"rimraf": "^3.0.2",
"@types/prettier": "^3.0.0",
"astro": "^4.0.3",
"eslint": "^8.50.0",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"rimraf": "^5.0.1",
"tailwindcss-fluid-type": "^2.0.3"
},
"dependencies": {
"@astro-reactive/tsconfig": "*",
"@astrojs/tailwind": "^5.0.3",
"astro-iconify": "^1.2.0",
"micromodal": "^0.4.10",
"tailwindcss": "^3.1.8"
"tailwindcss": "^3.3.6"
},
"description": "[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)",
"main": "index.js",
@ -40,10 +40,10 @@
"type": "git",
"url": "git+https://github.com/astro-reactive/astro-reactive.git"
},
"author": "Ayo Ayco",
"author": "astro-reactive",
"license": "MIT",
"bugs": {
"url": "https://github.com/astro-reactive/astro-reactive/issues"
},
"homepage": "https://github.com/astro-reactive/astro-reactive#readme"
"homepage": "https://astro-reactive.js.org"
}

View file

@ -1,46 +1,39 @@
---
import { Icon } from "astro-icon";
import { Icon } from 'astro-iconify';
// import Starfield from "~/components/starfield.astro";
---
<section class="h-screen flex flex-col px-10 astro relative">
<!--Starfield /-->
<div class="flex">
<div class="flex-1">
<h1 class="text-6xl font-extrabold gradient-text">
Native Astro Components
</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi facere,
culpa corporis aspernatur obcaecati autem fugiat excepturi, possimus
mollitia est veritatis eaque officiis quia porro nesciunt esse unde
consequuntur in nobis at earum dolore quod magni ipsam. Quo
necessitatibus modi sequi quas perspiciatis laborum enim
</p>
</div>
<div class="flex-1 items-center justify-center md:flex hidden">
<h1 class="sr-only">Astro</h1>
<Icon name="logomark" class="astro-logo" />
<Icon name="wordmark" class="h-10" />
</div>
</div>
<div
class="benefits flex flex-col md:flex-row justify-between space-y-4 md:space-y-0 my-10"
>
<img src="https://via.placeholder.com/200" alt="benefit 1" />
<img src="https://via.placeholder.com/200" alt="benefit 2" />
<img src="https://via.placeholder.com/200" alt="benefit 3" />
<img src="https://via.placeholder.com/200" alt="benefit 4" />
</div>
<!--Starfield /-->
<div class="flex">
<div class="flex-1">
<h1 class="text-6xl font-extrabold gradient-text">Native Astro Components</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi facere, culpa corporis
aspernatur obcaecati autem fugiat excepturi, possimus mollitia est veritatis eaque officiis
quia porro nesciunt esse unde consequuntur in nobis at earum dolore quod magni ipsam. Quo
necessitatibus modi sequi quas perspiciatis laborum enim
</p>
</div>
<div class="flex-1 items-center justify-center md:flex hidden">
<h1 class="sr-only">Astro Reactive</h1>
</div>
</div>
<div class="benefits flex flex-col md:flex-row justify-between space-y-4 md:space-y-0 my-10">
<img src="https://via.placeholder.com/200" alt="benefit 1" />
<img src="https://via.placeholder.com/200" alt="benefit 2" />
<img src="https://via.placeholder.com/200" alt="benefit 3" />
<img src="https://via.placeholder.com/200" alt="benefit 4" />
</div>
</section>
<style>
.astro {
padding-top: 7rem;
}
.astro {
padding-top: 7rem;
}
.astro-logo {
width: 10rem;
height: 10rem;
}
.astro-logo {
width: 10rem;
height: 10rem;
}
</style>

View file

@ -1,107 +1,110 @@
---
import { Icon } from "astro-icon";
import { Icon } from 'astro-iconify';
---
<div
id="toast-success"
class="items-center p-4 mb-4 w-full max-w-xs text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800 flex transition"
role="alert"
id="toast-success"
class="items-center p-4 mb-4 w-full max-w-xs text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800 flex transition"
role="alert"
>
<div
class="inline-flex flex-shrink-0 justify-center items-center w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"
>
<svg
aria-hidden="true"
class="w-5 h-5"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
><path
fill-rule="evenodd"
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
clip-rule="evenodd"></path>
</svg>
<span class="sr-only">Check icon</span>
</div>
<div class="ml-3 text-sm font-normal">Copied to clipboard!</div>
<button
type="button"
class="ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"
id="toast-close-btn"
aria-label="Close"
>
<span class="sr-only">Close</span>
<svg
aria-hidden="true"
class="w-5 h-5"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
><path
fill-rule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule="evenodd"></path>
</svg>
</button>
<div
class="inline-flex flex-shrink-0 justify-center items-center w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"
>
<svg
aria-hidden="true"
class="w-5 h-5"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
><path
fill-rule="evenodd"
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
clip-rule="evenodd"></path>
</svg>
<span class="sr-only">Check icon</span>
</div>
<div class="ml-3 text-sm font-normal">Copied to clipboard!</div>
<button
type="button"
class="ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"
id="toast-close-btn"
aria-label="Close"
>
<span class="sr-only">Close</span>
<svg
aria-hidden="true"
class="w-5 h-5"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
><path
fill-rule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule="evenodd"></path>
</svg>
</button>
</div>
<button
class="copy-btn flex items-center w-4/5 mt-3 justify-center astro-md:w-1/2 astro-lg:w-[28%] astro-lg:mt-0 astro-lg:ml-3 max-w-md"
id="copy-command-button"
class="copy-btn flex items-center w-4/5 mt-3 justify-center max-w-xs astro-md:w-1/2 astro-lg:w-sm astro-lg:mt-0 astro-lg:ml-3"
id="copy-command-button"
>
<span id="command"
>npm install @astro-reactive/form @astro-reactive/validator</span
>
<Icon name="mdi:content-copy" width="40px" height="40px" />
<span id="command">&gt; npm install @astro-reactive/form</span>
<Icon name="mdi:content-copy" width="30px" height="30px" />
</button>
<style>
.copy-btn {
/* max-width: 50%; */
color: #fff;
background-color: #2f2f2f;
border-radius: 4px;
padding: 6px 16px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s ease-in-out;
}
.copy-btn {
/* max-width: 50%; */
color: #fff;
background-color: #2f2f2f;
border-radius: 4px;
padding: 6px 16px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s ease-in-out;
}
.copy-btn > span {
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
}
span#command {
margin-right: 1rem;
padding: 0.5rem 0;
}
.copy-btn:hover {
background-color: #3f3f3f;
}
.copy-btn > span {
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
}
#toast-success {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%) translateY(100%);
opacity: 0;
z-index: 999;
}
.copy-btn:hover {
background-color: #3f3f3f;
}
#toast-success {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%) translateY(100%);
opacity: 0;
z-index: 999;
}
</style>
<script>
const copyCommandButton = document.getElementById("copy-command-button");
const commandText = document.getElementById("command").innerText;
const toastSuccess = document.getElementById("toast-success");
const toastClose = document.getElementById("toast-close-btn");
const copyCommandButton = document.getElementById('copy-command-button');
const commandText = document.getElementById('command').innerText;
const toastSuccess = document.getElementById('toast-success');
const toastClose = document.getElementById('toast-close-btn');
copyCommandButton?.addEventListener("click", () => {
toastSuccess.style.transform = "translateX(-50%) translateY(0)";
toastSuccess.style.opacity = "1";
navigator.clipboard.writeText(commandText);
});
copyCommandButton?.addEventListener('click', () => {
toastSuccess.style.transform = 'translateX(-50%) translateY(0)';
toastSuccess.style.opacity = '1';
navigator.clipboard.writeText(commandText);
});
toastClose?.addEventListener("click", () => {
toastSuccess.style.transform = "translateX(-50%) translateY(100%)";
toastSuccess.style.opacity = "0";
});
toastClose?.addEventListener('click', () => {
toastSuccess.style.transform = 'translateX(-50%) translateY(100%)';
toastSuccess.style.opacity = '0';
});
</script>

View file

@ -1,5 +1,5 @@
---
import { Icon } from 'astro-icon';
import { Icon } from 'astro-iconify';
// import ThemeSwitcher from "~/components/theme-switcher.astro";
const socials = [
@ -57,9 +57,6 @@ const socials = [
<Icon pack="mdi" name="close" class="h-8" />
</button>
</header>
<div class="flex justify-center">
<Icon name="logomark" class="h-16" />
</div>
</div>
</div>
</div>

View file

@ -1,5 +1,5 @@
---
import { Icon } from 'astro-icon';
import { Icon } from 'astro-iconify';
import Copynpm from '~/components/copynpm.astro';
---
@ -15,7 +15,7 @@ import Copynpm from '~/components/copynpm.astro';
class="mt-8 flex justify-center flex-col items-center astro-lg:flex-row astro-lg:justify-center"
>
<a
href="https://docs.astro-reactive.dev/en/api/form/form-component/"
href="https://docs.astro-reactive.js.org/en/api/form/form-component/"
class="flex items-center w-4/5 astro-md:w-1/2 justify-center bg-blue-500 hover:bg-blue-400 hover:text-white text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded transition-colors astro-lg:w-auto"
>
<span class="pr-2">Get Started</span>

View file

@ -1,97 +1,97 @@
<div id="starfield" class="absolute -z-10 inset-0">
<canvas id="starfield-canvas"></canvas>
<canvas id="starfield-canvas"></canvas>
</div>
<script>
const COUNT = 800;
const SPEED = 0.3;
const COUNT = 100;
const SPEED = 0.07;
class Star {
x: number;
y: number;
z: number;
xPrev: number;
yPrev: number;
class Star {
x: number;
y: number;
z: number;
xPrev: number;
yPrev: number;
constructor(x = 0, y = 0, z = 0) {
this.x = x;
this.y = y;
this.z = z;
this.xPrev = x;
this.yPrev = y;
}
constructor(x = 0, y = 0, z = 0) {
this.x = x;
this.y = y;
this.z = z;
this.xPrev = x;
this.yPrev = y;
}
update(width: number, height: number, speed: number) {
this.xPrev = this.x;
this.yPrev = this.y;
this.z += speed * 0.0675;
this.x += this.x * (speed * 0.0225) * this.z;
this.y += this.y * (speed * 0.0225) * this.z;
if (
this.x > width / 2 ||
this.x < -width / 2 ||
this.y > height / 2 ||
this.y < -height / 2
) {
this.x = Math.random() * width - width / 2;
this.y = Math.random() * height - height / 2;
this.xPrev = this.x;
this.yPrev = this.y;
this.z = 0;
}
}
update(width: number, height: number, speed: number) {
this.xPrev = this.x;
this.yPrev = this.y;
this.z += speed * 0.0675;
this.x += this.x * (speed * 0.0225) * this.z;
this.y += this.y * (speed * 0.0225) * this.z;
if (
this.x > width / 2 ||
this.x < -width / 2 ||
this.y > height / 2 ||
this.y < -height / 2
) {
this.x = Math.random() * width - width / 2;
this.y = Math.random() * height - height / 2;
this.xPrev = this.x;
this.yPrev = this.y;
this.z = 0;
}
}
draw(ctx: CanvasRenderingContext2D) {
ctx.lineWidth = this.z;
ctx.beginPath();
ctx.moveTo(this.x, this.y);
ctx.lineTo(this.xPrev, this.yPrev);
ctx.stroke();
}
}
draw(ctx: CanvasRenderingContext2D) {
ctx.lineWidth = this.z;
ctx.beginPath();
ctx.moveTo(this.x, this.y);
ctx.lineTo(this.xPrev, this.yPrev);
ctx.stroke();
}
}
const stars = Array.from({ length: COUNT }, () => new Star(0, 0, 0));
let rafId = 0;
const stars = Array.from({ length: COUNT }, () => new Star(0, 0, 0));
let rafId = 0;
const canvas: HTMLCanvasElement = document.querySelector("#starfield-canvas");
const ctx = canvas.getContext("2d");
const canvas: HTMLCanvasElement = document.querySelector('#starfield-canvas');
const ctx = canvas.getContext('2d');
const container = document.querySelector("#starfield");
const resizeObserver = new ResizeObserver(setup);
resizeObserver.observe(container);
const container = document.querySelector('#starfield');
const resizeObserver = new ResizeObserver(setup);
resizeObserver.observe(container);
function setup() {
rafId > 0 && cancelAnimationFrame(rafId);
const { clientWidth: width, clientHeight: height } = container;
function setup() {
rafId > 0 && cancelAnimationFrame(rafId);
const { clientWidth: width, clientHeight: height } = container;
const dpr = window.devicePixelRatio || 1;
canvas.width = width * dpr;
canvas.height = height * dpr;
canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
ctx.scale(dpr, dpr);
const dpr = window.devicePixelRatio || 1;
canvas.width = width * dpr;
canvas.height = height * dpr;
canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
ctx.scale(dpr, dpr);
for (const star of stars) {
star.x = Math.random() * width - width / 2;
star.y = Math.random() * height - height / 2;
star.z = 0;
}
for (const star of stars) {
star.x = Math.random() * width - width / 2;
star.y = Math.random() * height - height / 2;
star.z = 0;
}
ctx.translate(width / 2, height / 2);
ctx.fillStyle = "rgba(0, 0, 0, 0.4)";
ctx.strokeStyle = "white";
rafId = requestAnimationFrame(frame);
}
ctx.translate(width / 2, height / 2);
ctx.fillStyle = 'rgba(0, 0, 0, 0.4)';
ctx.strokeStyle = 'white';
rafId = requestAnimationFrame(frame);
}
function frame() {
const { clientWidth: width, clientHeight: height } = container;
function frame() {
const { clientWidth: width, clientHeight: height } = container;
for (const star of stars) {
star.update(width, height, SPEED);
star.draw(ctx);
}
for (const star of stars) {
star.update(width, height, SPEED);
star.draw(ctx);
}
ctx.fillRect(-width / 2, -height / 2, width, height);
rafId = requestAnimationFrame(frame);
}
ctx.fillRect(-width / 2, -height / 2, width, height);
rafId = requestAnimationFrame(frame);
}
</script>

View file

@ -1,5 +1,5 @@
---
import { Icon } from "astro-icon";
import { Icon } from "astro-iconify";
---
<!--

View file

@ -1,92 +1,87 @@
---
import "~/styles/index.css";
import Header from "~/components/header.astro";
// import Icon from "astro-icon";
import Splash from "~/components/splash.astro";
import '~/styles/index.css';
import Header from '~/components/header.astro';
// import Icon from "astro-iconify";
import Splash from '~/components/splash.astro';
// import AstroSection from "~/sections/astro-section.astro";
import Starfield from "~/components/starfield.astro";
import Starfield from '~/components/starfield.astro';
const { site } = Astro;
const image = new URL("social.jpg", site);
const image = new URL('social.jpg', site);
const description =
"Library of components and utilities for building reactive user interfaces with Astro";
'Library of components and utilities for building reactive user interfaces with Astro';
---
<html lang="en" class="h-full motion-safe:scroll-smooth" data-theme="dark">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<title>Astro Reactive | {description} 🚀</title>
<meta name="description" content={description} />
<title>Astro Reactive | {description} 🚀</title>
<meta name="description" content={description} />
<!-- fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap"
media="print"
onload="this.media='all'"
/>
<noscript>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap"
/>
</noscript>
<!-- fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap"
media="print"
onload="th
is.media=' a ll'"
/>
<noscript>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap"
/>
</noscript>
<!-- social media -->
<meta property="og:title" content="Astro" />
<meta property="og:type" content="website" />
<meta property="og:description" content={description} />
<meta property="og:image" content={image} />
<meta property="og:url" content={site} />
<meta name="twitter:card" content="summary_large_image" />
<!-- social media -->
<meta property="og:title" content="Astro" />
<meta property="og:type" content="website" />
<meta property="og:description" content={description} />
<meta property="og:image" content={image} />
<meta property="og:url" content={site} />
<meta name="twitter:card" content="summary_large_image" />
<!-- initialize theme -->
<script is:inline>
document.documentElement.dataset.theme = "dark";
// const themeSaved = localStorage.getItem("theme");
// const forceTheme = "dark";
<!-- initialize theme -->
<script is:inline>
document.documentElement.dataset.theme = 'dark';
// const themeSaved = localStorage.getItem("theme");
// const forceTheme = "dark";
// if (themeSaved) {
// document.documentElement.dataset.theme = themeSaved;
// } else {
// // const prefersDark = window.matchMedia(
// // "(prefers-color-scheme: dark)"
// // ).matches;
// document.documentElement.dataset.theme = forceTheme; // prefersDark ? "dark" : "light";
// }
// if (themeSaved) {
// document.documentElement.dataset.theme = themeSaved;
// } else {
// // const prefersDark = window.matchMedia(
// // "(prefers-color-scheme: dark)"
// // ).matches;
// document.documentElement.dataset.theme = forceTheme; // prefersDark ? "dark" : "light";
// }
// window
// .matchMedia("(prefers-color-scheme: dark)")
// ?.addEventListener("change", (event) => {
// if (!localStorage.getItem("theme")) {
// document.documentElement.dataset.theme = event.matches
// ? "dark"
// : "light";
// }
// });
</script>
</head>
<body
class="h-full overflow-x-hidden text-base bg-default text-default selection:bg-secondary selection:text-white"
>
<Starfield />
<Header />
<Splash />
<!--AstroSection /-->
<!-- for Mastodon verification -->
<a rel="me" href="https://fosstodon.org/@ayo" style="display:none">Mastodon</a>
<a rel="me" href="https://social.ayco.io/@ayo" style="display:none">Mastodon</a>
</body>
// window
// .matchMedia("(prefers-color-scheme: dark)")
// ?.addEventListener("change", (event) => {
// if (!localStorage.getItem("theme")) {
// document.documentElement.dataset.theme = event.matches
// ? "dark"
// : "light";
// }
// });
</script>
</head>
<body
class="h-full overflow-x-hidden text-base bg-default text-default selection:bg-secondary selection:text-white"
>
<Starfield />
<Header />
<Splash />
<!--AstroSection /-->
</body>
</html>

View file

@ -1,5 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const defaultTheme = require('tailwindcss/defaultTheme');
import * as defaultTheme from 'tailwindcss/defaultTheme';
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,svelte,ts,tsx,vue}'],

View file

@ -4,7 +4,7 @@ module.exports = {
node: true,
},
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
plugins: ["@typescript-eslint", "prettier",],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",

View file

@ -2,12 +2,13 @@
"name": "@astro-reactive/eslint-config-custom",
"main": "./index.cjs",
"dependencies": {
"@types/eslint": "^8.4.10",
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier-plugin-astro": "^0.7.2"
"@types/eslint": "^8.44.3",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0"
}
}

View file

@ -1,3 +1,6 @@
{
"name": "@astro-reactive/tsconfig"
"name": "@astro-reactive/tsconfig",
"dependencies": {
"astro": "^3.1.3"
}
}

27198
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,12 +3,8 @@
"description": "Astro components for building reactive user interfaces 🚀",
"version": "0.0.0",
"repository": "https://github.com/astro-reactive/astro-reactive",
"homepage": "https://github.com/astro-reactive/astro-reactive#readme",
"author": {
"name": "Ayo Ayco",
"email": "ayo@ayco.io",
"url": "https://ayco.io"
},
"homepage": "https://astro-reactive.js.org",
"author": "astro-reactive",
"type": "module",
"exports": {
".": "./index.ts"
@ -24,11 +20,9 @@
"build": "turbo run build",
"check": "turbo run check",
"clean": "turbo clean",
"simulate:ci": "npm run check && npm run build && npm run test && npm run lint",
"test:watch": "turbo run test:watch",
"test:coverage": "turbo run test:coverage",
"patch": "npm version patch -w",
"minor": "npm version minor -w",
"major": "npm version major -w",
"publish": "turbo run lint build check test && npm publish --access public -w",
"release": "node ./packages/pr-updater.js"
},
@ -39,15 +33,14 @@
"configs/*"
],
"dependencies": {
"@changesets/cli": "^2.26.0",
"prettier-plugin-astro": "^0.7.0",
"prompt-sync": "^4.2.0",
"short-unique-id": "^4.4.4"
"@changesets/cli": "^2.26.2",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"prompt-sync": "^4.2.0"
},
"devDependencies": {
"@vitest/coverage-istanbul": "^0.28.3",
"eslint-config-turbo": "^0.0.4",
"rimraf": "^3.0.2",
"turbo": "^1.7.1"
"eslint-config-turbo": "^1.10.14",
"rimraf": "^5.0.1",
"turbo": "^1.10.14"
}
}

View file

@ -0,0 +1,65 @@
# @astro-reactive/common
## 0.2.1
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
## 0.2.0
### Minor Changes
- 4d2a577: Support Astro 3
## 0.1.9
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization
## 0.1.8
### Patch Changes
- 414a0bd: Fix dependencies for Astro v2+ support
## v0.1.6
- updates on how packages share files
## v0.1.5
- fix form method type to accept: 'get', 'post', 'dialog'
## v0.1.4
- form validation hook property `triggerValidationOn`
- form properties `action` and `method`
## v0.1.2
- make `Checkbox.checked` optional
## v0.1.1
- fix broken `ControlConfig`
## 0.1.0
- deprecate `labelPosition` prop
- TextArea and Dropdown types
## 0.0.3
- update package exports and files
## 0.0.2
- expose types on top-level index
## 0.0.1
- initialize @astro-reactive/common package

View file

@ -1,25 +0,0 @@
### v0.1.5
- fix form method type to accept: 'get', 'post', 'dialog'
### v0.1.4
- form validation hook property `triggerValidationOn`
- form properties `action` and `method`
### v0.1.2
- make `Checkbox.checked` optional
### v0.1.1
- fix broken `ControlConfig`
## 0.1.0
- deprecate `labelPosition` prop
- TextArea and Dropdown types
### 0.0.3
- update package exports and files
### 0.0.2
- expose types on top-level index
### 0.0.1
- initialize @astro-reactive/common package

View file

@ -1,15 +1,14 @@
{
"name": "@astro-reactive/common",
"version": "0.1.5",
"version": "0.3.0",
"description": "Common code for Astro Reactive Packages",
"main": "index.ts",
"types": "./types/index.ts",
"type": "module",
"devDependencies": {
"@astro-reactive/tsconfig": "*",
"rimraf": "^3.0.2"
},
"dependencies": {
"@astro-reactive/tsconfig": "*"
},
"exports": {
".": "./index.ts"
},
@ -25,13 +24,16 @@
"type": "git",
"url": "git+https://github.com/astro-reactive/astro-reactive.git"
},
"author": "Ayo Ayco",
"author": "astro-reactive",
"license": "MIT",
"bugs": {
"url": "https://github.com/astro-reactive/astro-reactive/issues"
},
"homepage": "https://github.com/astro-reactive/astro-reactive#readme",
"homepage": "https://astro-reactive.js.org",
"publishConfig": {
"access": "public"
},
"dependencies": {
"astro": "^4.0.3"
}
}

View file

@ -0,0 +1,21 @@
# create-astro-reactive
## 0.0.4
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
## 0.0.3
### Patch Changes
- 334a4c5: - Update documentation links to release notes
## 0.0.2
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization

View file

@ -0,0 +1,36 @@
<p align="center">
<img src="https://raw.githubusercontent.com/astro-reactive/astro-reactive/main/.github/assets/logo/min-banner.png" alt="Astro Reactive Library Logo">
<br />
<strong>Create Astro Reactive</strong>
<em>⚠️ WORK IN PROGRESS. This does not do anything yet.</em>
<br />
Create a new astro-reactive app
<br />
<br />
<a href="https://www.npmjs.com/package/@astro-reactive/create-astro-reactive">
<img src="https://img.shields.io/npm/v/@astro-reactive/create-astro-reactive" alt="Package information: NPM version" />
</a>
<a href="https://www.npmjs.com/package/@astro-reactive/create-astro-reactive">
<img src="https://img.shields.io/npm/l/@astro-reactive/create-astro-reactive" alt="Package information: NPM license" />
</a>
<a href="https://www.npmjs.com/package/@astro-reactive/create-astro-reactive">
<img src="https://img.shields.io/npm/dt/@astro-reactive/create-astro-reactive" alt="Package information: NPM downloads" />
</a>
<a href="https://www.npmjs.com/package/@astro-reactive/create-astro-reactive">
<img src="https://img.shields.io/librariesio/release/npm/@astro-reactive/create-astro-reactive" alt="Package information: NPM dependencies status" />
</a>
<br />
<br />
</p>
# Create a new Astro Reactive project
```
npm create astro-reactive@latest
```
# We are opensource!
_All [contributions](https://github.com/astro-reactive/astro-reactive/blob/main/CONTRIBUTING.md) are welcome. Let's make the fastest web forms powered by Astro._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/create-astro-reactive/CHANGELOG.md)._

View file

@ -0,0 +1 @@
console.log("Create a new astro-reactive project");

View file

@ -0,0 +1,20 @@
{
"name": "create-astro-reactive",
"version": "0.0.4",
"description": "Create a new astro-reactive app",
"main": "index.js",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/astro-reactive/astro-reactive.git"
},
"author": "astro-reactive",
"license": "MIT",
"bugs": {
"url": "https://github.com/astro-reactive/astro-reactive/issues"
},
"homepage": "https://astro-reactive.js.org",
"dependencies": {
"astro": "^4.0.3"
}
}

View file

@ -6,7 +6,7 @@ module.exports = {
tabWidth: 2,
trailingComma: 'es5',
useTabs: true,
plugins: ['../../node_modules/prettier-plugin-astro'],
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',

View file

@ -1,63 +1,142 @@
### v0.6.7
# @astro-reactive/form
## 0.9.1
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
- Updated dependencies [a1cc4b0]
- @astro-reactive/validator@0.4.1
- @astro-reactive/common@0.2.1
## 0.9.0
### Minor Changes
- 4d2a577: Support Astro 3
### Patch Changes
- Updated dependencies [4d2a577]
- @astro-reactive/validator@0.4.0
- @astro-reactive/common@0.2.0
## 0.8.1
### Patch Changes
- 334a4c5: - Update documentation links to release notes
- Updated dependencies [334a4c5]
- @astro-reactive/validator@0.3.4
## 0.8.0
### Minor Changes
- 30de516: Change the default of `validateOnLoad` property to true, making server-side rendering validation the default behavior for the `Form` component.
Update the demo `index.astro` page by removing the `validateOnLoad` property/directive on the example which should still result to server-side rendered validation results.
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization
- Updated dependencies [fb11b73]
- @astro-reactive/validator@0.3.3
- @astro-reactive/common@0.1.9
## 0.7.2
### Patch Changes
- 414a0bd: Fix dependencies for Astro v2+ support
- Updated dependencies [414a0bd]
- @astro-reactive/validator@0.3.2
- @astro-reactive/common@0.1.8
## v0.7.0
- project chores: updates on how the packages share common files, initial codecov set up
- documentation updates: Readme examples and API docs update
- support for Astro v2
## v0.6.7
- fix form method type to accept: 'get', 'post', 'dialog'
### v0.6.6
## v0.6.6
- implement validation hooks with form's `triggerValidationOn` prop
- types and intellisense improvements
- validation support for RadioGroup
- form's `action` and `method` props
### v0.6.5
## v0.6.5
- fix deps
### v0.6.4
## v0.6.4
- Form component's new `validateOnLoad` property
- FormGroup.setValue() method to set values for the whole form
- fix for Radio Group's inputs not having unique IDs
### v0.6.3
## v0.6.3
- make `Checkbox.checked` optional
### v0.6.2
## v0.6.2
- fix broken `ControlConfig`
### v0.6.1
## v0.6.1
- fix wrong dependency version
## v0.6.0
- deprecate `labelPosition` prop
- implement TextArea control
- add method `setValidators` to FormControl
- implement `readOnly` flag
- implement Dropdown control
### v0.5.1 - v0.5.2
## v0.5.1 - v0.5.2
- use @astro-reactive/common
### v0.5.1
## v0.5.1
- fix for dynamic import of validator causing errors (breaks independence)
## v0.5.0
- server-rendered validation errors (when control was set with invalid value)
- radio control accepts array of value or RadioOption
- added tests for form components
### v0.4.5
## v0.4.5
- update project documentations
### v0.4.4
## v0.4.4
- `validators` property in ControlConfig to set validators for a control
### v0.4.1
## v0.4.1
- set `showValidationHints` to true to show validation hints
## v0.3.0
- new control configuration type `ControlConfig`
### v0.2.7
## v0.2.7
- updated project logo
### v0.2.6
## v0.2.6
- support single `FormGroup` as input to the `Form` component
- implement `Form` component input prop `theme`
- add initial implementation of `FormControl` `isPristine` and `isValid` states
@ -65,14 +144,17 @@
- implement the submitControl Form input prop
- implement the FormControl placeholder attribute
### v0.2.4 to v0.2.5
## v0.2.4 to v0.2.5
- update package README
- update dependencies
### v0.2.2
## v0.2.2
- initial light and dark mode scaffold
- update package README
### v0.2.1
## v0.2.1
- FormGroup.get(name) - returns the FormControl with matching name
- FormControl.setValue(value) - sets the FormControl value

View file

@ -85,7 +85,7 @@ userNameControl?.setValue("RAMOOOON");
/>
```
👉 For more examples and explanations of the component properties, see the [Form API Docs](https://docs.astro-reactive.dev/en/api/form/form-component/).
👉 For more examples and explanations of the component properties, see the [Form API Docs](https://docs.astro-reactive.js.org/en/api/form/form-component/).
# Screenshots
Result of example above:
@ -105,5 +105,5 @@ This Form component is designed to work with [Astro Reactive Validator](https://
👉 _All [contributions](https://github.com/astro-reactive/astro-reactive/blob/main/CONTRIBUTING.md) are welcome. Let's make the fastest web forms powered by Astro._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/RELEASE.md)._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/form/CHANGELOG.md)._

View file

@ -56,7 +56,7 @@ const {
formGroups = [],
theme,
showValidationHints = false,
validateOnLoad = false,
validateOnLoad = true,
readOnly = false,
action = '',
method = 'get',
@ -72,10 +72,18 @@ const formId = Array.isArray(formGroups) ? uid() : formGroups?.id || null;
if (validateOnLoad) {
if (Array.isArray(formGroups)) {
formGroups.forEach((group) =>
group.controls.forEach((control) => control.setValidateOnLoad(validateOnLoad))
group.controls.forEach((control) => {
if ('setValidateOnLoad' in control) {
control.setValidateOnLoad(validateOnLoad);
}
})
);
} else {
formGroups.controls.forEach((control) => control.setValidateOnLoad(validateOnLoad));
formGroups.controls.forEach((control) => {
if ('setValidateOnLoad' in control) {
control.setValidateOnLoad(validateOnLoad);
}
});
}
}
---

View file

@ -50,9 +50,8 @@ export class FormControl {
/**
* Tracks the value and validation status of an individual form control.
* @param config - interface of a `FormControl`'s configuration.
* @param validateOnLoad - determines if a control will be validated before rendering on the server. Defaults to `false`
*/
constructor(private config: ControlConfig, validateOnLoad = false) {
constructor(private config: ControlConfig) {
const {
name,
type = 'text',
@ -83,11 +82,6 @@ export class FormControl {
this._rows = rows;
this._cols = cols;
}
// TODO: implement independence
// form should try to import validator,
// but handle error when it's not installed
this.setValidateOnLoad(validateOnLoad);
}
get id() {
@ -178,6 +172,7 @@ export class FormControl {
const valueStr: string = this._value?.toString() || '';
this._errors = this.validate(valueStr, this._validators);
} else {
// give a console warning that the validator package needs to be installed
// if user did not install the validator, then errors should be empty
this._errors = [];
}

View file

@ -1,14 +1,10 @@
{
"name": "@astro-reactive/form",
"description": "The Reactive Form component for Astro 🔥",
"version": "0.6.7",
"version": "0.10.1",
"repository": "https://github.com/astro-reactive/astro-reactive",
"homepage": "https://docs.astro-reactive.dev/en/api/form/form-component/",
"author": {
"name": "Ayo Ayco",
"email": "ayo@ayco.io",
"url": "https://ayco.io"
},
"homepage": "https://astro-reactive.js.org",
"author": "astro-reactive",
"type": "module",
"exports": {
".": "./index.ts"
@ -30,30 +26,31 @@
"format": "prettier -w .",
"lint": "eslint . --ext .ts,.js",
"lint:fix": "eslint --fix . --ext .ts,.js",
"check": "astro check && tsc --noEmit",
"check": "astro check",
"clean": "rimraf node_modules .turbo dist"
},
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
"@types/eslint": "^8.4.6",
"@types/node": "^18.7.18",
"@types/prettier": "^2.7.0",
"astro": "^2.1.3",
"@vitest/coverage-istanbul": "^0.34.5",
"astro": "^4.0.3",
"astro-component-tester": "^0.6.0",
"eslint": "^8.23.1",
"prettier": "^2.7.1",
"prettier-plugin-astro": "^0.7.0",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"rimraf": "^3.0.2",
"typescript": "^4.8.3",
"vitest": "^0.25.2"
"vitest": "^0.34.5"
},
"peerDependencies": {
"astro": "^2.1.3"
"astro": ">=4.0.3"
},
"license": "MIT",
"dependencies": {
"@astro-reactive/common": "*",
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
"@astro-reactive/validator": "*",
"short-unique-id": "^4.4.4"
},

View file

@ -1,107 +1,114 @@
import fs from 'fs';
import { fileURLToPath } from 'url';
import * as path from 'path';
import promptSync from 'prompt-sync';
import fs from "fs";
import { fileURLToPath } from "url";
import * as path from "path";
import promptSync from "prompt-sync";
const prompt = promptSync({sigint: true});
const prompt = promptSync({ sigint: true });
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
function writeReleaseMD(releaseFile, featuresArr, fixesArr) {
var formattedMessage = "";
var formattedMessage = "";
if (featuresArr.length != 0) {
formattedMessage += "Features";
for (var line of featuresArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
if (featuresArr.length != 0) {
formattedMessage += "Features";
for (var line of featuresArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
}
if (fixesArr.length != 0)
{
formattedMessage += "Fixes";
for (var line of fixesArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
if (fixesArr.length != 0) {
formattedMessage += "Fixes";
for (var line of fixesArr) {
formattedMessage += "\n\t- " + line;
}
formattedMessage += "\n\n";
}
//write file
var oldRelease = fs.readFileSync(releaseFile);
var fd = fs.openSync(releaseFile, 'w+');
//write file
var oldRelease = fs.readFileSync(releaseFile);
var fd = fs.openSync(releaseFile, "w+");
fs.writeSync(fd, formattedMessage, 0, formattedMessage.length, 0);
fs.writeSync(fd, oldRelease, 0, oldRelease.length, formattedMessage.length);
fs.close(fd);
fs.writeSync(fd, formattedMessage, 0, formattedMessage.length, 0);
fs.writeSync(fd, oldRelease, 0, oldRelease.length, formattedMessage.length);
fs.close(fd);
}
function main() {
console.log("Astro Reactive PR Release Updater (ctrl-c to exit)");
console.log("Astro Reactive PR Release Updater (ctrl-c to exit)");
var noChanged, feature, fix, breakExisting;
var featuresArr = [];
var fixesArr = [];
var noChanged, feature, fix, breakExisting;
var featuresArr = [];
var fixesArr = [];
do {
console.log(`What package is changed?
do {
console.log(`What package is changed?
1. Common
2. Form
3. Validator`);
noChanged = prompt(": ");
} while (isNaN(noChanged) || parseInt(noChanged) < 1 || parseInt(noChanged) > 3);
noChanged = prompt(": ");
} while (
isNaN(noChanged) ||
parseInt(noChanged) < 1 ||
parseInt(noChanged) > 3
);
do {
console.log("Description of feature (q to finish): ");
feature = prompt(": ");
if (feature != "q") {
console.log("Will this code change break existing examples and/or demo applications? Y/N");
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
feature += " (BREAKING CHANGE)";
}
featuresArr.push(feature);
}
} while (feature != "q");
do {
console.log("Description of feature (q to finish): ");
feature = prompt(": ");
do {
console.log("Description of fix (q to finish): ");
fix = prompt(": ");
if (fix != "q") {
console.log("Will this code change break existing examples and/or demo applications? Y/N");
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
fix += " (BREAKING CHANGE)";
}
fixesArr.push(fix);
}
} while (fix != "q");
switch (noChanged) {
case '1':
var releaseFile = path.resolve(__dirname, './common/RELEASE.md');
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case '2':
var releaseFile = path.resolve(__dirname, './form/RELEASE.md');
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case '3':
var releaseFile = path.resolve(__dirname, './validator/RELEASE.md');
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
default:
console.log("Invalid package specified.");
if (feature != "q") {
console.log(
"Will this code change break existing examples and/or demo applications? Y/N"
);
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
feature += " (BREAKING CHANGE)";
}
featuresArr.push(feature);
}
} while (feature != "q");
do {
console.log("Description of fix (q to finish): ");
fix = prompt(": ");
if (fix != "q") {
console.log(
"Will this code change break existing examples and/or demo applications? Y/N"
);
breakExisting = prompt(": ");
if (breakExisting == "Y" || breakExisting == "y") {
fix += " (BREAKING CHANGE)";
}
fixesArr.push(fix);
}
} while (fix != "q");
switch (noChanged) {
case "1":
var releaseFile = path.resolve(__dirname, "./common/CHANGELOG.md");
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case "2":
var releaseFile = path.resolve(__dirname, "./form/CHANGELOG.md");
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
case "3":
var releaseFile = path.resolve(__dirname, "./validator/CHANGELOG.md");
writeReleaseMD(releaseFile, featuresArr, fixesArr);
break;
default:
console.log("Invalid package specified.");
}
}
var continueScript;
do {
main();
console.log("Do you want to update another package release? (Y to continue)");
continueScript = prompt(": ");
} while (continueScript == 'Y' || continueScript == 'y');
main();
console.log("Do you want to update another package release? (Y to continue)");
continueScript = prompt(": ");
} while (continueScript == "Y" || continueScript == "y");

View file

@ -6,7 +6,7 @@ module.exports = {
tabWidth: 2,
trailingComma: 'es5',
useTabs: true,
plugins: ['../../node_modules/prettier-plugin-astro'],
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',

View file

@ -0,0 +1,104 @@
# @astro-reactive/validator
## 0.4.1
### Patch Changes
- a1cc4b0: Update homepage to https://astro-reactive.js.org
- Updated dependencies [a1cc4b0]
- @astro-reactive/common@0.2.1
## 0.4.0
### Minor Changes
- 4d2a577: Support Astro 3
### Patch Changes
- Updated dependencies [4d2a577]
- @astro-reactive/common@0.2.0
## 0.3.4
### Patch Changes
- 334a4c5: - Update documentation links to release notes
## 0.3.3
### Patch Changes
- fb11b73: Initial `create-astro-reactive` package
Update packages' meta information (author, homepage)
Upadte LICENSE owner info to `astro-reactive` organization
- Updated dependencies [fb11b73]
- @astro-reactive/common@0.1.9
## 0.3.2
### Patch Changes
- 414a0bd: Fix dependencies for Astro v2+ support
- Updated dependencies [414a0bd]
- @astro-reactive/common@0.1.8
## v0.3.0
- project chores: updates on how the packages share common files, initial codecov set up
- documentation updates: Readme examples and API docs update
- support for Astro v2
## v0.2.7
- support form method type to accept: 'get', 'post', 'dialog'
## v0.2.6
- implement validation hooks with form's `triggerValidationOn` prop
- types and intellisense improvements
## v0.2.5
- fix deps
## v0.2.4
- Validation categories: Error, Warning, Info
## v0.2.3
- make `Checkbox.checked` optional
## v0.2.2
- fix broken `ControlConfig`
## v0.2.1
- fix wrong dependency version
## v0.2.0
- deprecate `labelPosition` prop
## v0.1.1
- use @astro-reactive/common
## v0.1.0
- support server-rendered validation for forms
## v0.0.4
- update project documentation
## v0.0.3
- update examples on the README
## v0.0.1
- Validators
- validator functions

View file

@ -80,7 +80,7 @@ form.controls.push(
-->
```
👉 For more examples and explanations of the component properties, see the [Validators API Docs](https://docs.astro-reactive.dev/en/api/validator/validators/).
👉 For more examples and explanations of the component properties, see the [Validators API Docs](https://docs.astro-reactive.js.org/en/api/validator/validators/).
# Screenshots
@ -103,5 +103,5 @@ This validation library is designed to work with [Astro Reactive Form](https://w
👉 _All [contributions](https://github.com/astro-reactive/astro-reactive/blob/main/CONTRIBUTING.md) are welcome. Let's make the validation library for Astro._
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/RELEASE.md)_.
👉 _This package is a work in progress. See the [change log](https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/CHANGELOG.md)_.

View file

@ -1,39 +0,0 @@
### v0.2.7
- support form method type to accept: 'get', 'post', 'dialog'
### v0.2.6
- implement validation hooks with form's `triggerValidationOn` prop
- types and intellisense improvements
### v0.2.5
- fix deps
### v0.2.4
- Validation categories: Error, Warning, Info
### v0.2.3
- make `Checkbox.checked` optional
### v0.2.2
- fix broken `ControlConfig`
### v0.2.1
- fix wrong dependency version
## v0.2.0
- deprecate `labelPosition` prop
### v0.1.1
- use @astro-reactive/common
## v0.1.0
- support server-rendered validation for forms
### v0.0.4
- update project documentation
### v0.0.3
- update examples on the README
### v0.0.1
- Validators
- validator functions

View file

@ -1,14 +1,10 @@
{
"name": "@astro-reactive/validator",
"description": "Form validation library for Astro 🔥",
"version": "0.2.7",
"version": "0.5.1",
"repository": "https://github.com/astro-reactive/astro-reactive",
"homepage": "https://github.com/astro-reactive/astro-reactive/blob/main/packages/validator/README.md",
"author": {
"name": "Ayo Ayco",
"email": "ayo@ayco.io",
"url": "https://ayco.io"
},
"homepage": "https://astro-reactive.js.org",
"author": "astro-reactive",
"type": "module",
"exports": {
".": "./index.ts"
@ -28,29 +24,30 @@
"format": "prettier -w .",
"lint": "eslint . --ext .ts,.js",
"lint:fix": "eslint --fix . --ext .ts,.js",
"check": "astro check && tsc --noEmit",
"check": "astro check",
"clean": "rimraf node_modules .turbo dist"
},
"devDependencies": {
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*",
"@types/eslint": "^8.4.6",
"@types/node": "^18.7.18",
"@types/prettier": "^2.7.0",
"astro": "^2.1.3",
"@vitest/coverage-istanbul": "^0.34.5",
"astro": "^4.0.3",
"astro-component-tester": "^0.6.0",
"eslint": "^8.23.1",
"prettier": "^2.7.1",
"prettier-plugin-astro": "^0.7.0",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"rimraf": "^3.0.2",
"typescript": "^4.8.3",
"vitest": "^0.25.2"
"vitest": "^0.34.5"
},
"peerDependencies": {
"astro": "^2.1.3"
"astro": ">=4.0.3"
},
"dependencies": {
"@astro-reactive/common": "*",
"@astro-reactive/eslint-config-custom": "*",
"@astro-reactive/tsconfig": "*"
"@astro-reactive/common": "*"
},
"main": "index.js",
"directories": {