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