@lowdefy/build 4.7.3 → 5.0.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.
Files changed (56) hide show
  1. package/dist/build/addDefaultPages/404.js +8 -2
  2. package/dist/build/buildApi/buildRoutine/validateStep.js +7 -5
  3. package/dist/build/buildApi/validateEndpoint.js +6 -5
  4. package/dist/build/buildConnections.js +6 -0
  5. package/dist/build/buildImports/buildIconImports.js +5 -1
  6. package/dist/build/buildImports/buildImportsDev.js +1 -6
  7. package/dist/build/buildImports/buildImportsProd.js +1 -6
  8. package/dist/build/buildImports/validateIconImports.js +65 -0
  9. package/dist/build/buildJs/jsMapParser.js +5 -2
  10. package/dist/build/buildPages/buildBlock/buildBlock.js +12 -4
  11. package/dist/build/buildPages/buildBlock/buildEvents.js +34 -1
  12. package/dist/build/buildPages/buildBlock/buildRequests.js +7 -5
  13. package/dist/build/buildPages/buildBlock/buildSubBlocks.js +9 -9
  14. package/dist/build/buildPages/buildBlock/countBlockOperators.js +1 -1
  15. package/dist/build/buildPages/buildBlock/moveAreasToSlots.js +31 -0
  16. package/dist/build/buildPages/buildBlock/{moveSkeletonBlocksToArea.js → moveSkeletonBlocksToSlot.js} +8 -8
  17. package/dist/build/buildPages/buildBlock/{moveSubBlocksToArea.js → moveSubBlocksToSlot.js} +3 -3
  18. package/dist/build/buildPages/buildBlock/normalizeClassAndStyles.js +124 -0
  19. package/dist/build/buildPages/buildBlock/normalizeLayout.js +68 -0
  20. package/dist/build/buildPages/buildBlock/setBlockId.js +7 -1
  21. package/dist/build/buildPages/buildBlock/validateSlots.js +34 -0
  22. package/dist/build/buildPages/buildPage.js +23 -1
  23. package/dist/build/buildRefs/addLineNumbers.js +76 -0
  24. package/dist/build/{buildImports/buildStyleImports.js → buildRefs/getLineNumber.js} +4 -10
  25. package/dist/build/buildRefs/getRefContent.js +9 -1
  26. package/dist/build/buildRefs/parseRefContent.js +4 -66
  27. package/dist/build/buildTypes.js +4 -2
  28. package/dist/build/cleanBuildDirectory.js +3 -1
  29. package/dist/build/collectPageContent.js +57 -0
  30. package/dist/build/jit/buildPageJit.js +14 -3
  31. package/dist/build/jit/extractIconData.js +16 -1
  32. package/dist/build/jit/pageContentKeys.js +1 -0
  33. package/dist/build/jit/shallowBuild.js +24 -0
  34. package/dist/build/jit/stripPageContent.js +29 -0
  35. package/dist/build/jit/writePageJit.js +9 -1
  36. package/dist/build/testSchema.js +3 -0
  37. package/dist/build/writePluginImports/collectBlockSourceContent.js +65 -0
  38. package/dist/build/writePluginImports/writeActionSchemaMap.js +1 -1
  39. package/dist/build/writePluginImports/writeBlockSchemaMap.js +45 -7
  40. package/dist/build/writePluginImports/writeGlobalsCss.js +126 -0
  41. package/dist/build/writePluginImports/writeOperatorSchemaMap.js +1 -1
  42. package/dist/build/writePluginImports/writePluginImports.js +7 -2
  43. package/dist/build/writeTheme.js +28 -0
  44. package/dist/createContext.js +2 -0
  45. package/dist/defaultTypesMap.js +1693 -837
  46. package/dist/index.js +16 -0
  47. package/dist/lowdefySchema.js +100 -0
  48. package/dist/scripts/generateDefaultTypes.js +5 -10
  49. package/dist/test-utils/runBuild.js +3 -0
  50. package/dist/test-utils/runBuildForSnapshots.js +5 -2
  51. package/dist/test-utils/testContext.js +2 -1
  52. package/dist/utils/createHandleWarning.js +3 -0
  53. package/dist/utils/createPluginTypesMap.js +5 -9
  54. package/dist/utils/validateId.js +24 -0
  55. package/package.json +47 -47
  56. package/dist/build/writePluginImports/writeStyleImports.js +0 -34
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ import buildLogger from './build/buildLogger.js';
30
30
  import buildMenu from './build/buildMenu.js';
