@o3r/styling 14.1.0-prerelease.4 → 14.1.0-prerelease.41

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.
@@ -44,10 +44,10 @@ class OtterStylingDevtools {
44
44
  }, [])
45
45
  .forEach((varName) => style.removeProperty(varName));
46
46
  }
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: OtterStylingDevtools, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: OtterStylingDevtools }); }
47
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: OtterStylingDevtools, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: OtterStylingDevtools }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: OtterStylingDevtools, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: OtterStylingDevtools, decorators: [{
51
51
  type: Injectable
52
52
  }] });
53
53
 
@@ -175,10 +175,10 @@ class StylingDevtoolsMessageService {
175
175
  activate() {
176
176
  fromEvent(window, 'message').pipe(takeUntilDestroyed(this.destroyRef), filterMessageContent(isStylingMessage)).subscribe((e) => this.handleEvents(e));
177
177
  }
178
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsMessageService }); }
178
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsMessageService }); }
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsMessageService, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsMessageService, decorators: [{
182
182
  type: Injectable
183
183
  }], ctorParameters: () => [] });
184
184
 
@@ -197,15 +197,15 @@ class StylingDevtoolsModule {
197
197
  ]
198
198
  };
199
199
  }
200
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
201
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsModule }); }
202
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsModule, providers: [
200
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
201
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsModule }); }
202
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsModule, providers: [
203
203
  { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS },
204
204
  StylingDevtoolsMessageService,
205
205
  OtterStylingDevtools
206
206
  ] }); }
