iobroker.webui 1.29.0 → 1.31.2

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 (25) hide show
  1. package/README.md +13 -0
  2. package/io-package.json +53 -53
  3. package/package.json +17 -17
  4. package/www/dist/frontend/config/IobrokerWebuiBindingsEditor.js +1 -1
  5. package/www/dist/frontend/generated/Properties.json +1 -1
  6. package/www/dist/frontend/generated/ScriptCommands.json +46 -4
  7. package/www/dist/frontend/runtime/CustomControls.js +1 -1
  8. package/www/index.html +1 -1
  9. package/www/node_modules/@adobe/css-tools/dist/esm/adobe-css-tools.d.mts +176 -0
  10. package/www/node_modules/@adobe/css-tools/dist/esm/adobe-css-tools.mjs +2 -0
  11. package/www/node_modules/@adobe/css-tools/dist/umd/adobe-css-tools.js +2 -0
  12. package/www/node_modules/@iobroker/socket-client/dist/esm/AdminConnection.js +1 -1
  13. package/www/node_modules/@iobroker/socket-client/dist/esm/Connection.d.ts +2 -2
  14. package/www/node_modules/@iobroker/socket-client/dist/esm/Connection.js +104 -61
  15. package/www/node_modules/@iobroker/webcomponent-selectid-dialog/dist/iobrokerSelectId.es.js +11361 -11226
  16. package/www/node_modules/@iobroker/webcomponent-selectid-dialog/dist/socket.iob.js +7 -1
  17. package/www/node_modules/@node-projects/web-component-designer-visualization-addons/dist/components/BindingsEditor.js +14 -5
  18. package/www/node_modules/@node-projects/web-component-designer-visualization-addons/dist/helpers/BindingsHelper.js +87 -47
  19. package/www/node_modules/@node-projects/web-component-designer-visualization-addons/dist/scripting/ScriptSystem.js +61 -23
  20. package/www/node_modules/blockly/blockly_compressed.js +922 -878
  21. package/www/node_modules/blockly/blocks_compressed.js +57 -58
  22. package/www/node_modules/blockly/javascript_compressed.js +37 -37
  23. package/www/node_modules/blockly/msg/en.js +9 -19
  24. package/www/node_modules/es-module-shims/dist/es-module-shims.js +1137 -1120
  25. package/www/node_modules/@adobe/css-tools/dist/index.mjs +0 -861
package/README.md CHANGED
@@ -133,6 +133,19 @@ runtime.html?screenName=screen2
133
133
  Placeholder for next versions:
134
134
  ### __WORK IN PROGRESS__
135
135
  -->
136
+ ### 1.31.2 (2025-08-18)
137
+ - update npms
138
+
139
+ ### 1.31.1 (2025-08-17)
140
+ - remove nod 18 from github actions
141
+
142
+ ### 1.31.0 (2025-08-17)
143
+ - update packages
144
+ - script support for properties
145
+
146
+ ### 1.30.0 (2025-05-25)
147
+ - starting indirect binding fix
148
+
136
149
  ### 1.29.0 (2025-05-25)
137
150
  - complexer indirect bindings
138
151
 
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "webui",
4
- "version": "1.29.0",
4
+ "version": "1.31.2",
5
5
  "titleLang": {
6
6
  "en": "webui",
7
7
  "de": "webui",
@@ -29,6 +29,58 @@
29
29
  "zh-cn": "使用万维网传送器的高锰用户接口"
30
30
  },
