@ama-styling/devkit 14.1.0-prerelease.4 → 14.1.0-prerelease.40

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": "@ama-styling/devkit",
3
- "version": "14.1.0-prerelease.4",
3
+ "version": "14.1.0-prerelease.40",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -15,14 +15,14 @@
15
15
  "otter-module"
16
16
  ],
17
17
  "peerDependencies": {
18
- "@angular-devkit/schematics": "~21.0.2",
19
- "@angular/common": "~21.0.3",
20
- "@angular/core": "~21.0.3",
21
- "@o3r/core": "~14.1.0-prerelease.4",
22
- "@o3r/logger": "~14.1.0-prerelease.4",
23
- "@o3r/schematics": "~14.1.0-prerelease.4",
24
- "@o3r/testing": "~14.1.0-prerelease.4",
25
- "@schematics/angular": "~21.0.2",
18
+ "@angular-devkit/schematics": "~21.1.0",
19
+ "@angular/common": "~21.1.0",
20
+ "@angular/core": "~21.1.0",
21
+ "@o3r/core": "~14.1.0-prerelease.40",
22
+ "@o3r/logger": "~14.1.0-prerelease.40",
23
+ "@o3r/schematics": "~14.1.0-prerelease.40",
24
+ "@o3r/testing": "~14.1.0-prerelease.40",
25
+ "@schematics/angular": "~21.1.0",
26
26
  "rxjs": "^7.8.1",
27
27
  "type-fest": "^5.3.1",
28
28
  "typescript": "^5.9.0"
@@ -48,11 +48,11 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@o3r/schematics": "~14.1.0-prerelease.4",
51
+ "@o3r/schematics": "~14.1.0-prerelease.40",
52
52
  "tslib": "^2.6.2"
53
53
  },
54
54
  "engines": {
55
- "node": "^20.19.0 || ^22.17.0 || ^24.0.0"
55
+ "node": "^22.17.0 || ^24.0.0"
56
56
  },
57
57
  "schematics": "./collection.json",
58
58
  "module": "fesm2022/ama-styling-devkit.mjs",
