@navecss/core 0.2.0 → 0.4.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.
package/dist/postcss.js CHANGED
@@ -1,314 +1,308 @@
1
- import { atoms } from './chunk-BVON7XKC.js';
1
+ import { resolveExtendSpecifier, applyExtendModule } from './chunk-NKUZNRF4.js';
2
+ import { snapshotExtendMap, walkExtendAtoms, foldLocated, anchorSelectorList, plan, WORKAROUND_GROUP_AT_RULE_NAMES } from './chunk-LADFXRWQ.js';
3
+ import { tokenize } from './chunk-NFS2REPQ.js';
4
+ import { formatDiagnostic } from './chunk-SYNQJNVB.js';
5
+ import './chunk-CUL5PLPI.js';
6
+ import './chunk-GZL2VW7C.js';
2
7
  import postcss from 'postcss';
3
8
 
4
- // src/selector-utils.ts
5
- function isCommentClose(text, index, commentStart) {
6
- return text[index] === "/" && text[index - 1] === "*" && index - 1 >= commentStart + 2;
9
+ // src/postcss-nested-builders.ts
10
+ function isNestedNode(node) {
11
+ return node.type === "rule" || node.type === "atrule" && node.name.toLowerCase() !== "nave";
7
12
  }
8
- function isConsumedAsLiteral(state, text, index) {
9
- if (state.commentStart !== void 0) {
10
- if (isCommentClose(text, index, state.commentStart)) state.commentStart = void 0;
11
- return true;
12
- }
13
- if (state.isEscaped) {
14
- state.isEscaped = false;
15
- return true;
16
- }
17
- if (text[index] === "\\") {
18
- state.isEscaped = true;
19
- return true;
13
+ function isFollowingNestedNode(rule, atRule) {
14
+ return rule.nodes.slice(0, rule.index(atRule)).some((node) => isNestedNode(node));
15
+ }
16
+
17
+ // src/postcss-node-utils.ts
18
+ function isInsideKeyframes(container) {
19
+ let node = container;
20
+ while (node) {
21
+ if (node.type === "atrule" && /keyframes$/i.test(node.name)) return true;
22
+ node = node.parent;
20
23
  }
21
- if (!state.quote) return false;
22
- if (text[index] === state.quote) state.quote = void 0;
23
- return true;
24
+ return false;
24
25
  }
25
- function isCodeChar(state, text, index) {
26
- if (isConsumedAsLiteral(state, text, index)) return false;
27
- const char = text[index];
28
- if (char === '"' || char === "'") {
29
- state.quote = char;
26
+ function hasWorkaroundSentence(refusedParent) {
27
+ if (refusedParent.type !== "atrule") return false;
28
+ if (!WORKAROUND_GROUP_AT_RULE_NAMES.has(refusedParent.name.toLowerCase())) {
30
29
  return false;
31
30
  }
32
- if (char === "/" && text[index + 1] === "*") {
33
- state.commentStart = index;
34
- return false;
31
+ if (isInsideKeyframes(refusedParent)) return false;
32
+ let current = refusedParent.parent;
33
+ while (current) {
34
+ if (current.type === "rule") return true;
35
+ current = current.parent;
35
36
  }
36
- return true;
37
+ return false;
38
+ }
39
+ function stampSource(node, source) {
40
+ if (!source) return;
41
+ node.source = source;
42
+ node.walk((child) => {
43
+ child.source = source;
44
+ });
45
+ }
46
+
47
+ // src/postcss-at-rule.ts
48
+ function currentParams(atRule) {
49
+ const raw = atRule.raws.params;
50
+ if (raw?.value === atRule.params) return raw.raw;
51
+ return atRule.params;
37
52
  }
38
- function codeMask(text) {
39
- const state = { quote: void 0, isEscaped: false, commentStart: void 0 };
40
- return Array.from({ length: text.length }, (_, index) => isCodeChar(state, text, index));
53
+ function matchNaveAtRule(atRule) {
54
+ const afterName = atRule.raws.afterName ?? " ";
55
+ const paramsRaw = currentParams(atRule);
56
+ const nameBoundary = 1 + atRule.name.length;
57
+ const full = `@${atRule.name}${afterName}${paramsRaw}`;
58
+ const token = tokenize(full)[0];
59
+ const commonPrelude = { prelude: paramsRaw, preludeStartIndex: nameBoundary + afterName.length };
60
+ if (token?.type !== "at-keyword-token") return { isNave: false, ...commonPrelude };
61
+ const isNave = (token.structured?.value).toLowerCase() === "nave";
62
+ if (token.endIndex === nameBoundary) return { isNave, ...commonPrelude };
63
+ return { isNave, prelude: full.slice(token.endIndex), preludeStartIndex: token.endIndex };
41
64
  }
42
- function splitTopLevel(selectorList) {
43
- const mask = codeMask(selectorList);
44
- const branches = [];
45
- let depth = 0;
46
- let start = 0;
47
- for (const [index, isCode] of mask.entries()) {
48
- if (!isCode) continue;
49
- const char = selectorList[index];
50
- if (char === "(" || char === "[") depth += 1;
51
- else if (char === ")" || char === "]") depth -= 1;
52
- else if (char === "," && depth === 0) {
53
- branches.push(selectorList.slice(start, index));
54
- start = index + 1;
65
+ function atRuleErrorIndex(preludeStartIndex, diagnostic) {
66
+ if (diagnostic.code !== "unknown-atom" && diagnostic.code !== "bad-token") return void 0;
67
+ return preludeStartIndex + diagnostic.offset;
68
+ }
69
+ function reportDiagnostic(diagnostic, ctx, preludeStartIndex) {
70
+ const refusedParent = ctx.atRule.parent;
71
+ const isNestedGroup = diagnostic.code === "bad-parent" && refusedParent !== void 0 && hasWorkaroundSentence(refusedParent);
72
+ const text = formatDiagnostic(
73
+ isNestedGroup ? { ...diagnostic, detail: "nested-group" } : diagnostic,
74
+ {
75
+ extend: ctx.extend
55
76
  }
77
+ );
78
+ const index = atRuleErrorIndex(preludeStartIndex, diagnostic);
79
+ if (ctx.onUnknown === "warn") {
80
+ ctx.atRule.warn(ctx.result, text, index === void 0 ? {} : { index });
81
+ return;
56
82
  }
57
- return [...branches, selectorList.slice(start)];
83
+ if (ctx.onUnknown === "ignore") return;
84
+ ctx.fold.push({ atRule: ctx.atRule, text, index });
58
85
  }
59
- function hasNestingSelector(branch) {
60
- return codeMask(branch).some((isCode, index) => isCode && branch[index] === "&");
86
+ function declNode(atRule, decl) {
87
+ const node = postcss.decl({ prop: decl.prop, value: decl.value });
88
+ if (atRule.source) node.source = atRule.source;
89
+ return node;
61
90
  }
62
- function anchorSelectorList(selectorList) {
63
- return splitTopLevel(selectorList).map((branch) => {
64
- const trimmed = branch.trim();
65
- if (trimmed === "") {
66
- throw new Error(
67
- `anchorSelectorList: empty selector branch in pseudo key "${selectorList}". Remove the stray or trailing comma: an empty branch would otherwise compile to a bare "&", matching the atom unconditionally.`
68
- );
69
- }
70
- return hasNestingSelector(trimmed) ? trimmed : `&${trimmed}`;
71
- }).join(", ");
91
+ function insertDeclarations(atRule, declarations, isWrapped) {
92
+ if (declarations.length === 0) return;
93
+ if (!isWrapped) {
94
+ for (const decl of declarations) atRule.before(declNode(atRule, decl));
95
+ return;
96
+ }
97
+ const wrapper = postcss.rule({ selector: "&" });
98
+ if (atRule.source) wrapper.source = atRule.source;
99
+ for (const decl of declarations) wrapper.append(declNode(atRule, decl));
100
+ atRule.before(wrapper);
72
101
  }
73
-
74
- // src/postcss-nested-builders.ts
75
- var DIRECTIVE = "nave";
76
- function buildNestedRule(selector, decls) {
102
+ function buildRule(selector, declarations) {
77
103
  const rule = postcss.rule({ selector });
78
- for (const [prop, value] of Object.entries(decls)) {
79
- rule.append(postcss.decl({ prop, value }));
80
- }
104
+ for (const decl of declarations) rule.append(postcss.decl({ prop: decl.prop, value: decl.value }));
81
105
  return rule;
82
106
  }
83
- function buildPseudoRules(pseudos) {
84
- return Object.entries(pseudos).map(
85
- ([pseudo, decls]) => buildNestedRule(anchorSelectorList(pseudo), decls)
86
- );
107
+ function buildAppendedNode(block) {
108
+ if (block.kind === "pseudo") return buildRule(block.selector, block.declarations);
109
+ const node = postcss.atRule({ name: block.kind, params: block.condition });
110
+ if (block.declarations.length > 0) node.append(buildRule("&", block.declarations));
111
+ for (const pseudo of block.pseudos) node.append(buildRule(pseudo.selector, pseudo.declarations));
112
+ return node;
87
113
  }
88
- function buildInnerRules(block) {
89
- const rules = [];
90
- if (block.declarations) rules.push(buildNestedRule("&", block.declarations));
91
- if (block.pseudos) rules.push(...buildPseudoRules(block.pseudos));
92
- return rules;
114
+ function throwMalformedAtom(atRule, error) {
115
+ const message = error instanceof Error ? error.message : String(error);
116
+ throw atRule.error(message);
93
117
  }
94
- function buildAtBlock(atName, condition, block) {
95
- const inner = buildInnerRules(block);
96
- if (inner.length === 0) return void 0;
97
- const node = postcss.atRule({ name: atName, params: condition });
98
- for (const rule of inner) node.append(rule);
99
- return node;
118
+ function planAtRule(atRule, extend, prelude) {
119
+ const parent = atRule.parent;
120
+ const isStyleRuleParent = parent?.type === "rule";
121
+ const isFollowingNestedNodeHere = isStyleRuleParent ? isFollowingNestedNode(parent, atRule) : false;
122
+ try {
123
+ return {
124
+ isStyleRuleParent,
125
+ parent,
126
+ result: plan(
127
+ prelude,
128
+ {
129
+ isStyleRuleParent,
130
+ isInsideKeyframes: parent !== void 0 && isInsideKeyframes(parent),
131
+ isFollowingNestedNode: isFollowingNestedNodeHere
132
+ },
133
+ { extend }
134
+ )
135
+ };
136
+ } catch (error) {
137
+ return throwMalformedAtom(atRule, error);
138
+ }
100
139
  }
101
- function buildNested(atom) {
102
- const nodes = [];
103
- if (atom.pseudos) nodes.push(...buildPseudoRules(atom.pseudos));
104
- for (const atName of ["media", "container"]) {
105
- const blocks = atom[atName] ?? {};
106
- for (const [condition, block] of Object.entries(blocks)) {
107
- const node = buildAtBlock(atName, condition, block);
108
- if (node) nodes.push(node);
140
+ function hasBlock(atRule) {
141
+ return atRule.nodes !== void 0;
142
+ }
143
+ function handleAtRule(atRule, ctx) {
144
+ const match = matchNaveAtRule(atRule);
145
+ if (!match.isNave) return;
146
+ const fullCtx = { ...ctx, atRule };
147
+ const {
148
+ isStyleRuleParent,
149
+ parent,
150
+ result: planResult
151
+ } = planAtRule(atRule, ctx.extend, match.prelude);
152
+ for (const diagnostic of planResult.diagnostics) {
153
+ reportDiagnostic(diagnostic, fullCtx, match.preludeStartIndex);
154
+ }
155
+ if (hasBlock(atRule)) {
156
+ reportDiagnostic(
157
+ { code: "has-block", offset: 0, endOffset: atRule.toString().length },
158
+ fullCtx,
159
+ match.preludeStartIndex
160
+ );
161
+ }
162
+ insertDeclarations(atRule, planResult.declarations, planResult.wrapInAmpersand);
163
+ atRule.remove();
164
+ if (isStyleRuleParent && parent) {
165
+ for (const block of planResult.blocks) {
166
+ const node = buildAppendedNode(block);
167
+ stampSource(node, atRule.source);
168
+ parent.append(node);
109
169
  }
110
170
  }
111
- return nodes;
112
171
  }
113
- function isNestedNode(node) {
114
- return node.type === "rule" || node.type === "atrule" && node.name !== DIRECTIVE;
172
+
173
+ // src/postcss-fold.ts
174
+ function positionOf(entry, fallbackLine) {
175
+ if (!entry.atRule.source) return { column: 0, line: fallbackLine };
176
+ return entry.atRule.positionBy(entry.index === void 0 ? {} : { index: entry.index });
115
177
  }
116
- function isFollowingNestedNode(rule, atRule) {
117
- return rule.nodes.slice(0, rule.index(atRule)).some((node) => isNestedNode(node));
178
+ function sortFoldBySourceOrder(entries) {
179
+ return entries.map((entry, originalIndex) => ({ entry, originalIndex })).toSorted((a, b) => {
180
+ const pa = positionOf(a.entry, a.originalIndex);
181
+ const pb = positionOf(b.entry, b.originalIndex);
182
+ return pa.line - pb.line || pa.column - pb.column;
183
+ }).map(({ entry }) => entry);
118
184
  }
119
-
120
- // src/postcss-node-utils.ts
121
- function isInsideKeyframes(rule) {
122
- let node = rule.parent;
123
- while (node) {
124
- if (node.type === "atrule" && /keyframes$/i.test(node.name)) return true;
125
- node = node.parent;
126
- }
127
- return false;
185
+ function foldMessage(entries) {
186
+ return foldLocated(
187
+ entries.map((entry, i) => {
188
+ const position = positionOf(entry, i);
189
+ return { text: entry.text, line: position.line, column: position.column };
190
+ })
191
+ );
128
192
  }
129
- function stampSource(node, source) {
130
- if (!source) return;
131
- node.source = source;
132
- node.walk((child) => {
133
- child.source = source;
134
- });
193
+ function unescapeHtml(text) {
194
+ return text.replaceAll(/\\3c (?=\/?style\b|!--)/gi, "<");
135
195
  }
136
- function isPlainObject(value) {
137
- return typeof value === "object" && value !== null && !Array.isArray(value);
196
+ function compact(text) {
197
+ return text.replaceAll(/\s+/g, "");
138
198
  }
139
- function isDeclarationValid(prop, value) {
199
+ function declarationRefusal(prop, value) {
140
200
  let root;
141
201
  try {
142
202
  root = postcss.parse(`a{${prop}:${value}}`);
143
203
  } catch {
144
- return false;
204
+ return "break-out";
145
205
  }
146
- if (root.nodes.length !== 1) return false;
206
+ if (root.nodes.length !== 1) return "break-out";
147
207
  const rule = root.nodes[0];
148
- if (rule.type !== "rule" || rule.nodes.length !== 1) return false;
208
+ if (rule.type !== "rule" || rule.nodes.length !== 1) return "break-out";
149
209
  const decl = rule.nodes[0];
150
- if (decl.type !== "decl") return false;
151
- return decl.prop === prop && decl.toString() === `${prop}:${value}`.trimEnd();
210
+ if (decl.type !== "decl" || decl.prop !== prop) return "break-out";
211
+ const given = `${prop}:${value}`;
212
+ const written = decl.toString();
213
+ if (written === given.trimEnd()) return void 0;
214
+ return compact(unescapeHtml(written)) === compact(given) ? "rewritten" : "break-out";
152
215
  }
153
- function isPropValid(prop) {
154
- return isDeclarationValid(prop, "0");
216
+ function propRefusal(prop) {
217
+ return declarationRefusal(prop, "0");
155
218
  }
156
- function isSelectorValid(key) {
219
+ function selectorRefusal(key) {
157
220
  let selector;
158
221
  try {
159
222
  selector = anchorSelectorList(key);
160
223
  } catch {
161
- return false;
224
+ return "break-out";
162
225
  }
163
226
  let root;
164
227
  try {
165
228
  root = postcss.parse(`${selector}{}`);
166
229
  } catch {
167
- return false;
230
+ return "break-out";
168
231
  }
169
- if (root.nodes.length !== 1) return false;
232
+ if (root.nodes.length !== 1) return "break-out";
170
233
  const rule = root.nodes[0];
171
- return rule.type === "rule" && rule.selector === selector && rule.nodes.length === 0;
234
+ const isOneEmptyRule = rule.type === "rule" && rule.selector === selector;
235
+ return isOneEmptyRule && rule.nodes.length === 0 ? void 0 : "break-out";
172
236
  }
173
- function isConditionValid(atName, condition) {
237
+ function conditionRefusal(atName, condition) {
174
238
  let root;
175
239
  try {
176
240
  root = postcss.parse(`@${atName} ${condition}{}`);
177
241
  } catch {
178
- return false;
242
+ return "break-out";
179
243
  }
180
- if (root.nodes.length !== 1) return false;
244
+ if (root.nodes.length !== 1) return "break-out";
181
245
  const node = root.nodes[0];
182
- return node.type === "atrule" && node.name === atName && node.params === condition.trim() && (node.nodes?.length ?? 0) === 0;
183
- }
184
- function fail(describedAs, value) {
185
- throw new Error(
186
- `navePlugin({ extend }): ${describedAs} does not parse as a single CSS declaration, selector or condition, and would break out of the rule it is spliced into: ${JSON.stringify(value)}. extend is trusted, consumer-authored code, not sanitised input \u2014 fix the atom definition.`
187
- );
188
- }
189
- function assertDeclarationsSafe(declarations, where) {
190
- if (!isPlainObject(declarations)) return;
191
- for (const [prop, value] of Object.entries(declarations)) {
192
- if (typeof prop === "string" && !isPropValid(prop)) {
193
- fail(`${where}'s declaration property "${prop}"`, prop);
194
- }
195
- if (typeof value === "string" && !isDeclarationValid(prop, value)) {
196
- fail(`${where}'s declaration value for "${prop}"`, value);
197
- }
198
- }
199
- }
200
- function assertPseudosSafe(pseudos, where) {
201
- if (!isPlainObject(pseudos)) return;
202
- for (const [pseudo, declarations] of Object.entries(pseudos)) {
203
- if (!isSelectorValid(pseudo)) fail(`${where}'s pseudo "${pseudo}"`, pseudo);
204
- assertDeclarationsSafe(declarations, `${where}'s pseudo "${pseudo}"`);
205
- }
206
- }
207
- function assertAtBlocksSafe(blocks, atName, where) {
208
- if (!isPlainObject(blocks)) return;
209
- for (const [condition, block] of Object.entries(blocks)) {
210
- if (!isConditionValid(atName, condition))
211
- fail(`${where}'s ${atName} condition "${condition}"`, condition);
212
- if (!isPlainObject(block)) continue;
213
- const blockWhere = `${where}'s ${atName} "${condition}"`;
214
- assertDeclarationsSafe(block.declarations, blockWhere);
215
- assertPseudosSafe(block.pseudos, blockWhere);
246
+ if (node.type !== "atrule" || node.name !== atName || (node.nodes?.length ?? 0) !== 0) {
247
+ return "break-out";
216
248
  }
249
+ if (node.params === condition.trim()) return void 0;
250
+ return compact(node.params) === compact(condition) ? "rewritten" : "break-out";
217
251
  }
218
252
  function validateExtendAtoms(extend) {
219
- for (const [name, atom] of Object.entries(extend)) {
220
- if (!atom) continue;
221
- const where = `atom "${name}"`;
222
- assertDeclarationsSafe(atom.declarations, where);
223
- assertPseudosSafe(atom.pseudos, where);
224
- assertAtBlocksSafe(atom.media, "media", where);
225
- assertAtBlocksSafe(atom.container, "container", where);
226
- }
253
+ walkExtendAtoms(extend, { declarationRefusal, propRefusal, selectorRefusal, conditionRefusal });
227
254
  }
228
255
 
229
256
  // src/postcss.ts
230
- function reportUnknown(msg, ctx) {
231
- const { atRule, onUnknown, result } = ctx;
232
- if (onUnknown === "warn") {
233
- atRule.warn(result, msg);
234
- return;
235
- }
236
- if (onUnknown === "ignore") return;
237
- throw atRule.error(msg);
238
- }
239
- function checkUnknownAtoms(names, validAtomNames, ctx) {
240
- if (names.length === 0) {
241
- reportUnknown("@nave: directive names no atom", ctx);
242
- return;
243
- }
244
- for (const name of names) {
245
- if (validAtomNames.has(name)) continue;
246
- reportUnknown(
247
- `@nave: unknown atom "${name}". Available: ${[...validAtomNames].join(", ")}`,
248
- ctx
249
- );
250
- }
251
- }
252
- function insertDeclarations(atRule, declNodes, isFollowingNested) {
253
- if (declNodes.length === 0) return;
254
- if (!isFollowingNested) {
255
- for (const decl of declNodes) atRule.before(decl);
256
- return;
257
- }
258
- const wrapper = postcss.rule({ selector: "&" });
259
- if (atRule.source) wrapper.source = atRule.source;
260
- for (const decl of declNodes) wrapper.append(decl);
261
- atRule.before(wrapper);
262
- }
263
257
  var navePlugin = (options = {}) => {
264
- const { onUnknown = "error", extend = {} } = options;
265
- validateExtendAtoms(extend);
266
- const allAtoms = { ...atoms, ...extend };
267
- const validAtomNames = new Set(
268
- Object.entries(allAtoms).filter(([, definition]) => definition).map(([name]) => name)
269
- );
258
+ const { onUnknown = "error", extend: extendOption } = options;
259
+ const extendFile = typeof extendOption === "string" ? resolveExtendSpecifier(extendOption) : void 0;
260
+ const staticExtend = typeof extendOption === "object" ? snapshotExtendMap(extendOption) : {};
261
+ validateExtendAtoms(staticExtend);
262
+ const loadCache = /* @__PURE__ */ new Map();
270
263
  return {
271
264
  postcssPlugin: "postcss-nave",
272
- AtRule(atRule, { result }) {
273
- if (atRule.name !== DIRECTIVE) return;
274
- const ctx = { atRule, onUnknown, result };
275
- const parent = atRule.parent;
276
- if (parent?.type !== "rule") {
277
- reportUnknown("@nave must be the direct child of a CSS rule selector block", ctx);
278
- atRule.remove();
279
- return;
280
- }
281
- const rule = parent;
282
- if (isInsideKeyframes(rule)) {
283
- reportUnknown("@nave cannot be used inside @keyframes", ctx);
284
- atRule.remove();
285
- return;
286
- }
287
- const names = atRule.params.trim().split(/\s+/).filter(Boolean);
288
- checkUnknownAtoms(names, validAtomNames, ctx);
289
- const declNodes = [];
290
- const nested = names.flatMap((name) => {
291
- const atom = Object.hasOwn(allAtoms, name) ? allAtoms[name] : void 0;
292
- if (!atom) return [];
293
- if (typeof atom.declarations !== "object" || atom.declarations === null || Array.isArray(atom.declarations)) {
294
- throw atRule.error(`@nave: atom "${name}" is registered without a declarations object`);
295
- }
296
- for (const [prop, value] of Object.entries(atom.declarations)) {
297
- const decl = postcss.decl({ prop, value });
298
- if (atRule.source) decl.source = atRule.source;
299
- declNodes.push(decl);
265
+ // Per-run state lives here, not in the factory closure above: PostCSS
266
+ // calls `prepare(result)` once per `Result`, so two stylesheets sharing
267
+ // one `navePlugin()` instance never share a `fold` or a resolved
268
+ // `extend`, however their async hooks interleave (otherwise one
269
+ // stylesheet's problems, or its loaded `extend`, could leak into another's).
270
+ prepare(result) {
271
+ const fold = [];
272
+ let extend = staticExtend;
273
+ return {
274
+ Once() {
275
+ fold.length = 0;
276
+ if (extendFile === void 0) return;
277
+ result.messages.push({
278
+ type: "dependency",
279
+ plugin: "postcss-nave",
280
+ file: extendFile,
281
+ parent: result.opts.from
282
+ });
283
+ return applyExtendModule(extendFile, loadCache, (value) => {
284
+ const snapshot = snapshotExtendMap(value);
285
+ validateExtendAtoms(snapshot);
286
+ extend = snapshot;
287
+ });
288
+ },
289
+ AtRule(atRule) {
290
+ handleAtRule(atRule, { onUnknown, result, extend, fold });
291
+ },
292
+ OnceExit() {
293
+ if (fold.length === 0) return;
294
+ const ordered = sortFoldBySourceOrder(fold);
295
+ const first = ordered[0];
296
+ throw first.atRule.error(
297
+ foldMessage(ordered),
298
+ first.index === void 0 ? {} : { index: first.index }
299
+ );
300
300
  }
301
- return buildNested(atom);
302
- });
303
- insertDeclarations(atRule, declNodes, isFollowingNestedNode(rule, atRule));
304
- atRule.remove();
305
- for (const node of nested) {
306
- stampSource(node, atRule.source);
307
- rule.append(node);
308
- }
301
+ };
309
302
  }
310
303
  };
311
304
  };
312
305
  navePlugin.postcss = true;
306
+ var postcss_default = navePlugin;
313
307
 
314
- export { navePlugin };
308
+ export { postcss_default as default, navePlugin };