31
31
  "news": {
32
+ "1.31.2": {
33
+ "en": "update npms",
34
+ "de": "aktualisierung von npms",
35
+ "ru": "обновление npms",
36
+ "pt": "atualizar npms",
37
+ "nl": "npms bijwerken",
38
+ "fr": "mettre à jour npms",
39
+ "it": "aggiornamento npm",
40
+ "es": "actualización npms",
41
+ "pl": "update npms",
42
+ "uk": "оновлення npms",
43
+ "zh-cn": "更新 npms"
44
+ },
45
+ "1.31.1": {
46
+ "en": "remove nod 18 from github actions",
47
+ "de": "nod 18 von github aktionen entfernen",
48
+ "ru": "удалить кивок 18 из действий github",
49
+ "pt": "remover aceno 18 das ações do github",
50
+ "nl": "verwijderen nod 18 uit github acties",
51
+ "fr": "supprimer le nod 18 des actions github",
52
+ "it": "rimuovere nd 18 da azioni github",
53
+ "es": "eliminar nod 18 de las acciones de github",
54
+ "pl": "usuń nod 18 z działań github",
55
+ "uk": "remove nod 18 від github дії",
56
+ "zh-cn": "从 github 动作中删除点头 18"
57
+ },
58
+ "1.31.0": {
59
+ "en": "update packages\nscript support for properties",
60
+ "de": "update-pakete\nscript-unterstützung für eigenschaften",
61
+ "ru": "обновление пакетов\nподдержка скриптов для свойств",
62
+ "pt": "atualizar pacotes\nsuporte de script para propriedades",
63
+ "nl": "pakketten bijwerken\nscriptondersteuning voor eigenschappen",
64
+ "fr": "mettre à jour les paquets\nsupport de script pour les propriétés",
65
+ "it": "pacchetti di aggiornamento\nsupporto script per le proprietà",
66
+ "es": "actualizar paquetes\nsoporte de script para propiedades",
67
+ "pl": "aktualizacja pakietów\nobsługa skryptów dla właściwości",
68
+ "uk": "оновлення пакетів\nпідтримка сценаріїв властивостей",
69
+ "zh-cn": "更新软件包\n属性的脚本支持"
70
+ },
71
+ "1.30.0": {
72
+ "en": "starting indirect binding fix",
73
+ "de": "start indirekter bindungsfix",
74
+ "ru": "начало косвенного связывания",
75
+ "pt": "correção de ligação indireta",
76
+ "nl": "beginnen met indirecte bindingsfix",
77
+ "fr": "début de la fixation indirecte",
78
+ "it": "start indirect binding fix",
79
+ "es": "inicio de fijación indirecta",
80
+ "pl": "początkowy łącznik pośredni",
81
+ "uk": "від непрямої фіксації",
82
+ "zh-cn": "开始间接绑定"
83
+ },
32
84
  "1.29.0": {
33
85
  "en": "complexer indirect bindings",
34
86
  "de": "komplexe indirekte bindungen",
@@ -67,58 +119,6 @@
67
119
  "pl": "fix import xml",
68
120
  "uk": "виправлено імпорт xml",
69
121
  "zh-cn": "修正 xml 导入"
70
- },
71
- "1.27.0": {
72
- "en": "edit string in visu property grid\nbindings to properties did not work (in designer)\nhtml setting did not work sometimes",
73
- "de": "string in visu-eigenschaftsgitter bearbeiten\nbindungen an eigenschaften funktionierten nicht (im designer)\nhtml einstellung funktioniert nicht manchmal",
74
- "ru": "редактировать строки в сетке свойств visu\nпривязка к свойствам не сработала (в конструкторе)\nhtml-настройка иногда не работает",
75
- "pt": "edit string in visu property grid\nligações a propriedades não funcionou (em designer)\nconfiguração html não funcionou às vezes",
76
- "nl": "tekenreeks bewerken in visu eigenschap raster\nbindingen aan eigenschappen werkten niet (in ontwerper)\nhtml-instelling werkte soms niet",
77
- "fr": "modifier la chaîne dans la grille de propriétés visu\nles fixations aux propriétés ne fonctionnaient pas (en designer)\nle réglage html ne fonctionnait pas parfois",
78
- "it": "modifica stringa nella griglia di proprietà visu\nleganti a proprietà non ha funzionato (in progettista)\nhtml impostazione non ha funzionato a volte",
79
- "es": "cadena de edición en la red de propiedades visu\nvinculantes para propiedades no funcionaron (en diseñador)\nhtml setting did not work sometimes",
80
- "pl": "edytuj ciąg w siatce właściwości visu\nwiązania do nieruchomości nie działa (w projektancie)\nustawienia html nie działały czasami",
81
- "uk": "редагувати рядок в мережі visu\nобов’язки до властивостей не працювали (у дизайнеру)\nналаштування html не працює іноді",
82
- "zh-cn": "在粘着属性网格中编辑字符串\n约束属性无效( 设计者)\nhtml 设置有时行不通"
83
- },
84
- "1.26.0": {
85
- "en": "fix error in screenviewer\nupdate npms\nrename global styles\nallow styling of dialog",
86
- "de": "fehler in screenviewer beheben\naktualisierung von npms\numbenennen global styles\ndie gestaltung des dialogs ermöglichen",
87
- "ru": "исправить ошибку screenviewer\nобновление npms\nпереименовать глобальные стили\nразрешить стилизацию диалога",
88
- "pt": "corrigir erro no screenviewer\natualização npms\nrenomear estilos globais\npermitir o estilo de diálogo",
89
- "nl": "fix error in screenviewer\nnpms bijwerken\nglobale stijlen hernoemen\nstyling van dialoogvenster toestaan",
90
- "fr": "correction d'erreur dans screenviewer\nmettre à jour npms\nrenommer les styles globaux\npermettre le style de dialogue",
91
- "it": "errore di correzione in screenviewer\naggiornamento npm\nrinominare gli stili globali\nconsentire lo styling di dialogo",
92
- "es": "corregir error en screenviewer\nactualización npms\nrenombrar estilos globales\npermitir el estilo de diálogo",
93
- "pl": "naprawić błąd w przeglądarce\nupdate npms\nzmienić nazwę stylów globalnych\numożliwić stylizację okna dialogowego",
94
- "uk": "виправлено помилку в екрані\nоновлення npms\nперейменувати глобальні стилі\nдозволяє укладати діалогове вікно",
95
- "zh-cn": "在屏幕查看器中修正错误\n更新 npms\n重命名全局样式\n允许对话框的样式"
96
- },
97
- "1.25.2": {
98
- "en": "fix null error on props",
99
- "de": "nullfehler auf requisiten beheben",
100
- "ru": "исправить ошибку null на реквизитов",
101
- "pt": "corrigir erro nulo em adereços",
102
- "nl": "fix null-fout op rekwisieten",
103
- "fr": "correction de l'erreur null sur les accessoires",
104
- "it": "correzione di errore null su oggetti",
105
- "es": "solucionar error null en props",
106
- "pl": "naprawić błąd null na rekwizytach",
107
- "uk": "виправити помилку null на пропсах",
108
- "zh-cn": "修复道具上的无效错误"
109
- },
110
- "1.25.1": {
111
- "en": "escape xml\nswitch to official selector package",
112
- "de": "entkommen xml\nwechsel zum offiziellen auswahlpaket",
113
- "ru": "xml\nпереход на официальный пакет селектора",
114
- "pt": "escapar xml\nmudar para o pacote seletor oficial",
115
- "nl": "ontsnappen xml\nschakel over op officiële selectiepakket",
116
- "fr": "évasion xml\npasser au sélecteur officiel",
117
- "it": "fuga xml\npassare al pacchetto selettore ufficiale",
118
- "es": "escape xml\ncambiar al paquete oficial selector",
119
- "pl": "escape xml\nprzełączanie na oficjalny pakiet wyboru",
120
- "uk": "втеча xml\nвимикач на офіційному пакеті selector",
121
- "zh-cn": "越狱 xml\n切换到正式选择软件包"
122
122
  }
123
123
  },
