@pantoken/pendo 0.1.7 → 0.1.9

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/dist/index.d.mts CHANGED
@@ -49,10 +49,11 @@ declare function buildPendoCss(options?: BuildPendoCssOptions): string;
49
49
  * // ".x{color:red !important}"
50
50
  * ```
51
51
  */
52
- declare function addImportant(): Plugin;
53
- declare namespace addImportant {
54
- var postcss: boolean;
55
- }
52
+ declare const addImportant: {
53
+ (): Plugin;
54
+ /** Required PostCSS plugin marker. */
55
+ postcss: true;
56
+ };
56
57
  //#endregion
57
58
  //#region src/plugins/add-scope.d.ts
58
59
  /** Options for {@link addScope}. */
@@ -73,10 +74,11 @@ interface AddScopeOptions {
73
74
  * // "@scope (._pendo-step-container) { .x{color:red} }"
74
75
  * ```
75
76
  */
76
- declare function addScope(options?: AddScopeOptions): Plugin;
77
- declare namespace addScope {
78
- var postcss: boolean;
79
- }
77
+ declare const addScope: {
78
+ (options?: AddScopeOptions): Plugin;
79
+ /** Required PostCSS plugin marker. */
80
+ postcss: true;
81
+ };
80
82
  //#endregion
81
83
  //#region src/layers.d.ts
82
84
  /**
package/dist/index.mjs CHANGED
@@ -123,7 +123,7 @@ const COMPONENTS = [
123
123
  * // ".x{color:red !important}"
124
124
  * ```
125
125
  */
126
- function addImportant() {
126
+ const addImportant = Object.assign(function addImportant() {
127
127
  return {
128
128
  postcssPlugin: "pendo-add-important",
129
129
  Declaration(decl) {
@@ -132,8 +132,7 @@ function addImportant() {
132
132
  decl.important = true;
133
133
  }
134
134
  };
135
- }
136
- addImportant.postcss = true;
135
+ }, { postcss: true });
137
136
  //#endregion
138
137
  //#region src/plugins/add-scope.ts
139
138
  /**
@@ -149,7 +148,7 @@ addImportant.postcss = true;
149
148
  * // "@scope (._pendo-step-container) { .x{color:red} }"
150
149
  * ```
151
150
  */
152
- function addScope(options = {}) {
151
+ const addScope = Object.assign(function addScope(options = {}) {
153
152
  const selector = options.selector ?? "._pendo-step-container";
154
153
  return {
155
154
  postcssPlugin: "pendo-add-scope",
@@ -174,8 +173,7 @@ function addScope(options = {}) {
174
173
  root.append(scope);
175
174
  }
176
175
  };
177
- }
178
- addScope.postcss = true;
176
+ }, { postcss: true });
179
177
  //#endregion
180
178
  //#region src/build.ts
181
179
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pantoken/pendo",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Instructure-styled global CSS for Pendo guides, built on pantoken tokens (ported from @instructure/pendo-global-css).",
5
5
  "homepage": "https://pantoken.iywahl.com",
6
6
  "bugs": "https://github.com/thedannywahl/pantoken/issues",