207
207
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: StylingDevtoolsModule, decorators: [{
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: StylingDevtoolsModule, decorators: [{
209
209
  type: NgModule,
210
210
  args: [{
211
211
  providers: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/styling",
3
- "version": "14.1.0-prerelease.4",
3
+ "version": "14.1.0-prerelease.41",
4
4
  "deprecated": "This package will be removed in Otter v15. Please use @ama-styling/devkit instead.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -39,18 +39,18 @@
39
39
  "@angular/common": "^21.0.0",
40
40
  "@angular/core": "^21.0.0",
41
41
  "@angular/material": "^21.0.0",
42
- "@o3r/core": "~14.1.0-prerelease.4",
43
- "@o3r/dynamic-content": "~14.1.0-prerelease.4",
44
- "@o3r/extractors": "~14.1.0-prerelease.4",
45
- "@o3r/logger": "~14.1.0-prerelease.4",
46
- "@o3r/schematics": "~14.1.0-prerelease.4",
42
+ "@o3r/core": "~14.1.0-prerelease.41",
43
+ "@o3r/dynamic-content": "~14.1.0-prerelease.41",
44
+ "@o3r/extractors": "~14.1.0-prerelease.41",
45
+ "@o3r/logger": "~14.1.0-prerelease.41",
46
+ "@o3r/schematics": "~14.1.0-prerelease.41",
47
47
  "@schematics/angular": "^21.0.0",
48
48
  "@yarnpkg/cli": "^4.3.1",
49
49
  "@yarnpkg/core": "^4.1.1",
50
50
  "@yarnpkg/fslib": "^3.1.0",
51
51
  "@yarnpkg/plugin-npm": "^3.0.1",
52
52
  "@yarnpkg/plugin-pack": "^4.0.0",
53
- "chokidar": "^4.0.3",
53
+ "chokidar": "^4.0.0 || ^5.0.0",
54
54
  "globby": "^11.1.0",
55
55
  "rxjs": "^7.8.1",
56
56
  "sass": "^1.81.0",
@@ -131,14 +131,14 @@
131
131
  }
132
132
  },
133
133
  "dependencies": {
134
- "@o3r/schematics": "~14.1.0-prerelease.4",
134
+ "@o3r/schematics": "~14.1.0-prerelease.41",
135
135
  "tslib": "^2.6.2"
136
136
  },
137
137
  "generatorDependencies": {
138
138
  "sass-loader": "^16.0.0"
139
139
  },
140
140
  "engines": {
141
- "node": "^20.19.0 || ^22.17.0 || ^24.0.0"
141
+ "node": "^22.17.0 || ^24.0.0"
142
142
  },
143
143
  "builders": "./builders.json",
144
144
  "schematics": "./collection.json",
package/index.d.ts DELETED
@@ -1,153 +0,0 @@
1
- import { ItemIdentifier, DevtoolsCommonOptions, OtterMessageContent, MessageDataTypes, ConnectContentMessage, RequestMessagesContentMessage } from '@o3r/core';
2
- import * as i0 from '@angular/core';
3
- import { ModuleWithProviders, InjectionToken } from '@angular/core';
4
-
5
- type CssVariableType = 'string' | 'color';
6
- /** Metadata for a CSS Variable */
7
- interface CssVariable {
8
- /** Name of the variable */
9
- name: string;
10
- /** Default value of the variable */
11
- defaultValue: string;
12
- /** References of the variable */
13
- references?: CssVariable[];
14
- /** Tags of the variable */
15
- tags?: string[];
16
- /** Description of the variable */
17
- description?: string;
18
- /** Description of the variable */
19
- label?: string;
20
- /** Type of the variable */
21
- type?: CssVariableType;
22
- /** Name of a group of variables */
23
- category?: string;
24
- /** component reference if the variable is linked to one */
25
- component?: ItemIdentifier;
26
- }
27
- /** Style Metadata map */
28
- interface CssMetadata {
29
- /** Variables' dictionary */
30
- variables: {
31
- [name: string]: CssVariable;
32
- };
33
- }
34
-
35
- /**
36
- * Styling devtools service options
37
- */
38
- interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {
39
- /**
40
- * Path to retrieve the styling metadata file
41
- */
42
- stylingMetadataPath: string;
43
- }
44
- /** Update styling variables */
45
- interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {
46
- /**
47
- * Dictionary of variable value to update
48
- * indexed by the variable name
49
- */
50
- variables: Record<string, string>;
51
- }
52
- /** Reset styling variables override */
53
- interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {
54
- }
55
- /** Styling variable */
56
- type StylingVariable = CssVariable & {
57
- runtimeValue?: string;
58
- };
59
- /** Get styling variables */
60
- interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {
61
- /** List of styling variables */
62
- variables: StylingVariable[];
63
- }
64
- /**
65
- * List of styling message contents
66
- */
67
- type StylingMessageContents = UpdateStylingVariablesContentMessage | ResetStylingVariablesContentMessage | GetStylingVariableContentMessage;
68
- /** List of possible DataTypes for Styling messages */
69
- type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;
70
- /** List of all messages for Styling purposes */
71
- type AvailableStylingMessageContents = StylingMessageContents | ConnectContentMessage | RequestMessagesContentMessage<StylingMessageDataTypes>;
72
- /** Tag to identify theme variable */
73
- declare const THEME_TAG_NAME = "theme";
74
- /** Tag to identify palette variable */
75
- declare const PALETTE_TAG_NAME = "palette";
76
-
77
- /**
78
- * Styling devtools service
79
- */
80
- declare class OtterStylingDevtools {
81
- private readonly document;
82
- /**
83
- * Retrieve styling metadata
84
- * @param stylingMetadataPath
85
- */
86
- getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata>;
87
- /**
88
- * Update styling variables
89
- * @param variables
90
- */
91
- updateVariables(variables: Record<string, string>): void;
92
- /**
93
- * Reset styling variables override
94
- */
95
- resetStylingVariables(): void;
96
- static ɵfac: i0.ɵɵFactoryDeclaration<OtterStylingDevtools, never>;
97
- static ɵprov: i0.ɵɵInjectableDeclaration<OtterStylingDevtools>;
98
- }
99
-
100
- /**
101
- * Service to handle communication between application and chrome extension for styling
102
- */
103
- declare class StylingDevtoolsMessageService {
104
- private readonly logger;
105
- private readonly stylingDevTools;
106
- private readonly options;
107
- private readonly sendMessage;
108
- private readonly destroyRef;
109
- constructor();
110
- private sendMetadata;
111
- /**
112
- * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
113
- * @param only restricted list of messages to re-send
114
- */
115
- private handleReEmitRequest;
116
- /**
117
- * Function to handle the incoming messages from Otter Chrome DevTools extension
118
- * @param message Message coming from the Otter Chrome DevTools extension
119
- */
120
- private handleEvents;
121
- /**
122
- * Function to connect the plugin to the Otter Chrome DevTools extension
123
- */
124
- private connectPlugin;
125
- /** @inheritDoc */
126
- activate(): void;
127
- static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsMessageService, never>;
128
- static ɵprov: i0.ɵɵInjectableDeclaration<StylingDevtoolsMessageService>;
129
- }
130
-
131
- declare class StylingDevtoolsModule {
132
- /**
133
- * Initialize Otter Devtools
134
- * @param options
135
- */
136
- static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule>;
137
- static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsModule, never>;
138
- static ɵmod: i0.ɵɵNgModuleDeclaration<StylingDevtoolsModule, never, never, never>;
139
- static ɵinj: i0.ɵɵInjectorDeclaration<StylingDevtoolsModule>;
140
- }
141
-
142
- /**
143
- * Default value for styling devtools
144
- */
145
- declare const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions>;
146
- /**
147
- * Token for styling devtools
148
- */
149
- declare const OTTER_STYLING_DEVTOOLS_OPTIONS: InjectionToken<StylingDevtoolsServiceOptions>;
150
-
151
- export { OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, OTTER_STYLING_DEVTOOLS_OPTIONS, OtterStylingDevtools, PALETTE_TAG_NAME, StylingDevtoolsMessageService, StylingDevtoolsModule, THEME_TAG_NAME };
152
- export type { AvailableStylingMessageContents, CssMetadata, CssVariable, CssVariableType, GetStylingVariableContentMessage, ResetStylingVariablesContentMessage, StylingDevtoolsServiceOptions, StylingMessageDataTypes, StylingVariable, UpdateStylingVariablesContentMessage };
153
- //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sources":["../src/core/styles-interface.ts","../src/devkit/styling-devkit-interface.ts","../src/devkit/styling-devtools.ts","../src/devkit/styling-devtools-message-service.ts","../src/devkit/styling-devtools-module.ts","../src/devkit/styling-devtools-token.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;AAMA;;;;;;;AAOE,iBAAA,WAAA;;AAEA;;;;;;;;;;;AAWD;AAED;;;AAGE;AACE,wBAAA,WAAA;;AAEH;;ACvBD;;AAEG;AACG,UAAA,6BAAA,SAAA,qBAAA;AACJ;;AAEG;;AAEJ;AAED;;AAEE;;;AAGG;AACH,eAAA,MAAA;AACD;AAED;;AAC4G;AAE5G;AACM,KAAA,eAAA,GAAA,WAAA;;;AAEN;;;;AAIC;AAED;;AAEG;AACH,KAAA,sBAAA,GAAA,oCAAA,GAAA,mCAAA,GAAA,gCAAA;AAIA;;AAGA;AACM,KAAA,+BAAA,GAAA,sBAAA,GAAA,qBAAA,GAAA,6BAAA,CAAA,uBAAA;AAIN;AACA,cAAA,cAAA;AAEA;AACA,cAAA,gBAAA;;ACpDA;;AAEG;AACH,cAAA,oBAAA;AAEE;AAEA;;;AAGG;;AAKH;;;AAGG;;AAKH;;AAEG;;;;AAWJ;;ACkCD;;AAEG;AACH,cAAA,6BAAA;AAEE;AACA;AACA;AAEA;AACA;;;AAsBA;;;AAGG;AACH;AAMA;;;AAGG;AACH;AA0BA;;AAEG;AACH;;;;;AAWD;;ACnJD,cAAA,qBAAA;AAQE;;;AAGG;;;;;AAWJ;;ACjCD;;AAEG;AACH,cAAA,sCAAA,EAAA,QAAA,CAAA,6BAAA;AAKA;;AAEG;AACH,cAAA,8BAAA,EAAA,cAAA,CAAA,6BAAA;;;;"}