Skip to content
Merged
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
53 changes: 53 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
# Copilot Workspace Instructions

## Local Environment

- Operating system: macOS
- Preferred shell: zsh
- `rg` (ripgrep) is not available in this environment

## Terminal Command Guidance

- Use `zsh`-compatible commands and syntax.
- Do not assume `rg` exists.
- For file discovery, use alternatives such as:
- `find . -type f`
- `ls -R`
- For text search, use alternatives such as:
- `grep -R "pattern" .`
- `grep -Rin "pattern" .`

## Behavior Expectation

- Always adapt command suggestions and scripts to this macOS + zsh setup.
- If a command example would normally use `rg`, replace it with `find`/`grep` equivalents.
- Keep documentation synchronized with code changes. When behavior, public APIs, defaults, or workflows change, update the relevant README/docs files in the same change.

## Git Commit Requests

- **Never commit directly to `master`.** All commits must go on a branch. If not already on a branch, create one before staging or committing anything.
- When the user asks to "stage and commit", stage all current changes by default unless the user explicitly scopes which changes to include, and create a commit using Conventional Commits format.
- The commit subject must be sentence-case and match repository conventions (for example: `feat(core): Add pitch bend support` or `chore: Update lint configuration`).
- Do not use vague commit subjects; choose the type/scope/subject based on the actual staged changes.

## "Update Everything" Dependency Workflow

When the user asks to "update everything" (or equivalent phrasing for workspace-wide dependency updates), run this process end-to-end:

1. Create and switch to a new branch named `fix/depUpdates[MMDDYY]` before making changes.
2. Upgrade dependencies using latest versions first; only regress specific packages if necessary after confirming a real compatibility failure.
3. Upgrade in this order:
- Nx first using Nx-recommended CLI migration flow.
- Storybook second using Storybook-recommended CLI upgrade flow.
- Remaining workspace dependencies/devDependencies/peerDependencies afterward (to include all `package.json`s).
4. Apply any required config or script updates needed to keep CI/CD behavior intact.
5. Run full validation checks and ensure they pass:
- typecheck
- lint
- build
- test
- coverage threshold checks
6. Clean up temporary artifacts created during the upgrade process.
7. Before staging/committing, explicitly ask the user to confirm they verified the final result.
8. Only after user confirmation, stage and commit all intended changes using a Conventional Commit message.

# Project Guidelines

## Code Style
Expand Down
13 changes: 10 additions & 3 deletions apps/storybook-hub/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { fileURLToPath } from "node:url";
import type { StorybookConfig } from '@storybook/web-components-vite';
import { resolve } from 'node:path';
import { resolve, dirname } from 'node:path';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

const isStaticBuild = process.env.STORYBOOK_BUILD === 'true';