124
124
  "icon": "logo.png",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.webui",
3
- "version": "1.29.0",
3
+ "version": "1.31.2",
4
4
  "description": "ioBroker webui",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -43,18 +43,18 @@
43
43
  "node": ">=18"
44
44
  },
45
45
  "dependencies": {
46
- "@iobroker/adapter-core": "^3.2.3",
47
- "@types/node": "^22.15.21"
46
+ "@iobroker/adapter-core": "^3.3.2",
47
+ "@types/node": "^24.3.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@adobe/css-tools": "4.4.3",
50
+ "@adobe/css-tools": "4.4.4",
51
51
  "@alcalzone/release-script": "^3.8.0",
52
52
  "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
53
53
  "@alcalzone/release-script-plugin-license": "^3.7.0",
54
- "@blockly/zoom-to-fit": "^7.0.1",
55
- "@iobroker/socket-client": "^4.1.3",
54
+ "@blockly/zoom-to-fit": "^7.0.2",
55
+ "@iobroker/socket-client": "^5.0.1",
56
56
  "@iobroker/testing": "^5.0.4",
57
- "@iobroker/webcomponent-selectid-dialog": "^1.0.8",
57
+ "@iobroker/webcomponent-selectid-dialog": "^1.0.10",
58
58
  "@node-projects/base-custom-webcomponent": "0.30.0",
59
59
  "@node-projects/lean-he-esm": "^3.3.0",
60
60
  "@node-projects/node-html-parser-esm": "^6.2.0",
@@ -64,35 +64,35 @@
64
64
  "@node-projects/web-component-designer-codeview-monaco": "^0.1.33",
65
65
  "@node-projects/web-component-designer-htmlparserservice-nodehtmlparser": "^0.1.11",
66
66
  "@node-projects/web-component-designer-stylesheetservice-css-tools": "^0.1.10",
67
- "@node-projects/web-component-designer-visualization-addons": "^0.1.119",
67
+ "@node-projects/web-component-designer-visualization-addons": "^0.1.125",
68
68
  "@node-projects/web-component-designer-widgets-wunderbaum": "^0.1.33",
69
69
  "@types/json-schema": "^7.0.15",
70
70
  "@web/dev-server": "^0.4.6",
71
- "blockly": "^12.0.0",
72
- "chai": "^5.2.0",
71
+ "blockly": "^12.2.0",
72
+ "chai": "^5.3.1",
73
73
  "chai-as-promised": "^8.0.1",
74
74
  "construct-style-sheets-polyfill": "^3.1.0",
75
- "cross-env": "^7.0.3",
75
+ "cross-env": "^10.0.0",
76
76
  "dayjs": "^1.11.13",
77
77
  "del": "^8.0.0",
78
78
  "dock-spawn-ts": "^3.5.0",
79
- "es-module-shims": "2.5.1",
80
- "eslint": "^9.27.0",
79
+ "es-module-shims": "2.6.2",
80
+ "eslint": "^9.33.0",
81
81
  "esprima-next": "^6.0.3",
82
- "glob-stream": "^8.0.2",
83
- "gulp": "^5.0.0",
82
+ "glob-stream": "^8.0.3",
83
+ "gulp": "^5.0.1",
84
84
  "gulp-git": "^2.11.0",
85
85
  "gulp-replace": "^1.1.4",
86
86
  "long": "^5.3.2",
87
87
  "mobile-drag-drop": "^3.0.0-rc.0",
88
- "mocha": "^11.5.0",
88
+ "mocha": "^11.7.1",
89
89
  "monaco-editor": "^0.50.0",
90
90
  "nyc": "^17.1.0",
91
91
  "sinon-chai": "^4.0.0",
92
92
  "toastify-js": "^1.12.0",
93
93
  "ts-node": "^10.9.2",
94
94
  "tslib": "^2.8.1",
95
- "typescript": "^5.8.3",
95
+ "typescript": "^5.9.2",
96
96
  "typescript-json-schema": "^0.65.1",
97
97
  "wunderbaum": "0.13.0"
98
98
  }
