Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3d85826
Material design 3 migration #11936
sambaptista Oct 30, 2025
ec825c9
Remove unsued themes #11936
sambaptista Oct 30, 2025
a4f87fe
Correct selector for default theme #11936
sambaptista Oct 30, 2025
2d492ad
Fix material version #11936
sambaptista Oct 30, 2025
4cff685
Fine tunings #11936
sambaptista Oct 30, 2025
da6f53e
Centralize and finetune theming setup #11936
sambaptista Nov 4, 2025
cd7c240
Add themes #11936
sambaptista Nov 4, 2025
4aaa439
Fix tests
sambaptista Nov 4, 2025
931e691
Never i18n `subscriptSizing`
PowerKiKi Nov 4, 2025
85532c9
Never i18n `i18n-matButton`
PowerKiKi Nov 4, 2025
7024a22
Assist more consistent theme #11936
sambaptista Nov 5, 2025
23a7fab
Fix SSR #11936
sambaptista Nov 13, 2025
40cc2b0
Merge branch 'master' into md3
PowerKiKi Nov 14, 2025
d6fc5b4
Update projects/natural/src/lib/services/theme.service.ts
sambaptista Nov 17, 2025
a5e79a7
Update projects/natural/src/lib/services/theme.service.ts
sambaptista Nov 17, 2025
ff5dc1d
Md3 finetunings #11936
sambaptista Nov 20, 2025
3aa8772
Improve merger #11936
sambaptista Nov 20, 2025
0ffe848
MD3 : keep isDark and data-is-dark synched when browser change scheme…
sambaptista Nov 20, 2025
22416a4
Initialize correctly default colorScheme #11936
sambaptista Nov 20, 2025
ba2138f
Support browsers that don't support `light-dark()` #11936
PowerKiKi Nov 26, 2025
8aeea67
MD3 typogaphy #11936
sambaptista Nov 27, 2025
ee9524f
MD3 typo : headers and paragraphe have no default margins #11936
sambaptista Nov 28, 2025
0c60667
Md3 buttons #11936
sambaptista Dec 1, 2025
8cbf291
Support theming of buttons with dynamic color #11936
sambaptista Dec 2, 2025
8d171ae
Update themes and minor fine tunings #11932
sambaptista Dec 3, 2025
60a29a4
Merge branch 'master' into md3
PowerKiKi Dec 5, 2025
87b938c
Default language is french
PowerKiKi Dec 9, 2025
6e7e3dd
New components are OnPush #11936
PowerKiKi Dec 9, 2025
bca6436
Show which theme is selected in opened menu #11936
PowerKiKi Dec 9, 2025
bf84089
Don't store theme in local storage #11936
PowerKiKi Dec 9, 2025
02e5407
Lock down NaturalThemeService to avoid misuses #11936
PowerKiKi Dec 9, 2025
58ef83d
Document NaturalThemeService API #11936
PowerKiKi Dec 9, 2025
b9e46e4
Reject invalid theme name #11936
PowerKiKi Dec 9, 2025
16253c2
Restore animation during image uploads #11936
PowerKiKi Dec 9, 2025
4257008
Add Copilot instructions #11936
PowerKiKi Dec 10, 2025
342d991
Use standard "Natural" prefix #11936
PowerKiKi Dec 10, 2025
c1500fa
Avoid npm warning #11936
PowerKiKi Dec 10, 2025
0bcb150
Enable trusted publishing #11936
PowerKiKi Dec 10, 2025
381a0ec
Node 24 for all CI #11936
PowerKiKi Dec 10, 2025
bbf6003
No need for `--access public` after first publish #11936
PowerKiKi Dec 10, 2025
9ae05cc
Update to latest npm #11936
PowerKiKi Dec 10, 2025
9e00d87
Node 24 is enough #11936
PowerKiKi Dec 10, 2025
59d5be0
66.0.13
PowerKiKi Dec 10, 2025
043fdd2
Release requires lint and prettier to pass #11936
PowerKiKi Dec 10, 2025
78b97c9
Drop Gitter #11936
PowerKiKi Dec 10, 2025
d4586ac
Upgrade type-fest #11936
PowerKiKi Dec 10, 2025
20dd3c8
Remove useless provider
sambaptista Dec 10, 2025
e1eeb53
Better md3 theming for upload #11936
sambaptista Dec 10, 2025
a6d1b34
A few more protected members #11936
PowerKiKi Dec 11, 2025
159edcf
Respect file name convention #11936
PowerKiKi Dec 11, 2025
c48bae8
Prevent accidental scroll bars #11936
PowerKiKi Dec 18, 2025
2f449b4
New natural-compact-color-schemer #11936
PowerKiKi Dec 18, 2025
b710131
Don't auto-fix mat-slider to make it easier to align with other eleme…
PowerKiKi Dec 18, 2025
72eed25
Document requirement of providing themes in most cases #11936
PowerKiKi Dec 22, 2025
73dc026
Merge branch 'master' into md3
PowerKiKi Dec 26, 2025
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
55 changes: 55 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
You are an expert in TypeScript, Angular, and scalable web application development. You write functional, maintainable, performant, and accessible code following Angular and TypeScript best practices.

