Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
ref: ${{ inputs.commit-hash || 'main' }}
fetch-depth: 0

- name: 🚧 Build
uses: ./.github/actions/build
- name: 🧱 Install
uses: ./.github/actions/install

- name: ☁️ Publish
env:
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,3 @@ Thumbs.db
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# GitHub
.github/copilot-instructions.md
7 changes: 6 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import { defineSvelteConfig } from '@dvcol/eslint-config';

export default defineSvelteConfig();
export default defineSvelteConfig({
ignores: [
'.github/copilot-instructions.md',
'README.md',
],
});
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@dvcol/neo-svelte",
"type": "module",
"version": "0.1.12",
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.15.9",
"description": "Neomorphic ui library for svelte 5",
"author": "dvcol",
"license": "MIT",
Expand Down Expand Up @@ -167,19 +167,19 @@
"vite:watch": "vite build --watch",
"vite:preview": "vite preview --host",
"dev": "run-s vite:serve",
"build": "run-s vite:build package",
"build": "run-s check package",
"build:web": "VITE_MODE=WEB run-s vite:build",
"serve:web": "VITE_MODE=WEB run-p vite:watch vite:preview",
"package": "svelte-kit sync && svelte-package && publint",
"prepublishOnly": "npm run package",
"check:type": "tsc -p tsconfig.json",
"check:type:watch": "tsc -p tsconfig.json --watch",
"check:svelte": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:svelte:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepublishOnly": "run-s package",
"check:type": "tsc -p tsconfig.build.json",
"check:type:watch": "tsc -p tsconfig.build.json --watch",
"check:svelte": "svelte-kit sync && svelte-check --tsconfig tsconfig.build.json",
"check:svelte:watch": "svelte-kit sync && svelte-check --tsconfig tsconfig.build.json --watch",
"check": "run-s check:type check:svelte",
"check:watch": "run-p check:type:watch check:svelte:watch",
"lint": "eslint src demo",
"lint:fix": "eslint src demo --fix",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"style": "stylelint **/*.{svelte,css,scss,less,html} --go '{\"gitignore\":true}'",
"style:fix": "pnpm run style --fix",
"test:unit": "vitest --run --coverage",
Expand Down
8 changes: 4 additions & 4 deletions src/lib/inputs/NeoPin.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@

const labelId = $derived(label ? `neo-pin-label-${getUUID()}` : undefined);

const refs = $state<NeoInputHTMLElement[][]>(Array.from({ length: Number(groups) }).fill([]));
const values = $state<string[][]>(Array.from({ length: Number(groups) }).fill(Array.from({ length: Number(count) }).fill('')));
const touches = $state<boolean[][]>(Array.from({ length: Number(groups) }).fill(Array.from({ length: Number(count) }).fill(false)));
const dirtiness = $state<boolean[][]>(Array.from({ length: Number(groups) }).fill(Array.from({ length: Number(count) }).fill(false)));
const refs = $state<NeoInputHTMLElement[][]>(Array.from<NeoInputHTMLElement[]>({ length: Number(groups) }).fill([]));
const values = $state<string[][]>(Array.from<string[]>({ length: Number(groups) }).fill(Array.from<string>({ length: Number(count) }).fill('')));
const touches = $state<boolean[][]>(Array.from<boolean[]>({ length: Number(groups) }).fill(Array.from<boolean>({ length: Number(count) }).fill(false)));
const dirtiness = $state<boolean[][]>(Array.from<boolean[]>({ length: Number(groups) }).fill(Array.from<boolean>({ length: Number(count) }).fill(false)));

const initial = $state(value);
let validationMessage: string | undefined = $state(ref?.validationMessage);
Expand Down
15 changes: 15 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"allowJs": true,
"checkJs": true,
"strict": true,
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
}
}
2 changes: 1 addition & 1 deletion tsconfig.demo.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"extends": "./tsconfig.build.json",
"include": ["demo/**/*.ts", "demo/**/*.svelte"]
}
14 changes: 1 addition & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"allowJs": true,
"checkJs": true,
"strict": true,
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"extends": ["./.svelte-kit/tsconfig.json", "./tsconfig.build.json"],
"references": [
{ "path": "./tsconfig.vite.json" },
{ "path": "./tsconfig.demo.json" }
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.vite.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["@tsconfig/node22/tsconfig.json", "./tsconfig.json"],
"extends": ["@tsconfig/node22/tsconfig.json", "./tsconfig.build.json"],
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vite.tsbuildinfo",
"compilerOptions": {
"composite": true,
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (isDev) {
}),
checker({
typescript: {
tsconfigPath: 'tsconfig.json',
tsconfigPath: 'tsconfig.build.json',
},
}),
);
Expand Down
Loading