Sitelet https://github.com/limitless-angular/limitless-angular/pull/56/files
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
24 changes: 12 additions & 12 deletions apps/analog-sanity-blog-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
},
"dependencies": {
"@analogjs/router": "2.6.0",
"@angular/common": "~19.0.3",
"@angular/compiler": "~19.0.3",
"@angular/core": "~19.0.3",
"@angular/platform-browser": "~19.0.3",
"@angular/platform-server": "~19.0.3",
"@angular/router": "~19.0.3",
"@angular/common": "~20.0.0",
"@angular/compiler": "~20.0.0",
"@angular/core": "~20.0.0",
"@angular/platform-browser": "~20.0.0",
"@angular/platform-server": "~20.0.0",
"@angular/router": "~20.0.0",
"@limitless-angular/analog-sanity-blog": "workspace:*",
"@limitless-angular/sanity": "workspace:*",
"@portabletext/toolkit": "^5.0.2",
Expand All @@ -31,12 +31,12 @@
"devDependencies": {
"@analogjs/content": "2.6.0",
"@analogjs/platform": "2.6.0",
"@angular/build": "~19.0.4",
"@angular/cli": "~19.0.4",
"@angular/compiler-cli": "~19.0.3",
"@angular/build": "~20.0.0",
"@angular/cli": "~20.0.0",
"@angular/compiler-cli": "~20.0.0",
"@tailwindcss/typography": "^0.5.13",
"@types/node": "~22.19.20",
"angular-eslint": "^19.0.2",
"angular-eslint": "^20.0.0",
"autoprefixer": "^10.4.0",
"eslint": "^9.8.0",
"jsdom": "^22.0.0",
Expand All @@ -47,8 +47,8 @@
"postcss": "^8.4.5",
"rollup-plugin-typescript-paths": "^1.5.0",
"tailwindcss": "^3.0.2",
"typescript": "~5.6.3",
"typescript-eslint": "^8.0.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.61.0",
"vite": "^8.0.16",
"vite-plugin-webfont-dl": "^3.12.0"
}
Expand Down
4 changes: 2 additions & 2 deletions apps/analog-sanity-blog-example/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
type ApplicationConfig,
provideExperimentalZonelessChangeDetection,
provideEnvironmentInitializer,
provideZonelessChangeDetection,
} from '@angular/core';
import { provideHttpClient, withFetch } from '@angular/common/http';
import { provideClientHydration } from '@angular/platform-browser';
Expand All @@ -18,7 +18,7 @@ import { updateMetaTagsOnRouteChange } from './utils/meta-tags';