@@ -4,7 +4,7 @@ import { openSelectIdDialog } from "@iobroker/webcomponent-selectid-dialog/dist/
4
4
  export class IobrokerWebuiBindingsEditor extends BindingsEditor {
5
5
  static is = 'iobroker-webui-bindings-editor';
6
6
  constructor(property, binding, bindingTarget, serviceContainer, instanceServiceContainer, shell) {
7
- super(property, binding, bindingTarget, serviceContainer, instanceServiceContainer, shell);
7
+ super(property, binding, bindingTarget, serviceContainer, instanceServiceContainer, shell, { namedConverters: false });
8
8
  let groupObjectNameControl = this._getDomElement('groupObjectName');
9
9
  let btn = document.createElement('button');
10
10
  btn.textContent = 'IOB';
@@ -39,7 +39,7 @@
39
39
  "arguments",
40
40
  "caller",
41
41
  "name",
42
- "__@hasInstance@2369"
42
+ "__@hasInstance@2385"
43
43
  ],
44
44
  "type": "object"
45
45
  },
@@ -10,6 +10,9 @@
10
10
  "description": "A formula to calculate the new signal value, can contain other signals in angle brackets: {}\nExample: {adapter.0.level} * 100 + 30",
11
11
  "type": "string"
12
12
  },