31
31
  import buildPages from './build/full/buildPages.js';
32
32
  import buildRefs from './build/buildRefs/buildRefs.js';
33
+ import collectPageContent from './build/collectPageContent.js';
33
34
  import buildTypes from './build/buildTypes.js';
34
35
  import cleanBuildDirectory from './build/cleanBuildDirectory.js';
35
36
  import copyPublicFolder from './build/copyPublicFolder.js';
@@ -42,6 +43,7 @@ import writeConfig from './build/writeConfig.js';
42
43
  import writeConnections from './build/writeConnections.js';
43
44
  import writeApi from './build/writeApi.js';
44
45
  import writeGlobal from './build/writeGlobal.js';
46
+ import writeTheme from './build/writeTheme.js';
45
47
  import writeJs from './build/buildJs/writeJs.js';
46
48
  import writeLogger from './build/writeLogger.js';
47
49
  import writeMaps from './build/writeMaps.js';
@@ -141,6 +143,16 @@ async function build(options) {
141
143
  components,
142
144
  context
143
145
  });
146
+ // Collect page content strings for Tailwind to scan
147
+ context.tailwindContentMap = new Map();
148
+ for (const page of components.pages ?? []){
149
+ const content = collectPageContent([
150
+ page
151
+ ]);
152
+ if (content) {
153
+ context.tailwindContentMap.set(page.pageId, content);
154
+ }
155
+ }
144
156
  // Check if there are any collected errors before writing
145
157
  logCollectedErrors(context);
146
158
  // Write steps - only if no errors
@@ -179,6 +191,10 @@ async function build(options) {
179
191
  components,
180
192
  context
181
193
  });
194
+ await writeTheme({
195
+ components,
196
+ context
197
+ });
182
198
  await writeLogger({
183
199
  components,
184
200
  context
@@ -613,6 +613,38 @@ export default {
613
613
  type: 'Block "style" should be an object.'
614
614
  }
615
615
  },
616
+ class: {
617
+ oneOf: [
618
+ {
619
+ type: 'string'
620
+ },
621
+ {
622
+ type: 'array',
623
+ items: {
624
+ type: 'string'
625
+ }
626
+ },
627
+ {
628
+ type: 'object',
629
+ additionalProperties: {
630
+ oneOf: [
631
+ {
632
+ type: 'string'
633
+ },
634
+ {
635
+ type: 'array',
636
+ items: {
637
+ type: 'string'
638
+ }
639
+ }
640
+ ]
641
+ }
642
+ }
643
+ ],
644
+ errorMessage: {
645
+ type: 'Block "class" should be a string, array of strings, or object.'
646
+ }
647
+ },
616
648
  visible: {},
617
649
  loading: {},
618
650
  blocks: {
@@ -740,6 +772,25 @@ export default {
740
772
  }
741
773
  }
742
774
  }
775
+ },
776
+ shortcut: {
777
+ anyOf: [
778
+ {
779
+ type: 'string',
780
+ errorMessage: {
781
+ type: 'Event "shortcut" should be a string.'
782
+ }
783
+ },
784
+ {
785
+ type: 'array',
786
+ items: {
787
+ type: 'string'
788
+ },
789
+ errorMessage: {
790
+ type: 'Event "shortcut" should be a string or array of strings.'
791
+ }
792
+ }
793
+ ]
743
794
  }
744
795
  }
745
796
  }