export const appConfig: ApplicationConfig = {
providers: [
provideExperimentalZonelessChangeDetection(),
provideZonelessChangeDetection(),
provideFileRouter(
withComponentInputBinding(),
withNavigationErrorHandler(console.error),
Expand Down
26 changes: 13 additions & 13 deletions apps/sanity-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"serve": "ng serve"
},
"dependencies": {
"@angular/common": "~19.0.3",
"@angular/compiler": "~19.0.3",
"@angular/core": "~19.0.3",
"@angular/platform-browser": "~19.0.3",
"@angular/platform-server": "~19.0.3",
"@angular/router": "~19.0.3",
"@angular/ssr": "~19.0.4",
"@angular/common": "~20.0.0",
"@angular/compiler": "~20.0.0",
"@angular/core": "~20.0.0",
"@angular/platform-browser": "~20.0.0",
"@angular/platform-server": "~20.0.0",
"@angular/router": "~20.0.0",
"@angular/ssr": "~20.0.0",
"@limitless-angular/sanity": "workspace:*",
"@portabletext/toolkit": "^5.0.2",
"@portabletext/types": "^4.0.2",
Expand All @@ -27,19 +27,19 @@
"tslib": "^2.3.0"
},
"devDependencies": {
"@angular/build": "~19.0.4",
"@angular/cli": "~19.0.4",
"@angular/compiler-cli": "~19.0.3",
"@angular/build": "~20.0.0",
"@angular/cli": "~20.0.0",
"@angular/compiler-cli": "~20.0.0",
"@netlify/angular-runtime": "4.0.0",
"@tailwindcss/typography": "^0.5.13",
"@types/express": "4.17.14",
"@types/leaflet": "^1.9.12",
"@types/node": "~22.19.20",
"@types/prismjs": "^1.26.4",
"angular-eslint": "^19.0.2",
"angular-eslint": "^20.0.0",
"eslint": "^9.8.0",
"tailwindcss": "^3.0.2",
"typescript": "~5.6.3",
"typescript-eslint": "^8.0.0"
"typescript": "~5.8.3",
"typescript-eslint": "^8.61.0"
}
}
4 changes: 2 additions & 2 deletions apps/sanity-example/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
ApplicationConfig,
provideExperimentalZonelessChangeDetection,
provideZonelessChangeDetection,
} from '@angular/core';
import { provideRouter } from '@angular/router';
import {
Expand All @@ -13,7 +13,7 @@ import { appRoutes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideClientHydration(withEventReplay()),
provideExperimentalZonelessChangeDetection(),
provideZonelessChangeDetection(),
provideRouter(appRoutes),
],
};
26 changes: 13 additions & 13 deletions apps/sanity-presentation-e2e-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"serve:ssr": "node dist/sanity-presentation-e2e-preview/server/server.mjs"
},
"dependencies": {
"@angular/common": "~19.0.3",
"@angular/compiler": "~19.0.3",
"@angular/core": "~19.0.3",
"@angular/platform-browser": "~19.0.3",
"@angular/platform-server": "~19.0.3",
"@angular/router": "~19.0.3",
"@angular/ssr": "~19.0.4",
"@angular/common": "~20.0.0",
"@angular/compiler": "~20.0.0",
"@angular/core": "~20.0.0",
"@angular/platform-browser": "~20.0.0",
"@angular/platform-server": "~20.0.0",
"@angular/router": "~20.0.0",
"@angular/ssr": "~20.0.0",
"@limitless-angular/sanity": "workspace:*",
"@sanity/client": "^7.22.1",
"express": "^4.18.2",
Expand All @@ -25,14 +25,14 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular/build": "~19.0.4",
"@angular/cli": "~19.0.4",
"@angular/compiler-cli": "~19.0.3",
"@angular/build": "~20.0.0",
"@angular/cli": "~20.0.0",
"@angular/compiler-cli": "~20.0.0",
"@types/express": "^4.17.17",
"@types/node": "~22.19.20",
"angular-eslint": "^19.0.2",
"angular-eslint": "^20.0.0",
"eslint": "^9.8.0",
"typescript": "~5.6.3",
"typescript-eslint": "^8.0.0"
"typescript": "~5.8.3",
"typescript-eslint": "^8.61.0"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"prettier": "3.3.3",
"semver": "^7.8.2",
"turbo": "2.9.16",
"typescript": "~5.6.3",
"typescript-eslint": "^8.0.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.61.0",
"yargs": "^17.7.2"
}
}
1 change: 0 additions & 1 deletion packages/sanity/image-loader/src/sanity-image.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ function getNoopImageLoader() {
},
],
})
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class SanityImage extends NgOptimizedImage implements OnInit, OnChanges {
private _loaderParams: LoaderParams = {};

Expand Down
32 changes: 15 additions & 17 deletions packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"cms"
],
"peerDependencies": {
"@angular/common": "^18.0.0 || ^19.0.0",
"@angular/core": "^18.0.0 || ^19.0.0",
"@angular/router": "^18.0.0 || ^19.0.0",
"@angular/common": "^18.0.0 || ^19.0.0 || ^20.0.0",
"@angular/core": "^18.0.0 || ^19.0.0 || ^20.0.0",
"@angular/router": "^18.0.0 || ^19.0.0 || ^20.0.0",
"@portabletext/toolkit": "^2.0.15 || ^3.0.0 || ^4.0.0 || ^5.0.0",
"@portabletext/types": "^2.0.13 || ^3.0.0 || ^4.0.0",
"@sanity/client": "^6.28.0 || ^7.0.0",
Expand All @@ -57,30 +57,28 @@
"devDependencies": {
"@analogjs/vite-plugin-angular": "^2.6.0",
"@analogjs/vitest-angular": "^2.6.0",
"@angular-devkit/architect": "~0.1900.4",
"@angular/build": "~19.0.4",
"@angular/common": "~19.0.3",
"@angular/compiler": "~19.0.3",
"@angular/compiler-cli": "~19.0.3",
"@angular/core": "~19.0.3",
"@angular/platform-browser": "~19.0.3",
"@angular/platform-browser-dynamic": "19.0.3",
"@angular/router": "~19.0.3",
"@angular/build": "~20.0.0",
"@angular/common": "~20.0.0",
"@angular/compiler": "~20.0.0",
"@angular/compiler-cli": "~20.0.0",
"@angular/core": "~20.0.0",
"@angular/platform-browser": "~20.0.0",
"@angular/router": "~20.0.0",
"@portabletext/toolkit": "^5.0.2",
"@portabletext/types": "^4.0.2",
"@sanity/client": "^7.22.1",
"@sanity/image-url": "^2.1.1",
"@testing-library/angular": "^17.3.6",
"@testing-library/angular": "^18.1.1",
"@testing-library/dom": "^10.4.0",
"@types/lodash-es": "^4.17.12",
"@types/node": "~22.19.20",
"angular-eslint": "^19.0.2",
"angular-eslint": "^20.0.0",
"eslint": "^9.8.0",
"jsdom": "^22.0.0",
"ng-packagr": "~19.0.1",
"ng-packagr": "~20.0.0",
"rxjs": "~7.8.0",
"typescript": "~5.6.3",
"typescript-eslint": "^8.0.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.61.0",
"vite": "^8.0.16",
"vitest": "^4.1.8"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @angular-eslint/component-class-suffix */
/* eslint-disable @angular-eslint/component-selector */
import { Component, type Type } from '@angular/core';
import type { PortableTextBlockStyle } from '@portabletext/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @angular-eslint/component-selector */
/* eslint-disable @angular-eslint/component-class-suffix */

import { Component } from '@angular/core';
import { PortableTextAngularComponents } from '../../types';
import { defaultBlockStyles } from './blocks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @angular-eslint/component-class-suffix */
/* eslint-disable @angular-eslint/component-selector */
import { Component, type Type } from '@angular/core';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @angular-eslint/component-class-suffix */
/* eslint-disable @angular-eslint/component-selector */
import { Component, type Type } from '@angular/core';
import { PortableTextMarkComponent } from '../../directives/portable-text-directives';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @angular-eslint/component-selector */
/* eslint-disable @angular-eslint/component-class-suffix */

import { Component, computed } from '@angular/core';
import {
PortableTextBlockComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { PortableTextComponent } from '../components/portable-text.component';

// eslint-disable-next-line @angular-eslint/directive-selector
@Directive({ selector: '[portableTextContent]' })
// eslint-disable-next-line @angular-eslint/directive-class-suffix, @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export class DynamicPortableTextContent<Node extends TypedObject = TypedObject>
implements AfterViewInit
{
Expand Down Expand Up @@ -56,7 +56,6 @@ export class DynamicPortableTextContent<Node extends TypedObject = TypedObject>
/**
* @template M Shape describing the data associated with this mark, if it is an annotation
*/
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class PortableTextMarkComponent<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
M extends TypedObject = any,
Expand Down Expand Up @@ -87,7 +86,6 @@ export class PortableTextMarkComponent<
/**
* Data associated with this portable text node, eg the raw JSON value of a block/type
*/
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class PortableTextTypeComponent<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
T extends TypedObject = any,
Expand All @@ -108,21 +106,18 @@ export class PortableTextTypeComponent<

// eslint-disable-next-line @angular-eslint/directive-selector
@Directive({ selector: '[portableTextBlock]' })
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class PortableTextBlockComponent<
T extends TypedObject = PortableTextBlock,
> extends PortableTextTypeComponent<T> {}

// eslint-disable-next-line @angular-eslint/directive-selector
@Directive({ selector: '[portableTextList]' })
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class PortableTextListComponent<
T extends TypedObject = PortableTextListBlock,
> extends PortableTextTypeComponent<T> {}

// eslint-disable-next-line @angular-eslint/directive-selector
@Directive({ selector: '[portableTextListItem]' })
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class PortableTextListItemComponent<
T extends TypedObject = PortableTextListItemBlock,
> extends PortableTextTypeComponent<T> {}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { PortableTextComponent } from '../components/portable-text.component';

// eslint-disable-next-line @angular-eslint/directive-selector
@Directive({ selector: '[renderNode]' })
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class RenderNode {
node = input.required<TypedObject>({ alias: 'renderNode' });
index = input<number>();
Expand Down
24 changes: 5 additions & 19 deletions packages/sanity/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
import '@angular/compiler';
import '@analogjs/vitest-angular/setup-snapshots';
import { setupTestBed } from '@analogjs/vitest-angular/setup-testbed';

import {
provideExperimentalZonelessChangeDetection,
NgModule,
} from '@angular/core';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import { getTestBed } from '@angular/core/testing';

@NgModule({
providers: [provideExperimentalZonelessChangeDetection()],
})
export class ZonelessTestModule {}

getTestBed().initTestEnvironment(
[BrowserDynamicTestingModule, ZonelessTestModule],
platformBrowserDynamicTesting(),
);
setupTestBed({
zoneless: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function getInsertMenuOptions(
<button
class="item"
type="button"
(click)="select.emit(schemaType)"
(click)="optionSelected.emit(schemaType)"
>
@if (previewImageurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Flimitless-angular%2Flimitless-angular%2Fpull%2F56%2FschemaType); as previewImage) {
<img class="preview-image" [src]="previewImage" alt="" />
Expand Down Expand Up @@ -207,7 +207,7 @@ function getInsertMenuOptions(
export class VisualEditingInsertMenuComponent {
node = input.required<SchemaUnionNode<SchemaNode>>();

select = output<SchemaUnionOption<SchemaNode>>();
optionSelected = output<SchemaUnionOption<SchemaNode>>();

protected query = signal('');
protected view = signal<'grid' | 'list'>('list');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function isSchemaUnionNode(
<div class="popover" [attr.data-position]="position">
<sanity-visual-editing-insert-menu
[node]="parent"
(select)="handleSelect($event, position)"
(optionSelected)="handleSelect($event, position)"
/>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ type ContextMenuState = NonNullable<OverlayState['contextMenu']>;
<div class="submenu">
<sanity-visual-editing-insert-menu
[node]="item.parent"
(select)="handleInsertMenuSelect($event, item)"
(optionSelected)="handleInsertMenuSelect($event, item)"
/>
</div>
</div>
Expand Down
Loading
Loading