13
+ "target": {
14
+ "$ref": "#/definitions/signalTarget"
15
+ },
13
16
  "targetSignal": {
14
17
  "description": "Name of the signal",
15
18
  "format": "signal",
@@ -24,6 +27,7 @@
24
27
  "type",
25
28
  "targetSignal",
26
29
  "formula",
30
+ "target",
27
31
  "additionalData"
28
32
  ],
29
33
  "type": "object"
@@ -34,7 +38,6 @@
34
38
  "type": "string"
35
39
  },
36
40
  "bitNumber": {
37
- "default": 0,
38
41
  "type": "number"
39
42
  },
40
43
  "signal": {
@@ -42,6 +45,10 @@
42
45
  "format": "signal",
43
46
  "type": "string"
44
47
  },
48
+ "target": {
49
+ "$ref": "#/definitions/signalTarget",
50
+ "default": 0
51
+ },
45
52
  "type": {
46
53
  "const": "ClearBitInSignal",
47
54
  "type": "string"
@@ -50,6 +57,7 @@
50
57
  "propertyOrder": [
51
58
  "type",
52
59
  "signal",
60
+ "target",
53
61
  "bitNumber",
54
62
  "additionalData"
55
63
  ],
@@ -215,7 +223,7 @@
215
223
  },
216
224
  "destinationFolder": {
217
225
  "description": "name of destination folder",
218
- "type": "number"
226
+ "type": "string"
219
227
  },
220
228
  "sourceFolder": {
221
229
  "description": "name of the source folder",
@@ -244,6 +252,9 @@
244
252
  "format": "signal",
245
253
  "type": "string"
246
254
  },
255
+ "target": {
256
+ "$ref": "#/definitions/signalTarget"
257
+ },
247
258
  "type": {
248
259
  "const": "DecrementSignalValue",
249
260
  "type": "string"
@@ -256,6 +267,7 @@
256
267
  "type",
257
268
  "signal",
258
269
  "value",
270
+ "target",
259
271
  "additionalData"
260
272
  ],
261
273
  "type": "object"
@@ -380,6 +392,9 @@
380
392
  "format": "signal",
381
393
  "type": "string"
382
394
  },
395
+ "target": {
396
+ "$ref": "#/definitions/signalTarget"
397
+ },
383
398
  "type": {
384
399
  "const": "IncrementSignalValue",
385
400
  "type": "string"
@@ -392,6 +407,7 @@
392
407
  "type",
393
408
  "signal",
394
409
  "value",
410
+ "target",
395
411
  "additionalData"
396
412
  ],
397
413
  "type": "object"