@@ -750,6 +801,31 @@ export default {
750
801
  type: 'Block "events" should be an object.'
751
802
  }
752
803
  },
804
+ slots: {
805
+ type: 'object',
806
+ patternProperties: {
807
+ '^.*$': {
808
+ type: 'object',
809
+ properties: {
810
+ blocks: {
811
+ type: 'array',
812
+ items: {
813
+ $ref: '#/definitions/block'
814
+ },
815
+ errorMessage: {
816
+ type: 'Block "slots.{slotKey}.blocks" should be an array.'
817
+ }
818
+ }
819
+ },
820
+ errorMessage: {
821
+ type: 'Block "slots.{slotKey}" should be an object.'
822
+ }
823
+ }
824
+ },
825
+ errorMessage: {
826
+ type: 'Block "slots" should be an object.'
827
+ }
828
+ },
753
829
  areas: {
754
830
  type: 'object',
755
831
  patternProperties: {
@@ -1380,6 +1456,30 @@ export default {
1380
1456
  }
1381
1457
  }
1382
1458
  },
1459
+ theme: {
1460
+ type: 'object',
1461
+ additionalProperties: false,
1462
+ properties: {
1463
+ antd: {
1464
+ type: 'object'
1465
+ },
1466
+ tailwind: {
1467
+ type: 'object'
1468
+ },
1469
+ darkMode: {
1470
+ type: 'string',
1471
+ enum: [
1472
+ 'system',
1473
+ 'light',
1474
+ 'dark'
1475
+ ],
1476
+ description: 'Dark mode behavior. "system" follows OS preference (default), "light" forces light mode, "dark" forces dark mode.'
1477
+ }
1478
+ },
1479
+ errorMessage: {
1480
+ type: 'App "theme" should be an object.'
1481
+ }
1482
+ },
1383
1483
  plugins: {
1384
1484
  type: 'array',
1385
1485
  items: {
@@ -20,10 +20,8 @@ const defaultPackages = [
20
20
  '@lowdefy/actions-core',
21
21
  '@lowdefy/actions-pdf-make',
22
22
  '@lowdefy/blocks-aggrid',
23
- '@lowdefy/blocks-algolia',
24
23
  '@lowdefy/blocks-antd',
25
24
  '@lowdefy/blocks-basic',
26
- '@lowdefy/blocks-color-selectors',
27
25
  '@lowdefy/blocks-echarts',
28
26
  '@lowdefy/blocks-google-maps',
29
27
  '@lowdefy/blocks-loaders',
@@ -42,7 +40,7 @@ const defaultPackages = [
42
40
  '@lowdefy/operators-diff',
43
41
  '@lowdefy/operators-js',
44
42
  '@lowdefy/operators-jsonata',
45
- '@lowdefy/operators-moment',
43
+ '@lowdefy/operators-dayjs',
46
44
  '@lowdefy/operators-mql',
47
45
  '@lowdefy/operators-nunjucks',
48
46
  '@lowdefy/operators-uuid',
@@ -62,6 +60,7 @@ async function generateDefaultTypesMap() {
62
60
  events: {},
63
61
  providers: {}
64
62
  },
63
+ blockMetas: {},
65
64
  blocks: {},
66
65
  connections: {},
67
66
  icons: {},
@@ -69,13 +68,9 @@ async function generateDefaultTypesMap() {
69
68
  client: {},
70
69
  server: {}
71
70
  },
72
- requests: {},
73
- styles: {
74
- packages: {},
75
- blocks: {}
76
- }
71
+ requests: {}
77
72
  };
78
- await Promise.all(defaultPackages.map(async (packageName)=>{
73
+ for (const packageName of defaultPackages){
79
74
  const { default: types } = await import(`${packageName}/types`);
80
75
  const version = packageFile.devDependencies[packageName] || packageFile.dependencies[packageName];
81
76
  createPluginTypesMap({
@@ -84,7 +79,7 @@ async function generateDefaultTypesMap() {
84
79
  packageName,
85
80
  version
86
81
  });
87
- }));
82
+ }
88
83
  await writeFile(path.resolve(process.cwd(), './dist/defaultTypesMap.js'), `const defaultTypesMap = ${JSON.stringify(defaultTypesMap, null, 2)};
89
84
 
90
85
  export default defaultTypesMap;
@@ -31,6 +31,9 @@ import createTestLogger from './createTestLogger.js';
31
31
  Reset: {
32
32
  package: '@lowdefy/actions-core'
33
33
  },
34
+ SetDarkMode: {
35
+ package: '@lowdefy/actions-core'
36
+ },
34
37
  Throw: {
35
38
  package: '@lowdefy/actions-core'
36
39
  },
@@ -48,6 +48,9 @@ import path from 'path';
48
48
  ScrollTo: {
49
49
  package: '@lowdefy/actions-core'
50
50
  },
51
+ SetDarkMode: {
52
+ package: '@lowdefy/actions-core'
53
+ },
51
54
  SetFocus: {
52
55
  package: '@lowdefy/actions-core'
53
56
  },
@@ -538,8 +541,8 @@ import path from 'path';
538
541
  _uuid: {
539
542
  package: '@lowdefy/operators-uuid'
540
543
  },
541
- _moment: {
542
- package: '@lowdefy/operators-moment'
544
+ _dayjs: {
545
+ package: '@lowdefy/operators-dayjs'
543
546
  },
544
547
  _regex: {
545
548
  package: '@lowdefy/operators-js'
@@ -24,7 +24,8 @@ function testContext({ writeBuildArtifact, configDirectory, readConfigFile, logg
24
24
  const context = {
25
25
  stage: 'test',
26
26
  directories: {
27
- config: configDirectory || ''
27
+ config: configDirectory || '',
28
+ server: ''
28
29
  },
29
30
  typeCounters: {
30
31
  actions: createCounter(),
@@ -35,6 +35,9 @@ function createHandleWarning({ context }) {
35
35
  const dedupKey = warning.source ?? warning.message;
36
36
  if (context.seenSourceLines?.has(dedupKey)) return;
37
37
  context.seenSourceLines?.add(dedupKey);
38
+ if (context.warnings) {
39
+ context.warnings.push(warning);
40
+ }
38
41
  context.logger.warn(warning);
39
42
  };
40
43
  }
@@ -95,19 +95,15 @@ function createPluginTypesMap({ packageName, packageTypes, typePrefix = '', type
95
95
  typePrefix,
96
96
  version
97
97
  });
98
- if (type.isObject(packageTypes.styles)) {
99
- Object.entries(packageTypes.styles).forEach(([blockType, styles])=>{
100
- if (blockType === 'default') {
101
- typesMap.styles.packages[packageName] = styles;
102
- } else {
103
- typesMap.styles.blocks[`${typePrefix}${blockType}`] = styles;
104
- }
105
- });
106
- }
107
98
  if (type.isObject(packageTypes.icons)) {
108
99
  Object.entries(packageTypes.icons).forEach(([blockType, icons])=>{
109
100
  typesMap.icons[`${typePrefix}${blockType}`] = icons;
110
101
  });
111
102
  }
103
+ if (type.isObject(packageTypes.blockMetas)) {
104
+ Object.entries(packageTypes.blockMetas).forEach(([blockType, meta])=>{
105
+ typesMap.blockMetas[`${typePrefix}${blockType}`] = meta;
106
+ });
107
+ }
112
108
  }
113
109
  export default createPluginTypesMap;
@@ -0,0 +1,24 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { ConfigError } from '@lowdefy/errors';
16
+ const validIdPattern = /^[A-Za-z0-9\-_/:]+$/;
17
+ function validateId({ id, field, location, configKey }) {
18
+ if (!validIdPattern.test(id)) {
19
+ throw new ConfigError(`${field} "${id}"${location ? ` at ${location}` : ''} contains invalid characters. IDs must only contain A-Z, a-z, 0-9, "-", "_", "/", and ":".`, {
20
+ configKey
21
+ });
22
+ }
23
+ }
24
+ export default validateId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/build",
3
- "version": "4.7.3",
3
+ "version": "5.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -45,15 +45,16 @@
45
45
  "dist/*"
46
46
  ],
47
47
  "dependencies": {
48
- "@lowdefy/ajv": "4.7.3",
49
- "@lowdefy/blocks-basic": "4.7.3",
50
- "@lowdefy/blocks-loaders": "4.7.3",
51
- "@lowdefy/errors": "4.7.3",
52
- "@lowdefy/helpers": "4.7.3",
53
- "@lowdefy/node-utils": "4.7.3",
54
- "@lowdefy/nunjucks": "4.7.3",
55
- "@lowdefy/operators": "4.7.3",
56
- "@lowdefy/operators-js": "4.7.3",
48
+ "@lowdefy/ajv": "5.0.0",
49
+ "@lowdefy/block-utils": "5.0.0",
50
+ "@lowdefy/blocks-basic": "5.0.0",
51
+ "@lowdefy/blocks-loaders": "5.0.0",
52
+ "@lowdefy/errors": "5.0.0",
53
+ "@lowdefy/helpers": "5.0.0",
54
+ "@lowdefy/node-utils": "5.0.0",
55
+ "@lowdefy/nunjucks": "5.0.0",
56
+ "@lowdefy/operators": "5.0.0",
57
+ "@lowdefy/operators-js": "5.0.0",
57
58
  "ajv": "8.12.0",
58
59
  "json5": "2.2.3",
59
60
  "yaml": "2.3.4",
@@ -61,41 +62,39 @@
61
62
  },
62
63
  "devDependencies": {
63
64
  "@jest/globals": "28.1.3",
64
- "@lowdefy/actions-core": "4.7.3",
65
- "@lowdefy/actions-pdf-make": "4.7.3",
66
- "@lowdefy/blocks-aggrid": "4.7.3",
67
- "@lowdefy/blocks-algolia": "4.7.3",
68
- "@lowdefy/blocks-antd": "4.7.3",
69
- "@lowdefy/blocks-color-selectors": "4.7.3",
70
- "@lowdefy/blocks-echarts": "4.7.3",
71
- "@lowdefy/blocks-google-maps": "4.7.3",
72
- "@lowdefy/blocks-markdown": "4.7.3",
73
- "@lowdefy/blocks-qr": "4.7.3",
74
- "@lowdefy/connection-axios-http": "4.7.3",
75
- "@lowdefy/connection-elasticsearch": "4.7.3",
76
- "@lowdefy/connection-test": "4.7.3",
77
- "@lowdefy/connection-google-sheets": "4.7.3",
78
- "@lowdefy/connection-knex": "4.7.3",
79
- "@lowdefy/connection-mongodb": "4.7.3",
80
- "@lowdefy/connection-redis": "4.7.3",
81
- "@lowdefy/connection-sendgrid": "4.7.3",
82
- "@lowdefy/connection-stripe": "4.7.3",
83
- "@lowdefy/operators-change-case": "4.7.3",
84
- "@lowdefy/operators-diff": "4.7.3",
85
- "@lowdefy/operators-jsonata": "4.7.3",
86
- "@lowdefy/operators-moment": "4.7.3",
87
- "@lowdefy/operators-mql": "4.7.3",
88
- "@lowdefy/operators-nunjucks": "4.7.3",
89
- "@lowdefy/operators-uuid": "4.7.3",
90
- "@lowdefy/operators-yaml": "4.7.3",
91
- "@lowdefy/plugin-auth0": "4.7.3",
92
- "@lowdefy/plugin-aws": "4.7.3",
93
- "@lowdefy/plugin-csv": "4.7.3",
94
- "@lowdefy/plugin-next-auth": "4.7.3",
95
- "@swc/cli": "0.1.63",
96
- "@swc/core": "1.3.99",
97
- "@swc/jest": "0.2.29",
98
- "@lowdefy/logger": "4.7.3",
65
+ "@lowdefy/actions-core": "5.0.0",
66
+ "@lowdefy/actions-pdf-make": "5.0.0",
67
+ "@lowdefy/blocks-aggrid": "5.0.0",
68
+ "@lowdefy/blocks-antd": "5.0.0",
69
+ "@lowdefy/blocks-echarts": "5.0.0",
70
+ "@lowdefy/blocks-google-maps": "5.0.0",
71
+ "@lowdefy/blocks-markdown": "5.0.0",
72
+ "@lowdefy/blocks-qr": "5.0.0",
73
+ "@lowdefy/connection-axios-http": "5.0.0",
74
+ "@lowdefy/connection-elasticsearch": "5.0.0",
75
+ "@lowdefy/connection-test": "5.0.0",
76
+ "@lowdefy/connection-google-sheets": "5.0.0",
77
+ "@lowdefy/connection-knex": "5.0.0",
78
+ "@lowdefy/connection-mongodb": "5.0.0",
79
+ "@lowdefy/connection-redis": "5.0.0",
80
+ "@lowdefy/connection-sendgrid": "5.0.0",
81
+ "@lowdefy/connection-stripe": "5.0.0",
82
+ "@lowdefy/operators-change-case": "5.0.0",
83
+ "@lowdefy/operators-diff": "5.0.0",
84
+ "@lowdefy/operators-jsonata": "5.0.0",
85
+ "@lowdefy/operators-dayjs": "5.0.0",
86
+ "@lowdefy/operators-mql": "5.0.0",
87
+ "@lowdefy/operators-nunjucks": "5.0.0",
88
+ "@lowdefy/operators-uuid": "5.0.0",
89
+ "@lowdefy/operators-yaml": "5.0.0",
90
+ "@lowdefy/plugin-auth0": "5.0.0",
91
+ "@lowdefy/plugin-aws": "5.0.0",
92
+ "@lowdefy/plugin-csv": "5.0.0",
93
+ "@lowdefy/plugin-next-auth": "5.0.0",
94
+ "@swc/cli": "0.8.0",
95
+ "@swc/core": "1.15.18",
96
+ "@swc/jest": "0.2.39",
97
+ "@lowdefy/logger": "5.0.0",
99
98
  "jest": "28.1.3",
100
99
  "pino": "8.16.2"
101
100
  },
@@ -103,9 +102,10 @@
103
102
  "access": "public"
104
103
  },
105
104
  "scripts": {
106
- "build": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && node dist/scripts/generateDefaultTypes.js",
105
+ "build": "swc src --out-dir dist --config-file ../../.swcrc --cli-config-file ../../.swc-cli.json && node dist/scripts/generateDefaultTypes.js",
107
106
  "clean": "rm -rf dist",
108
107
  "start": "node dist/scripts/run.js",
109
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
108
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
109
+ "test:u": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=snapshots -- -u"
110
110
  }
111
111
  }
@@ -1,34 +0,0 @@
1
- /*
2
- Copyright 2020-2026 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import fs from 'fs';
16
- import path from 'path';
17
- import { nunjucksFunction } from '@lowdefy/nunjucks';
18
- const template = `@import '@lowdefy/layout/style.less';
19
- @import '@lowdefy/client/style.less';
20
- {% for style in styles -%}
21
- @import '{{ style }}';
22
- {% endfor -%}
23
- {% if importUserStyles %}
24
- @import '../../public/styles.less';
25
- {% endif %}
26
- `;
27
- async function writeStyleImports({ components, context }) {
28
- const templateFn = nunjucksFunction(template);
29
- await context.writeBuildArtifact('plugins/styles.less', templateFn({
30
- styles: components.imports.styles,
31
- importUserStyles: fs.existsSync(path.join(context.directories.config, 'public/styles.less'))
32
- }));
33
- }
34
- export default writeStyleImports;