const config: StorybookConfig = {
stories: ['../docs/**/*.mdx'],
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
addons: [getAbsolutePath("@storybook/addon-links"), getAbsolutePath("@storybook/addon-docs")],
framework: {
name: '@storybook/web-components-vite',
name: getAbsolutePath("@storybook/web-components-vite"),
options: {},
},
refs: isStaticBuild
Expand Down Expand Up @@ -41,6 +43,7 @@ const config: StorybookConfig = {

return {
...viteConfig,
plugins: [...(viteConfig.plugins ?? []), nxViteTsPaths()],
root: resolve(import.meta.dirname, '..'),
resolve: {
...viteConfig.resolve,
Expand All @@ -57,3 +60,7 @@ const config: StorybookConfig = {
};

export default config;

function getAbsolutePath(value: string): string {
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
}
1 change: 1 addition & 0 deletions apps/storybook-hub/docs/contracts-controls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ This is intentional, not accidental legacy.

- UX language is `tempo` for singers and product docs.
- SoundTouchJS worklet examples drive source speed via `playbackRate` to keep the processing pipeline stable.
- SoundTouchJS v2+ requires creating `SoundTouchNode` with an options object (`new SoundTouchNode({ context })`) after calling `SoundTouchNode.register(...)`.
- Controls preserve both names so adapters can migrate without breaking.

## Integration Guidance
Expand Down
16 changes: 11 additions & 5 deletions apps/storybook-react/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import { fileURLToPath } from "node:url";
import type { StorybookConfig } from '@storybook/react-vite';
import { resolve } from 'node:path';
import { resolve, dirname } from 'node:path';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

const config: StorybookConfig = {
stories: ['../stories/**/*.stories.@(ts|tsx)', '../stories/**/*.mdx'],
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
addons: [getAbsolutePath("@storybook/addon-links"), getAbsolutePath("@storybook/addon-docs")],
framework: {
name: '@storybook/react-vite',
name: getAbsolutePath("@storybook/react-vite"),
options: {},
},
docs: {
defaultName: 'Documentation',
autodocs: true,
defaultName: 'Documentation'
},
viteFinal: async (viteConfig) => {
const existingAlias = viteConfig.resolve?.alias;

return {
...viteConfig,
plugins: [...(viteConfig.plugins ?? []), nxViteTsPaths()],
root: resolve(import.meta.dirname, '..'),
resolve: {
...viteConfig.resolve,
Expand All @@ -37,3 +39,7 @@ const config: StorybookConfig = {
};

export default config;

function getAbsolutePath(value: string): string {
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
}
3 changes: 3 additions & 0 deletions apps/storybook-react/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const stopPlaybackOnStoryChange: Preview['decorators'][number] = (

const preview: Preview = {
decorators: [stopPlaybackOnStoryChange],

parameters: {
controls: {
matchers: {
Expand All @@ -30,6 +31,8 @@ const preview: Preview = {
},
},
},

tags: ['autodocs']
};

export default preview;
10 changes: 8 additions & 2 deletions apps/storybook-web/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import type { StorybookConfig } from '@storybook/web-components-vite';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

const storybookDir = dirname(fileURLToPath(import.meta.url));
const appRoot = resolve(storybookDir, '..');

const config: StorybookConfig = {
stories: ['../stories/**/*.stories.@(ts|tsx)', '../stories/**/*.mdx'],
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
addons: [getAbsolutePath("@storybook/addon-links"), getAbsolutePath("@storybook/addon-docs")],
framework: {
name: '@storybook/web-components-vite',
name: getAbsolutePath("@storybook/web-components-vite"),
options: {},
},
docs: {
Expand All @@ -18,6 +19,7 @@ const config: StorybookConfig = {
viteFinal: async (viteConfig) => {
return {
...viteConfig,
plugins: [...(viteConfig.plugins ?? []), nxViteTsPaths()],
root: appRoot,
resolve: {
...(viteConfig.resolve ?? {}),
Expand All @@ -35,3 +37,7 @@ const config: StorybookConfig = {
};

export default config;

function getAbsolutePath(value: string): string {
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
}
104 changes: 50 additions & 54 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,59 +1,55 @@
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import storybook from "eslint-plugin-storybook";

import nxPlugin from '@nx/eslint-plugin';

export default [
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/.dist/**',
'**/.tsbuild/**',
'**/coverage/**',
'.nx/**',
'**/vite.config.*.timestamp*',
'**/vitest.config.*.timestamp*',
],
export default [{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/.dist/**',
'**/.tsbuild/**',
'**/coverage/**',
'.nx/**',
'**/vite.config.*.timestamp*',
'**/vitest.config.*.timestamp*',
],
}, ...nxPlugin.configs['flat/base'], ...nxPlugin.configs['flat/typescript'], ...nxPlugin.configs['flat/javascript'], {
files: ['**/*.{ts,tsx,js,jsx}'],
plugins: {
'@nx': nxPlugin,
},
...nxPlugin.configs['flat/base'],
...nxPlugin.configs['flat/typescript'],
...nxPlugin.configs['flat/javascript'],
{
files: ['**/*.{ts,tsx,js,jsx}'],
plugins: {
'@nx': nxPlugin,
},
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [
'@cxing/framework-demo-app',
'@cxing/framework-demo-styles',
'@cxing/demo-app-element',
],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
'@typescript-eslint/no-explicit-any': 'error',
},
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [
'@cxing/framework-demo-app',
'@cxing/framework-demo-styles',
'@cxing/demo-app-element',
],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
'@typescript-eslint/no-explicit-any': 'error',
},
{
files: ['**/*.{spec,test}.{ts,tsx,js,jsx}'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
}, {
files: ['**/*.{spec,test}.{ts,tsx,js,jsx}'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
];
}, ...storybook.configs["flat/recommended"]];
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,51 +47,52 @@
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "20.5.3",
"@commitlint/config-conventional": "20.5.3",
"@commitlint/format": "20.5.0",
"@commitlint/cli": "21.0.2",
"@commitlint/config-conventional": "21.0.2",
"@commitlint/format": "21.0.1",
"@eslint/js": "^10.0.1",
"@nx/devkit": "22.7.1",
"@nx/eslint": "22.7.1",
"@nx/eslint-plugin": "22.7.1",
"@nx/js": "22.7.1",
"@nx/vite": "22.7.1",
"@nx/vitest": "22.7.1",
"@nx/workspace": "22.7.1",
"@nx/devkit": "22.7.5",
"@nx/eslint": "22.7.5",
"@nx/eslint-plugin": "22.7.5",
"@nx/js": "22.7.5",
"@nx/vite": "22.7.5",
"@nx/vitest": "22.7.5",
"@nx/workspace": "22.7.5",
"@remixicon/react": "^4.9.0",
"@storybook/addon-docs": "10.3.6",
"@storybook/addon-links": "^10.3.6",
"@storybook/react-vite": "^10.3.6",
"@storybook/web-components-vite": "^10.3.6",
"@storybook/addon-docs": "10.4.3",
"@storybook/addon-links": "10.4.3",
"@storybook/react-vite": "10.4.3",
"@storybook/web-components-vite": "10.4.3",
"@swc-node/register": "~1.11.1",
"@swc/core": "~1.15.33",
"@swc/helpers": "~0.5.21",
"@swc/core": "~1.15.41",
"@swc/helpers": "~0.5.23",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/node": "25.6.0",
"@types/react": "^19.2.14",
"@types/node": "25.9.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^8.59.1",
"@typescript-eslint/parser": "^8.59.1",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "~4.1.5",
"@vitest/ui": "~4.1.5",
"eslint": "~10.3.0",
"@typescript-eslint/eslint-plugin": "^8.61.0",
"@typescript-eslint/parser": "^8.61.0",
"@vitejs/plugin-react": "^6.0.2",
"@vitest/coverage-v8": "~4.1.8",
"@vitest/ui": "~4.1.8",
"eslint": "~10.4.1",
"eslint-plugin-storybook": "10.4.3",
"husky": "^9.1.7",
"jsdom": "^29.1.1",
"jsonc-eslint-parser": "^3.1.0",
"nx": "22.7.1",
"prettier": "~3.8.3",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"storybook": "^10.3.6",
"nx": "22.7.5",
"prettier": "~3.8.4",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"storybook": "10.4.3",
"tslib": "^2.8.1",
"typescript": "~6.0.3",
"typescript-eslint": "^8.59.1",
"verdaccio": "^6.5.2",
"vite": "^8.0.10",
"vite-plugin-dts": "~5.0.0",
"vitest": "~4.1.5"
"typescript-eslint": "^8.61.0",
"verdaccio": "^6.7.2",
"vite": "^8.0.16",
"vite-plugin-dts": "~5.0.2",
"vitest": "~4.1.8"
},
"pnpm": {
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion packages/media-playback-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
],
"sideEffects": false,
"dependencies": {
"lucide": "^1.14.0"
"lucide": "^1.17.0"
}
}
Loading