package/index.d.ts DELETED
@@ -1,164 +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
- /** Style Metadata map */
6
- interface CssMetadata {
7
- /** Variables' dictionary */
8
- variables: {
9
- [name: string]: CssVariable;
10
- };
11
- }
12
- /** Metadata information added in the design token extension for Metadata extraction */
13
- interface DesignTokenMetadata {
14
- /** List of tags */
15
- tags?: string[];
16
- /** Description of the variable */
17
- label?: string;
18
- /** Name of a group of variables */
19
- category?: string;
20
- /** Component reference if the variable is linked to one */
21
- component?: ItemIdentifier;
22
- }
23
- /** CSS Variable possible types */
24
- type CssVariableType = 'string' | 'color';
25
- /** Metadata for a CSS Variable */
26
- interface CssVariable {
27
- /** Name of the variable */
28
- name: string;
29
- /** Default value of the variable */
30
- defaultValue: string;
31
- /** References of the variable */
32
- references?: CssVariable[];
33
- /** Tags of the variable */
34
- tags?: string[];
35
- /** Description of the variable */
36
- description?: string;
37
- /** Description of the variable */
38
- label?: string;
39
- /** Type of the variable */
40
- type?: CssVariableType;
41
- /** Name of a group of variables */
42
- category?: string;
43
- /** component reference if the variable is linked to one */
44
- component?: ItemIdentifier;
45
- }
46
- /**
47
- * Styling devtools service options
48
- */
49
- interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {
50
- /**
51
- * Path to retrieve the styling metadata file
52
- */
53
- stylingMetadataPath: string;
54
- }
55
- /** Update styling variables */
56
- interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {
57
- /**
58
- * Dictionary of variable value to update
59
- * indexed by the variable name
60
- */
61
- variables: Record<string, string>;
62
- }
63
- /** Reset styling variables override */
64
- interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {
65
- }
66
- /** Styling variable */
67
- type StylingVariable = CssVariable & {
68
- runtimeValue?: string;
69
- };
70
- /** Get styling variables */
71
- interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {
72
- /** List of styling variables */
73
- variables: StylingVariable[];
74
- }
75
- /**
76
- * List of styling message contents
77
- */
78
- type StylingMessageContents = UpdateStylingVariablesContentMessage | ResetStylingVariablesContentMessage | GetStylingVariableContentMessage;
79
- /** List of possible DataTypes for Styling messages */
80
- type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;
81
- /** List of all messages for Styling purposes */
82
- type AvailableStylingMessageContents = StylingMessageContents | ConnectContentMessage | RequestMessagesContentMessage<StylingMessageDataTypes>;
83
- /** Tag to identify theme variable */
84
- declare const THEME_TAG_NAME = "theme";
85
- /** Tag to identify palette variable */
86
- declare const PALETTE_TAG_NAME = "palette";
87
-
88
- /**
89
- * Styling devtools service
90
- */
91
- declare class OtterStylingDevtools {
92
- private readonly document;
93
- /**
94
- * Retrieve styling metadata
95
- * @param stylingMetadataPath
96
- */
97
- getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata>;
98
- /**
99
- * Update styling variables
100
- * @param variables
101
- */
102
- updateVariables(variables: Record<string, string>): void;
103
- /**
104
- * Reset styling variables override
105
- */
106
- resetStylingVariables(): void;
107
- static ɵfac: i0.ɵɵFactoryDeclaration<OtterStylingDevtools, never>;
108
- static ɵprov: i0.ɵɵInjectableDeclaration<OtterStylingDevtools>;
109
- }
110
-
111
- /**
112
- * Service to handle communication between application and chrome extension for styling
113
- */
114
- declare class StylingDevtoolsMessageService {
115
- private readonly logger;
116
- private readonly stylingDevTools;
117
- private readonly options;
118
- private readonly sendMessage;
119
- private readonly destroyRef;
120
- constructor();
121
- private sendMetadata;
122
- /**
123
- * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
124
- * @param only restricted list of messages to re-send
125
- */
126
- private handleReEmitRequest;
127
- /**
128
- * Function to handle the incoming messages from Otter Chrome DevTools extension
129
- * @param message Message coming from the Otter Chrome DevTools extension
130
- */
131
- private handleEvents;
132
- /**
133
- * Function to connect the plugin to the Otter Chrome DevTools extension
134
- */
135
- private connectPlugin;
136
- /** @inheritDoc */
137
- activate(): void;
138
- static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsMessageService, never>;
139
- static ɵprov: i0.ɵɵInjectableDeclaration<StylingDevtoolsMessageService>;
140
- }
141
-
142
- declare class StylingDevtoolsModule {
143
- /**
144
- * Initialize Otter Devtools
145
- * @param options
146
- */
147
- static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule>;
148
- static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsModule, never>;
149
- static ɵmod: i0.ɵɵNgModuleDeclaration<StylingDevtoolsModule, never, never, never>;
150
- static ɵinj: i0.ɵɵInjectorDeclaration<StylingDevtoolsModule>;
151
- }
152
-
153
- /**
154
- * Default value for styling devtools
155
- */
156
- declare const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions>;
157
- /**
158
- * Token for styling devtools
159
- */
160
- declare const OTTER_STYLING_DEVTOOLS_OPTIONS: InjectionToken<StylingDevtoolsServiceOptions>;
161
-
162
- export { OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, OTTER_STYLING_DEVTOOLS_OPTIONS, OtterStylingDevtools, PALETTE_TAG_NAME, StylingDevtoolsMessageService, StylingDevtoolsModule, THEME_TAG_NAME };
163
- export type { AvailableStylingMessageContents, CssMetadata, CssVariable, CssVariableType, DesignTokenMetadata, GetStylingVariableContentMessage, ResetStylingVariablesContentMessage, StylingDevtoolsServiceOptions, StylingMessageDataTypes, StylingVariable, UpdateStylingVariablesContentMessage };
164
- //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sources":["../src/core/styling-devkit-interface.ts","../src/core/styling-devtools.ts","../src/core/styling-devtools-message-service.ts","../src/core/styling-devtools-module.ts","../src/core/styling-devtools-token.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;;;AASA;;;AAGE;AACE,wBAAA,WAAA;;AAEH;AAED;;;AAGE;;;;;;;AAOD;AAED;;AAGA;;;;;;;AAOE,iBAAA,WAAA;;AAEA;;;;;;;;;;;AAWD;AAED;;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;;AC/FA;;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;;;;"}