## TypeScript Best Practices

- Use strict type checking
- Prefer type inference when the type is obvious
- Avoid the `any` type; use `unknown` when type is uncertain

## Angular Best Practices

- Always use standalone components over NgModules
- Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v20+.
- Use signals for state management
- Implement lazy loading for feature routes
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
- Use `NgOptimizedImage` for all static images.
- `NgOptimizedImage` does not work for inline base64 images.

## Accessibility Requirements

- It MUST pass all AXE checks.
- It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes.

### Components

- Keep components small and focused on a single responsibility
- Use `input()` and `output()` functions instead of decorators
- Use `computed()` for derived state
- Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
- Prefer inline templates for small components
- Prefer Reactive forms instead of Template-driven ones
- Do NOT use `ngClass`, use `class` bindings instead
- Do NOT use `ngStyle`, use `style` bindings instead
- When using external templates/styles, use paths relative to the component TS file.

## State Management

- Use signals for local component state
- Use `computed()` for derived state
- Keep state transformations pure and predictable
- Do NOT use `mutate` on signals, use `update` or `set` instead

## Templates

- Keep templates simple and avoid complex logic
- Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
- Use the async pipe to handle observables
- Do not assume globals like (`new Date()`) are available.
- Do not write arrow functions in templates (they are not supported).

## Services

- Design services around a single responsibility
- Use the `providedIn: 'root'` option for singleton services
- Use the `inject()` function instead of constructor injection
27 changes: 8 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
fetch-depth: 0 # Need all tags to get a version number in-between tags
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn build-demo
Expand All @@ -25,6 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: ./node_modules/.bin/ng test natural --progress false --watch=false --browsers ChromeHeadlessCustom
Expand All @@ -38,6 +40,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn lint
Expand All @@ -48,6 +51,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: ./node_modules/.bin/prettier --experimental-cli --check .
Expand Down Expand Up @@ -75,9 +79,7 @@ jobs:
id-token: write
packages: write
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs:
- build
- test
needs: [build, test, lint, prettier]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -91,24 +93,11 @@ jobs:
# Publish to npm
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm publish --provenance --access public dist/natural/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public dist/natural-editor/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Publish to GitHub Packages
- uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish --provenance --access public dist/natural/
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm publish --provenance --access public dist/natural-editor/
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm publish dist/natural/
- run: npm publish dist/natural-editor/

