ember-scoped-css 0.17.2 → 0.17.3

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.
@@ -0,0 +1,2 @@
1
+ export default function generateRelativePathHash(relativePath: string): string;
2
+ //# sourceMappingURL=generateRelativePathHash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateRelativePathHash.d.ts","sourceRoot":"","sources":["../../src/lib/generateRelativePathHash.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,YAAY,EAAE,MAAM,UAEpE"}
@@ -0,0 +1,2 @@
1
+ export default function renameClass(className: string, postfix: string, classesInCss?: Set<string>): string;
2
+ //# sourceMappingURL=renameClass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renameClass.d.ts","sourceRoot":"","sources":["../../src/lib/renameClass.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,UAuB3B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Appends a suffix to a class name during build time.
3
+ * This function is not available at runtime and is removed.
4
+ *
5
+ * @param {string} className the class, defined within the co-located CSS to have a suffix appended to it during build time.
6
+ */
7
+ export declare function scopedClass(className: string): string;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAIrD"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * On element selectors where there are no classes,
3
+ * you may pass only the modulePath and get the hash for the element.
4
+ *
5
+ * For example, in app code,
6
+ * with template code `<h3>x</h3>`
7
+ * and css `h3 { }`
8
+ * a class will be added during the build, result in:
9
+ * the template: `<h3 class="some-hash">x</h3>`
10
+ * and css `h3.some-hash { }`
11
+ *
12
+ * @example
13
+ * If a file is located at `app/components/foo/bar.hbs`
14
+ * The associated css should be at `app/components/foo/bar.css`
15
+ * and the path passed to `scopedClass` should be `<modulePrefix>/components/foo/bar`
16
+ *
17
+ * @example
18
+ * If a file is located at `app/templates/bar.hbs`
19
+ * The associated css should be at `app/templates/bar.css`
20
+ * and the path passed to `scopedClass` should be `<modulePrefix>/templates/bar`
21
+ *
22
+ * @example
23
+ * If a file is located at `<podModulePrefix>/bar/template.hbs`
24
+ * The associated css should be at `app/<podModulePrefix sub path>/bar/styles.css`
25
+ * and the path passed to `scopedClass` should be `<podModulePrefix>/bar`
26
+ *
27
+ */
28
+ export declare function scopedClass(modulePath: string): string;
29
+ /**
30
+ * Retrieve the built hash for a class.
31
+ *
32
+ * For example, in app code,
33
+ * with template code `<h3 class="foo">x</h3>`
34
+ * and css `.foo { }`
35
+ * a hash will be added during the build, resulting in:
36
+ * the template: `<h3 class="foo_some-hash">x</h3>`
37
+ * and css `.foo_some-hash { }`
38
+ *
39
+ * @example
40
+ * If a file is located at `app/components/foo/bar.hbs`
41
+ * The associated css should be at `app/components/foo/bar.css`
42
+ * and the path passed to `scopedClass` should be `<modulePrefix>/components/foo/bar`
43
+ *
44
+ * @example
45
+ * If a file is located at `app/templates/bar.hbs`
46
+ * The associated css should be at `app/templates/bar.css`
47
+ * and the path passed to `scopedClass` should be `<modulePrefix>/templates/bar`
48
+ *
49
+ * @example
50
+ * If a file is located at `<podModulePrefix>/bar/template.hbs`
51
+ * The associated css should be at `app/<podModulePrefix sub path>/bar/styles.css`
52
+ * and the path passed to `scopedClass` should be `<podModulePrefix>/bar`
53
+ *
54
+ */
55
+ export declare function scopedClass(className: string, modulePath: string): string;
56
+ //# sourceMappingURL=test-support.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-support.d.ts","sourceRoot":"","sources":["../../src/runtime/test-support.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-scoped-css",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "src",
13
13
  "dist",
14
+ "declarations",
14
15
  "addon-main.cjs",
15
16
  "template-registry.d.ts"
16
17
  ],