summaryrefslogtreecommitdiff
path: root/node_modules/postcss-custom-properties
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
commitf06956efd2dc4bf77244a9fcce2b883a00b925af (patch)
tree0123cb73ce67f1f4b17e1d6cbabff076ee44e31b /node_modules/postcss-custom-properties
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/postcss-custom-properties')
-rw-r--r--node_modules/postcss-custom-properties/CHANGELOG.md576
-rw-r--r--node_modules/postcss-custom-properties/dist/cascade-layers.d.ts3
-rw-r--r--node_modules/postcss-custom-properties/dist/get-custom-properties-from-root.d.ts3
-rw-r--r--node_modules/postcss-custom-properties/dist/has-supports-at-rule-ancestor.d.ts2
-rw-r--r--node_modules/postcss-custom-properties/dist/index.cjs2
-rw-r--r--node_modules/postcss-custom-properties/dist/index.d.ts10
-rw-r--r--node_modules/postcss-custom-properties/dist/index.mjs2
-rw-r--r--node_modules/postcss-custom-properties/dist/is-ignored.d.ts3
-rw-r--r--node_modules/postcss-custom-properties/dist/is-processable-rule.d.ts7
-rw-r--r--node_modules/postcss-custom-properties/dist/is-var-function.d.ts3
-rw-r--r--node_modules/postcss-custom-properties/dist/parse-or-cached.d.ts2
-rw-r--r--node_modules/postcss-custom-properties/dist/toposort.d.ts1
-rw-r--r--node_modules/postcss-custom-properties/dist/transform-properties.d.ts5
-rw-r--r--node_modules/postcss-custom-properties/dist/transform-value-ast.d.ts2
-rw-r--r--node_modules/postcss-custom-properties/package.json45
15 files changed, 32 insertions, 634 deletions
diff --git a/node_modules/postcss-custom-properties/CHANGELOG.md b/node_modules/postcss-custom-properties/CHANGELOG.md
index 31bbc294..4b6d936d 100644
--- a/node_modules/postcss-custom-properties/CHANGELOG.md
+++ b/node_modules/postcss-custom-properties/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changes to PostCSS Custom Properties
+### 13.3.3
+
+_December 15, 2023_
+
+- Fix type definitions
+- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#222) (patch)
+- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.4.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#240) (minor)
+- Updated [`@csstools/cascade-layer-name-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser) to [`1.0.6`](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser/CHANGELOG.md#106) (patch)
+
### 13.3.2
_September 24, 2023_
@@ -14,569 +23,4 @@ _September 18, 2023_
- Improve performance
-### 13.3.0
-
-_July 24, 2023_
-
-- Added: support for `:where(html)` and `:where(:root)` selectors
-- Fixed: cascade layers support
-- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#220) (minor)
-- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#231) (patch)
-- Updated [`@csstools/cascade-layer-name-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser) to [`1.0.4`](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser/CHANGELOG.md#104) (patch)
-
-### 13.2.1
-
-_July 3, 2023_
-
-- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#230) (minor)
-- Updated [`@csstools/cascade-layer-name-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser) to [`1.0.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser/CHANGELOG.md#103) (patch)
-
-### 13.2.0
-
-_June 1, 2023_
-
-- Do not generate fallback values when the rule is wrapped in `@supports (top: var(--f))`.
-
-### 13.1.5
-
-_April 10, 2023_
-
-- Updated `@csstools/css-tokenizer` to `2.1.1` (patch)
-- Updated `@csstools/css-parser-algorithms` to `2.1.1` (patch)
-- Updated `@csstools/cascade-layer-name-parser` to `1.0.2` (patch)
-
-### 13.1.4
-
-_February 21, 2023_
-
-- Fixed: exception on chained variable declarations.
-
-### 13.1.3
-
-_February 8, 2023_
-
-- Fixed: exception on missing variables.
-
-### 13.1.2
-
-_February 7, 2023_
-
-- Do not apply fallback values when these contain unresolvable custom properties.
-
-### 13.1.1
-
-_January 28, 2023_
-
-- Improve `types` declaration in `package.json`
-
-### 13.1.0
-
-_January 24, 2023_
-
-- Added: Support for Cascade Layers.
-- Improve plugin performance (port of fixes in `v12.1.11`)
-
-### 13.0.0
-
-_November 14, 2022_
-
-- Updated: Support for Node v14+ (major).
-- Removed : `importFrom` feature (breaking).
-- Removed : `exportTo` feature (breaking).
-- Added support for local custom property declarations.
-
-```css
-.example {
- --a-value: 20px;
- margin: var(--a-value);
-}
-
-/* becomes */
-
-.example {
- --a-value: 20px;
- margin: 20px;
- margin: var(--a-value);
-}
-```
-
-### 12.1.11
-
-_December 1, 2022_
-
-- Improve plugin performance
-
-### 12.1.10
-
-_October 20, 2022_
-
-- Fix how `preserve: false` interacts with logic around duplicate code (see `12.1.9`).
-
-```css
-:root {
- --my-order: 1;
-}
-
-.foo {
- order: 1;
- order: var(--my-order);
-}
-
-/* With `preserve: false` : */
-
-.foo {
- order: 1;
-}
-```
-
-### 12.1.9
-
-_September 14, 2022_
-
-- Prevent duplicate code generation.
-
-```diff
-.foo {
- order: 1;
- order: var(--my-order, 1);
-}
-
-/* becomes */
-
-.foo {
- order: 1;
-- order: 1;
- order: var(--my-order, 1);
-}
-```
-
-### 12.1.8
-
-_June 10, 2022_
-
-- Remove some unneeded regular expressions.
-
-### 12.1.7
-
-_April 8, 2022_
-
-- Fix racing condition that could happen when using other async PostCSS plugins ([#331](https://github.com/csstools/postcss-plugins/issues/331))
-
-### 12.1.6
-
-_April 5, 2022_
-
-- Fix `var()` fallback value downgrades with value lists.
-
-### 12.1.5
-
-_March 19, 2022_
-
-- Add deprecation notice for `importFrom` and `exportTo`
-
-[see the discussion](https://github.com/csstools/postcss-plugins/discussions/192)
-
-### 12.1.4
-
-_January 31, 2022_
-
-- Fix `.mjs` in `importFrom` when using `export default`
-- Fix `.mjs` in `importFrom` on Windows
-
-### 12.1.3
-
-_January 17, 2022_
-
-- Reset plugin state after each process. It is now safe to use the plugin multiple times for different processes or when watching.
-
-### 12.1.2
-
-_January 12, 2022_
-
-- Fix TypeScript transpilation.
-- Avoid throwing errors on unexpected option objects.
-
-### 12.1.1
-
-_January 12, 2022_
-
-- Fix Node 12/14 compatibility
-
-### 12.1.0
-
-_January 12, 2022_
-
-- Add `overrideImportFromWithRoot` option
-- Allow `.mjs` in `importFrom`
-- Converted to TypeScript
-- Correct typings for plugin options
-- Fix unicode support in custom property names
-
-### 12.0.4
-
-_January 7, 2022_
-
-- Fixed an issue that was causing synchronous mode to not being able to pick and transform properties that were added as part of the PostCSS flow. ([#132](https://github.com/csstools/postcss-plugins/issues/132))
-
-### 12.0.2
-
-_January 2, 2022_
-
-- Removed Sourcemaps from package tarball.
-- Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
-
-### 12.0.1
-
-_December 16, 2021_
-
-- Changed: now uses `postcss-value-parser` for parsing.
-- Updated: documentation
-
-### 12.0.0
-
-_September 17, 2021_
-
-- Updated: Support for PostCS 8+ (major).
-- Updated: Support for Node 12+ (major).
-
-### 11.0.0
-
-_January 12, 2021_
-
-- Added: Support for PostCSS v8.
-
-### 10.0.0
-
-_September 18, 2020_
-
-- Fixed: `url-regex` vulnerability ([#228](https://github.com/postcss/postcss-custom-properties/pull/228))
-- Breaking Change: Node v10+ now required
-
-### 9.2.0
-
-_September 18, 2020_
-
-- Added: Export variables to SCSS file ([#212](https://github.com/postcss/postcss-custom-properties/pull/212))
-- Added: Support for ".pcss" file resolution in `importFrom` ([#211](https://github.com/postcss/postcss-custom-properties/pull/211))
-- Fixed: Allow combined selectors ([#199](https://github.com/postcss/postcss-custom-properties/pull/199))
-- Fixed: Bug with spaces and commas in value ([#222](https://github.com/postcss/postcss-custom-properties/pull/222))
-- Fixed: `importFrom` priority ([#222](https://github.com/postcss/postcss-custom-properties/pull/222))
-
-### 9.1.1
-
-_February 20, 2020_
-
-- Fixed: Preserve spaces in multi-part values ([#203](https://github.com/postcss/postcss-custom-properties/pull/203))
-
-### 9.1.0
-
-_July 15, 2019_
-
-- Added: Support for preserving trailing comments within a declaration.
-
-### 9.0.2
-
-_July 15, 2019_
-
-- Updated: `postcss-values-parser` to 3.0.5 (patch)
-
-### 9.0.1
-
-_June 20, 2019_
-
-- Updated: `postcss-values-parser` to 3.0.4 (major)
-- Updated: Node 8+ compatibility (major)
-
-> This release is identical to v9.0.0, only `npm publish` failed to publish v9.0.0 and threw the following error:
-> ```
-> You cannot publish over the previously published versions: 9.0.0.
-> ```
-> I did not want this issue to distract me, and so I thoughtfully and impatiently published v9.0.0 as v9.0.1.
-
-### 8.0.11
-
-_June 20, 2019_
-
-- Added: Synchronous transforms when async is unnecessary (thank @eteeselink)
-- Fixed: Unexpected mutations to imported Custom Properties (thank @EECOLOR)
-- Fixed: Transforms throwing over unknown Custom Properties
-
-### 8.0.10
-
-_April 1, 2019_
-
-- Added: Support for ignoring lines and or blocks using
- `postcss-custom-properties` comments.
-- Updated: `postcss` to 7.0.14 (patch)
-- Updated: `postcss-values-parser` to 2.0.1 (patch)
-
-### 8.0.9
-
-_November 5, 2018_
-
-- Fixed: Issue with duplicate custom property usage within a declaration
-
-### 8.0.8
-
-_October 2, 2018_
-
-- Fixed: Issue with nested fallbacks
-
-### 8.0.7
-
-_October 2, 2018_
-
-- Fixed: Issue with parsing custom properties that are not strings
-- Updated: `postcss` to 7.0.5 (patch)
-
-### 8.0.6
-
-_September 21, 2018_
-
-- Fixed: Issue with regular `:root` and `html` properties not getting polyfilled
-- Updated: `postcss` to 7.0.3 (patch)
-
-### 8.0.5
-
-_September 21, 2018_
-
-- Fixed: Issue with multiple `importFrom` not getting combined
-
-### 8.0.4
-
-_September 18, 2018_
-
-- Fixed: Do not break on an empty `importFrom` object
-
-### 8.0.3
-
-_September 18, 2018_
-
-- Updated: PostCSS Values Parser 2
-
-### 8.0.2
-
-_September 17, 2018_
-
-- Fixed: Spacing is preserved before replaced variables.
-
-### 8.0.1
-
-_September 17, 2018_
-
-- Fixed: Workaround issue in `postcss-values-parser` incorrectly cloning nodes.
-
-### 8.0.0
-
-_September 16, 2018_
-
-- Added: New `exportTo` function to specify where to export custom properties to.
-- Added: New `importFrom` option to specify where to import custom properties from.
-- Added: Support for variables written within `html`
-- Added: Support for PostCSS v7.
-- Added: Support for Node v6+.
-- Removed: `strict` option, as using the fallback value isn’t necessarily more valid.
-- Removed: `preserve: "computed"` option, as there seems to be little use in preserving custom property declarations while removing all usages of them.
-- Removed: `warnings` and `noValueNotifications` options, as this should be the job of a linter tool.
-- Removed: `variables` option, which is now replaced by `importFrom`
-- Removed: `appendVariables` option, which is now replaced by `exportTo`
-- Fixed: Custom Properties in `:root` are not also transformed.
-- Fixed: Declarations that do not change are not duplicated during preserve.
-
-### 7.0.0
-
-_February 16, 2018_
-
-- Changed: `preserve` option defaults as `true` to reflect the browser climate
-- Changed: `warnings` option defaults to `false` to reflect the browser climate
-
-### 6.3.1
-
-_February 16, 2018_
-
-- Reverted: `preserve` and `warnings` option to be added in major release
-
-### 6.3.0
-
-_February 15, 2018_
-
-- Fixed: `var()` captures strictly `var()` functions and not `xvar()`, etc
-- Fixed: `var()` better captures whitespace within the function
-- Fixed: comments within declarations using `var()` are now preserved
-- Changed: `preserve` option defaults as `true` to reflect the browser climate
-- Changed: `warnings` option defaults to `false` to reflect the browser climate
-- Updated documentation
-
-### 6.2.0
-
-_October 6, 2017_
-
-- Added: `noValueNotifications` option (#71)
-- Fixed: Typo in `prefixedVariables` variable name (#77)
-
-### 6.1.0
-
-_June 28, 2017_
-
-- Added: Let "warnings" option silence all warnings
-([#67](https://github.com/postcss/postcss-custom-properties/pull/67))
-- Dependencies update (postcss, balanced-match)
-
-### 6.0.1
-
-_May 15, 2017_
-
-- Fixed: incorrect export ([#69](https://github.com/postcss/postcss-custom-properties/issues/69))
-
-### 6.0.0
-
-_May 12, 2017_
-
-- Added: compatibility with postcss v6.x
-
-### 5.0.2
-
-_February 1, 2017_
-
-- Minor dependency update
- ([#57](https://github.com/postcss/postcss-custom-properties/pull/57))
-
-### 5.0.1
-
-_April 22, 2016_
-
-- Fixed: trailing space after custom property name causes duplicate empty
- property
- ([#43](https://github.com/postcss/postcss-custom-properties/pull/43))
-
-### 5.0.0
-
-_August 25, 2015_
-
-- Removed: compatibility with postcss v4.x
-- Added: compatibility with postcss v5.x
-
-### 4.2.0
-
-_July 21, 2015_
-
-- Added: `warnings` option allows you to disable warnings.
-([cssnext#186](https://github.com/cssnext/cssnext/issues/186))
-
-### 4.1.0
-
-_July 14, 2015_
-
-- Added: plugin now returns itself in order to expose a `setVariables` function
-that allow you to programmatically change the variables.
-([#35](https://github.com/postcss/postcss-custom-properties/pull/35))
-
-### 4.0.0
-
-_June 17, 2015_
-
-- Changed: messages and exceptions are now sent using postcss message API.
-
-### 3.3.0
-
-_April 8, 2015_
-
-- Added: `preserve` now support `"computed"` so only preserve resolved custom properties (see new option below)
-- Added: `appendVariables` allows you (when `preserve` is truthy) to append your variables as custom properties
-- Added: `strict: false` allows your to avoid too many fallbacks added in your CSS.
-
-### 3.2.0
-
-_03 31, 2015_
-
-- Added: JS defined variables are now resolved too ([#22](https://github.com/postcss/postcss-custom-properties/issues/22))
-
-### 3.1.0
-
-_03 16, 2015_
-
-- Added: variables defined in JS are now automatically prefixed with `--`
- ([0691784](https://github.com/postcss/postcss-custom-properties/commit/0691784ed2218d7e6b16da8c4df03e2ca0c4798c))
-
-### 3.0.1
-
-_February 6, 2015_
-
-- Fixed: logs now have filename back ([#19](https://github.com/postcss/postcss-custom-properties/issues/19))
-
-### 3.0.0
-
-_January 20, 2015_
-
-- Changed: upgrade to postcss 4 ([#18](https://github.com/postcss/postcss-custom-properties/pull/18))
-- Removed: some code that seems to be useless ([16ff3c2](https://github.com/postcss/postcss-custom-properties/commit/16ff3c22fe0563a1283411d7866791966fff4c58))
-
-### 2.1.1
-
-_December 2, 2014_
-
-- Fixed: issue when multiples undefined custom properties are referenced ([#16](https://github.com/postcss/postcss-custom-properties/issues/16))
-
-### 2.1.0
-
-_November 25, 2014_
-
-- Added: enhanced exceptions & messages
-
-### 2.0.0
-
-_November 12, 2014_
-
-- Changed: upgrade to postcss 3
-
-### 1.0.2
-
-_November 4, 2014_
-
-- Fixed: more clear message for warning about custom prop used in non top-level :root
-
-### 1.0.1
-
-_November 3, 2014_
-
-- Fixed: warning about custom prop used in non :root
-
-### 1.0.0
-
-_November 2, 2014_
-
-- Added: warning when a custom prop is used in another place than :root
-- Added: handle !important
-
-### 0.4.0
-
-_September 30, 2014_
-
-- Added: JS-defined properties override CSS-defined
-
-### 0.3.1
-
-_August 27, 2014_
-
-- Added: nested custom properties usages are now correctly resolved
-- Changed: undefined var doesn't throw error anymore (just a console warning) & are kept as is in the output
-
-### 0.3.0
-
-_August 26, 2014_
-
-- Changed: fallback now are always added by default ([see why](http://www.w3.org/TR/css-variables/#invalid-variables))
-- Changed: `map` option renamed to `variables`
-
-### 0.2.0
-
-_August 22, 2014_
-
-- Added: `map` option
-- Changed: GNU style error message
-
-### 0.1.0
-
-_August 1, 2014_
-
-✨ First release based on [rework-vars](https://github.com/reworkcss/rework-vars) v3.1.1
+[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-properties/CHANGELOG.md)
diff --git a/node_modules/postcss-custom-properties/dist/cascade-layers.d.ts b/node_modules/postcss-custom-properties/dist/cascade-layers.d.ts
deleted file mode 100644
index b9891949..00000000
--- a/node_modules/postcss-custom-properties/dist/cascade-layers.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { Node, Root } from 'postcss';
-export declare function collectCascadeLayerOrder(root: Root): WeakMap<Node, number>;
-export declare function cascadeLayerNumberForNode(node: Node, layers: WeakMap<Node, number>): number;
diff --git a/node_modules/postcss-custom-properties/dist/get-custom-properties-from-root.d.ts b/node_modules/postcss-custom-properties/dist/get-custom-properties-from-root.d.ts
deleted file mode 100644
index 5a9c1547..00000000
--- a/node_modules/postcss-custom-properties/dist/get-custom-properties-from-root.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { Root } from 'postcss';
-import valuesParser from 'postcss-value-parser';
-export default function getCustomPropertiesFromRoot(root: Root, parsedValuesCache: Map<string, valuesParser.ParsedValue>): Map<string, valuesParser.ParsedValue>;
diff --git a/node_modules/postcss-custom-properties/dist/has-supports-at-rule-ancestor.d.ts b/node_modules/postcss-custom-properties/dist/has-supports-at-rule-ancestor.d.ts
deleted file mode 100644
index a46009ec..00000000
--- a/node_modules/postcss-custom-properties/dist/has-supports-at-rule-ancestor.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { Node } from 'postcss';
-export declare function hasSupportsAtRuleAncestor(node: Node): boolean;
diff --git a/node_modules/postcss-custom-properties/dist/index.cjs b/node_modules/postcss-custom-properties/dist/index.cjs
index 5f0a23c5..24b50e03 100644
--- a/node_modules/postcss-custom-properties/dist/index.cjs
+++ b/node_modules/postcss-custom-properties/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("postcss-value-parser"),r=require("@csstools/cascade-layer-name-parser");const t=r.parse("csstools-implicit-layer")[0];function collectCascadeLayerOrder(e){const n=new Map,o=new Map,s=[];e.walkAtRules((e=>{var a;if("layer"!==e.name.toLowerCase())return;{let r=e.parent;for(;r;){if("atrule"!==r.type||"layer"!==r.name.toLowerCase()){if(r===e.root())break;return}r=r.parent}}let l;if(e.nodes)l=normalizeLayerName(e.params,1);else{if(!e.params.trim())return;l=e.params}let i=r.parse(l);if(null!=(a=i)&&a.length){{let r=e.parent;for(;r&&"atrule"===r.type&&"layer"===r.name.toLowerCase();){const e=o.get(r);e?(i=i.map((r=>e.concat(r))),r=r.parent):r=r.parent}}if(r.addLayerToModel(s,i),e.nodes){const r=i[0].concat(t);n.set(e,r),o.set(e,i[0])}}}));for(const e of n.values())r.addLayerToModel(s,[e]);const a=new WeakMap;for(const[e,r]of n)a.set(e,s.findIndex((e=>r.equal(e))));return a}function normalizeLayerName(e,r){return e.trim()?e:"csstools-anon-layer--"+r++}const n=/(!\s*)?postcss-custom-properties:\s*off\b/i,o=new WeakMap;function isBlockIgnored(e){if(!e||!e.nodes)return!1;if(o.has(e))return o.get(e);const r=e.some((e=>isIgnoreComment(e,n)));return o.set(e,r),r}const s=/(!\s*)?postcss-custom-properties:\s*ignore\s+next\b/i;function isDeclarationIgnored(e){return!!e&&(!!isBlockIgnored(e.parent)||isIgnoreComment(e.prev(),s))}function isIgnoreComment(e,r){return!!e&&"comment"===e.type&&r.test(e.text)}const a=new Set(["layer"]);function isProcessableRule(e){let r=e.parent;for(;r;){if("atrule"===r.type&&!a.has(r.name.toLowerCase()))return!1;r=r.parent}return!0}const l=/^html$/i,i=/^:where\(html\)$/i,c=/^:root$/i,u=/^:where\(:root\)$/i,p=/(html|:root)/i,d=/^var$/i;function isVarFunction(e){return"function"===e.type&&d.test(e.value)&&Object(e.nodes).length>0}const f=/var\(/i;function removeCyclicReferences(e,r){const t=new Set;let n=r;for(;e.size>0;)try{toposort(Array.from(e.keys()),n);break}catch(r){if(!r._graphNode)throw r;e.delete(r._graphNode),t.add(r._graphNode),n=n.filter((e=>-1===e.indexOf(r._graphNode)))}return t}function toposort(e,r){let t=e.length;const n=new Array(t),o={};let s=t;const a=makeOutgoingEdges(r),l=makeNodesHash(e);for(;s--;)o[s]||visit(e[s],s,new Set);return n;function visit(e,r,s){if(s.has(e)){const r=new Error("Cyclic dependency"+JSON.stringify(e));throw r._graphNode=e,r}if(!l.has(e))return;if(o[r])return;o[r]=!0;let i=a.get(e)||new Set;if(i=Array.from(i),r=i.length){s.add(e);do{const e=i[--r];visit(e,l.get(e),s)}while(r);s.delete(e)}n[--t]=e}}function makeOutgoingEdges(e){const r=new Map;for(let t=0,n=e.length;t<n;t++){const n=e[t];r.has(n[0])||r.set(n[0],new Set),r.has(n[1])||r.set(n[1],new Set),r.get(n[0]).add(n[1])}return r}function makeNodesHash(e){const r=new Map;for(let t=0,n=e.length;t<n;t++)r.set(e[t],t);return r}function parseOrCached(r,t){let n=t.get(r);return n||(n=e(r),t.set(r,n),n)}function getCustomPropertiesFromRoot(r,t){const n=new Map,o=new Map,s=collectCascadeLayerOrder(r);r.walkRules((e=>{var r;p.test(e.selector)&&null!=(r=e.nodes)&&r.length&&isProcessableRule(e)&&(isBlockIgnored(e)||e.selectors.forEach((r=>{let t=-1;if(i.test(r)||u.test(r))t=0;else if(l.test(r))t=1;else{if(!c.test(r))return;t=2}const a=(d=s,((p=e).parent&&"atrule"===p.parent.type&&"layer"===p.parent.name.toLowerCase()?d.has(p.parent)?d.get(p.parent)+1:0:1e7)+10+t);var p,d;e.each((e=>{if("decl"!==e.type)return;if(!e.variable||isDeclarationIgnored(e))return;if("initial"===e.value.toLowerCase().trim())return;const r=o.get(e.prop)??-1;a>=r&&(o.set(e.prop,a),n.set(e.prop,e.value))}))})))}));const a=[],d=new Map;for(const[r,o]of n.entries()){const n=parseOrCached(o,t);e.walk(n.nodes,(e=>{if(isVarFunction(e)){const[t]=e.nodes.filter((e=>"word"===e.type));a.push([t.value,r])}})),d.set(r,n)}return removeCyclicReferences(d,a),d}function transformValueAST(r,t,n){var o;if(null==(o=r.nodes)||!o.length)return"";const s=new Map;return r.nodes.forEach((e=>{s.set(e,r)})),e.walk(r.nodes,(e=>{"nodes"in e&&e.nodes.length&&e.nodes.forEach((r=>{s.set(r,e)}))})),e.walk(r.nodes,(r=>{var o,a;if(!isVarFunction(r))return;const[l,...i]=r.nodes.filter((e=>"div"!==e.type)),{value:c}=l,u=s.get(r);if(!u)return;const p=u.nodes.indexOf(r);if(-1===p)return;let d=!1;i&&e.walk(i,(e=>{if(isVarFunction(e)){const[r]=e.nodes.filter((e=>"word"===e.type));if(t.has(r.value)||n.has(r.value))return;return d=!0,!1}}));let f=(null==(o=n.get(c))?void 0:o.nodes)??(null==(a=t.get(c))?void 0:a.nodes);f||!i.length||d||(f=r.nodes.slice(r.nodes.indexOf(i[0]))),void 0!==f&&(f.length?(u.nodes.splice(p,1,...f),u.nodes.forEach((e=>s.set(e,u)))):(u.nodes.splice(p,1,{type:"comment",value:"",sourceIndex:r.sourceIndex,sourceEndIndex:r.sourceEndIndex}),u.nodes.forEach((e=>s.set(e,u)))))}),!0),e.stringify(r.nodes)}function transformProperties(r,t,n,o,s){if(isTransformableDecl(r)&&!isDeclarationIgnored(r)){const o=r.value;let i=transformValueAST(e(o),t,n);const c=new Set;for(;f.test(i)&&!c.has(i);){c.add(i);i=transformValueAST(e(i),t,n)}if(i!==o){if(parentHasExactFallback(r,i))return void(s.preserve||r.remove());if(s.preserve){var a;const e=r.cloneBefore({value:i});hasTrailingComment(e)&&null!=(a=e.raws)&&a.value&&(e.raws.value.value=e.value.replace(v,"$1"),e.raws.value.raw=e.raws.value.value+e.raws.value.raw.replace(v,"$2"))}else{var l;r.value=i,hasTrailingComment(r)&&null!=(l=r.raws)&&l.value&&(r.raws.value.value=r.value.replace(v,"$1"),r.raws.value.raw=r.raws.value.value+r.raws.value.raw.replace(v,"$2"))}}}}const isTransformableDecl=e=>!e.variable&&e.value.includes("--")&&e.value.toLowerCase().includes("var("),hasTrailingComment=e=>{var r,t;return"value"in Object(Object(e.raws).value)&&"raw"in((null==(r=e.raws)?void 0:r.value)??{})&&v.test((null==(t=e.raws.value)?void 0:t.raw)??"")},v=/^([\W\w]+)(\s*\/\*[\W\w]+?\*\/)$/;function parentHasExactFallback(e,r){if(!e||!e.parent)return!1;let t=!1;const n=e.parent.index(e);return e.parent.each(((o,s)=>o!==e&&(!(s>=n)&&void("decl"===o.type&&o.prop.toLowerCase()===e.prop.toLowerCase()&&o.value===r&&(t=!0))))),t}function hasSupportsAtRuleAncestor(e){let r=e.parent;for(;r;)if("atrule"===r.type){if("supports"===r.name.toLowerCase()&&/([^\w]var\()|(\(top: var\(--f\))/i.test(r.params))return!0;r=r.parent}else r=r.parent;return!1}const w=/^initial$/i,creator=e=>{const r=!("preserve"in Object(e))||Boolean(null==e?void 0:e.preserve);if("importFrom"in Object(e))throw new Error('[postcss-custom-properties] "importFrom" is no longer supported');if("exportTo"in Object(e))throw new Error('[postcss-custom-properties] "exportTo" is no longer supported');return{postcssPlugin:"postcss-custom-properties",prepare:()=>{let e=new Map;const t=new Map;return{Once:r=>{e=getCustomPropertiesFromRoot(r,t)},Declaration:n=>{if(!f.test(n.value))return;if(hasSupportsAtRuleAncestor(n))return;const o=new Map;r&&n.parent&&n.parent.each((e=>{"decl"===e.type&&e.variable&&n!==e&&(isDeclarationIgnored(e)||(w.test(e.value)?o.delete(e.prop):o.set(e.prop,parseOrCached(e.value,t))))})),transformProperties(n,e,o,0,{preserve:r})}}}}};creator.postcss=!0,module.exports=creator;
+"use strict";var e=require("postcss-value-parser"),t=require("@csstools/cascade-layer-name-parser");const r=t.parse("csstools-implicit-layer")[0];function collectCascadeLayerOrder(e){const n=new Map,o=new Map,s=[];e.walkAtRules((e=>{if("layer"!==e.name.toLowerCase())return;{let t=e.parent;for(;t;){if("atrule"!==t.type||"layer"!==t.name.toLowerCase()){if(t===e.root())break;return}t=t.parent}}let a;if(e.nodes)a=normalizeLayerName(e.params,1);else{if(!e.params.trim())return;a=e.params}let i=t.parse(a);if(i?.length){{let t=e.parent;for(;t&&"atrule"===t.type&&"layer"===t.name.toLowerCase();){const e=o.get(t);e?(i=i.map((t=>e.concat(t))),t=t.parent):t=t.parent}}if(t.addLayerToModel(s,i),e.nodes){const t=i[0].concat(r);n.set(e,t),o.set(e,i[0])}}}));for(const e of n.values())t.addLayerToModel(s,[e]);const a=new WeakMap;for(const[e,t]of n)a.set(e,s.findIndex((e=>t.equal(e))));return a}function normalizeLayerName(e,t){return e.trim()?e:"csstools-anon-layer--"+t++}const n=/(!\s*)?postcss-custom-properties:\s*off\b/i,o=new WeakMap;function isBlockIgnored(e){if(!e||!e.nodes)return!1;if(o.has(e))return o.get(e);const t=e.some((e=>isIgnoreComment(e,n)));return o.set(e,t),t}const s=/(!\s*)?postcss-custom-properties:\s*ignore\s+next\b/i;function isDeclarationIgnored(e){return!!e&&(!!isBlockIgnored(e.parent)||isIgnoreComment(e.prev(),s))}function isIgnoreComment(e,t){return!!e&&"comment"===e.type&&t.test(e.text)}const a=new Set(["layer"]);function isProcessableRule(e){let t=e.parent;for(;t;){if("atrule"===t.type&&!a.has(t.name.toLowerCase()))return!1;t=t.parent}return!0}const i=/^html$/i,l=/^:where\(html\)$/i,c=/^:root$/i,u=/^:where\(:root\)$/i,p=/(html|:root)/i,f=/^var$/i;function isVarFunction(e){return"function"===e.type&&f.test(e.value)&&Object(e.nodes).length>0}const d=/var\(/i;function removeCyclicReferences(e,t){const r=new Set;let n=t;for(;e.size>0;)try{toposort(Array.from(e.keys()),n);break}catch(t){if(!t._graphNode)throw t;e.delete(t._graphNode),r.add(t._graphNode),n=n.filter((e=>-1===e.indexOf(t._graphNode)))}return r}function toposort(e,t){let r=e.length;const n=new Array(r),o={};let s=r;const a=makeOutgoingEdges(t),i=makeNodesHash(e);for(;s--;)o[s]||visit(e[s],s,new Set);return n;function visit(e,t,s){if(s.has(e)){const t=new Error("Cyclic dependency"+JSON.stringify(e));throw t._graphNode=e,t}if(!i.has(e))return;if(o[t])return;o[t]=!0;let l=a.get(e)||new Set;if(l=Array.from(l),t=l.length){s.add(e);do{const e=l[--t];visit(e,i.get(e),s)}while(t);s.delete(e)}n[--r]=e}}function makeOutgoingEdges(e){const t=new Map;for(let r=0,n=e.length;r<n;r++){const n=e[r];t.has(n[0])||t.set(n[0],new Set),t.has(n[1])||t.set(n[1],new Set),t.get(n[0]).add(n[1])}return t}function makeNodesHash(e){const t=new Map;for(let r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}function parseOrCached(t,r){let n=r.get(t);return n||(n=e(t),r.set(t,n),n)}function getCustomPropertiesFromRoot(t,r){const n=new Map,o=new Map,s=collectCascadeLayerOrder(t);t.walkRules((e=>{p.test(e.selector)&&e.nodes?.length&&isProcessableRule(e)&&(isBlockIgnored(e)||e.selectors.forEach((t=>{let r=-1;if(l.test(t)||u.test(t))r=0;else if(i.test(t))r=1;else{if(!c.test(t))return;r=2}const a=(f=s,((p=e).parent&&"atrule"===p.parent.type&&"layer"===p.parent.name.toLowerCase()?f.has(p.parent)?f.get(p.parent)+1:0:1e7)+10+r);var p,f;e.each((e=>{if("decl"!==e.type)return;if(!e.variable||isDeclarationIgnored(e))return;if("initial"===e.value.toLowerCase().trim())return;const t=o.get(e.prop)??-1;a>=t&&(o.set(e.prop,a),n.set(e.prop,e.value))}))})))}));const a=[],f=new Map;for(const[t,o]of n.entries()){const n=parseOrCached(o,r);e.walk(n.nodes,(e=>{if(isVarFunction(e)){const[r]=e.nodes.filter((e=>"word"===e.type));a.push([r.value,t])}})),f.set(t,n)}return removeCyclicReferences(f,a),f}function transformValueAST(t,r,n){if(!t.nodes?.length)return"";const o=new Map;return t.nodes.forEach((e=>{o.set(e,t)})),e.walk(t.nodes,(e=>{"nodes"in e&&e.nodes.length&&e.nodes.forEach((t=>{o.set(t,e)}))})),e.walk(t.nodes,(t=>{if(!isVarFunction(t))return;const[s,...a]=t.nodes.filter((e=>"div"!==e.type)),{value:i}=s,l=o.get(t);if(!l)return;const c=l.nodes.indexOf(t);if(-1===c)return;let u=!1;a&&e.walk(a,(e=>{if(isVarFunction(e)){const[t]=e.nodes.filter((e=>"word"===e.type));if(r.has(t.value)||n.has(t.value))return;return u=!0,!1}}));let p=n.get(i)?.nodes??r.get(i)?.nodes;p||!a.length||u||(p=t.nodes.slice(t.nodes.indexOf(a[0]))),void 0!==p&&(p.length?(l.nodes.splice(c,1,...p),l.nodes.forEach((e=>o.set(e,l)))):(l.nodes.splice(c,1,{type:"comment",value:"",sourceIndex:t.sourceIndex,sourceEndIndex:t.sourceEndIndex}),l.nodes.forEach((e=>o.set(e,l)))))}),!0),e.stringify(t.nodes)}function transformProperties(t,r,n,o,s){if(isTransformableDecl(t)&&!isDeclarationIgnored(t)){const o=t.value;let a=transformValueAST(e(o),r,n);const i=new Set;for(;d.test(a)&&!i.has(a);){i.add(a);a=transformValueAST(e(a),r,n)}if(a!==o){if(parentHasExactFallback(t,a))return void(s.preserve||t.remove());if(s.preserve){const e=t.cloneBefore({value:a});hasTrailingComment(e)&&e.raws?.value&&(e.raws.value.value=e.value.replace(w,"$1"),e.raws.value.raw=e.raws.value.value+e.raws.value.raw.replace(w,"$2"))}else t.value=a,hasTrailingComment(t)&&t.raws?.value&&(t.raws.value.value=t.value.replace(w,"$1"),t.raws.value.raw=t.raws.value.value+t.raws.value.raw.replace(w,"$2"))}}}const isTransformableDecl=e=>!e.variable&&e.value.includes("--")&&e.value.toLowerCase().includes("var("),hasTrailingComment=e=>"value"in Object(Object(e.raws).value)&&"raw"in(e.raws?.value??{})&&w.test(e.raws.value?.raw??""),w=/^([\W\w]+)(\s*\/\*[\W\w]+?\*\/)$/;function parentHasExactFallback(e,t){if(!e||!e.parent)return!1;let r=!1;const n=e.parent.index(e);return e.parent.each(((o,s)=>o!==e&&(!(s>=n)&&void("decl"===o.type&&o.prop.toLowerCase()===e.prop.toLowerCase()&&o.value===t&&(r=!0))))),r}function hasSupportsAtRuleAncestor(e){let t=e.parent;for(;t;)if("atrule"===t.type){if("supports"===t.name.toLowerCase()&&/([^\w]var\()|(\(top: var\(--f\))/i.test(t.params))return!0;t=t.parent}else t=t.parent;return!1}const v=/^initial$/i,creator=e=>{const t=!("preserve"in Object(e))||Boolean(e?.preserve);if("importFrom"in Object(e))throw new Error('[postcss-custom-properties] "importFrom" is no longer supported');if("exportTo"in Object(e))throw new Error('[postcss-custom-properties] "exportTo" is no longer supported');return{postcssPlugin:"postcss-custom-properties",prepare:()=>{let e=new Map;const r=new Map;return{Once:t=>{e=getCustomPropertiesFromRoot(t,r)},Declaration:n=>{if(!d.test(n.value))return;if(hasSupportsAtRuleAncestor(n))return;const o=new Map;t&&n.parent&&n.parent.each((e=>{"decl"===e.type&&e.variable&&n!==e&&(isDeclarationIgnored(e)||(v.test(e.value)?o.delete(e.prop):o.set(e.prop,parseOrCached(e.value,r))))})),transformProperties(n,e,o,0,{preserve:t})}}}}};creator.postcss=!0,module.exports=creator;
diff --git a/node_modules/postcss-custom-properties/dist/index.d.ts b/node_modules/postcss-custom-properties/dist/index.d.ts
index beebd186..7e2b993e 100644
--- a/node_modules/postcss-custom-properties/dist/index.d.ts
+++ b/node_modules/postcss-custom-properties/dist/index.d.ts
@@ -1,8 +1,12 @@
import type { PluginCreator } from 'postcss';
+
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
+
/** postcss-custom-properties plugin options */
-export type pluginOptions = {
+export declare type pluginOptions = {
/** Preserve the original notation. default: true */
preserve?: boolean;
};
-declare const creator: PluginCreator<pluginOptions>;
-export default creator;
+
+export { }
diff --git a/node_modules/postcss-custom-properties/dist/index.mjs b/node_modules/postcss-custom-properties/dist/index.mjs
index 6b510153..a82df6d4 100644
--- a/node_modules/postcss-custom-properties/dist/index.mjs
+++ b/node_modules/postcss-custom-properties/dist/index.mjs
@@ -1 +1 @@
-import e from"postcss-value-parser";import{parse as t,addLayerToModel as r}from"@csstools/cascade-layer-name-parser";const n=t("csstools-implicit-layer")[0];function collectCascadeLayerOrder(e){const o=new Map,s=new Map,a=[];e.walkAtRules((e=>{var l;if("layer"!==e.name.toLowerCase())return;{let t=e.parent;for(;t;){if("atrule"!==t.type||"layer"!==t.name.toLowerCase()){if(t===e.root())break;return}t=t.parent}}let i;if(e.nodes)i=normalizeLayerName(e.params,1);else{if(!e.params.trim())return;i=e.params}let c=t(i);if(null!=(l=c)&&l.length){{let t=e.parent;for(;t&&"atrule"===t.type&&"layer"===t.name.toLowerCase();){const e=s.get(t);e?(c=c.map((t=>e.concat(t))),t=t.parent):t=t.parent}}if(r(a,c),e.nodes){const t=c[0].concat(n);o.set(e,t),s.set(e,c[0])}}}));for(const e of o.values())r(a,[e]);const l=new WeakMap;for(const[e,t]of o)l.set(e,a.findIndex((e=>t.equal(e))));return l}function normalizeLayerName(e,t){return e.trim()?e:"csstools-anon-layer--"+t++}const o=/(!\s*)?postcss-custom-properties:\s*off\b/i,s=new WeakMap;function isBlockIgnored(e){if(!e||!e.nodes)return!1;if(s.has(e))return s.get(e);const t=e.some((e=>isIgnoreComment(e,o)));return s.set(e,t),t}const a=/(!\s*)?postcss-custom-properties:\s*ignore\s+next\b/i;function isDeclarationIgnored(e){return!!e&&(!!isBlockIgnored(e.parent)||isIgnoreComment(e.prev(),a))}function isIgnoreComment(e,t){return!!e&&"comment"===e.type&&t.test(e.text)}const l=new Set(["layer"]);function isProcessableRule(e){let t=e.parent;for(;t;){if("atrule"===t.type&&!l.has(t.name.toLowerCase()))return!1;t=t.parent}return!0}const i=/^html$/i,c=/^:where\(html\)$/i,u=/^:root$/i,p=/^:where\(:root\)$/i,f=/(html|:root)/i,d=/^var$/i;function isVarFunction(e){return"function"===e.type&&d.test(e.value)&&Object(e.nodes).length>0}const v=/var\(/i;function removeCyclicReferences(e,t){const r=new Set;let n=t;for(;e.size>0;)try{toposort(Array.from(e.keys()),n);break}catch(t){if(!t._graphNode)throw t;e.delete(t._graphNode),r.add(t._graphNode),n=n.filter((e=>-1===e.indexOf(t._graphNode)))}return r}function toposort(e,t){let r=e.length;const n=new Array(r),o={};let s=r;const a=makeOutgoingEdges(t),l=makeNodesHash(e);for(;s--;)o[s]||visit(e[s],s,new Set);return n;function visit(e,t,s){if(s.has(e)){const t=new Error("Cyclic dependency"+JSON.stringify(e));throw t._graphNode=e,t}if(!l.has(e))return;if(o[t])return;o[t]=!0;let i=a.get(e)||new Set;if(i=Array.from(i),t=i.length){s.add(e);do{const e=i[--t];visit(e,l.get(e),s)}while(t);s.delete(e)}n[--r]=e}}function makeOutgoingEdges(e){const t=new Map;for(let r=0,n=e.length;r<n;r++){const n=e[r];t.has(n[0])||t.set(n[0],new Set),t.has(n[1])||t.set(n[1],new Set),t.get(n[0]).add(n[1])}return t}function makeNodesHash(e){const t=new Map;for(let r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}function parseOrCached(t,r){let n=r.get(t);return n||(n=e(t),r.set(t,n),n)}function getCustomPropertiesFromRoot(t,r){const n=new Map,o=new Map,s=collectCascadeLayerOrder(t);t.walkRules((e=>{var t;f.test(e.selector)&&null!=(t=e.nodes)&&t.length&&isProcessableRule(e)&&(isBlockIgnored(e)||e.selectors.forEach((t=>{let r=-1;if(c.test(t)||p.test(t))r=0;else if(i.test(t))r=1;else{if(!u.test(t))return;r=2}const a=(f=s,((l=e).parent&&"atrule"===l.parent.type&&"layer"===l.parent.name.toLowerCase()?f.has(l.parent)?f.get(l.parent)+1:0:1e7)+10+r);var l,f;e.each((e=>{if("decl"!==e.type)return;if(!e.variable||isDeclarationIgnored(e))return;if("initial"===e.value.toLowerCase().trim())return;const t=o.get(e.prop)??-1;a>=t&&(o.set(e.prop,a),n.set(e.prop,e.value))}))})))}));const a=[],l=new Map;for(const[t,o]of n.entries()){const n=parseOrCached(o,r);e.walk(n.nodes,(e=>{if(isVarFunction(e)){const[r]=e.nodes.filter((e=>"word"===e.type));a.push([r.value,t])}})),l.set(t,n)}return removeCyclicReferences(l,a),l}function transformValueAST(t,r,n){var o;if(null==(o=t.nodes)||!o.length)return"";const s=new Map;return t.nodes.forEach((e=>{s.set(e,t)})),e.walk(t.nodes,(e=>{"nodes"in e&&e.nodes.length&&e.nodes.forEach((t=>{s.set(t,e)}))})),e.walk(t.nodes,(t=>{var o,a;if(!isVarFunction(t))return;const[l,...i]=t.nodes.filter((e=>"div"!==e.type)),{value:c}=l,u=s.get(t);if(!u)return;const p=u.nodes.indexOf(t);if(-1===p)return;let f=!1;i&&e.walk(i,(e=>{if(isVarFunction(e)){const[t]=e.nodes.filter((e=>"word"===e.type));if(r.has(t.value)||n.has(t.value))return;return f=!0,!1}}));let d=(null==(o=n.get(c))?void 0:o.nodes)??(null==(a=r.get(c))?void 0:a.nodes);d||!i.length||f||(d=t.nodes.slice(t.nodes.indexOf(i[0]))),void 0!==d&&(d.length?(u.nodes.splice(p,1,...d),u.nodes.forEach((e=>s.set(e,u)))):(u.nodes.splice(p,1,{type:"comment",value:"",sourceIndex:t.sourceIndex,sourceEndIndex:t.sourceEndIndex}),u.nodes.forEach((e=>s.set(e,u)))))}),!0),e.stringify(t.nodes)}function transformProperties(t,r,n,o,s){if(isTransformableDecl(t)&&!isDeclarationIgnored(t)){const o=t.value;let i=transformValueAST(e(o),r,n);const c=new Set;for(;v.test(i)&&!c.has(i);){c.add(i);i=transformValueAST(e(i),r,n)}if(i!==o){if(parentHasExactFallback(t,i))return void(s.preserve||t.remove());if(s.preserve){var a;const e=t.cloneBefore({value:i});hasTrailingComment(e)&&null!=(a=e.raws)&&a.value&&(e.raws.value.value=e.value.replace(w,"$1"),e.raws.value.raw=e.raws.value.value+e.raws.value.raw.replace(w,"$2"))}else{var l;t.value=i,hasTrailingComment(t)&&null!=(l=t.raws)&&l.value&&(t.raws.value.value=t.value.replace(w,"$1"),t.raws.value.raw=t.raws.value.value+t.raws.value.raw.replace(w,"$2"))}}}}const isTransformableDecl=e=>!e.variable&&e.value.includes("--")&&e.value.toLowerCase().includes("var("),hasTrailingComment=e=>{var t,r;return"value"in Object(Object(e.raws).value)&&"raw"in((null==(t=e.raws)?void 0:t.value)??{})&&w.test((null==(r=e.raws.value)?void 0:r.raw)??"")},w=/^([\W\w]+)(\s*\/\*[\W\w]+?\*\/)$/;function parentHasExactFallback(e,t){if(!e||!e.parent)return!1;let r=!1;const n=e.parent.index(e);return e.parent.each(((o,s)=>o!==e&&(!(s>=n)&&void("decl"===o.type&&o.prop.toLowerCase()===e.prop.toLowerCase()&&o.value===t&&(r=!0))))),r}function hasSupportsAtRuleAncestor(e){let t=e.parent;for(;t;)if("atrule"===t.type){if("supports"===t.name.toLowerCase()&&/([^\w]var\()|(\(top: var\(--f\))/i.test(t.params))return!0;t=t.parent}else t=t.parent;return!1}const m=/^initial$/i,creator=e=>{const t=!("preserve"in Object(e))||Boolean(null==e?void 0:e.preserve);if("importFrom"in Object(e))throw new Error('[postcss-custom-properties] "importFrom" is no longer supported');if("exportTo"in Object(e))throw new Error('[postcss-custom-properties] "exportTo" is no longer supported');return{postcssPlugin:"postcss-custom-properties",prepare:()=>{let e=new Map;const r=new Map;return{Once:t=>{e=getCustomPropertiesFromRoot(t,r)},Declaration:n=>{if(!v.test(n.value))return;if(hasSupportsAtRuleAncestor(n))return;const o=new Map;t&&n.parent&&n.parent.each((e=>{"decl"===e.type&&e.variable&&n!==e&&(isDeclarationIgnored(e)||(m.test(e.value)?o.delete(e.prop):o.set(e.prop,parseOrCached(e.value,r))))})),transformProperties(n,e,o,0,{preserve:t})}}}}};creator.postcss=!0;export{creator as default};
+import e from"postcss-value-parser";import{parse as t,addLayerToModel as r}from"@csstools/cascade-layer-name-parser";const n=t("csstools-implicit-layer")[0];function collectCascadeLayerOrder(e){const o=new Map,s=new Map,a=[];e.walkAtRules((e=>{if("layer"!==e.name.toLowerCase())return;{let t=e.parent;for(;t;){if("atrule"!==t.type||"layer"!==t.name.toLowerCase()){if(t===e.root())break;return}t=t.parent}}let i;if(e.nodes)i=normalizeLayerName(e.params,1);else{if(!e.params.trim())return;i=e.params}let l=t(i);if(l?.length){{let t=e.parent;for(;t&&"atrule"===t.type&&"layer"===t.name.toLowerCase();){const e=s.get(t);e?(l=l.map((t=>e.concat(t))),t=t.parent):t=t.parent}}if(r(a,l),e.nodes){const t=l[0].concat(n);o.set(e,t),s.set(e,l[0])}}}));for(const e of o.values())r(a,[e]);const i=new WeakMap;for(const[e,t]of o)i.set(e,a.findIndex((e=>t.equal(e))));return i}function normalizeLayerName(e,t){return e.trim()?e:"csstools-anon-layer--"+t++}const o=/(!\s*)?postcss-custom-properties:\s*off\b/i,s=new WeakMap;function isBlockIgnored(e){if(!e||!e.nodes)return!1;if(s.has(e))return s.get(e);const t=e.some((e=>isIgnoreComment(e,o)));return s.set(e,t),t}const a=/(!\s*)?postcss-custom-properties:\s*ignore\s+next\b/i;function isDeclarationIgnored(e){return!!e&&(!!isBlockIgnored(e.parent)||isIgnoreComment(e.prev(),a))}function isIgnoreComment(e,t){return!!e&&"comment"===e.type&&t.test(e.text)}const i=new Set(["layer"]);function isProcessableRule(e){let t=e.parent;for(;t;){if("atrule"===t.type&&!i.has(t.name.toLowerCase()))return!1;t=t.parent}return!0}const l=/^html$/i,c=/^:where\(html\)$/i,u=/^:root$/i,p=/^:where\(:root\)$/i,f=/(html|:root)/i,d=/^var$/i;function isVarFunction(e){return"function"===e.type&&d.test(e.value)&&Object(e.nodes).length>0}const w=/var\(/i;function removeCyclicReferences(e,t){const r=new Set;let n=t;for(;e.size>0;)try{toposort(Array.from(e.keys()),n);break}catch(t){if(!t._graphNode)throw t;e.delete(t._graphNode),r.add(t._graphNode),n=n.filter((e=>-1===e.indexOf(t._graphNode)))}return r}function toposort(e,t){let r=e.length;const n=new Array(r),o={};let s=r;const a=makeOutgoingEdges(t),i=makeNodesHash(e);for(;s--;)o[s]||visit(e[s],s,new Set);return n;function visit(e,t,s){if(s.has(e)){const t=new Error("Cyclic dependency"+JSON.stringify(e));throw t._graphNode=e,t}if(!i.has(e))return;if(o[t])return;o[t]=!0;let l=a.get(e)||new Set;if(l=Array.from(l),t=l.length){s.add(e);do{const e=l[--t];visit(e,i.get(e),s)}while(t);s.delete(e)}n[--r]=e}}function makeOutgoingEdges(e){const t=new Map;for(let r=0,n=e.length;r<n;r++){const n=e[r];t.has(n[0])||t.set(n[0],new Set),t.has(n[1])||t.set(n[1],new Set),t.get(n[0]).add(n[1])}return t}function makeNodesHash(e){const t=new Map;for(let r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}function parseOrCached(t,r){let n=r.get(t);return n||(n=e(t),r.set(t,n),n)}function getCustomPropertiesFromRoot(t,r){const n=new Map,o=new Map,s=collectCascadeLayerOrder(t);t.walkRules((e=>{f.test(e.selector)&&e.nodes?.length&&isProcessableRule(e)&&(isBlockIgnored(e)||e.selectors.forEach((t=>{let r=-1;if(c.test(t)||p.test(t))r=0;else if(l.test(t))r=1;else{if(!u.test(t))return;r=2}const a=(f=s,((i=e).parent&&"atrule"===i.parent.type&&"layer"===i.parent.name.toLowerCase()?f.has(i.parent)?f.get(i.parent)+1:0:1e7)+10+r);var i,f;e.each((e=>{if("decl"!==e.type)return;if(!e.variable||isDeclarationIgnored(e))return;if("initial"===e.value.toLowerCase().trim())return;const t=o.get(e.prop)??-1;a>=t&&(o.set(e.prop,a),n.set(e.prop,e.value))}))})))}));const a=[],i=new Map;for(const[t,o]of n.entries()){const n=parseOrCached(o,r);e.walk(n.nodes,(e=>{if(isVarFunction(e)){const[r]=e.nodes.filter((e=>"word"===e.type));a.push([r.value,t])}})),i.set(t,n)}return removeCyclicReferences(i,a),i}function transformValueAST(t,r,n){if(!t.nodes?.length)return"";const o=new Map;return t.nodes.forEach((e=>{o.set(e,t)})),e.walk(t.nodes,(e=>{"nodes"in e&&e.nodes.length&&e.nodes.forEach((t=>{o.set(t,e)}))})),e.walk(t.nodes,(t=>{if(!isVarFunction(t))return;const[s,...a]=t.nodes.filter((e=>"div"!==e.type)),{value:i}=s,l=o.get(t);if(!l)return;const c=l.nodes.indexOf(t);if(-1===c)return;let u=!1;a&&e.walk(a,(e=>{if(isVarFunction(e)){const[t]=e.nodes.filter((e=>"word"===e.type));if(r.has(t.value)||n.has(t.value))return;return u=!0,!1}}));let p=n.get(i)?.nodes??r.get(i)?.nodes;p||!a.length||u||(p=t.nodes.slice(t.nodes.indexOf(a[0]))),void 0!==p&&(p.length?(l.nodes.splice(c,1,...p),l.nodes.forEach((e=>o.set(e,l)))):(l.nodes.splice(c,1,{type:"comment",value:"",sourceIndex:t.sourceIndex,sourceEndIndex:t.sourceEndIndex}),l.nodes.forEach((e=>o.set(e,l)))))}),!0),e.stringify(t.nodes)}function transformProperties(t,r,n,o,s){if(isTransformableDecl(t)&&!isDeclarationIgnored(t)){const o=t.value;let a=transformValueAST(e(o),r,n);const i=new Set;for(;w.test(a)&&!i.has(a);){i.add(a);a=transformValueAST(e(a),r,n)}if(a!==o){if(parentHasExactFallback(t,a))return void(s.preserve||t.remove());if(s.preserve){const e=t.cloneBefore({value:a});hasTrailingComment(e)&&e.raws?.value&&(e.raws.value.value=e.value.replace(m,"$1"),e.raws.value.raw=e.raws.value.value+e.raws.value.raw.replace(m,"$2"))}else t.value=a,hasTrailingComment(t)&&t.raws?.value&&(t.raws.value.value=t.value.replace(m,"$1"),t.raws.value.raw=t.raws.value.value+t.raws.value.raw.replace(m,"$2"))}}}const isTransformableDecl=e=>!e.variable&&e.value.includes("--")&&e.value.toLowerCase().includes("var("),hasTrailingComment=e=>"value"in Object(Object(e.raws).value)&&"raw"in(e.raws?.value??{})&&m.test(e.raws.value?.raw??""),m=/^([\W\w]+)(\s*\/\*[\W\w]+?\*\/)$/;function parentHasExactFallback(e,t){if(!e||!e.parent)return!1;let r=!1;const n=e.parent.index(e);return e.parent.each(((o,s)=>o!==e&&(!(s>=n)&&void("decl"===o.type&&o.prop.toLowerCase()===e.prop.toLowerCase()&&o.value===t&&(r=!0))))),r}function hasSupportsAtRuleAncestor(e){let t=e.parent;for(;t;)if("atrule"===t.type){if("supports"===t.name.toLowerCase()&&/([^\w]var\()|(\(top: var\(--f\))/i.test(t.params))return!0;t=t.parent}else t=t.parent;return!1}const v=/^initial$/i,creator=e=>{const t=!("preserve"in Object(e))||Boolean(e?.preserve);if("importFrom"in Object(e))throw new Error('[postcss-custom-properties] "importFrom" is no longer supported');if("exportTo"in Object(e))throw new Error('[postcss-custom-properties] "exportTo" is no longer supported');return{postcssPlugin:"postcss-custom-properties",prepare:()=>{let e=new Map;const r=new Map;return{Once:t=>{e=getCustomPropertiesFromRoot(t,r)},Declaration:n=>{if(!w.test(n.value))return;if(hasSupportsAtRuleAncestor(n))return;const o=new Map;t&&n.parent&&n.parent.each((e=>{"decl"===e.type&&e.variable&&n!==e&&(isDeclarationIgnored(e)||(v.test(e.value)?o.delete(e.prop):o.set(e.prop,parseOrCached(e.value,r))))})),transformProperties(n,e,o,0,{preserve:t})}}}}};creator.postcss=!0;export{creator as default};
diff --git a/node_modules/postcss-custom-properties/dist/is-ignored.d.ts b/node_modules/postcss-custom-properties/dist/is-ignored.d.ts
deleted file mode 100644
index 336cbebf..00000000
--- a/node_modules/postcss-custom-properties/dist/is-ignored.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { Container, Declaration } from 'postcss';
-export declare function isBlockIgnored(container: Container | undefined): any;
-export declare function isDeclarationIgnored(decl: Declaration | undefined): boolean;
diff --git a/node_modules/postcss-custom-properties/dist/is-processable-rule.d.ts b/node_modules/postcss-custom-properties/dist/is-processable-rule.d.ts
deleted file mode 100644
index 235ba67e..00000000
--- a/node_modules/postcss-custom-properties/dist/is-processable-rule.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import type { Rule } from 'postcss';
-export declare function isProcessableRule(rule: Rule): boolean;
-export declare const HTML_SELECTOR_REGEXP: RegExp;
-export declare const HTML_WHERE_SELECTOR_REGEXP: RegExp;
-export declare const ROOT_SELECTOR_REGEXP: RegExp;
-export declare const ROOT_WHERE_SELECTOR_REGEXP: RegExp;
-export declare const MAYBE_HTML_OR_ROOT_RULE_REGEXP: RegExp;
diff --git a/node_modules/postcss-custom-properties/dist/is-var-function.d.ts b/node_modules/postcss-custom-properties/dist/is-var-function.d.ts
deleted file mode 100644
index dd9ad6cc..00000000
--- a/node_modules/postcss-custom-properties/dist/is-var-function.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { FunctionNode, Node } from 'postcss-value-parser';
-export declare function isVarFunction(node: Node): node is FunctionNode;
-export declare const HAS_VAR_FUNCTION: RegExp;
diff --git a/node_modules/postcss-custom-properties/dist/parse-or-cached.d.ts b/node_modules/postcss-custom-properties/dist/parse-or-cached.d.ts
deleted file mode 100644
index c96e7b6c..00000000
--- a/node_modules/postcss-custom-properties/dist/parse-or-cached.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import valuesParser from 'postcss-value-parser';
-export declare function parseOrCached(value: string, parsedValuesCache: Map<string, valuesParser.ParsedValue>): valuesParser.ParsedValue;
diff --git a/node_modules/postcss-custom-properties/dist/toposort.d.ts b/node_modules/postcss-custom-properties/dist/toposort.d.ts
deleted file mode 100644
index ffb196fd..00000000
--- a/node_modules/postcss-custom-properties/dist/toposort.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare function removeCyclicReferences(nodes: Map<string, unknown>, edges: Array<Array<string>>): Set<string>;
diff --git a/node_modules/postcss-custom-properties/dist/transform-properties.d.ts b/node_modules/postcss-custom-properties/dist/transform-properties.d.ts
deleted file mode 100644
index da417cbd..00000000
--- a/node_modules/postcss-custom-properties/dist/transform-properties.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import valuesParser from 'postcss-value-parser';
-import type { Declaration } from 'postcss';
-export declare function transformProperties(decl: Declaration, customProperties: Map<string, valuesParser.ParsedValue>, localCustomProperties: Map<string, valuesParser.ParsedValue>, parsedValuesCache: Map<string, valuesParser.ParsedValue>, opts: {
- preserve?: boolean;
-}): void;
diff --git a/node_modules/postcss-custom-properties/dist/transform-value-ast.d.ts b/node_modules/postcss-custom-properties/dist/transform-value-ast.d.ts
deleted file mode 100644
index 91a52d18..00000000
--- a/node_modules/postcss-custom-properties/dist/transform-value-ast.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import valuesParser from 'postcss-value-parser';
-export default function transformValueAST(root: valuesParser.ParsedValue, customProperties: Map<string, valuesParser.ParsedValue>, localCustomProperties: Map<string, valuesParser.ParsedValue>): string;
diff --git a/node_modules/postcss-custom-properties/package.json b/node_modules/postcss-custom-properties/package.json
index 99bd789b..d43febdd 100644
--- a/node_modules/postcss-custom-properties/package.json
+++ b/node_modules/postcss-custom-properties/package.json
@@ -1,7 +1,7 @@
{
"name": "postcss-custom-properties",
"description": "Use Custom Properties Queries in CSS",
- "version": "13.3.2",
+ "version": "13.3.3",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"contributors": [
"Maxime Thirouin"
@@ -20,15 +20,18 @@
"engines": {
"node": "^14 || ^16 || >=18"
},
+ "type": "module",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
"exports": {
".": {
- "types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.cjs",
- "default": "./dist/index.mjs"
+ "import": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.mjs"
+ },
+ "require": {
+ "default": "./dist/index.cjs"
+ }
}
},
"files": [
@@ -39,26 +42,14 @@
"index.d.ts"
],
"dependencies": {
- "@csstools/cascade-layer-name-parser": "^1.0.5",
- "@csstools/css-parser-algorithms": "^2.3.2",
- "@csstools/css-tokenizer": "^2.2.1",
+ "@csstools/cascade-layer-name-parser": "^1.0.6",
+ "@csstools/css-parser-algorithms": "^2.4.0",
+ "@csstools/css-tokenizer": "^2.2.2",
"postcss-value-parser": "^4.2.0"
},
"peerDependencies": {
"postcss": "^8.4"
},
- "devDependencies": {
- "@csstools/postcss-bundler": "^1.0.3",
- "@csstools/postcss-tape": "*"
- },
- "scripts": {
- "build": "rollup -c ../../rollup/default.mjs",
- "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs",
- "lint": "node ../../.github/bin/format-package-json.mjs",
- "prepublishOnly": "npm run build && npm run test",
- "test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs",
- "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
- },
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-properties#readme",
"repository": {
"type": "git",
@@ -78,15 +69,5 @@
"variables",
"vars",
"w3c"
- ],
- "csstools": {
- "assumesToProcessBundledCSS": true,
- "cssdbId": "custom-properties",
- "exportName": "postcssCustomProperties",
- "humanReadableName": "PostCSS Custom Properties",
- "specUrl": "https://www.w3.org/TR/css-variables-1/"
- },
- "volta": {
- "extends": "../../package.json"
- }
+ ]
}