# Create release
- name: Get release info
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Total Downloads](https://img.shields.io/npm/dt/@ecodev/natural.svg)](https://www.npmjs.com/package/@ecodev/natural)
[![Latest Stable Version](https://img.shields.io/npm/v/@ecodev/natural.svg)](https://www.npmjs.com/package/@ecodev/natural)
[![License](https://img.shields.io/npm/l/@ecodev/natural.svg)](https://www.npmjs.com/package/@ecodev/natural)
[![Join the chat at https://gitter.im/Ecodev/natural](https://badges.gitter.im/Ecodev/natural.svg)](https://gitter.im/Ecodev/natural)

This project is a collection of Angular Material components and various utilities classes for Angular projects.

Expand Down
16 changes: 15 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@
"polyfills": ["zone.js", "@angular/localize/init"],
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss", "node_modules/@ecodev/natural-layout/natural-layout.css"],
"styles": [
"src/styles.scss",
"src/styles/natural.scss",
"src/styles/epicerio.scss",
"src/styles/chez-emmy.scss",
"src/styles/epicentre.scss",
"src/styles/epicoop.scss",
"src/styles/jardinvivant.scss",
"src/styles/lacanopee.scss",
"src/styles/lavracrie.scss",
"src/styles/lelocalhauterive.scss",
"src/styles/levorace.scss",
"src/styles/rucher.scss",
"node_modules/@ecodev/natural-layout/natural-layout.css"
],
"scripts": [],
"allowedCommonJsDependencies": ["graphql-tag", "zen-observable"],
"extractLicenses": false,
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const basicAllowedAttributes = [
'id',
'lang',
'list',
'matButton',
'name',
'ngClass',
'ngProjectAs',
Expand All @@ -30,6 +31,7 @@ const basicAllowedAttributes = [
'stroke',
'stroke-width',
'style',
'subscriptSizing',
'svgIcon',
'tabindex',
'target',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "demo",
"version": "0.0.0",
"version": "66.0.13",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down Expand Up @@ -53,7 +53,7 @@
"prosemirror-view": "^1.41.0",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"type-fest": "^4.41.0",
"type-fest": "^5.3.1",
"zone.js": "~0.15.1"
},
"devDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion projects/natural-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "@ecodev/natural-editor",
"version": "0.0.1",
"license": "MIT",
"repository": "github:Ecodev/natural",
"repository": {
"type": "git",
"url": "git+https://github.com/Ecodev/natural.git"
},
"sideEffects": false,
"exports": {
".": {
Expand Down
59 changes: 0 additions & 59 deletions projects/natural-editor/src/lib/editor/_editor.theme.scss

This file was deleted.

20 changes: 10 additions & 10 deletions projects/natural-editor/src/lib/editor/editor.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="menu-container">
<div class="menu">
@if (save$.observed) {
<button mat-icon-button i18n-matTooltip matTooltip="Enregistrer" (click)="save$.next()">
<button matIconButton i18n-matTooltip matTooltip="Enregistrer" (click)="save$.next()">
<mat-icon fontIcon="save" />
</button>
}
Expand Down Expand Up @@ -268,7 +268,7 @@
</mat-menu>
@if (imageUploader()) {
<button
mat-icon-button
matIconButton
naturalFileDrop
i18n-matTooltip
matTooltip="Insérer une image"
Expand Down Expand Up @@ -330,7 +330,7 @@
}
@if (menu.undo) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Annuler"
[disabled]="menu.undo.disabled"
Expand All @@ -341,7 +341,7 @@
}
@if (menu.redo) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Refaire"
[disabled]="menu.redo.disabled"
Expand All @@ -352,7 +352,7 @@
}
@if (menu.wrapBulletList && menu.wrapBulletList.show) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Liste à puce"
[disabled]="menu.wrapBulletList.disabled"
Expand All @@ -363,7 +363,7 @@
}
@if (menu.wrapOrderedList && menu.wrapOrderedList.show) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Liste à numéro"
[disabled]="menu.wrapOrderedList.disabled"
Expand All @@ -374,7 +374,7 @@
}
@if (menu.wrapBlockQuote && menu.wrapBlockQuote.show) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Citation"
[disabled]="menu.wrapBlockQuote.disabled"
Expand All @@ -385,7 +385,7 @@
}
@if (menu.joinUp && menu.joinUp.show) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Fusionner avec l'élément du haut"
[disabled]="menu.joinUp.disabled"
Expand All @@ -396,7 +396,7 @@
}
@if (menu.lift && menu.lift.show) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Désindenter"
[disabled]="menu.lift.disabled"
Expand All @@ -407,7 +407,7 @@
}
@if (menu.selectParentNode && menu.selectParentNode.show) {
<button
mat-icon-button
matIconButton
i18n-matTooltip
matTooltip="Sélectionner l'élément parent"
[disabled]="menu.selectParentNode.disabled"
Expand Down
Loading