@medyll/idae-cadenzia 0.81.1 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierignore +4 -4
- package/.prettierrc +15 -15
- package/CHANGELOG.md +24 -0
- package/README.md +38 -38
- package/eslint.config.js +33 -33
- package/package.json +1 -1
- package/scripts/package-pre.js +3 -3
- package/src/app.d.ts +13 -13
- package/src/app.html +12 -12
- package/src/demo.spec.ts +7 -7
- package/src/lib/components/App.svelte +46 -46
- package/src/lib/components/CadencePanel.svelte +24 -24
- package/src/lib/components/ChordTable.svelte +252 -252
- package/src/lib/components/ChordVisualization.svelte +82 -82
- package/src/lib/constants/constants.ts +49 -49
- package/src/lib/functions/functions.svelte.ts +139 -139
- package/src/lib/functions/rules.ts +118 -118
- package/src/lib/index.ts +1 -1
- package/src/lib/types/types.ts +31 -31
- package/src/routes/+page.svelte +7 -7
- package/svelte.config.js +18 -18
- package/tsconfig.json +19 -19
- package/vite.config.ts +10 -10
package/.prettierignore
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Package Managers
|
|
2
|
-
package-lock.json
|
|
3
|
-
pnpm-lock.yaml
|
|
4
|
-
yarn.lock
|
|
1
|
+
# Package Managers
|
|
2
|
+
package-lock.json
|
|
3
|
+
pnpm-lock.yaml
|
|
4
|
+
yarn.lock
|
package/.prettierrc
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"useTabs": true,
|
|
3
|
-
"singleQuote": true,
|
|
4
|
-
"trailingComma": "none",
|
|
5
|
-
"printWidth": 100,
|
|
6
|
-
"plugins": ["prettier-plugin-svelte"],
|
|
7
|
-
"overrides": [
|
|
8
|
-
{
|
|
9
|
-
"files": "*.svelte",
|
|
10
|
-
"options": {
|
|
11
|
-
"parser": "svelte"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"useTabs": true,
|
|
3
|
+
"singleQuote": true,
|
|
4
|
+
"trailingComma": "none",
|
|
5
|
+
"printWidth": 100,
|
|
6
|
+
"plugins": ["prettier-plugin-svelte"],
|
|
7
|
+
"overrides": [
|
|
8
|
+
{
|
|
9
|
+
"files": "*.svelte",
|
|
10
|
+
"options": {
|
|
11
|
+
"parser": "svelte"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @medyll/idae-cadenzia
|
|
2
2
|
|
|
3
|
+
## 0.83.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a6624be: - fix(idae-main): mettre à jour les dépendances vers les dernières versions ([e8403a8](https://github.com/medyll/idae/commit/e8403a84732c14a4fd859840a9155d28cd2bc1c1)) - 2025-03-05 by @medyll
|
|
8
|
+
|
|
9
|
+
- feat(svelte-kit): ajouter des fichiers de configuration et des composants de base pour le projet SvelteKit ([bd4a807](https://github.com/medyll/idae/commit/bd4a807d425ba60f39573c514719946e3404d9dc)) - 2025-03-05 by @medyll
|
|
10
|
+
- feat(améliorer): la gestion des changements d'accords avec une fonction dédiée et mise à jour des entrées d'accords ([9f58fc5](https://github.com/medyll/idae/commit/9f58fc5470ea3f0a19780fdd994e83a9d3b4a63a)) - 2024-11-19 by @medyll
|
|
11
|
+
- feat(ajouter): la gestion des informations de mesure pour les entrées d'accords ([b0641d0](https://github.com/medyll/idae/commit/b0641d0e4c236717555b6cb2a853f127092ee194)) - 2024-11-18 by @medyll
|
|
12
|
+
- feat(ajouter): des constantes musicales et améliorer la gestion des accords avec des options d'armure ([0f48cd9](https://github.com/medyll/idae/commit/0f48cd947ceabadf13a7488110c8bbdc6b32e638)) - 2024-11-16 by @medyll
|
|
13
|
+
- feat(ajouter): le composant App et les composants associés pour la visualisation des accords ([e7c9517](https://github.com/medyll/idae/commit/e7c95178e328e56f514678bed4c96015e7ef7529)) - 2024-11-16 by @medyll
|
|
14
|
+
|
|
15
|
+
## 0.82.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- a6624be: - fix(idae-main): mettre à jour les dépendances vers les dernières versions ([e8403a8](https://github.com/medyll/idae/commit/e8403a84732c14a4fd859840a9155d28cd2bc1c1)) - 2025-03-05 by @medyll
|
|
20
|
+
|
|
21
|
+
- feat(svelte-kit): ajouter des fichiers de configuration et des composants de base pour le projet SvelteKit ([bd4a807](https://github.com/medyll/idae/commit/bd4a807d425ba60f39573c514719946e3404d9dc)) - 2025-03-05 by @medyll
|
|
22
|
+
- feat(améliorer): la gestion des changements d'accords avec une fonction dédiée et mise à jour des entrées d'accords ([9f58fc5](https://github.com/medyll/idae/commit/9f58fc5470ea3f0a19780fdd994e83a9d3b4a63a)) - 2024-11-19 by @medyll
|
|
23
|
+
- feat(ajouter): la gestion des informations de mesure pour les entrées d'accords ([b0641d0](https://github.com/medyll/idae/commit/b0641d0e4c236717555b6cb2a853f127092ee194)) - 2024-11-18 by @medyll
|
|
24
|
+
- feat(ajouter): des constantes musicales et améliorer la gestion des accords avec des options d'armure ([0f48cd9](https://github.com/medyll/idae/commit/0f48cd947ceabadf13a7488110c8bbdc6b32e638)) - 2024-11-16 by @medyll
|
|
25
|
+
- feat(ajouter): le composant App et les composants associés pour la visualisation des accords ([e7c9517](https://github.com/medyll/idae/commit/e7c95178e328e56f514678bed4c96015e7ef7529)) - 2024-11-16 by @medyll
|
|
26
|
+
|
|
3
27
|
## 0.81.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# sv
|
|
2
|
-
|
|
3
|
-
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
|
4
|
-
|
|
5
|
-
## Creating a project
|
|
6
|
-
|
|
7
|
-
If you're seeing this, you've probably already done this step. Congrats!
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# create a new project in the current directory
|
|
11
|
-
npx sv create
|
|
12
|
-
|
|
13
|
-
# create a new project in my-app
|
|
14
|
-
npx sv create my-app
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Developing
|
|
18
|
-
|
|
19
|
-
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm run dev
|
|
23
|
-
|
|
24
|
-
# or start the server and open the app in a new browser tab
|
|
25
|
-
npm run dev -- --open
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Building
|
|
29
|
-
|
|
30
|
-
To create a production version of your app:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm run build
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
You can preview the production build with `npm run preview`.
|
|
37
|
-
|
|
38
|
-
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
1
|
+
# sv
|
|
2
|
+
|
|
3
|
+
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
|
4
|
+
|
|
5
|
+
## Creating a project
|
|
6
|
+
|
|
7
|
+
If you're seeing this, you've probably already done this step. Congrats!
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# create a new project in the current directory
|
|
11
|
+
npx sv create
|
|
12
|
+
|
|
13
|
+
# create a new project in my-app
|
|
14
|
+
npx sv create my-app
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Developing
|
|
18
|
+
|
|
19
|
+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run dev
|
|
23
|
+
|
|
24
|
+
# or start the server and open the app in a new browser tab
|
|
25
|
+
npm run dev -- --open
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Building
|
|
29
|
+
|
|
30
|
+
To create a production version of your app:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run build
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You can preview the production build with `npm run preview`.
|
|
37
|
+
|
|
38
|
+
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
package/eslint.config.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import prettier from 'eslint-config-prettier';
|
|
2
|
-
import js from '@eslint/js';
|
|
3
|
-
import svelte from 'eslint-plugin-svelte';
|
|
4
|
-
import globals from 'globals';
|
|
5
|
-
import ts from 'typescript-eslint';
|
|
6
|
-
|
|
7
|
-
export default ts.config(
|
|
8
|
-
js.configs.recommended,
|
|
9
|
-
...ts.configs.recommended,
|
|
10
|
-
...svelte.configs['flat/recommended'],
|
|
11
|
-
prettier,
|
|
12
|
-
...svelte.configs['flat/prettier'],
|
|
13
|
-
{
|
|
14
|
-
languageOptions: {
|
|
15
|
-
globals: {
|
|
16
|
-
...globals.browser,
|
|
17
|
-
...globals.node
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.svelte'],
|
|
23
|
-
|
|
24
|
-
languageOptions: {
|
|
25
|
-
parserOptions: {
|
|
26
|
-
parser: ts.parser
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
ignores: ['build/', '.svelte-kit/', 'dist/']
|
|
32
|
-
}
|
|
33
|
-
);
|
|
1
|
+
import prettier from 'eslint-config-prettier';
|
|
2
|
+
import js from '@eslint/js';
|
|
3
|
+
import svelte from 'eslint-plugin-svelte';
|
|
4
|
+
import globals from 'globals';
|
|
5
|
+
import ts from 'typescript-eslint';
|
|
6
|
+
|
|
7
|
+
export default ts.config(
|
|
8
|
+
js.configs.recommended,
|
|
9
|
+
...ts.configs.recommended,
|
|
10
|
+
...svelte.configs['flat/recommended'],
|
|
11
|
+
prettier,
|
|
12
|
+
...svelte.configs['flat/prettier'],
|
|
13
|
+
{
|
|
14
|
+
languageOptions: {
|
|
15
|
+
globals: {
|
|
16
|
+
...globals.browser,
|
|
17
|
+
...globals.node
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.svelte'],
|
|
23
|
+
|
|
24
|
+
languageOptions: {
|
|
25
|
+
parserOptions: {
|
|
26
|
+
parser: ts.parser
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
ignores: ['build/', '.svelte-kit/', 'dist/']
|
|
32
|
+
}
|
|
33
|
+
);
|
package/package.json
CHANGED
package/scripts/package-pre.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Created scripts/package-pre.js
|
|
2
|
-
|
|
3
|
-
import { MakeLibIndex } from '../../shared/scripts/indexIfy.js';
|
|
1
|
+
// Created scripts/package-pre.js
|
|
2
|
+
|
|
3
|
+
import { MakeLibIndex } from '../../shared/scripts/indexIfy.js';
|
|
4
4
|
new MakeLibIndex().makeIndexFile();
|
package/src/app.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
2
|
-
// for information about these interfaces
|
|
3
|
-
declare global {
|
|
4
|
-
namespace App {
|
|
5
|
-
// interface Error {}
|
|
6
|
-
// interface Locals {}
|
|
7
|
-
// interface PageData {}
|
|
8
|
-
// interface PageState {}
|
|
9
|
-
// interface Platform {}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export {};
|
|
1
|
+
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
2
|
+
// for information about these interfaces
|
|
3
|
+
declare global {
|
|
4
|
+
namespace App {
|
|
5
|
+
// interface Error {}
|
|
6
|
+
// interface Locals {}
|
|
7
|
+
// interface PageData {}
|
|
8
|
+
// interface PageState {}
|
|
9
|
+
// interface Platform {}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {};
|
package/src/app.html
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
%sveltekit.head%
|
|
8
|
-
</head>
|
|
9
|
-
<body data-sveltekit-preload-data="hover">
|
|
10
|
-
<div style="display: contents">%sveltekit.body%</div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
%sveltekit.head%
|
|
8
|
+
</head>
|
|
9
|
+
<body data-sveltekit-preload-data="hover">
|
|
10
|
+
<div style="display: contents">%sveltekit.body%</div>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
package/src/demo.spec.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
|
|
3
|
-
describe('sum test', () => {
|
|
4
|
-
it('adds 1 + 2 to equal 3', () => {
|
|
5
|
-
expect(1 + 2).toBe(3);
|
|
6
|
-
});
|
|
7
|
-
});
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('sum test', () => {
|
|
4
|
+
it('adds 1 + 2 to equal 3', () => {
|
|
5
|
+
expect(1 + 2).toBe(3);
|
|
6
|
+
});
|
|
7
|
+
});
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import ChordTable from './ChordTable.svelte';
|
|
3
|
-
import CadencePanel from './CadencePanel.svelte';
|
|
4
|
-
import ChordVisualization from './ChordVisualization.svelte';
|
|
5
|
-
import { chords, suggestedCadences } from '../functions/functions.svelte.js';
|
|
6
|
-
|
|
7
|
-
function handleNewFile() {
|
|
8
|
-
console.log('New file');
|
|
9
|
-
chords.length = 0;
|
|
10
|
-
suggestedCadences.length = 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function handleOpenFile() {
|
|
14
|
-
console.log('Open file');
|
|
15
|
-
// Implement logic to open a file here
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function handleSaveFile() {
|
|
19
|
-
console.log('Save file');
|
|
20
|
-
// Implement logic to save a file here
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<main>
|
|
25
|
-
<h1>Music Composer</h1>
|
|
26
|
-
<div>
|
|
27
|
-
<button onclick={handleNewFile}>New</button>
|
|
28
|
-
<button onclick={handleOpenFile}>Open</button>
|
|
29
|
-
<button onclick={handleSaveFile}>Save</button>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<ChordTable />
|
|
33
|
-
<CadencePanel />
|
|
34
|
-
<ChordVisualization />
|
|
35
|
-
</main>
|
|
36
|
-
|
|
37
|
-
<style>
|
|
38
|
-
main {
|
|
39
|
-
font-family: Arial, sans-serif;
|
|
40
|
-
max-width: 100%;
|
|
41
|
-
margin: 0 auto;
|
|
42
|
-
padding: 20px;
|
|
43
|
-
}
|
|
44
|
-
button {
|
|
45
|
-
margin-right: 10px;
|
|
46
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ChordTable from './ChordTable.svelte';
|
|
3
|
+
import CadencePanel from './CadencePanel.svelte';
|
|
4
|
+
import ChordVisualization from './ChordVisualization.svelte';
|
|
5
|
+
import { chords, suggestedCadences } from '../functions/functions.svelte.js';
|
|
6
|
+
|
|
7
|
+
function handleNewFile() {
|
|
8
|
+
console.log('New file');
|
|
9
|
+
chords.length = 0;
|
|
10
|
+
suggestedCadences.length = 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleOpenFile() {
|
|
14
|
+
console.log('Open file');
|
|
15
|
+
// Implement logic to open a file here
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function handleSaveFile() {
|
|
19
|
+
console.log('Save file');
|
|
20
|
+
// Implement logic to save a file here
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<main>
|
|
25
|
+
<h1>Music Composer</h1>
|
|
26
|
+
<div>
|
|
27
|
+
<button onclick={handleNewFile}>New</button>
|
|
28
|
+
<button onclick={handleOpenFile}>Open</button>
|
|
29
|
+
<button onclick={handleSaveFile}>Save</button>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<ChordTable />
|
|
33
|
+
<CadencePanel />
|
|
34
|
+
<ChordVisualization />
|
|
35
|
+
</main>
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
main {
|
|
39
|
+
font-family: Arial, sans-serif;
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
margin: 0 auto;
|
|
42
|
+
padding: 20px;
|
|
43
|
+
}
|
|
44
|
+
button {
|
|
45
|
+
margin-right: 10px;
|
|
46
|
+
}
|
|
47
47
|
</style>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<!-- components/CadencePanel.svelte -->
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import { suggestedCadences } from '../functions/functions.svelte.js';
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<div class="cadence-panel">
|
|
7
|
-
<h3>Suggested Cadences:</h3>
|
|
8
|
-
{#if suggestedCadences.length === 0}
|
|
9
|
-
<p>No cadences available at the moment.</p>
|
|
10
|
-
{:else}
|
|
11
|
-
<ul>
|
|
12
|
-
{#each suggestedCadences as cadence}
|
|
13
|
-
<li>{cadence.name}: {cadence.chords.join(' - ')}</li>
|
|
14
|
-
{/each}
|
|
15
|
-
</ul>
|
|
16
|
-
{/if}
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<style>
|
|
20
|
-
.cadence-panel {
|
|
21
|
-
background-color: #f0f0f0;
|
|
22
|
-
padding: 10px;
|
|
23
|
-
margin-top: 20px;
|
|
24
|
-
}
|
|
1
|
+
<!-- components/CadencePanel.svelte -->
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import { suggestedCadences } from '../functions/functions.svelte.js';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class="cadence-panel">
|
|
7
|
+
<h3>Suggested Cadences:</h3>
|
|
8
|
+
{#if suggestedCadences.length === 0}
|
|
9
|
+
<p>No cadences available at the moment.</p>
|
|
10
|
+
{:else}
|
|
11
|
+
<ul>
|
|
12
|
+
{#each suggestedCadences as cadence}
|
|
13
|
+
<li>{cadence.name}: {cadence.chords.join(' - ')}</li>
|
|
14
|
+
{/each}
|
|
15
|
+
</ul>
|
|
16
|
+
{/if}
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.cadence-panel {
|
|
21
|
+
background-color: #f0f0f0;
|
|
22
|
+
padding: 10px;
|
|
23
|
+
margin-top: 20px;
|
|
24
|
+
}
|
|
25
25
|
</style>
|