diff --git a/.adr.json b/.adr.json deleted file mode 100644 index f5aa6b5b..00000000 --- a/.adr.json +++ /dev/null @@ -1 +0,0 @@ -{"decisions":[{"date":"2021-04-14","filename":"0001-alert-component-spec","id":1,"name":"Alert component spec","state":"Done"},{"date":"2021-04-14","filename":"0002-button-component-spec","id":2,"name":"Button component spec","state":"Proposed"}],"digits":4,"id":2,"language":"en","path":".spec/","prefix":""} \ No newline at end of file diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 00000000..f41c63b0 --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "showcase", + "runtimeExecutable": "bun", + "runtimeArgs": ["run", "--cwd", "apps/showcase", "dev"], + "port": 5173 + } + ] +} diff --git a/.env b/.env new file mode 100644 index 00000000..6a09695a --- /dev/null +++ b/.env @@ -0,0 +1 @@ +BUN_CONFIG_REGISTRY=https://registry.npmjs.org/ diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 42b3d5e9..00000000 --- a/.eslintignore +++ /dev/null @@ -1,10 +0,0 @@ -dist/ -www/ -types/ -coverage/ -**/*.d.ts -node_modules/ -temp/* -coverage/* -src-tauri/ -.eslintrc.cjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 30053c5f..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "extends": [ - "plugin:unicorn/recommended", - "prettier", - "plugin:prettier/recommended" - ], - "env": { - "es6": true, - "node": true - }, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020 - }, - "plugins": [ - "import", - "sort-destructure-keys", - "@typescript-eslint" - ], - "overrides": [ - { - "files": [ - "*.ts", - "*.tsx" - ], - "rules": { - "no-undef": "off", - "no-unused-vars": "off", - "class-methods-use-this": "off", - "import/no-unresolved": "off" - } - } - ], - "rules": { - "quotes": [ - "error", - "single", - { - "allowTemplateLiterals": true - } - ], - "import/order": [ - "error", - { - "groups": [ - "builtin", - "external", - "parent", - "sibling", - "index" - ], - "pathGroups": [ - { - "pattern": "@custom-lib/**", - "group": "external", - "position": "after" - } - ], - "pathGroupsExcludedImportTypes": [ - "builtin" - ], - "alphabetize": { - "order": "asc" - }, - "newlines-between": "always" - } - ], - "sort-imports": [ - "error", - { - "allowSeparatedGroups": true, - "ignoreDeclarationSort": true - } - ], - "no-duplicate-imports": "error", - "no-multiple-empty-lines": [ - "error", - { - "max": 1, - "maxEOF": 0, - "maxBOF": 0 - } - ], - "import/first": "error", - "import/newline-after-import": "error", - "import/no-duplicates": "error", - "import/no-unassigned-import": [ - "error", - { - "allow": [ - "**/*.css", - "**/*.scss" - ] - } - ], - "max-len": [ - "error", - { - "code": 125, - "comments": 100, - "ignoreComments": false, - "ignoreRegExpLiterals": true, - "ignoreStrings": false, - "ignoreTemplateLiterals": true, - "ignoreTrailingComments": false, - "ignoreUrls": true, - "tabWidth": 2 - } - ], - "max-params": [ - "error", - 3 - ], - "no-console": [ - "error", - { - "allow": [ - "error", - "info", - "group" - ] - } - ], - "sort-keys": [ - "error", - "asc", - { - "caseSensitive": true, - "natural": false, - "minKeys": 2 - } - ], - "import/extensions": [ - "error", - "never", - { - "ignorePackages": true, - "pattern": { - "json": "always", - "js": "ignorePackages" - } - } - ], - "import/no-unresolved": [ - 2, - { - "commonjs": true, - "amd": true - } - ], - "import/prefer-default-export": "off", - "prefer-destructuring": [ - "error", - { - "object": true, - "array": false - } - ], - "sort-destructure-keys/sort-destructure-keys": [ - "error", - { - "caseSensitive": true - } - ] - } -} diff --git a/.githooks/post-checkout b/.githooks/post-checkout new file mode 100755 index 00000000..8740e4f2 --- /dev/null +++ b/.githooks/post-checkout @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.0.2 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + if command -v timeout >/dev/null 2>&1; then + timeout "$_bd_timeout" bd hooks run post-checkout "$@" + _bd_exit=$? + if [ $_bd_exit -eq 124 ]; then + echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + else + bd hooks run post-checkout "$@" + _bd_exit=$? + fi + if [ $_bd_exit -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'post-checkout'" + _bd_exit=0 + fi + if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi +fi +# --- END BEADS INTEGRATION v1.0.2 --- diff --git a/.githooks/post-merge b/.githooks/post-merge new file mode 100755 index 00000000..79487b2f --- /dev/null +++ b/.githooks/post-merge @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.0.2 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + if command -v timeout >/dev/null 2>&1; then + timeout "$_bd_timeout" bd hooks run post-merge "$@" + _bd_exit=$? + if [ $_bd_exit -eq 124 ]; then + echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + else + bd hooks run post-merge "$@" + _bd_exit=$? + fi + if [ $_bd_exit -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'post-merge'" + _bd_exit=0 + fi + if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi +fi +# --- END BEADS INTEGRATION v1.0.2 --- diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 00000000..61e65c0a --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,26 @@ +#!/bin/sh +bunx @biomejs/biome check --staged --no-errors-on-unmatched + +# --- BEGIN BEADS INTEGRATION v1.0.2 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + if command -v timeout >/dev/null 2>&1; then + timeout "$_bd_timeout" bd hooks run pre-commit "$@" + _bd_exit=$? + if [ $_bd_exit -eq 124 ]; then + echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + else + bd hooks run pre-commit "$@" + _bd_exit=$? + fi + if [ $_bd_exit -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'pre-commit'" + _bd_exit=0 + fi + if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi +fi +# --- END BEADS INTEGRATION v1.0.2 --- diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 00000000..490f66e4 --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.0.2 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + if command -v timeout >/dev/null 2>&1; then + timeout "$_bd_timeout" bd hooks run pre-push "$@" + _bd_exit=$? + if [ $_bd_exit -eq 124 ]; then + echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + else + bd hooks run pre-push "$@" + _bd_exit=$? + fi + if [ $_bd_exit -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'pre-push'" + _bd_exit=0 + fi + if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi +fi +# --- END BEADS INTEGRATION v1.0.2 --- diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg new file mode 100755 index 00000000..e10a4fe3 --- /dev/null +++ b/.githooks/prepare-commit-msg @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +# --- BEGIN BEADS INTEGRATION v1.0.2 --- +# This section is managed by beads. Do not remove these markers. +if command -v bd >/dev/null 2>&1; then + export BD_GIT_HOOK=1 + _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} + if command -v timeout >/dev/null 2>&1; then + timeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@" + _bd_exit=$? + if [ $_bd_exit -eq 124 ]; then + echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads" + _bd_exit=0 + fi + else + bd hooks run prepare-commit-msg "$@" + _bd_exit=$? + fi + if [ $_bd_exit -eq 3 ]; then + echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'" + _bd_exit=0 + fi + if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi +fi +# --- END BEADS INTEGRATION v1.0.2 --- diff --git a/.github/actions/node/action.yml b/.github/actions/node/action.yml index 5655bb1e..f97f8dec 100644 --- a/.github/actions/node/action.yml +++ b/.github/actions/node/action.yml @@ -4,8 +4,8 @@ author: "xxxxx@github.com" inputs: node-version: - description: 'Node version' - default: 20.x + description: "Node version" + default: "22.13" type: string runs: @@ -14,8 +14,8 @@ runs: - uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} - cache: 'pnpm' - cache-dependency-path: 'pnpm-lock.yaml' + cache: "pnpm" + cache-dependency-path: "pnpm-lock.yaml" - uses: actions/cache@v4 name: Setup node cache diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index cc3335be..00000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Checks - -on: - pull_request: - branches-ignore: - - 'changeset-release/**' - - 'changeset-snapshot/**' - -env: - CI: true - -run-name: '[Build]: ${{ github.event.pull_request.head.ref }} by @${{ github.actor }}' - -jobs: - build: - name: Check Packages - runs-on: ubuntu-latest - steps: - - name: Checkout code repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: feature/reusable-actions - - - name: Install pnpm package manager - id: install-pnpm - uses: ./.github/actions/pnpm - with: - npm-token: ${{ secrets.NPM_TOKEN }} - - - name: Install NodeJs - id: install-node - uses: ./.github/actions/node - - - name: Build Packages - id: build-packages - uses: ./.github/actions/build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 747fb5b4..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Release - -on: - push: - branches: - - main - -env: - CI: true - -run-name: '[Release]: Release for ${{ github.ref_name }}' - -jobs: - release-build: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout code repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install pnpm package manager - id: install-pnpm - uses: ./.github/actions/pnpm - with: - npm-token: ${{ secrets.NPM_TOKEN }} - - - name: Install NodeJs - id: install-node - uses: ./.github/actions/node - - - name: Build Packages - id: build-packages - uses: ./.github/actions/build - - - name: Setup CI Git User - id: setup-ci-git-user - uses: ./.github/actions/npmrc - with: - github-token: ${{ secrets.GH_TOKEN }} - - - name: Create Snapshot - uses: changesets/action@v1.4.5 - with: - setupGitUser: false - #version: pnpm snapshot:version - publish: pnpm release - title: "chore(release): Stable Release" - commit: "chore(release): deploy stable release" - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/snapshot-deploy.yml b/.github/workflows/snapshot-deploy.yml deleted file mode 100644 index d3e5a3a9..00000000 --- a/.github/workflows/snapshot-deploy.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Deploy Snapshots - -on: - pull_request_target: - types: - - closed - branches: - - 'changeset-snapshot/**' - -env: - CI: true - -run-name: '[Snapshots]: Deploying snapshot for ${{ github.ref_name }}' - -jobs: - snapshot-build: - if: github.event.pull_request.merged == true - name: Snapshot - runs-on: ubuntu-latest - steps: - - name: Checkout code repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install pnpm package manager - id: install-pnpm - uses: ./.github/actions/pnpm - with: - npm-token: ${{ secrets.NPM_TOKEN }} - - - name: Install NodeJs - id: install-node - uses: ./.github/actions/node - - - name: Build Packages - id: build-packages - uses: ./.github/actions/build - - - name: Setup CI Git User - id: setup-ci-git-user - uses: ./.github/actions/npmrc - with: - github-token: ${{ secrets.GH_TOKEN }} - - - name: Create Snapshot - uses: changesets/action@v1.4.5 - with: - setupGitUser: false - #version: pnpm snapshot:version - publish: pnpm snapshot:publish - title: "chore(release): Snapshot Release" - commit: "chore(release): deploy snapshot release" - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/snapshot-version.yml b/.github/workflows/snapshot-version.yml deleted file mode 100644 index a36c5a28..00000000 --- a/.github/workflows/snapshot-version.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Version Snapshots - -on: workflow_dispatch - -env: - CI: true - -run-name: '[Snapshots]: Version for ${{ github.ref_name }}' - -jobs: - snapshot-version: - name: Snapshot - runs-on: ubuntu-latest - steps: - - name: Checkout code repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - #ref: ${{ github.ref_name }} - - - name: Install pnpm package manager - id: install-pnpm - uses: ./.github/actions/pnpm - with: - npm-token: ${{ secrets.NPM_TOKEN }} - - - name: Install NodeJs - id: install-node - uses: ./.github/actions/node - - - name: Build Packages - id: build-packages - uses: ./.github/actions/build - - - name: Setup CI Git User - id: setup-ci-git-user - uses: ./.github/actions/npmrc - with: - github-token: ${{ secrets.GH_TOKEN }} - - - name: Create Snapshot - uses: changesets/action@v1.4.5 - with: - setupGitUser: false - version: pnpm snapshot:version - #publish: pnpm snapshot:publish - title: "chore(version): Snapshot Version" - commit: "chore(version): creating a snapshot version" - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.gitignore b/.gitignore index a844f21b..d9d18ce6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ .DS_Store node_modules -/dist -temp/ -www/js/ +dist +temp +coverage # local env files .env.local @@ -12,16 +12,19 @@ www/js/ npm-debug.log* yarn-debug.log* yarn-error.log* -pnpm-debug.log* +bun-debug.log* # Editor directories and files .idea .vscode -.idea -node_modules -.DS_Store -dist -temp -coverage -.pnpm-store -.eslintcache \ No newline at end of file + +# Claude Code local settings +.claude/settings.local.json + +# Dolt database files (added by bd init) +.dolt/ +*.db + +# Beads / Dolt files (added by bd init) +.beads-credential-key +.beads/issues.jsonl diff --git a/.npmrc b/.npmrc index 4506f0ae..214c29d1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1 @@ registry=https://registry.npmjs.org/ -shamefully-hoist=true -strict-peer-dependencies=false -side-effects-cache=false -shell-emulator=true diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index 6b90670c..00000000 --- a/.prettierrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - semi: true, - trailingComma: 'none', - singleQuote: true, - printWidth: 120, - tabWidth: 2, - endOfLine: 'auto', -} diff --git a/.spec/0001-alert-component-spec.md b/.spec/0001-alert-component-spec.md deleted file mode 100644 index 31b10565..00000000 --- a/.spec/0001-alert-component-spec.md +++ /dev/null @@ -1,43 +0,0 @@ -# 1. Alert component spec - -Date: 2021-04-14 - -Deciders: [Miguel Ramos] -Technical Story: [https://github.com/websublime/vitamin/projects/1#card-58059377] -Pull Request: [https://github.com/websublime/vitamin/pull/1] - -## Status - -2021-04-14 proposed -2021-04-14 done - -## Context and Problem Statement - -Alert component should have a type to inform user about a system action. This type will be colourful to call user attention. It will exists five types of alert: - -- Default, simple with gray -- Success, green color -- Info, blue color -- Warning, yellow or orange color -- Error, red color - -Alert should also expose some properties to be more easy to customize. The following table will explain then: - -| Property | Description | Value | -| ----------- | ------------------------------------------ | ------------- | -| hasBorder | Will make button bordered | true or false | -| isClosable | Should be possible to close alert | true or false | -| description | Should be possible to assign a description | - | -| rounded | Make button from edges rounded to full | - | -| shadow | Make shadow on button | - | -| withMedia | Prepend an icon to alert | true or false | -| title | Should be possible to assign a title | - | -| type | Type of alert | - | - -Component should also expose slots for description, title and media to user costumize for his needed. When closed an event will be emit as 'close'. - -## Decision Outcome - -Implementation, tests, documentation and example on site. - - \ No newline at end of file diff --git a/.spec/0002-button-component-spec.md b/.spec/0002-button-component-spec.md deleted file mode 100644 index b6f442e5..00000000 --- a/.spec/0002-button-component-spec.md +++ /dev/null @@ -1,29 +0,0 @@ -# 2. Button component spec - -Date: 2021-04-14 - -Deciders: [list everyone involved in the decision] <!-- optional --> -Technical Story: [description | ticket/issue URL] <!-- optional --> -Pull Request: [PR URL] <!-- optional --> - -## Status - -2021-04-14 proposed - -## Context and Problem Statement - -[Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.] - -## Decision Outcome - -Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | … | comes out best (see below)]. - -### Consequences <!-- optional --> - -* [e.g., improvement of quality attribute satisfaction, follow-up decisions required, …] -* … - -## Links <!-- optional --> - -* [Link type] [Link to ADR] <!-- example: Refined by ADR-0005 --> -* … <!-- numbers of links can vary --> diff --git a/.spec/button-example.png b/.spec/button-example.png deleted file mode 100644 index e494a2b7..00000000 Binary files a/.spec/button-example.png and /dev/null differ diff --git a/README.md b/README.md index 8e28ca79..b7fa907c 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,107 @@ -
-
-
-
-
💊 Vitamin - UI library
+Content
+