@@ -676,7 +692,6 @@
676
692
  "type": "string"
677
693
  },
678
694
  "bitNumber": {
679
- "default": 0,
680
695
  "type": "number"
681
696
  },
682
697
  "signal": {
@@ -684,6 +699,10 @@
684
699
  "format": "signal",
685
700
  "type": "string"
686
701
  },
702
+ "target": {
703
+ "$ref": "#/definitions/signalTarget",
704
+ "default": 0
705
+ },
687
706
  "type": {
688
707
  "const": "SetBitInSignal",
689
708
  "type": "string"
@@ -692,6 +711,7 @@
692
711
  "propertyOrder": [
693
712
  "type",
694
713
  "signal",
714
+ "target",
695
715
  "bitNumber",
696
716
  "additionalData"
697
717
  ],
@@ -776,6 +796,9 @@
776
796
  "format": "signal",
777
797
  "type": "string"
778
798
  },
799
+ "target": {
800
+ "$ref": "#/definitions/signalTarget"
801
+ },
779
802
  "type": {
780
803
  "const": "SetSignalValue",
781
804
  "type": "string"
@@ -785,6 +808,7 @@
785
808
  "propertyOrder": [
786
809
  "type",
787
810
  "signal",
811
+ "target",
788
812
  "value",
789
813
  "additionalData"
790
814
  ],
@@ -908,7 +932,6 @@
908
932
  "type": "string"
909
933
  },
910
934
  "bitNumber": {
911
- "default": 0,
912
935
  "type": "number"
913
936
  },
914
937
  "signal": {
@@ -916,6 +939,10 @@
916
939
  "format": "signal",
917
940
  "type": "string"
918
941
  },
942
+ "target": {
943
+ "$ref": "#/definitions/signalTarget",
944
+ "default": 0
945
+ },
919
946
  "type": {
920
947
  "const": "ToggleBitInSignal",
921
948
  "type": "string"
@@ -924,6 +951,7 @@
924
951
  "propertyOrder": [
925
952
  "type",
926
953
  "signal",
954
+ "target",
927
955
  "bitNumber",
928
956
  "additionalData"
929
957
  ],
@@ -939,6 +967,9 @@
939
967
  "format": "signal",
940
968
  "type": "string"
941
969
  },
970
+ "target": {
971
+ "$ref": "#/definitions/signalTarget"
972
+ },
942
973
  "type": {
943
974
  "const": "ToggleSignalValue",
944
975
  "type": "string"
@@ -947,6 +978,7 @@
947
978
  "propertyOrder": [
948
979
  "type",
949
980
  "signal",
981
+ "target",
950
982
  "additionalData"
951
983
  ],
952
984
  "type": "object"
@@ -1099,6 +1131,16 @@
1099
1131
  "additionalData"
1100
1132
  ],
1101
1133
  "type": "object"
1134
+ },
1135
+ "signalTarget": {
1136
+ "description": "signal - a signal (the default)\nproperty - a property defined in the current screen/control\nelementProperty - a property defined on the elment raising the event\nrootProperty - a property defined on the root element",
1137
+ "enum": [
1138
+ "elementProperty",
1139
+ "property",
1140
+ "rootProperty",
1141
+ "signal"
1142
+ ],
1143
+ "type": "string"
1102
1144
  }
1103
1145
  }
1104
1146
  }
