diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
| commit | afa87af01c79a9baa539f2992d32154d2a4739bd (patch) | |
| tree | 92c7416db734270a2fee1d72ee9cc119379ff8e1 /vanilla/node_modules/css-tree/lib/generator/sourceMap.js | |
| parent | 3b927e84d200402281f68181cd4253bc77e5528d (diff) | |
| download | neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.gz neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.bz2 neko-afa87af01c79a9baa539f2992d32154d2a4739bd.zip | |
task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq
Diffstat (limited to 'vanilla/node_modules/css-tree/lib/generator/sourceMap.js')
| -rw-r--r-- | vanilla/node_modules/css-tree/lib/generator/sourceMap.js | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/vanilla/node_modules/css-tree/lib/generator/sourceMap.js b/vanilla/node_modules/css-tree/lib/generator/sourceMap.js deleted file mode 100644 index 0c5ff27..0000000 --- a/vanilla/node_modules/css-tree/lib/generator/sourceMap.js +++ /dev/null @@ -1,92 +0,0 @@ -import { SourceMapGenerator } from 'source-map-js/lib/source-map-generator.js'; - -const trackNodes = new Set(['Atrule', 'Selector', 'Declaration']); - -export function generateSourceMap(handlers) { - const map = new SourceMapGenerator(); - const generated = { - line: 1, - column: 0 - }; - const original = { - line: 0, // should be zero to add first mapping - column: 0 - }; - const activatedGenerated = { - line: 1, - column: 0 - }; - const activatedMapping = { - generated: activatedGenerated - }; - let line = 1; - let column = 0; - let sourceMappingActive = false; - - const origHandlersNode = handlers.node; - handlers.node = function(node) { - if (node.loc && node.loc.start && trackNodes.has(node.type)) { - const nodeLine = node.loc.start.line; - const nodeColumn = node.loc.start.column - 1; - - if (original.line !== nodeLine || - original.column !== nodeColumn) { - original.line = nodeLine; - original.column = nodeColumn; - - generated.line = line; - generated.column = column; - - if (sourceMappingActive) { - sourceMappingActive = false; - if (generated.line !== activatedGenerated.line || - generated.column !== activatedGenerated.column) { - map.addMapping(activatedMapping); - } - } - - sourceMappingActive = true; - map.addMapping({ - source: node.loc.source, - original, - generated - }); - } - } - - origHandlersNode.call(this, node); - - if (sourceMappingActive && trackNodes.has(node.type)) { - activatedGenerated.line = line; - activatedGenerated.column = column; - } - }; - - const origHandlersEmit = handlers.emit; - handlers.emit = function(value, type, auto) { - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) === 10) { // \n - line++; - column = 0; - } else { - column++; - } - } - - origHandlersEmit(value, type, auto); - }; - - const origHandlersResult = handlers.result; - handlers.result = function() { - if (sourceMappingActive) { - map.addMapping(activatedMapping); - } - - return { - css: origHandlersResult(), - map - }; - }; - - return handlers; -}; |
