43081j
a8b2c18feb
fix: add Document to result sets and default parser type
...
Fixes #1667
A `Result` can now contain a root which is ` Document`. For example, a
custom syntax may produce a `Document` containing several nested `Root`
stylesheets.
Similarly, the default type parameter of `Parser` has been updated to
include `Document` since custom syntaxes must account for this anyway.
2021-11-16 22:17:34 +00:00
Andrey Sitnik
3261a7ed1d
Export Processor type
2021-11-16 16:43:49 +01:00
Andrey Sitnik and GitHub
2c6777648a
Merge pull request #1582 from hudochenkov/add-document-node-1498
...
Add Document node and related API (#1498 )
2021-05-18 20:46:25 -04:00
Aleks Hudochenkov
eeea51219e
Fix Parser type
2021-05-18 23:48:26 +02:00
Aleks Hudochenkov
a783d6b84d
Fix types
2021-05-17 18:23:00 +02:00
Valentin Semirulnik and Andrey Sitnik
6b07218c74
move from source-map to source-map-js
2021-05-17 08:50:13 -04:00
Aleks Hudochenkov
430ee0d902
Add Document node and related API ( #1498 )
2021-05-16 20:15:56 +02:00
Rouven Weßling
8628ce3a35
Export types for NodeErrorOptions
2021-03-30 12:52:07 +02:00
Niklas Mischkulnig
ad88ece3c5
Cleanup: Typescript
2021-01-07 12:33:44 +01:00
Ludovico Fischer
cc4714d9d9
Change plugin creator type to allow returning a processor.
2020-12-09 21:06:28 +01:00
Andrey Sitnik
4f8122e557
Clean up fromJSON
2020-12-05 19:36:10 -05:00
Niklas Mischkulnig
781e433bdb
Add missing test, linting, typings
2020-12-05 11:07:00 +01:00
Niklas Mischkulnig
ec69e352d9
fromJSON and toJSON
2020-12-05 00:15:24 +01:00
Evan You and GitHub
fcbcbe6054
Expose LazyResult type
2020-11-22 15:36:20 -05:00
Arthur Petrie and GitHub
509e641a60
Add missing "comment" export in types + restructure ( #1448 )
2020-10-23 19:52:33 -04:00
Andrey Sitnik
0d49399d5d
Add Once and OnceExit events
2020-09-25 15:56:19 -04:00
Andrey Sitnik
c20d10df29
Fix visiting parent on nested children changes
2020-09-23 18:47:27 -04:00
Andrey Sitnik
605a045492
Add Processors docs
2020-09-23 17:54:07 -04:00
Andrey Sitnik
62bfcf38f1
Call RootExit on node changes and Exit only once
2020-09-23 17:36:34 -04:00
Pierre-Marie Dartus and GitHub
134e4a0ce2
Add missing Transformer type to processor.d.ts ( #1423 )
2020-09-23 11:51:20 -04:00
Andrey Sitnik
7a631dc459
Add helpers.postcss
2020-08-24 17:30:01 -05:00
Andrey Sitnik
c6d2ab1604
Use RootExit instead of Exit
2020-08-24 00:50:22 -05:00
Andrey Sitnik
ff1541c36d
Add Exit visitor
2020-08-23 18:26:46 -05:00
Andrey Sitnik
ddacc34852
Add Plugin#prepare()
2020-08-22 15:34:57 -05:00
Andrey Sitnik
6a0b8cd0cb
Update plugin API in TypeDoc
2020-08-22 00:09:47 -05:00
Andrey Sitnik
4378401239
Add fast filters for decl props and at-rule names
2020-08-10 22:39:24 -07:00
Andrey Sitnik
a1e95b2eb3
Clean up code
2020-08-10 22:09:59 -07:00
Andrey Sitnik
0feaad71d5
Fix postcss.Classes type
2020-08-07 13:26:34 -07:00
Andrey Sitnik
a539418f45
Use class names in visitor hooks
2020-08-07 12:04:54 -07:00
Andrey Sitnik
15a248c06d
Pass postcss & Result to second argument for visitors
2020-08-07 11:46:58 -07:00
Andrey Sitnik
6fbb0d5434
Change plugin API
2020-08-06 16:00:46 -07:00
Andrey Sitnik
9fd442b941
Export TransformCallback
2020-08-05 16:27:09 -07:00
Andrey Sitnik
6de8e0d706
Add opts.map.absolute
2020-07-20 12:36:30 -07:00
Andrey Sitnik
95cc565a13
Fix types for API website
2020-07-15 23:45:38 -07:00
Andrey Sitnik
f038ae97b1
Show example with named import
2020-07-13 20:11:42 -07:00
Andrey Sitnik
dbc8ee3420
Allow to set function to map.annotation
2020-07-12 22:19:13 -07:00
Andrey Sitnik
389b7b00a9
Export public classes from main entry
2020-07-12 16:31:09 -07:00
Andrey Sitnik
7dc34d61a8
Move Node test to TS
2020-07-10 20:21:53 -07:00
Andrey Sitnik
35ddba0a63
Move PreviousMap test to TS
2020-07-09 23:12:39 -07:00
Andrey Sitnik
1ba2f7afc6
Move Processor test to TS
2020-07-09 22:56:35 -07:00
Andrey Sitnik
aa4188ca99
Move stringify test to TS
2020-07-09 21:21:35 -07:00
Andrey Sitnik
c9eb2807b6
Move Result tests to TS
2020-07-09 21:18:44 -07:00
Andrey Sitnik
981b016135
Update imports
2020-07-09 21:11:51 -07:00
Andrey Sitnik
6d9d64c4c3
Move list tests to TS
2020-07-09 18:37:29 -07:00
Andrey Sitnik
72cea6a6b6
Remove JSDoc links
2020-07-09 18:14:53 -07:00
Andrey Sitnik
8aae507a45
Clean up types and replace JSDoc to TypeDoc
2020-07-08 17:55:13 -07:00
Emmanouil Zoumpoulakis and GitHub
a8edb9292e
Fix: Reads only the last sourceMappingURL in the file ( #1360 )
...
* Fix: Reads only the last sourceMappingURL in the file (which is the only valid)
* Refactor: Create getAnnotationURL() to get the url of the sourceMap match.
* Minor: Rename some variables for better clarity
* Improvement: Add unit test to catch regressions
2020-05-25 20:45:00 -04:00
Natalie Weizenbaum and GitHub
57250d5da2
Further improve type declarations ( #1356 )
...
* Typings: get rid of "| void" return values
These are not very useful, because the "void" half can never be used.
For `next()` and `prev()` this now declares the actual return value,
`undefined`. For `each()` and `walk*()`, this declares different
overloads for callbacks that do or do not return booleans.
* Typings: Node.raw() returns string | undefined
* Container.every() and .some() don't take thisArg
2020-05-11 09:56:06 -04:00
Natalie Weizenbaum and GitHub
13c872c4e0
Improve type annotations for Plugin.process() ( #1353 )
2020-05-01 19:13:13 -04:00
Natalie Weizenbaum and GitHub
5a92d106f4
Update the type annotation for Input.origin ( #1327 )
...
This can return false if no origin is available.
2020-02-17 16:51:20 -05:00