@teleporthq/teleport-plugin-css 0.43.0-alpha.0 → 0.43.0

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.
@@ -90,7 +90,7 @@ describe('Component Scoped Styles', () => {
90
90
  expect(
91
91
  jsxComponent.meta.nodesLookup.container.openingElement.attributes[0].value.expression
92
92
  .quasis[0].value.raw
93
- ).toBe('md-8 primary-navbar ')
93
+ ).toBe('md-8 my-componentprimary-navbar ')
94
94
  expect(
95
95
  jsxComponent.meta.nodesLookup.container.openingElement.attributes[0].value.expression
96
96
  .expressions[0].property.name
@@ -148,7 +148,9 @@ describe('Component Scoped Styles', () => {
148
148
  const { chunks } = await plugin(structure)
149
149
  const hastComponent = chunks.find((chunk) => chunk.name === 'template')
150
150
 
151
- expect(hastComponent.meta.nodesLookup.container.properties['class']).toBe('md-8 primary-navbar')
151
+ expect(hastComponent.meta.nodesLookup.container.properties['class']).toBe(
152
+ 'md-8 my-componentprimary-navbar'
153
+ )
152
154
  expect(hastComponent.meta.nodesLookup.container.properties['v-bind:class']).toBe('variant')
153
155
  })
154
156
  })
@@ -5,7 +5,7 @@ import {
5
5
  } from '@teleporthq/teleport-types'
6
6
  import { staticNode, dynamicNode } from '@teleporthq/teleport-uidl-builders'
7
7
  import { createStyleSheetPlugin } from '../src/style-sheet'
8
- import { setUpStructureWithHASTChunk } from './mocks'
8
+ import { setUpHASTChunk, setUpStructureWithHASTChunk } from './mocks'
9
9
 
10
10
  describe('plugin-css-style-sheet', () => {
11
11
  it('should generate css when the styleSetDefinitions are presnet', async () => {
@@ -111,7 +111,7 @@ describe('plugin-css-style-sheet', () => {
111
111
  const structure = setUpStructureWithHASTChunk()
112
112
 
113
113
  const result = await plugin(structure)
114
-
115
- expect(result).toBe(undefined)
114
+ expect(result.chunks.length).toBe(1)
115
+ expect(result.chunks[0]).toEqual(setUpHASTChunk())
116
116
  })
117
117
  })
@@ -6,11 +6,11 @@ interface CSSPluginConfig {
6
6
  componentDecoratorChunkName: string;
7
7
  inlineStyleAttributeKey: string;
8
8
  classAttributeName: string;
9
- forceScoping: boolean;
10
9
  templateStyle: 'html' | 'jsx';
11
10
  declareDependency: 'import' | 'decorator' | 'none';
12
11
  dynamicVariantPrefix?: string;
13
12
  staticPropReferences?: boolean;
13
+ standaloneHtmlComponents?: boolean;
14
14
  }
15
15
  declare const createCSSPlugin: ComponentPluginFactory<CSSPluginConfig>;
16
16
  export { createStyleSheetPlugin, createCSSPlugin };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EACtB,eAAe,EAShB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAEtD,UAAU,eAAe;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,CAAA;IACzB,2BAA2B,EAAE,MAAM,CAAA;IACnC,uBAAuB,EAAE,MAAM,CAAA;IAC/B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,GAAG,KAAK,CAAA;IAC7B,iBAAiB,EAAE,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAA;IAClD,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAAC,eAAe,CAyU5D,CAAA;AAED,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,CAAA;;AAElD,wBAAgC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,sBAAsB,EACtB,eAAe,EAiBhB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAGtD,UAAU,e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