@o3r/styling 13.0.0-next.2 → 13.0.0-next.20
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.
- package/fesm2022/o3r-styling.mjs +17 -23
- package/fesm2022/o3r-styling.mjs.map +1 -1
- package/index.d.ts +151 -4
- package/index.d.ts.map +1 -0
- package/package.json +19 -19
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +2 -0
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.json +2 -1
- package/core/index.d.ts +0 -2
- package/core/index.d.ts.map +0 -1
- package/core/styles.interface.d.ts +0 -31
- package/core/styles.interface.d.ts.map +0 -1
- package/devkit/index.d.ts +0 -6
- package/devkit/index.d.ts.map +0 -1
- package/devkit/styling-devkit.interface.d.ts +0 -45
- package/devkit/styling-devkit.interface.d.ts.map +0 -1
- package/devkit/styling-devtools.message.service.d.ts +0 -35
- package/devkit/styling-devtools.message.service.d.ts.map +0 -1
- package/devkit/styling-devtools.module.d.ts +0 -14
- package/devkit/styling-devtools.module.d.ts.map +0 -1
- package/devkit/styling-devtools.service.d.ts +0 -25
- package/devkit/styling-devtools.service.d.ts.map +0 -1
- package/devkit/styling-devtools.token.d.ts +0 -11
- package/devkit/styling-devtools.token.d.ts.map +0 -1
- package/o3r-styling.d.ts.map +0 -1
- package/public_api.d.ts +0 -3
- package/public_api.d.ts.map +0 -1
package/fesm2022/o3r-styling.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, InjectionToken, DestroyRef,
|
|
2
|
+
import { inject, DOCUMENT, Injectable, InjectionToken, DestroyRef, NgModule } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { sendOtterMessage, filterMessageContent } from '@o3r/core';
|
|
5
|
-
import
|
|
5
|
+
import { LoggerService } from '@o3r/logger';
|
|
6
6
|
import { fromEvent } from 'rxjs';
|
|
7
|
-
import { DOCUMENT } from '@angular/common';
|
|
8
7
|
|
|
9
8
|
/** Tag to identify theme variable */
|
|
10
9
|
const THEME_TAG_NAME = 'theme';
|
|
@@ -45,10 +44,10 @@ class OtterStylingDevtools {
|
|
|
45
44
|
}, [])
|
|
46
45
|
.forEach((varName) => style.removeProperty(varName));
|
|
47
46
|
}
|
|
48
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
47
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: OtterStylingDevtools, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: OtterStylingDevtools }); }
|
|
50
49
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: OtterStylingDevtools, decorators: [{
|
|
52
51
|
type: Injectable
|
|
53
52
|
}] });
|
|
54
53
|
|
|
@@ -106,10 +105,10 @@ const getCSSVariableValue = (variableName, cssRules) => {
|
|
|
106
105
|
* Service to handle communication between application and chrome extension for styling
|
|
107
106
|
*/
|
|
108
107
|
class StylingDevtoolsMessageService {
|
|
109
|
-
constructor(
|
|
110
|
-
this.logger =
|
|
111
|
-
this.stylingDevTools =
|
|
112
|
-
this.options =
|
|
108
|
+
constructor() {
|
|
109
|
+
this.logger = inject(LoggerService);
|
|
110
|
+
this.stylingDevTools = inject(OtterStylingDevtools);
|
|
111
|
+
this.options = inject(OTTER_STYLING_DEVTOOLS_OPTIONS, { optional: true }) ?? OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS;
|
|
113
112
|
this.sendMessage = (sendOtterMessage);
|
|
114
113
|
this.destroyRef = inject(DestroyRef);
|
|
115
114
|
this.options = {
|
|
@@ -176,17 +175,12 @@ class StylingDevtoolsMessageService {
|
|
|
176
175
|
activate() {
|
|
177
176
|
fromEvent(window, 'message').pipe(takeUntilDestroyed(this.destroyRef), filterMessageContent(isStylingMessage)).subscribe((e) => this.handleEvents(e));
|
|
178
177
|
}
|
|
179
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
180
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
178
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
179
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsMessageService }); }
|
|
181
180
|
}
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsMessageService, decorators: [{
|
|
183
182
|
type: Injectable
|
|
184
|
-
}], ctorParameters: () => [
|
|
185
|
-
type: Optional
|
|
186
|
-
}, {
|
|
187
|
-
type: Inject,
|
|
188
|
-
args: [OTTER_STYLING_DEVTOOLS_OPTIONS]
|
|
189
|
-
}] }] });
|
|
183
|
+
}], ctorParameters: () => [] });
|
|
190
184
|
|
|
191
185
|
class StylingDevtoolsModule {
|
|
192
186
|
/**
|
|
@@ -203,15 +197,15 @@ class StylingDevtoolsModule {
|
|
|
203
197
|
]
|
|
204
198
|
};
|
|
205
199
|
}
|
|
206
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
207
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
208
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
200
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
201
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsModule }); }
|
|
202
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsModule, providers: [
|
|
209
203
|
{ provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS },
|
|
210
204
|
StylingDevtoolsMessageService,
|
|
211
205
|
OtterStylingDevtools
|
|
212
206
|
] }); }
|
|
213
207
|
}
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: StylingDevtoolsModule, decorators: [{
|
|
215
209
|
type: NgModule,
|
|
216
210
|
args: [{
|
|
217
211
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-styling.mjs","sources":["../../src/devkit/styling-devkit.interface.ts","../../src/devkit/styling-devtools.service.ts","../../src/devkit/styling-devtools.token.ts","../../src/devkit/styling-devtools.message.service.ts","../../src/devkit/styling-devtools.module.ts","../../src/o3r-styling.ts"],"sourcesContent":["import type {\n ConnectContentMessage,\n DevtoolsCommonOptions,\n MessageDataTypes,\n OtterMessageContent,\n RequestMessagesContentMessage,\n} from '@o3r/core';\nimport {\n CssVariable,\n} from '../core/index';\n\n/**\n * Styling devtools service options\n */\nexport interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {\n /**\n * Path to retrieve the styling metadata file\n */\n stylingMetadataPath: string;\n}\n\n/** Update styling variables */\nexport interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {\n /**\n * Dictionary of variable value to update\n * indexed by the variable name\n */\n variables: Record<string, string>;\n}\n\n/** Reset styling variables override */\nexport interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {}\n\n/** Styling variable */\nexport type StylingVariable = CssVariable & { runtimeValue?: string };\n\n/** Get styling variables */\nexport interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {\n /** List of styling variables */\n variables: StylingVariable[];\n}\n\n/**\n * List of styling message contents\n */\ntype StylingMessageContents =\n | UpdateStylingVariablesContentMessage\n | ResetStylingVariablesContentMessage\n | GetStylingVariableContentMessage;\n\n/** List of possible DataTypes for Styling messages */\nexport type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;\n\n/** List of all messages for Styling purposes */\nexport type AvailableStylingMessageContents =\n | StylingMessageContents\n | ConnectContentMessage\n | RequestMessagesContentMessage<StylingMessageDataTypes>;\n\n/** Tag to identify theme variable */\nexport const THEME_TAG_NAME = 'theme';\n\n/** Tag to identify palette variable */\nexport const PALETTE_TAG_NAME = 'palette';\n","import {\n DOCUMENT,\n} from '@angular/common';\nimport {\n inject,\n Injectable,\n} from '@angular/core';\nimport type {\n CssMetadata,\n} from '../core/index';\n\n/**\n * Styling devtools service\n */\n@Injectable()\nexport class OtterStylingDevtools {\n private readonly document = inject(DOCUMENT);\n\n /**\n * Retrieve styling metadata\n * @param stylingMetadataPath\n */\n public async getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata> {\n return (await fetch(stylingMetadataPath)).json();\n }\n\n /**\n * Update styling variables\n * @param variables\n */\n public updateVariables(variables: Record<string, string>) {\n Object.entries(variables).forEach(([varName, value]) => this.document.querySelector('html')!.style.setProperty(`--${varName}`, value));\n }\n\n /**\n * Reset styling variables override\n */\n public resetStylingVariables() {\n const style = this.document.querySelector('html')!.style;\n style.cssText\n .split(/;(\\s+)?/)\n .reduce((acc: string[], str) => {\n const match = str?.match(/^(--.*):/);\n return match ? acc.concat(match[1]) : acc;\n }, [])\n .forEach((varName) => style.removeProperty(varName));\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\n\n/**\n * Default value for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions> = {\n isActivatedOnBootstrap: false,\n stylingMetadataPath: './metadata/styling.metadata.json'\n} as const;\n\n/**\n * Token for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_OPTIONS = new InjectionToken<StylingDevtoolsServiceOptions>('Otter Styling Devtools options');\n","/* eslint-disable no-console -- this is the purpose of this service */\nimport {\n DestroyRef,\n inject,\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n filterMessageContent,\n sendOtterMessage,\n} from '@o3r/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n fromEvent,\n} from 'rxjs';\nimport {\n AvailableStylingMessageContents,\n StylingDevtoolsServiceOptions,\n StylingMessageDataTypes,\n} from './styling-devkit.interface';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\nconst isStylingMessage = (message: any): message is AvailableStylingMessageContents => {\n return message && (\n message.dataType === 'updateStylingVariables'\n || message.dataType === 'resetStylingVariables'\n || message.dataType === 'getStylingVariable'\n || message.dataType === 'requestMessages'\n || message.dataType === 'connect'\n );\n};\n\nconst getCSSRulesAppliedOnRoot = () => Array.from(document.styleSheets)\n .reverse()\n .reduce((acc: CSSStyleRule[], styleSheet) => {\n let rules;\n try {\n rules = styleSheet.cssRules || styleSheet.rules;\n } catch (err) {\n console.debug(`Could not access to stylesheet ${styleSheet.href}. This might be due to network issues, please check:\n- network connectivity\n- CORS setup\n- granted access to the stylesheet`, err);\n }\n\n return acc.concat(\n Array.from(rules || [])\n .reverse()\n .filter((rule): rule is CSSStyleRule => rule instanceof CSSStyleRule && /\\b:root\\b/.test(rule.selectorText))\n );\n }, []);\n\nconst getCSSVariableValueInCSSStyleDeclaration = (variableName: string, style: CSSStyleDeclaration) =>\n style.getPropertyValue(variableName).trim();\n\nconst getCSSVariableValue = (variableName: string, cssRules: CSSStyleRule[]) => {\n const inlineValue = getCSSVariableValueInCSSStyleDeclaration(variableName, document.querySelector('html')!.style);\n if (inlineValue) {\n return inlineValue;\n }\n\n for (const rule of cssRules) {\n const ruleValue = getCSSVariableValueInCSSStyleDeclaration(variableName, rule.style);\n if (ruleValue) {\n return ruleValue;\n }\n }\n};\n\n/**\n * Service to handle communication between application and chrome extension for styling\n */\n@Injectable()\nexport class StylingDevtoolsMessageService {\n private readonly sendMessage = sendOtterMessage<AvailableStylingMessageContents>;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n private readonly logger: LoggerService,\n private readonly stylingDevTools: OtterStylingDevtools,\n @Optional() @Inject(OTTER_STYLING_DEVTOOLS_OPTIONS) private readonly options: StylingDevtoolsServiceOptions = OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS) {\n this.options = {\n ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n ...this.options\n };\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n private async sendMetadata() {\n const metadata = await this.stylingDevTools.getStylingMetadata(this.options.stylingMetadataPath);\n const cssRules = getCSSRulesAppliedOnRoot();\n const variables = Object.values(metadata.variables).map((variable) => ({\n ...variable,\n runtimeValue: getCSSVariableValue(`--${variable.name}`, cssRules)\n }));\n this.sendMessage('getStylingVariable', { variables });\n }\n\n /**\n * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension\n * @param only restricted list of messages to re-send\n */\n private handleReEmitRequest(only?: StylingMessageDataTypes[]) {\n if (!only || only.includes('getStylingVariable')) {\n return this.sendMetadata();\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param message Message coming from the Otter Chrome DevTools extension\n */\n private handleEvents(message: AvailableStylingMessageContents) {\n this.logger.debug('Message handling by the styling service', message);\n\n switch (message.dataType) {\n case 'connect': {\n this.connectPlugin();\n break;\n }\n case 'requestMessages': {\n void this.handleReEmitRequest(message.only);\n break;\n }\n case 'updateStylingVariables': {\n this.stylingDevTools.updateVariables(message.variables);\n break;\n }\n case 'resetStylingVariables': {\n this.stylingDevTools.resetStylingVariables();\n break;\n }\n default: {\n this.logger.warn('Message ignored by the styling service', message);\n }\n }\n }\n\n /**\n * Function to connect the plugin to the Otter Chrome DevTools extension\n */\n private connectPlugin() {\n this.logger.debug('Otter DevTools is plugged to styling service of the application');\n }\n\n /** @inheritDoc */\n public activate() {\n fromEvent(window, 'message').pipe(\n takeUntilDestroyed(this.destroyRef),\n filterMessageContent(isStylingMessage)\n ).subscribe((e) => this.handleEvents(e));\n }\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\nimport {\n StylingDevtoolsMessageService,\n} from './styling-devtools.message.service';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\n@NgModule({\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n})\nexport class StylingDevtoolsModule {\n /**\n * Initialize Otter Devtools\n * @param options\n */\n public static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule> {\n return {\n ngModule: StylingDevtoolsModule,\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: { ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, ...options }, multi: false },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AA2DA;AACO,MAAM,cAAc,GAAG;AAE9B;AACO,MAAM,gBAAgB,GAAG;;ACpDhC;;AAEG;MAEU,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AA+B7C;AA7BC;;;AAGG;IACI,MAAM,kBAAkB,CAAC,mBAA2B,EAAA;QACzD,OAAO,CAAC,MAAM,KAAK,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE;;AAGlD;;;AAGG;AACI,IAAA,eAAe,CAAC,SAAiC,EAAA;AACtD,QAAA,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,OAAO,CAAA,CAAE,EAAE,KAAK,CAAC,CAAC;;AAGxI;;AAEG;IACI,qBAAqB,GAAA;AAC1B,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,KAAK;AACxD,QAAA,KAAK,CAAC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AE,KAAK,EAAE;gBAC9H,6BAA6B;gBAC7B;AACD;SACF;;kIAbQ,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mIAArB,qBAAqB,EAAA,CAAA,CAAA;AAArB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EANrB,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,sCAAsC,EAAE;YAC7F,6BAA6B;YAC7B;AACD,SAAA,EAAA,CAAA,CAAA;;4FAEU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,sCAAsC,EAAE;wBAC7F,6BAA6B;wBAC7B;AACD;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"o3r-styling.mjs","sources":["../../src/devkit/styling-devkit.interface.ts","../../src/devkit/styling-devtools.service.ts","../../src/devkit/styling-devtools.token.ts","../../src/devkit/styling-devtools.message.service.ts","../../src/devkit/styling-devtools.module.ts","../../src/o3r-styling.ts"],"sourcesContent":["import type {\n ConnectContentMessage,\n DevtoolsCommonOptions,\n MessageDataTypes,\n OtterMessageContent,\n RequestMessagesContentMessage,\n} from '@o3r/core';\nimport {\n CssVariable,\n} from '../core/index';\n\n/**\n * Styling devtools service options\n */\nexport interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {\n /**\n * Path to retrieve the styling metadata file\n */\n stylingMetadataPath: string;\n}\n\n/** Update styling variables */\nexport interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {\n /**\n * Dictionary of variable value to update\n * indexed by the variable name\n */\n variables: Record<string, string>;\n}\n\n/** Reset styling variables override */\nexport interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {}\n\n/** Styling variable */\nexport type StylingVariable = CssVariable & { runtimeValue?: string };\n\n/** Get styling variables */\nexport interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {\n /** List of styling variables */\n variables: StylingVariable[];\n}\n\n/**\n * List of styling message contents\n */\ntype StylingMessageContents =\n | UpdateStylingVariablesContentMessage\n | ResetStylingVariablesContentMessage\n | GetStylingVariableContentMessage;\n\n/** List of possible DataTypes for Styling messages */\nexport type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;\n\n/** List of all messages for Styling purposes */\nexport type AvailableStylingMessageContents =\n | StylingMessageContents\n | ConnectContentMessage\n | RequestMessagesContentMessage<StylingMessageDataTypes>;\n\n/** Tag to identify theme variable */\nexport const THEME_TAG_NAME = 'theme';\n\n/** Tag to identify palette variable */\nexport const PALETTE_TAG_NAME = 'palette';\n","import {\n DOCUMENT,\n inject,\n Injectable,\n} from '@angular/core';\nimport type {\n CssMetadata,\n} from '../core/index';\n\n/**\n * Styling devtools service\n */\n@Injectable()\nexport class OtterStylingDevtools {\n private readonly document = inject(DOCUMENT);\n\n /**\n * Retrieve styling metadata\n * @param stylingMetadataPath\n */\n public async getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata> {\n return (await fetch(stylingMetadataPath)).json();\n }\n\n /**\n * Update styling variables\n * @param variables\n */\n public updateVariables(variables: Record<string, string>) {\n Object.entries(variables).forEach(([varName, value]) => this.document.querySelector('html')!.style.setProperty(`--${varName}`, value));\n }\n\n /**\n * Reset styling variables override\n */\n public resetStylingVariables() {\n const style = this.document.querySelector('html')!.style;\n style.cssText\n .split(/;(\\s+)?/)\n .reduce((acc: string[], str) => {\n const match = str?.match(/^(--.*):/);\n return match ? acc.concat(match[1]) : acc;\n }, [])\n .forEach((varName) => style.removeProperty(varName));\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\n\n/**\n * Default value for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions> = {\n isActivatedOnBootstrap: false,\n stylingMetadataPath: './metadata/styling.metadata.json'\n} as const;\n\n/**\n * Token for styling devtools\n */\nexport const OTTER_STYLING_DEVTOOLS_OPTIONS = new InjectionToken<StylingDevtoolsServiceOptions>('Otter Styling Devtools options');\n","/* eslint-disable no-console -- this is the purpose of this service */\nimport {\n DestroyRef,\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n filterMessageContent,\n sendOtterMessage,\n} from '@o3r/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n fromEvent,\n} from 'rxjs';\nimport {\n AvailableStylingMessageContents,\n StylingDevtoolsServiceOptions,\n StylingMessageDataTypes,\n} from './styling-devkit.interface';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\nconst isStylingMessage = (message: any): message is AvailableStylingMessageContents => {\n return message && (\n message.dataType === 'updateStylingVariables'\n || message.dataType === 'resetStylingVariables'\n || message.dataType === 'getStylingVariable'\n || message.dataType === 'requestMessages'\n || message.dataType === 'connect'\n );\n};\n\nconst getCSSRulesAppliedOnRoot = () => Array.from(document.styleSheets)\n .reverse()\n .reduce((acc: CSSStyleRule[], styleSheet) => {\n let rules;\n try {\n rules = styleSheet.cssRules || styleSheet.rules;\n } catch (err) {\n console.debug(`Could not access to stylesheet ${styleSheet.href}. This might be due to network issues, please check:\n- network connectivity\n- CORS setup\n- granted access to the stylesheet`, err);\n }\n\n return acc.concat(\n Array.from(rules || [])\n .reverse()\n .filter((rule): rule is CSSStyleRule => rule instanceof CSSStyleRule && /\\b:root\\b/.test(rule.selectorText))\n );\n }, []);\n\nconst getCSSVariableValueInCSSStyleDeclaration = (variableName: string, style: CSSStyleDeclaration) =>\n style.getPropertyValue(variableName).trim();\n\nconst getCSSVariableValue = (variableName: string, cssRules: CSSStyleRule[]) => {\n const inlineValue = getCSSVariableValueInCSSStyleDeclaration(variableName, document.querySelector('html')!.style);\n if (inlineValue) {\n return inlineValue;\n }\n\n for (const rule of cssRules) {\n const ruleValue = getCSSVariableValueInCSSStyleDeclaration(variableName, rule.style);\n if (ruleValue) {\n return ruleValue;\n }\n }\n};\n\n/**\n * Service to handle communication between application and chrome extension for styling\n */\n@Injectable()\nexport class StylingDevtoolsMessageService {\n private readonly logger = inject(LoggerService);\n private readonly stylingDevTools = inject(OtterStylingDevtools);\n private readonly options = inject<StylingDevtoolsServiceOptions>(OTTER_STYLING_DEVTOOLS_OPTIONS, { optional: true }) ?? OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS;\n\n private readonly sendMessage = sendOtterMessage<AvailableStylingMessageContents>;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n this.options = {\n ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n ...this.options\n };\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n private async sendMetadata() {\n const metadata = await this.stylingDevTools.getStylingMetadata(this.options.stylingMetadataPath);\n const cssRules = getCSSRulesAppliedOnRoot();\n const variables = Object.values(metadata.variables).map((variable) => ({\n ...variable,\n runtimeValue: getCSSVariableValue(`--${variable.name}`, cssRules)\n }));\n this.sendMessage('getStylingVariable', { variables });\n }\n\n /**\n * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension\n * @param only restricted list of messages to re-send\n */\n private handleReEmitRequest(only?: StylingMessageDataTypes[]) {\n if (!only || only.includes('getStylingVariable')) {\n return this.sendMetadata();\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param message Message coming from the Otter Chrome DevTools extension\n */\n private handleEvents(message: AvailableStylingMessageContents) {\n this.logger.debug('Message handling by the styling service', message);\n\n switch (message.dataType) {\n case 'connect': {\n this.connectPlugin();\n break;\n }\n case 'requestMessages': {\n void this.handleReEmitRequest(message.only);\n break;\n }\n case 'updateStylingVariables': {\n this.stylingDevTools.updateVariables(message.variables);\n break;\n }\n case 'resetStylingVariables': {\n this.stylingDevTools.resetStylingVariables();\n break;\n }\n default: {\n this.logger.warn('Message ignored by the styling service', message);\n }\n }\n }\n\n /**\n * Function to connect the plugin to the Otter Chrome DevTools extension\n */\n private connectPlugin() {\n this.logger.debug('Otter DevTools is plugged to styling service of the application');\n }\n\n /** @inheritDoc */\n public activate() {\n fromEvent(window, 'message').pipe(\n takeUntilDestroyed(this.destroyRef),\n filterMessageContent(isStylingMessage)\n ).subscribe((e) => this.handleEvents(e));\n }\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport type {\n StylingDevtoolsServiceOptions,\n} from './styling-devkit.interface';\nimport {\n StylingDevtoolsMessageService,\n} from './styling-devtools.message.service';\nimport {\n OtterStylingDevtools,\n} from './styling-devtools.service';\nimport {\n OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_STYLING_DEVTOOLS_OPTIONS,\n} from './styling-devtools.token';\n\n@NgModule({\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n})\nexport class StylingDevtoolsModule {\n /**\n * Initialize Otter Devtools\n * @param options\n */\n public static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule> {\n return {\n ngModule: StylingDevtoolsModule,\n providers: [\n { provide: OTTER_STYLING_DEVTOOLS_OPTIONS, useValue: { ...OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS, ...options }, multi: false },\n StylingDevtoolsMessageService,\n OtterStylingDevtools\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AA2DA;AACO,MAAM,cAAc,GAAG;AAE9B;AACO,MAAM,gBAAgB,GAAG;;ACtDhC;;AAEG;MAEU,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AA+B7C;AA7BC;;;AAGG;IACI,MAAM,kBAAkB,CAAC,mBAA2B,EAAA;QACzD,OAAO,CAAC,MAAM,KAAK,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE;;AAGlD;;;AAGG;AACI,IAAA,eAAe,CAAC,SAAiC,EAAA;AACtD,QAAA,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,OAAO,CAAA,CAAE,EAAE,KAAK,CAAC,CAAC;;AAGxI;;AAEG;IACI,qBAAqB,GAAA;AAC1B,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,KAAK;AACxD,QAAA,KAAK,CAAC;aACH,KAAK,CAAC,SAAS;AACf,aAAA,MAAM,CAAC,CAAC,GAAa,EAAE,GAAG,KAAI;YAC7B,MAAM,KAAK,GAAG,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC;AACpC,YAAA,OAAO,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;SAC1C,EAAE,EAAE;AACJ,aAAA,OAAO,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,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AC7B;AACD,SAAA,EAAA,CAAA,CAAA;;2FAEU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,8BAA8B,EAAE,QAAQ,EAAE,sCAAsC,EAAE;wBAC7F,6BAA6B;wBAC7B;AACD;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,153 @@
|
|
|
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
|
+
|
|
1
35
|
/**
|
|
2
|
-
*
|
|
36
|
+
* Styling devtools service options
|
|
3
37
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
* Service to handle communication between application and chrome extension for styling
|
|
79
|
+
*/
|
|
80
|
+
declare class StylingDevtoolsMessageService {
|
|
81
|
+
private readonly logger;
|
|
82
|
+
private readonly stylingDevTools;
|
|
83
|
+
private readonly options;
|
|
84
|
+
private readonly sendMessage;
|
|
85
|
+
private readonly destroyRef;
|
|
86
|
+
constructor();
|
|
87
|
+
private sendMetadata;
|
|
88
|
+
/**
|
|
89
|
+
* Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
|
|
90
|
+
* @param only restricted list of messages to re-send
|
|
91
|
+
*/
|
|
92
|
+
private handleReEmitRequest;
|
|
93
|
+
/**
|
|
94
|
+
* Function to handle the incoming messages from Otter Chrome DevTools extension
|
|
95
|
+
* @param message Message coming from the Otter Chrome DevTools extension
|
|
96
|
+
*/
|
|
97
|
+
private handleEvents;
|
|
98
|
+
/**
|
|
99
|
+
* Function to connect the plugin to the Otter Chrome DevTools extension
|
|
100
|
+
*/
|
|
101
|
+
private connectPlugin;
|
|
102
|
+
/** @inheritDoc */
|
|
103
|
+
activate(): void;
|
|
104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsMessageService, never>;
|
|
105
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StylingDevtoolsMessageService>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare class StylingDevtoolsModule {
|
|
109
|
+
/**
|
|
110
|
+
* Initialize Otter Devtools
|
|
111
|
+
* @param options
|
|
112
|
+
*/
|
|
113
|
+
static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule>;
|
|
114
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsModule, never>;
|
|
115
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StylingDevtoolsModule, never, never, never>;
|
|
116
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StylingDevtoolsModule>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Styling devtools service
|
|
121
|
+
*/
|
|
122
|
+
declare class OtterStylingDevtools {
|
|
123
|
+
private readonly document;
|
|
124
|
+
/**
|
|
125
|
+
* Retrieve styling metadata
|
|
126
|
+
* @param stylingMetadataPath
|
|
127
|
+
*/
|
|
128
|
+
getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata>;
|
|
129
|
+
/**
|
|
130
|
+
* Update styling variables
|
|
131
|
+
* @param variables
|
|
132
|
+
*/
|
|
133
|
+
updateVariables(variables: Record<string, string>): void;
|
|
134
|
+
/**
|
|
135
|
+
* Reset styling variables override
|
|
136
|
+
*/
|
|
137
|
+
resetStylingVariables(): void;
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OtterStylingDevtools, never>;
|
|
139
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OtterStylingDevtools>;
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/core/styles.interface.ts","../src/devkit/styling-devkit.interface.ts","../src/devkit/styling-devtools.message.service.ts","../src/devkit/styling-devtools.module.ts","../src/devkit/styling-devtools.service.ts","../src/devkit/styling-devtools.token.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;AAMA;;;;;;;AAOE;;AAEA;;;;;;;;;;;AAWD;AAED;;;AAGE;AACE;;AAEH;;ACvBD;;AAEG;AACG;AACJ;;AAEG;;AAEJ;AAED;;AAEE;;;AAGG;AACH;AACD;AAED;;AAC4G;AAE5G;AACM;;;AAEN;;;;AAIC;AAED;;AAEG;AACH;AAKA;;AAGA;AACM;AAKN;AACA;AAEA;AACA;;ACgBA;;AAEG;AACH;AAEE;AACA;AACA;AAEA;AACA;;;AAsBA;;;AAGG;AACH;AAMA;;;AAGG;AACH;AA0BA;;AAEG;AACH;;;;;AAWD;;ACnJD;AAQE;;;AAGG;;;;;AAWJ;;AC/BD;;AAEG;AACH;AAEE;AAEA;;;AAGG;;AAKH;;;AAGG;;AAKH;;AAEG;;;;AAWJ;;ACtCD;;AAEG;AACH;AAKA;;AAEG;AACH;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/styling",
|
|
3
|
-
"version": "13.0.0-next.
|
|
3
|
+
"version": "13.0.0-next.20",
|
|
4
4
|
"deprecated": "This package will be removed in Otter v14. Please use @ama-styling/style-dictionary instead.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,27 +24,27 @@
|
|
|
24
24
|
"default": "./schemas/*.json"
|
|
25
25
|
},
|
|
26
26
|
"./builders/*/helpers": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"types": "./builders/*/helpers/index.d.ts",
|
|
28
|
+
"default": "./builders/*/helpers/index.js"
|
|
29
29
|
},
|
|
30
30
|
"./package.json": {
|
|
31
31
|
"default": "./package.json"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@angular-devkit/architect": ">=0.
|
|
36
|
-
"@angular-devkit/core": "^
|
|
37
|
-
"@angular-devkit/schematics": "^
|
|
38
|
-
"@angular/cdk": "^
|
|
39
|
-
"@angular/common": "^
|
|
40
|
-
"@angular/core": "^
|
|
41
|
-
"@angular/material": "^
|
|
42
|
-
"@o3r/core": "^13.0.0-next.
|
|
43
|
-
"@o3r/dynamic-content": "^13.0.0-next.
|
|
44
|
-
"@o3r/extractors": "^13.0.0-next.
|
|
45
|
-
"@o3r/logger": "^13.0.0-next.
|
|
46
|
-
"@o3r/schematics": "^13.0.0-next.
|
|
47
|
-
"@schematics/angular": "^
|
|
35
|
+
"@angular-devkit/architect": ">=0.2000.0 <0.2100.0-0",
|
|
36
|
+
"@angular-devkit/core": "^20.0.0",
|
|
37
|
+
"@angular-devkit/schematics": "^20.0.0",
|
|
38
|
+
"@angular/cdk": "^20.0.0",
|
|
39
|
+
"@angular/common": "^20.0.0",
|
|
40
|
+
"@angular/core": "^20.0.0",
|
|
41
|
+
"@angular/material": "^20.0.0",
|
|
42
|
+
"@o3r/core": "^13.0.0-next.20",
|
|
43
|
+
"@o3r/dynamic-content": "^13.0.0-next.20",
|
|
44
|
+
"@o3r/extractors": "^13.0.0-next.20",
|
|
45
|
+
"@o3r/logger": "^13.0.0-next.20",
|
|
46
|
+
"@o3r/schematics": "^13.0.0-next.20",
|
|
47
|
+
"@schematics/angular": "^20.0.0",
|
|
48
48
|
"@yarnpkg/cli": "^4.3.1",
|
|
49
49
|
"@yarnpkg/core": "^4.1.1",
|
|
50
50
|
"@yarnpkg/fslib": "^3.1.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"semver": "^7.5.2",
|
|
59
59
|
"ts-node": "~10.9.2",
|
|
60
60
|
"type-fest": "^4.30.1",
|
|
61
|
-
"typescript": "^5.
|
|
61
|
+
"typescript": "^5.8.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
64
64
|
"@angular-devkit/architect": {
|
|
@@ -132,14 +132,14 @@
|
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
134
|
"dependencies": {
|
|
135
|
-
"@o3r/schematics": "^13.0.0-next.
|
|
135
|
+
"@o3r/schematics": "^13.0.0-next.20",
|
|
136
136
|
"tslib": "^2.6.2"
|
|
137
137
|
},
|
|
138
138
|
"generatorDependencies": {
|
|
139
139
|
"sass-loader": "^16.0.0"
|
|
140
140
|
},
|
|
141
141
|
"engines": {
|
|
142
|
-
"node": "^20.
|
|
142
|
+
"node": "^20.19.0 || ^22.12.0 || ^24.0.0"
|
|
143
143
|
},
|
|
144
144
|
"builders": "./builders.json",
|
|
145
145
|
"schematics": "./collection.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAqBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAqBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAqFlB;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -10,6 +10,8 @@ const cms_adapter_1 = require("../cms-adapter");
|
|
|
10
10
|
* List of external dependencies to be added to the project as peer dependencies
|
|
11
11
|
*/
|
|
12
12
|
const dependenciesToInstall = [
|
|
13
|
+
'@angular/common',
|
|
14
|
+
'@angular/core',
|
|
13
15
|
'@angular/cdk',
|
|
14
16
|
'@angular/material'
|
|
15
17
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAC9B,kCAAkC;AAClC,2DAGoC;AACpC,gDAayB;AAIzB,gDAEwB;AAKxB;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,cAAc;IACd,mBAAmB;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAG;IAC/B,4BAA4B;IAC5B,qBAAqB;IACrB,UAAU;IACV,aAAa;CACd,CAAC;AAEF;;;;GAIG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAC9B,kCAAkC;AAClC,2DAGoC;AACpC,gDAayB;AAIzB,gDAEwB;AAKxB;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,mBAAmB;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAG;IAC/B,4BAA4B;IAC5B,qBAAqB;IACrB,UAAU;IACV,aAAa;CACd,CAAC;AAEF;;;;GAIG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5E,OAAO,GAAG,EAAE,GAAG,IAAA,0CAA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,EAAE,EAAE,CAAC,IAAA,iCAAoB,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AAAnF,QAAA,KAAK,SAA8E"}
|
package/core/index.d.ts
DELETED
package/core/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ItemIdentifier } from '@o3r/core';
|
|
2
|
-
export type CssVariableType = 'string' | 'color';
|
|
3
|
-
/** Metadata for a CSS Variable */
|
|
4
|
-
export interface CssVariable {
|
|
5
|
-
/** Name of the variable */
|
|
6
|
-
name: string;
|
|
7
|
-
/** Default value of the variable */
|
|
8
|
-
defaultValue: string;
|
|
9
|
-
/** References of the variable */
|
|
10
|
-
references?: CssVariable[];
|
|
11
|
-
/** Tags of the variable */
|
|
12
|
-
tags?: string[];
|
|
13
|
-
/** Description of the variable */
|
|
14
|
-
description?: string;
|
|
15
|
-
/** Description of the variable */
|
|
16
|
-
label?: string;
|
|
17
|
-
/** Type of the variable */
|
|
18
|
-
type?: CssVariableType;
|
|
19
|
-
/** Name of a group of variables */
|
|
20
|
-
category?: string;
|
|
21
|
-
/** component reference if the variable is linked to one */
|
|
22
|
-
component?: ItemIdentifier;
|
|
23
|
-
}
|
|
24
|
-
/** Style Metadata map */
|
|
25
|
-
export interface CssMetadata {
|
|
26
|
-
/** Variables' dictionary */
|
|
27
|
-
variables: {
|
|
28
|
-
[name: string]: CssVariable;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=styles.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.interface.d.ts","sourceRoot":"","sources":["../../src/core/styles.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACf,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,kCAAkC;AAClC,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,yBAAyB;AACzB,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,SAAS,EAAE;QACT,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;KAC7B,CAAC;CACH"}
|
package/devkit/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './styling-devkit.interface';
|
|
2
|
-
export * from './styling-devtools.message.service';
|
|
3
|
-
export * from './styling-devtools.module';
|
|
4
|
-
export * from './styling-devtools.service';
|
|
5
|
-
export * from './styling-devtools.token';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/devkit/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/devkit/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { ConnectContentMessage, DevtoolsCommonOptions, MessageDataTypes, OtterMessageContent, RequestMessagesContentMessage } from '@o3r/core';
|
|
2
|
-
import { CssVariable } from '../core/index';
|
|
3
|
-
/**
|
|
4
|
-
* Styling devtools service options
|
|
5
|
-
*/
|
|
6
|
-
export interface StylingDevtoolsServiceOptions extends DevtoolsCommonOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Path to retrieve the styling metadata file
|
|
9
|
-
*/
|
|
10
|
-
stylingMetadataPath: string;
|
|
11
|
-
}
|
|
12
|
-
/** Update styling variables */
|
|
13
|
-
export interface UpdateStylingVariablesContentMessage extends OtterMessageContent<'updateStylingVariables'> {
|
|
14
|
-
/**
|
|
15
|
-
* Dictionary of variable value to update
|
|
16
|
-
* indexed by the variable name
|
|
17
|
-
*/
|
|
18
|
-
variables: Record<string, string>;
|
|
19
|
-
}
|
|
20
|
-
/** Reset styling variables override */
|
|
21
|
-
export interface ResetStylingVariablesContentMessage extends OtterMessageContent<'resetStylingVariables'> {
|
|
22
|
-
}
|
|
23
|
-
/** Styling variable */
|
|
24
|
-
export type StylingVariable = CssVariable & {
|
|
25
|
-
runtimeValue?: string;
|
|
26
|
-
};
|
|
27
|
-
/** Get styling variables */
|
|
28
|
-
export interface GetStylingVariableContentMessage extends OtterMessageContent<'getStylingVariable'> {
|
|
29
|
-
/** List of styling variables */
|
|
30
|
-
variables: StylingVariable[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* List of styling message contents
|
|
34
|
-
*/
|
|
35
|
-
type StylingMessageContents = UpdateStylingVariablesContentMessage | ResetStylingVariablesContentMessage | GetStylingVariableContentMessage;
|
|
36
|
-
/** List of possible DataTypes for Styling messages */
|
|
37
|
-
export type StylingMessageDataTypes = MessageDataTypes<StylingMessageContents>;
|
|
38
|
-
/** List of all messages for Styling purposes */
|
|
39
|
-
export type AvailableStylingMessageContents = StylingMessageContents | ConnectContentMessage | RequestMessagesContentMessage<StylingMessageDataTypes>;
|
|
40
|
-
/** Tag to identify theme variable */
|
|
41
|
-
export declare const THEME_TAG_NAME = "theme";
|
|
42
|
-
/** Tag to identify palette variable */
|
|
43
|
-
export declare const PALETTE_TAG_NAME = "palette";
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=styling-devkit.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styling-devkit.interface.d.ts","sourceRoot":"","sources":["../../src/devkit/styling-devkit.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,EAC9B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,+BAA+B;AAC/B,MAAM,WAAW,oCAAqC,SAAQ,mBAAmB,CAAC,wBAAwB,CAAC;IACzG;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,uCAAuC;AACvC,MAAM,WAAW,mCAAoC,SAAQ,mBAAmB,CAAC,uBAAuB,CAAC;CAAG;AAE5G,uBAAuB;AACvB,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE,4BAA4B;AAC5B,MAAM,WAAW,gCAAiC,SAAQ,mBAAmB,CAAC,oBAAoB,CAAC;IACjG,gCAAgC;IAChC,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,KAAK,sBAAsB,GACvB,oCAAoC,GACpC,mCAAmC,GACnC,gCAAgC,CAAC;AAErC,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAE/E,gDAAgD;AAChD,MAAM,MAAM,+BAA+B,GACvC,sBAAsB,GACtB,qBAAqB,GACrB,6BAA6B,CAAC,uBAAuB,CAAC,CAAC;AAE3D,qCAAqC;AACrC,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,YAAY,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { LoggerService } from '@o3r/logger';
|
|
2
|
-
import { StylingDevtoolsServiceOptions } from './styling-devkit.interface';
|
|
3
|
-
import { OtterStylingDevtools } from './styling-devtools.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Service to handle communication between application and chrome extension for styling
|
|
7
|
-
*/
|
|
8
|
-
export declare class StylingDevtoolsMessageService {
|
|
9
|
-
private readonly logger;
|
|
10
|
-
private readonly stylingDevTools;
|
|
11
|
-
private readonly options;
|
|
12
|
-
private readonly sendMessage;
|
|
13
|
-
private readonly destroyRef;
|
|
14
|
-
constructor(logger: LoggerService, stylingDevTools: OtterStylingDevtools, options?: StylingDevtoolsServiceOptions);
|
|
15
|
-
private sendMetadata;
|
|
16
|
-
/**
|
|
17
|
-
* Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
|
|
18
|
-
* @param only restricted list of messages to re-send
|
|
19
|
-
*/
|
|
20
|
-
private handleReEmitRequest;
|
|
21
|
-
/**
|
|
22
|
-
* Function to handle the incoming messages from Otter Chrome DevTools extension
|
|
23
|
-
* @param message Message coming from the Otter Chrome DevTools extension
|
|
24
|
-
*/
|
|
25
|
-
private handleEvents;
|
|
26
|
-
/**
|
|
27
|
-
* Function to connect the plugin to the Otter Chrome DevTools extension
|
|
28
|
-
*/
|
|
29
|
-
private connectPlugin;
|
|
30
|
-
/** @inheritDoc */
|
|
31
|
-
activate(): void;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsMessageService, [null, null, { optional: true; }]>;
|
|
33
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<StylingDevtoolsMessageService>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=styling-devtools.message.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styling-devtools.message.service.d.ts","sourceRoot":"","sources":["../../src/devkit/styling-devtools.message.service.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,aAAa,EACd,MAAM,aAAa,CAAC;AAIrB,OAAO,EAEL,6BAA6B,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;;AAqDpC;;GAEG;AACH,qBACa,6BAA6B;IAKtC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IACoB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN9E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqD;IACjF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;gBAG9B,MAAM,EAAE,aAAa,EACrB,eAAe,EAAE,oBAAoB,EACe,OAAO,GAAE,6BAAsE;YAUxI,YAAY;IAU1B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAM3B;;;OAGG;IACH,OAAO,CAAC,YAAY;IA0BpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB,kBAAkB;IACX,QAAQ;yCA3EJ,6BAA6B;6CAA7B,6BAA6B;CAiFzC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import type { StylingDevtoolsServiceOptions } from './styling-devkit.interface';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class StylingDevtoolsModule {
|
|
5
|
-
/**
|
|
6
|
-
* Initialize Otter Devtools
|
|
7
|
-
* @param options
|
|
8
|
-
*/
|
|
9
|
-
static instrument(options: Partial<StylingDevtoolsServiceOptions>): ModuleWithProviders<StylingDevtoolsModule>;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StylingDevtoolsModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StylingDevtoolsModule, never, never, never>;
|
|
12
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<StylingDevtoolsModule>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=styling-devtools.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styling-devtools.module.d.ts","sourceRoot":"","sources":["../../src/devkit/styling-devtools.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;;AAYpC,qBAOa,qBAAqB;IAChC;;;OAGG;WACW,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAAG,mBAAmB,CAAC,qBAAqB,CAAC;yCAL1G,qBAAqB;0CAArB,qBAAqB;0CAArB,qBAAqB;CAejC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { CssMetadata } from '../core/index';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Styling devtools service
|
|
5
|
-
*/
|
|
6
|
-
export declare class OtterStylingDevtools {
|
|
7
|
-
private readonly document;
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve styling metadata
|
|
10
|
-
* @param stylingMetadataPath
|
|
11
|
-
*/
|
|
12
|
-
getStylingMetadata(stylingMetadataPath: string): Promise<CssMetadata>;
|
|
13
|
-
/**
|
|
14
|
-
* Update styling variables
|
|
15
|
-
* @param variables
|
|
16
|
-
*/
|
|
17
|
-
updateVariables(variables: Record<string, string>): void;
|
|
18
|
-
/**
|
|
19
|
-
* Reset styling variables override
|
|
20
|
-
*/
|
|
21
|
-
resetStylingVariables(): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OtterStylingDevtools, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OtterStylingDevtools>;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=styling-devtools.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styling-devtools.service.d.ts","sourceRoot":"","sources":["../../src/devkit/styling-devtools.service.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,WAAW,EACZ,MAAM,eAAe,CAAC;;AAEvB;;GAEG;AACH,qBACa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAE7C;;;OAGG;IACU,kBAAkB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIlF;;;OAGG;IACI,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIxD;;OAEG;IACI,qBAAqB;yCAtBjB,oBAAoB;6CAApB,oBAAoB;CAgChC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import type { StylingDevtoolsServiceOptions } from './styling-devkit.interface';
|
|
3
|
-
/**
|
|
4
|
-
* Default value for styling devtools
|
|
5
|
-
*/
|
|
6
|
-
export declare const OTTER_STYLING_DEVTOOLS_DEFAULT_OPTIONS: Readonly<StylingDevtoolsServiceOptions>;
|
|
7
|
-
/**
|
|
8
|
-
* Token for styling devtools
|
|
9
|
-
*/
|
|
10
|
-
export declare const OTTER_STYLING_DEVTOOLS_OPTIONS: InjectionToken<StylingDevtoolsServiceOptions>;
|
|
11
|
-
//# sourceMappingURL=styling-devtools.token.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styling-devtools.token.d.ts","sourceRoot":"","sources":["../../src/devkit/styling-devtools.token.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,sCAAsC,EAAE,QAAQ,CAAC,6BAA6B,CAGjF,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,8BAA8B,+CAAsF,CAAC"}
|
package/o3r-styling.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-styling.d.ts","sourceRoot":"","sources":["../src/o3r-styling.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
|
package/public_api.d.ts
DELETED
package/public_api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|