ð©âð Level: Beginner
patternplate
provides a powerful search engine on top of your component library.
Access the search panel by clicking on the ð icon in the bottom right corner of the interface.
Search may also be invoked by the shortcut Control + Option + Space
.
By default patternplate will perform a fuzzy search over all fields and content that accounts for minor typos.
E.g. buton
will yield a result list that contains the Button pattern.
Structured search complements fuzzy search with more fine grained control.
You can enter in a format of [key]=[value]
, e.g. version=1.0.0
has the
key version
and a value 1.0.0
.
with a flag of
value
flag
queries are useful to find groups of patterns that
do / do not satisfy stability requirements.
 Value | Order | Description |
---|---|---|
alpha |
0 | Default. First draft |
beta |
1 | Reviews conducted |
rc |
2 | API consent reached |
stable |
3 | API has stabilized |
deprecated |
0 | Â Flagged for removal. Do not use. |
When using a quantitive operator (>
, >=
, <
, <=
) the
order is used to determine what larger/smaller than means
according to
alpha (0) = deprecated (0) < alpha (1) < beta (1) < rc (2) < stable (3)
Examples
beta
with a type of
value
is
queries are useful to limit other queries to either pattern
or doc
items.
 Value | Description |
---|---|
pattern |
Software componens matched via config.entry |
doc |
Documenation items matched via config.docs |
Examples
has
property
ofvalue
has
queries find items that have defined qualities
attached to them.
 Value | Description |
---|---|
docs |
Documentation attched via a colocated md file |
flag |
Stability flag specified via manifest JSON |
version |
Semantic version specified via manifest JSON |
description |
Short description provided via manifest JSON |
displayName |
Display name for patternplate configured via manifest JSON |
tags |
A non-empty list of tags is attached via manifest JSON |
Examples
has a tag of
value
tags
queries match items if they have a tag of value
attached.
Examples
has a version satisfying
value
version
queries find items that match given semver
ranges
Examples
is located at
path
Supports the special match operator: *=
for glob matching
Examples
Search queries can be filtered AND
, expanded OR
and grouped ()
with logical operators.
Examples
with a flag
of beta if not tagged as Widget
(version<=1 OR flag!=stable) AND is=pattern
with version greator or equal 1.0.0
or a flag other than stable, if it is a pattern.