@@ -155,7 +155,7 @@ export function generateCustomControl(name, control) {
155
155
  if (backup !== undefined) {
156
156
  instance[p] = backup;
157
157
  }
158
- else if (currControl.properties[p].default) {
158
+ else if (currControl.properties[p].default != null) {
159
159
  instance['_' + p] = currControl.properties[p].default;
160
160
  }
161
161
  }
package/www/index.html CHANGED
@@ -218,7 +218,7 @@
218
218
  </button>
219
219
  <button data-command="save" title="save" disabled><img src="./node_modules/@node-projects/web-component-designer/assets/icons/save.svg"></button>
220
220
  <div style="margin-left: 30px;">
221
- webui - 1.29.0 - eb18062
221
+ webui - 1.31.2 - ab85074
222
222
  </div>
223
223
  <button style="margin-left: 30px;" data-command="paste" title="paste" disabled><img
224
224
  src="./node_modules/@node-projects/web-component-designer/assets/icons/paste.svg"></button>
@@ -0,0 +1,176 @@
1
+ declare class CssParseError extends Error {
2
+ readonly reason: string;
3
+ readonly filename?: string;
4
+ readonly line: number;
5
+ readonly column: number;
6
+ readonly source: string;
7
+ constructor(filename: string, msg: string, lineno: number, column: number, css: string);
8
+ }
9
+
10
+ /**
11
+ * Store position information for a node
12
+ */
13
+ declare class Position {
14
+ start: {
15
+ line: number;
16
+ column: number;
17
+ };
18
+ end: {
19
+ line: number;
20
+ column: number;
21
+ };
22
+ source?: string;
23
+ constructor(start: {
24
+ line: number;
25
+ column: number;
26
+ }, end: {
27
+ line: number;
28
+ column: number;
29
+ }, source: string);
30
+ }
31
+
32
+ declare enum CssTypes {
33
+ stylesheet = "stylesheet",
34
+ rule = "rule",
35
+ declaration = "declaration",
36
+ comment = "comment",
37
+ container = "container",
38
+ charset = "charset",
39
+ document = "document",
40
+ customMedia = "custom-media",
41
+ fontFace = "font-face",
42
+ host = "host",
43
+ import = "import",
44
+ keyframes = "keyframes",
45
+ keyframe = "keyframe",
46
+ layer = "layer",
47
+ media = "media",
48
+ namespace = "namespace",
49
+ page = "page",
50
+ startingStyle = "starting-style",
51
+ supports = "supports"
52
+ }
53
+ type CssCommonAST = {
54
+ type: CssTypes;
55
+ };
56
+ type CssCommonPositionAST = CssCommonAST & {
57
+ position?: Position;
58
+ parent?: unknown;
59
+ };
60
+ type CssStylesheetAST = CssCommonAST & {
61
+ type: CssTypes.stylesheet;
62
+ stylesheet: {
63
+ source?: string;
64
+ rules: Array<CssAtRuleAST>;
65
+ parsingErrors?: Array<CssParseError>;
66
+ };
67
+ };
68
+ type CssRuleAST = CssCommonPositionAST & {
69
+ type: CssTypes.rule;
70
+ selectors: Array<string>;
71
+ declarations: Array<CssDeclarationAST | CssCommentAST>;
72
+ };
73
+ type CssDeclarationAST = CssCommonPositionAST & {
74
+ type: CssTypes.declaration;
75
+ property: string;
76
+ value: string;
77
+ };
78
+ type CssCommentAST = CssCommonPositionAST & {
79
+ type: CssTypes.comment;
80
+ comment: string;
81
+ };
82
+ type CssContainerAST = CssCommonPositionAST & {
83
+ type: CssTypes.container;
84
+ container: string;
85
+ rules: Array<CssAtRuleAST>;
86
+ };
87
+ type CssCharsetAST = CssCommonPositionAST & {
88
+ type: CssTypes.charset;
89
+ charset: string;
90
+ };
91
+ type CssCustomMediaAST = CssCommonPositionAST & {
92
+ type: CssTypes.customMedia;
93
+ name: string;
94
+ media: string;
95
+ };
96
+ type CssDocumentAST = CssCommonPositionAST & {
97
+ type: CssTypes.document;
98
+ document: string;
99
+ vendor?: string;
100
+ rules: Array<CssAtRuleAST>;
101
+ };
102
+ type CssFontFaceAST = CssCommonPositionAST & {
103
+ type: CssTypes.fontFace;
104
+ declarations: Array<CssDeclarationAST | CssCommentAST>;
105
+ };
106
+ type CssHostAST = CssCommonPositionAST & {
107
+ type: CssTypes.host;
108
+ rules: Array<CssAtRuleAST>;
109
+ };
110
+ type CssImportAST = CssCommonPositionAST & {
111
+ type: CssTypes.import;
112
+ import: string;
113
+ };
114
+ type CssKeyframesAST = CssCommonPositionAST & {
115
+ type: CssTypes.keyframes;
116
+ name: string;
117
+ vendor?: string;
118
+ keyframes: Array<CssKeyframeAST | CssCommentAST>;
119
+ };
120
+ type CssKeyframeAST = CssCommonPositionAST & {
121
+ type: CssTypes.keyframe;
122
+ values: Array<string>;
123
+ declarations: Array<CssDeclarationAST | CssCommentAST>;
124
+ };
125
+ type CssLayerAST = CssCommonPositionAST & {
126
+ type: CssTypes.layer;
127
+ layer: string;
128
+ rules?: Array<CssAtRuleAST>;
129
+ };
130
+ type CssMediaAST = CssCommonPositionAST & {
131
+ type: CssTypes.media;
132
+ media: string;
133
+ rules: Array<CssAtRuleAST>;
134
+ };
135
+ type CssNamespaceAST = CssCommonPositionAST & {
136
+ type: CssTypes.namespace;
137
+ namespace: string;
138
+ };
139
+ type CssPageAST = CssCommonPositionAST & {
140
+ type: CssTypes.page;
141
+ selectors: Array<string>;
142
+ declarations: Array<CssDeclarationAST | CssCommentAST>;
143
+ };
144
+ type CssSupportsAST = CssCommonPositionAST & {
145
+ type: CssTypes.supports;
146
+ supports: string;
147
+ rules: Array<CssAtRuleAST>;
148
+ };
149
+ type CssStartingStyleAST = CssCommonPositionAST & {
150
+ type: CssTypes.startingStyle;
151
+ rules: Array<CssAtRuleAST>;
152
+ };
153
+ type CssAtRuleAST = CssRuleAST | CssCommentAST | CssContainerAST | CssCharsetAST | CssCustomMediaAST | CssDocumentAST | CssFontFaceAST | CssHostAST | CssImportAST | CssKeyframesAST | CssLayerAST | CssMediaAST | CssNamespaceAST | CssPageAST | CssSupportsAST | CssStartingStyleAST;
154
+ type CssAllNodesAST = CssAtRuleAST | CssStylesheetAST | CssDeclarationAST | CssKeyframeAST;
155
+
156
+ type CompilerOptions = {
157
+ indent?: string;
158
+ compress?: boolean;
159
+ };
160
+
161
+ declare const parse: (css: string, options?: {
162
+ source?: string;
163
+ silent?: boolean;
164
+ }) => CssStylesheetAST;
165
+ declare const stringify: (node: CssStylesheetAST, options?: CompilerOptions) => string;
166
+
167
+ declare const _default: {
168
+ parse: (css: string, options?: {
169
+ source?: string;
170
+ silent?: boolean;
171
+ }) => CssStylesheetAST;
172
+ stringify: (node: CssStylesheetAST, options?: CompilerOptions) => string;
173
+ };
174
+
175
+ export { CssTypes, _default as default, parse, stringify };
176
+ export type { CssAllNodesAST, CssAtRuleAST, CssCharsetAST, CssCommentAST, CssCommonAST, CssCommonPositionAST, CssContainerAST, CssCustomMediaAST, CssDeclarationAST, CssDocumentAST, CssFontFaceAST, CssHostAST, CssImportAST, CssKeyframeAST, CssKeyframesAST, CssLayerAST, CssMediaAST, CssNamespaceAST, CssPageAST, CssRuleAST, CssStartingStyleAST, CssStylesheetAST, CssSupportsAST };