…and create `useLegacyTreeSitter` for those who want to opt into the previous default behavior.
(Legacy Tree-sitter grammars will soon be removed, but this is a step toward that future!)
…for new CSS tree-sitter grammar.
This is not perfect, but it's ∞% better than the old tree-sitter CSS grammar,
for which `autocomplete-css` never worked.
Don't want those implicit values showing in the middle of suggested
auto-completions! Only at the end!
Return an empty array instead of the implicit values where needed,
if recursing.
Avoid appending the implicit values multiple times / in multiple
spots in the values list per property.
(These duplicate implicit values would be deduped, but the middle ones
would be the ones that would be kept, whereas we want to only keep
the bottom ones.)
---
Details:
The function that adds the implicit values to each property is
recursed sometimes, based on the structure of the data we are
ingesting. For the deeper/innner calls of this function, avoid
appending the implicit values, since we will be doing that at the end
of the outer/upper calls.
Makes sure the implicit values are not added in the middle *and* at
the bottom, in which scenario they would eventually be deduped
(removing the bottom copy, I suppose), but leaving one copy of the
implicit values smack-dab in the middle of the values list for the
given property.
We want only one copy of these values, sure, so deduping is
appreciated, but they should be *at the bottom* of the list of values.
Not the middle. So we gotta make sure the only copy fed through the
deduper function is the one at the bottom.
(This commit should just be re-arranging the values,
so as to put the implicit ones last.)
These implicit values are the same for all properties.
I find it more useful to view the property-specific values first,
since users may not actually know what property-specific values exist
for a given CSS property, and these implicit values are *always*
allowed... (I think they are, anyway).
This shows those property-specific values first, better advertising
what options are actually available to use. (Besides that, as far as I
know, the implicit "inherit", "initial", "unset" values are not as
commonly used as the property-specific values anyway.)
`update.js` now will not overwrite any duplicated property entries. In the case of duplication found will write only the one with the most values.
Additionally values are now dedupe prior to adding.
Finally we now support Non-Terminal Data Types in CSS Value Definition Syntax, allowing us to resolve values when the value group refers to another property