@ngrok/mantle 0.93.7 → 0.94.1
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/README.md +11 -2
- package/dist/accordion.d.ts +73 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1234 -84
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
- package/dist/alert-center.d.ts +67 -55
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +35 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +6 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +17 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +33 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +153 -97
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +36 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +19 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +155 -100
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +47 -36
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CZfkNw5A.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.d.ts +8 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
- package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
- package/dist/button.d.ts +9 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +8 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +7 -2
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +34 -23
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BLCqzt56.js +1 -0
- package/dist/chart-CChZiCrt.js +1 -0
- package/dist/chart-CUmSu9d7.js +1 -0
- package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +15 -2
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
- package/dist/choice.d.ts +6 -1
- package/dist/choice.js +1 -1
- package/dist/code-BPKNY1_w.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
- package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
- package/dist/code-block.d.ts +28 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +6 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +16 -3
- package/dist/code.js +1 -1
- package/dist/color-CHZbU1Ww.js +1 -0
- package/dist/color.js +1 -1
- package/dist/combobox.d.ts +42 -28
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +59 -47
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
- package/dist/cx.d.ts +4 -4
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +83 -52
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +13 -2
- package/dist/description-list.js +1 -1
- package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
- package/dist/dialog-CbEEA0fl.d.ts +32 -0
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +6 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +53 -42
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +11 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +35 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +25 -14
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
- package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
- package/dist/icon-xb7d9M7X.js +1 -0
- package/dist/icon.d.ts +8 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DEDCLZ8B.js +1 -0
- package/dist/icons-DXadFwpo.js +1 -0
- package/dist/icons-DcesO4Ng.js +1 -0
- package/dist/icons.d.ts +13 -1
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
- package/dist/input-BjCDSOPA.js +1 -0
- package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +37 -5
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +17 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
- package/dist/label.d.ts +6 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DL4yclOu.js +1 -0
- package/dist/layer-container.d.ts +2 -2
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +147 -90
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +34 -16
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +15 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +82 -79
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +13 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +133 -88
- package/dist/media-object.d.ts +16 -4
- package/dist/media-object.js +1 -1
- package/dist/migrations/0014-chart-named-colors.yml +1389 -0
- package/dist/migrations/0015-segmented-control.yml +788 -0
- package/dist/multi-select.d.ts +42 -29
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +20 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +93 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +7 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +28 -11
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +11 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +9 -4
- package/dist/query.js +1 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +21 -100
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +43 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.d.ts +8 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +137 -76
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +136 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
- package/dist/select.d.ts +6 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +29 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +6 -1
- package/dist/separator.js +1 -1
- package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
- package/dist/sheet-DHy_vlme.js +1 -0
- package/dist/sheet.d.ts +36 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +53 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +15 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +12 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +11 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
- package/dist/slot.d.ts +6 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +20 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +35 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +14 -2
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
- package/dist/table.d.ts +6 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +24 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +12 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +18 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +25 -11
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +15 -2
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3261 -0
- package/dist/tokens.json +4933 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +28 -14
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
- package/dist/use-callback-ref-DiOXFQzM.js +1 -0
- package/dist/use-composed-refs-DPYmLDSe.js +1 -0
- package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
- package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
- package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
- package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
- package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +14 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +7 -2
- package/dist/well.js +1 -1
- package/package.json +21 -7
- package/src/components/chart/d3-license.md +25 -0
- package/dist/alert-P9lwn25X.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-B8k98Pby.js +0 -1
- package/dist/button-Dge0D5bl.js +0 -1
- package/dist/chart-BpWfQAwf.js +0 -2
- package/dist/checkbox-DmSQXs26.js +0 -1
- package/dist/choice-2Lrv8_nl.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-7TUgiSzX.js +0 -1
- package/dist/dialog-Dp0QGWwo.d.ts +0 -28
- package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/icons-DP3lQw5O.js +0 -1
- package/dist/input-CpQ6jlpI.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-nHqqYS7e.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-RFRIQxU2.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-C96V8SXi.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-HDVxTNPi.js +0 -1
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-CAAYk4Yj.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-CSJc_sB4.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-C-glc5Q-.js +0 -1
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
|
@@ -0,0 +1,1389 @@
|
|
|
1
|
+
# Every rule binds the local name of a chart family's import from its
|
|
2
|
+
# `@ngrok/mantle/<chart>` subpath, so an aliased import matches and another
|
|
3
|
+
# library's `color` prop does not.
|
|
4
|
+
id: chart-color-token
|
|
5
|
+
language: tsx
|
|
6
|
+
message: a series names its color, so chart-1 through chart-8 become color names and chart-other becomes neutral
|
|
7
|
+
utils:
|
|
8
|
+
# A node that opens a lexical scope. The shadow search below stops at a
|
|
9
|
+
# nested one, so a sibling function's local name does not count.
|
|
10
|
+
scope:
|
|
11
|
+
any:
|
|
12
|
+
- kind: statement_block
|
|
13
|
+
- kind: function_declaration
|
|
14
|
+
- kind: generator_function_declaration
|
|
15
|
+
- kind: function_expression
|
|
16
|
+
- kind: generator_function
|
|
17
|
+
- kind: arrow_function
|
|
18
|
+
- kind: method_definition
|
|
19
|
+
- kind: class_body
|
|
20
|
+
- kind: for_statement
|
|
21
|
+
- kind: for_in_statement
|
|
22
|
+
- kind: catch_clause
|
|
23
|
+
# An identifier in a binding position: a parameter, a destructured name, a
|
|
24
|
+
# local variable, a function name, or a class name.
|
|
25
|
+
binding-name:
|
|
26
|
+
any:
|
|
27
|
+
- kind: shorthand_property_identifier_pattern
|
|
28
|
+
- kind: identifier
|
|
29
|
+
any:
|
|
30
|
+
- inside: { kind: variable_declarator, field: name }
|
|
31
|
+
- inside: { kind: function_declaration, field: name }
|
|
32
|
+
- inside: { kind: generator_function_declaration, field: name }
|
|
33
|
+
- inside: { kind: function_expression, field: name }
|
|
34
|
+
- inside: { kind: required_parameter, field: pattern }
|
|
35
|
+
- inside: { kind: optional_parameter, field: pattern }
|
|
36
|
+
- inside: { kind: assignment_pattern, field: left }
|
|
37
|
+
- inside: { kind: pair_pattern, field: value }
|
|
38
|
+
- inside: { kind: array_pattern }
|
|
39
|
+
- inside: { kind: rest_pattern }
|
|
40
|
+
- inside: { kind: arrow_function, field: parameter }
|
|
41
|
+
- inside: { kind: catch_clause, field: parameter }
|
|
42
|
+
- kind: type_identifier
|
|
43
|
+
inside: { kind: class_declaration, field: name }
|
|
44
|
+
# A function declaration opens a scope, so the search above stops at it and
|
|
45
|
+
# never reads its name. This matches the declaration itself instead.
|
|
46
|
+
function-declaration:
|
|
47
|
+
any:
|
|
48
|
+
- kind: function_declaration
|
|
49
|
+
- kind: generator_function_declaration
|
|
50
|
+
linechart-import:
|
|
51
|
+
kind: import_statement
|
|
52
|
+
all:
|
|
53
|
+
- has:
|
|
54
|
+
field: source
|
|
55
|
+
regex: ^["']@ngrok/mantle/line-chart["']$
|
|
56
|
+
- has:
|
|
57
|
+
stopBy: end
|
|
58
|
+
kind: import_specifier
|
|
59
|
+
has:
|
|
60
|
+
field: name
|
|
61
|
+
regex: ^LineChart$
|
|
62
|
+
any:
|
|
63
|
+
- kind: import_specifier
|
|
64
|
+
has:
|
|
65
|
+
field: alias
|
|
66
|
+
pattern: $LINE
|
|
67
|
+
- kind: import_specifier
|
|
68
|
+
not:
|
|
69
|
+
has:
|
|
70
|
+
field: alias
|
|
71
|
+
kind: identifier
|
|
72
|
+
has:
|
|
73
|
+
field: name
|
|
74
|
+
pattern: $LINE
|
|
75
|
+
barchart-import:
|
|
76
|
+
kind: import_statement
|
|
77
|
+
all:
|
|
78
|
+
- has:
|
|
79
|
+
field: source
|
|
80
|
+
regex: ^["']@ngrok/mantle/bar-chart["']$
|
|
81
|
+
- has:
|
|
82
|
+
stopBy: end
|
|
83
|
+
kind: import_specifier
|
|
84
|
+
has:
|
|
85
|
+
field: name
|
|
86
|
+
regex: ^BarChart$
|
|
87
|
+
any:
|
|
88
|
+
- kind: import_specifier
|
|
89
|
+
has:
|
|
90
|
+
field: alias
|
|
91
|
+
pattern: $BAR
|
|
92
|
+
- kind: import_specifier
|
|
93
|
+
not:
|
|
94
|
+
has:
|
|
95
|
+
field: alias
|
|
96
|
+
kind: identifier
|
|
97
|
+
has:
|
|
98
|
+
field: name
|
|
99
|
+
pattern: $BAR
|
|
100
|
+
areachart-import:
|
|
101
|
+
kind: import_statement
|
|
102
|
+
all:
|
|
103
|
+
- has:
|
|
104
|
+
field: source
|
|
105
|
+
regex: ^["']@ngrok/mantle/area-chart["']$
|
|
106
|
+
- has:
|
|
107
|
+
stopBy: end
|
|
108
|
+
kind: import_specifier
|
|
109
|
+
has:
|
|
110
|
+
field: name
|
|
111
|
+
regex: ^AreaChart$
|
|
112
|
+
any:
|
|
113
|
+
- kind: import_specifier
|
|
114
|
+
has:
|
|
115
|
+
field: alias
|
|
116
|
+
pattern: $AREA
|
|
117
|
+
- kind: import_specifier
|
|
118
|
+
not:
|
|
119
|
+
has:
|
|
120
|
+
field: alias
|
|
121
|
+
kind: identifier
|
|
122
|
+
has:
|
|
123
|
+
field: name
|
|
124
|
+
pattern: $AREA
|
|
125
|
+
scatterplot-import:
|
|
126
|
+
kind: import_statement
|
|
127
|
+
all:
|
|
128
|
+
- has:
|
|
129
|
+
field: source
|
|
130
|
+
regex: ^["']@ngrok/mantle/scatter-plot["']$
|
|
131
|
+
- has:
|
|
132
|
+
stopBy: end
|
|
133
|
+
kind: import_specifier
|
|
134
|
+
has:
|
|
135
|
+
field: name
|
|
136
|
+
regex: ^ScatterPlot$
|
|
137
|
+
any:
|
|
138
|
+
- kind: import_specifier
|
|
139
|
+
has:
|
|
140
|
+
field: alias
|
|
141
|
+
pattern: $SCATTER
|
|
142
|
+
- kind: import_specifier
|
|
143
|
+
not:
|
|
144
|
+
has:
|
|
145
|
+
field: alias
|
|
146
|
+
kind: identifier
|
|
147
|
+
has:
|
|
148
|
+
field: name
|
|
149
|
+
pattern: $SCATTER
|
|
150
|
+
# A part that takes a color (Line, Bar, Area, Point, or ReferenceLine) on the name
|
|
151
|
+
# the family's import binds.
|
|
152
|
+
color-part:
|
|
153
|
+
any:
|
|
154
|
+
- kind: jsx_opening_element
|
|
155
|
+
- kind: jsx_self_closing_element
|
|
156
|
+
has:
|
|
157
|
+
field: name
|
|
158
|
+
kind: member_expression
|
|
159
|
+
any:
|
|
160
|
+
- all:
|
|
161
|
+
- has:
|
|
162
|
+
field: object
|
|
163
|
+
pattern: $LINE
|
|
164
|
+
- has:
|
|
165
|
+
field: property
|
|
166
|
+
regex: ^(?:Line|ReferenceLine)$
|
|
167
|
+
- inside:
|
|
168
|
+
stopBy: end
|
|
169
|
+
kind: program
|
|
170
|
+
has:
|
|
171
|
+
matches: linechart-import
|
|
172
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
173
|
+
# rules cannot tell which binding the element reads.
|
|
174
|
+
- not:
|
|
175
|
+
inside:
|
|
176
|
+
stopBy: end
|
|
177
|
+
matches: scope
|
|
178
|
+
has:
|
|
179
|
+
stopBy:
|
|
180
|
+
matches: scope
|
|
181
|
+
any:
|
|
182
|
+
- matches: binding-name
|
|
183
|
+
pattern: $LINE
|
|
184
|
+
- matches: function-declaration
|
|
185
|
+
has:
|
|
186
|
+
field: name
|
|
187
|
+
pattern: $LINE
|
|
188
|
+
- all:
|
|
189
|
+
- has:
|
|
190
|
+
field: object
|
|
191
|
+
pattern: $BAR
|
|
192
|
+
- has:
|
|
193
|
+
field: property
|
|
194
|
+
regex: ^(?:Bar|ReferenceLine)$
|
|
195
|
+
- inside:
|
|
196
|
+
stopBy: end
|
|
197
|
+
kind: program
|
|
198
|
+
has:
|
|
199
|
+
matches: barchart-import
|
|
200
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
201
|
+
# rules cannot tell which binding the element reads.
|
|
202
|
+
- not:
|
|
203
|
+
inside:
|
|
204
|
+
stopBy: end
|
|
205
|
+
matches: scope
|
|
206
|
+
has:
|
|
207
|
+
stopBy:
|
|
208
|
+
matches: scope
|
|
209
|
+
any:
|
|
210
|
+
- matches: binding-name
|
|
211
|
+
pattern: $BAR
|
|
212
|
+
- matches: function-declaration
|
|
213
|
+
has:
|
|
214
|
+
field: name
|
|
215
|
+
pattern: $BAR
|
|
216
|
+
- all:
|
|
217
|
+
- has:
|
|
218
|
+
field: object
|
|
219
|
+
pattern: $AREA
|
|
220
|
+
- has:
|
|
221
|
+
field: property
|
|
222
|
+
regex: ^(?:Area|ReferenceLine)$
|
|
223
|
+
- inside:
|
|
224
|
+
stopBy: end
|
|
225
|
+
kind: program
|
|
226
|
+
has:
|
|
227
|
+
matches: areachart-import
|
|
228
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
229
|
+
# rules cannot tell which binding the element reads.
|
|
230
|
+
- not:
|
|
231
|
+
inside:
|
|
232
|
+
stopBy: end
|
|
233
|
+
matches: scope
|
|
234
|
+
has:
|
|
235
|
+
stopBy:
|
|
236
|
+
matches: scope
|
|
237
|
+
any:
|
|
238
|
+
- matches: binding-name
|
|
239
|
+
pattern: $AREA
|
|
240
|
+
- matches: function-declaration
|
|
241
|
+
has:
|
|
242
|
+
field: name
|
|
243
|
+
pattern: $AREA
|
|
244
|
+
- all:
|
|
245
|
+
- has:
|
|
246
|
+
field: object
|
|
247
|
+
pattern: $SCATTER
|
|
248
|
+
- has:
|
|
249
|
+
field: property
|
|
250
|
+
regex: ^(?:Point|ReferenceLine)$
|
|
251
|
+
- inside:
|
|
252
|
+
stopBy: end
|
|
253
|
+
kind: program
|
|
254
|
+
has:
|
|
255
|
+
matches: scatterplot-import
|
|
256
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
257
|
+
# rules cannot tell which binding the element reads.
|
|
258
|
+
- not:
|
|
259
|
+
inside:
|
|
260
|
+
stopBy: end
|
|
261
|
+
matches: scope
|
|
262
|
+
has:
|
|
263
|
+
stopBy:
|
|
264
|
+
matches: scope
|
|
265
|
+
any:
|
|
266
|
+
- matches: binding-name
|
|
267
|
+
pattern: $SCATTER
|
|
268
|
+
- matches: function-declaration
|
|
269
|
+
has:
|
|
270
|
+
field: name
|
|
271
|
+
pattern: $SCATTER
|
|
272
|
+
# The `color` attribute of a color part.
|
|
273
|
+
part-color:
|
|
274
|
+
kind: jsx_attribute
|
|
275
|
+
has:
|
|
276
|
+
kind: property_identifier
|
|
277
|
+
regex: ^color$
|
|
278
|
+
inside:
|
|
279
|
+
matches: color-part
|
|
280
|
+
# A node whose value is the color: the attribute value, its expression, or a
|
|
281
|
+
# branch of a ternary there. A lookup key or a compared operand is not.
|
|
282
|
+
color-value:
|
|
283
|
+
any:
|
|
284
|
+
- inside:
|
|
285
|
+
matches: part-color
|
|
286
|
+
- inside:
|
|
287
|
+
kind: jsx_expression
|
|
288
|
+
inside:
|
|
289
|
+
matches: part-color
|
|
290
|
+
- inside:
|
|
291
|
+
kind: parenthesized_expression
|
|
292
|
+
matches: color-value
|
|
293
|
+
- inside:
|
|
294
|
+
kind: ternary_expression
|
|
295
|
+
field: consequence
|
|
296
|
+
matches: color-value
|
|
297
|
+
- inside:
|
|
298
|
+
kind: ternary_expression
|
|
299
|
+
field: alternative
|
|
300
|
+
matches: color-value
|
|
301
|
+
rule:
|
|
302
|
+
kind: string_fragment
|
|
303
|
+
regex: ^chart-(?:[1-8]|other)$
|
|
304
|
+
pattern: $V
|
|
305
|
+
inside:
|
|
306
|
+
kind: string
|
|
307
|
+
matches: color-value
|
|
308
|
+
transform:
|
|
309
|
+
T1:
|
|
310
|
+
replace:
|
|
311
|
+
source: $V
|
|
312
|
+
replace: ^chart-1$
|
|
313
|
+
by: blue
|
|
314
|
+
T2:
|
|
315
|
+
replace:
|
|
316
|
+
source: $T1
|
|
317
|
+
replace: ^chart-2$
|
|
318
|
+
by: emerald
|
|
319
|
+
T3:
|
|
320
|
+
replace:
|
|
321
|
+
source: $T2
|
|
322
|
+
replace: ^chart-3$
|
|
323
|
+
by: pink
|
|
324
|
+
T4:
|
|
325
|
+
replace:
|
|
326
|
+
source: $T3
|
|
327
|
+
replace: ^chart-4$
|
|
328
|
+
by: orange
|
|
329
|
+
T5:
|
|
330
|
+
replace:
|
|
331
|
+
source: $T4
|
|
332
|
+
replace: ^chart-5$
|
|
333
|
+
by: teal
|
|
334
|
+
T6:
|
|
335
|
+
replace:
|
|
336
|
+
source: $T5
|
|
337
|
+
replace: ^chart-6$
|
|
338
|
+
by: fuchsia
|
|
339
|
+
T7:
|
|
340
|
+
replace:
|
|
341
|
+
source: $T6
|
|
342
|
+
replace: ^chart-7$
|
|
343
|
+
by: violet
|
|
344
|
+
T8:
|
|
345
|
+
replace:
|
|
346
|
+
source: $T7
|
|
347
|
+
replace: ^chart-8$
|
|
348
|
+
by: amber
|
|
349
|
+
T9:
|
|
350
|
+
replace:
|
|
351
|
+
source: $T8
|
|
352
|
+
replace: ^chart-other$
|
|
353
|
+
by: neutral
|
|
354
|
+
fix: $T9
|
|
355
|
+
---
|
|
356
|
+
id: chart-series-slot-with-color
|
|
357
|
+
language: tsx
|
|
358
|
+
message: seriesSlot is gone; the series' own color already names its color
|
|
359
|
+
utils:
|
|
360
|
+
# A node that opens a lexical scope. The shadow search below stops at a
|
|
361
|
+
# nested one, so a sibling function's local name does not count.
|
|
362
|
+
scope:
|
|
363
|
+
any:
|
|
364
|
+
- kind: statement_block
|
|
365
|
+
- kind: function_declaration
|
|
366
|
+
- kind: generator_function_declaration
|
|
367
|
+
- kind: function_expression
|
|
368
|
+
- kind: generator_function
|
|
369
|
+
- kind: arrow_function
|
|
370
|
+
- kind: method_definition
|
|
371
|
+
- kind: class_body
|
|
372
|
+
- kind: for_statement
|
|
373
|
+
- kind: for_in_statement
|
|
374
|
+
- kind: catch_clause
|
|
375
|
+
# An identifier in a binding position: a parameter, a destructured name, a
|
|
376
|
+
# local variable, a function name, or a class name.
|
|
377
|
+
binding-name:
|
|
378
|
+
any:
|
|
379
|
+
- kind: shorthand_property_identifier_pattern
|
|
380
|
+
- kind: identifier
|
|
381
|
+
any:
|
|
382
|
+
- inside: { kind: variable_declarator, field: name }
|
|
383
|
+
- inside: { kind: function_declaration, field: name }
|
|
384
|
+
- inside: { kind: generator_function_declaration, field: name }
|
|
385
|
+
- inside: { kind: function_expression, field: name }
|
|
386
|
+
- inside: { kind: required_parameter, field: pattern }
|
|
387
|
+
- inside: { kind: optional_parameter, field: pattern }
|
|
388
|
+
- inside: { kind: assignment_pattern, field: left }
|
|
389
|
+
- inside: { kind: pair_pattern, field: value }
|
|
390
|
+
- inside: { kind: array_pattern }
|
|
391
|
+
- inside: { kind: rest_pattern }
|
|
392
|
+
- inside: { kind: arrow_function, field: parameter }
|
|
393
|
+
- inside: { kind: catch_clause, field: parameter }
|
|
394
|
+
- kind: type_identifier
|
|
395
|
+
inside: { kind: class_declaration, field: name }
|
|
396
|
+
# A function declaration opens a scope, so the search above stops at it and
|
|
397
|
+
# never reads its name. This matches the declaration itself instead.
|
|
398
|
+
function-declaration:
|
|
399
|
+
any:
|
|
400
|
+
- kind: function_declaration
|
|
401
|
+
- kind: generator_function_declaration
|
|
402
|
+
linechart-import:
|
|
403
|
+
kind: import_statement
|
|
404
|
+
all:
|
|
405
|
+
- has:
|
|
406
|
+
field: source
|
|
407
|
+
regex: ^["']@ngrok/mantle/line-chart["']$
|
|
408
|
+
- has:
|
|
409
|
+
stopBy: end
|
|
410
|
+
kind: import_specifier
|
|
411
|
+
has:
|
|
412
|
+
field: name
|
|
413
|
+
regex: ^LineChart$
|
|
414
|
+
any:
|
|
415
|
+
- kind: import_specifier
|
|
416
|
+
has:
|
|
417
|
+
field: alias
|
|
418
|
+
pattern: $LINE
|
|
419
|
+
- kind: import_specifier
|
|
420
|
+
not:
|
|
421
|
+
has:
|
|
422
|
+
field: alias
|
|
423
|
+
kind: identifier
|
|
424
|
+
has:
|
|
425
|
+
field: name
|
|
426
|
+
pattern: $LINE
|
|
427
|
+
barchart-import:
|
|
428
|
+
kind: import_statement
|
|
429
|
+
all:
|
|
430
|
+
- has:
|
|
431
|
+
field: source
|
|
432
|
+
regex: ^["']@ngrok/mantle/bar-chart["']$
|
|
433
|
+
- has:
|
|
434
|
+
stopBy: end
|
|
435
|
+
kind: import_specifier
|
|
436
|
+
has:
|
|
437
|
+
field: name
|
|
438
|
+
regex: ^BarChart$
|
|
439
|
+
any:
|
|
440
|
+
- kind: import_specifier
|
|
441
|
+
has:
|
|
442
|
+
field: alias
|
|
443
|
+
pattern: $BAR
|
|
444
|
+
- kind: import_specifier
|
|
445
|
+
not:
|
|
446
|
+
has:
|
|
447
|
+
field: alias
|
|
448
|
+
kind: identifier
|
|
449
|
+
has:
|
|
450
|
+
field: name
|
|
451
|
+
pattern: $BAR
|
|
452
|
+
areachart-import:
|
|
453
|
+
kind: import_statement
|
|
454
|
+
all:
|
|
455
|
+
- has:
|
|
456
|
+
field: source
|
|
457
|
+
regex: ^["']@ngrok/mantle/area-chart["']$
|
|
458
|
+
- has:
|
|
459
|
+
stopBy: end
|
|
460
|
+
kind: import_specifier
|
|
461
|
+
has:
|
|
462
|
+
field: name
|
|
463
|
+
regex: ^AreaChart$
|
|
464
|
+
any:
|
|
465
|
+
- kind: import_specifier
|
|
466
|
+
has:
|
|
467
|
+
field: alias
|
|
468
|
+
pattern: $AREA
|
|
469
|
+
- kind: import_specifier
|
|
470
|
+
not:
|
|
471
|
+
has:
|
|
472
|
+
field: alias
|
|
473
|
+
kind: identifier
|
|
474
|
+
has:
|
|
475
|
+
field: name
|
|
476
|
+
pattern: $AREA
|
|
477
|
+
scatterplot-import:
|
|
478
|
+
kind: import_statement
|
|
479
|
+
all:
|
|
480
|
+
- has:
|
|
481
|
+
field: source
|
|
482
|
+
regex: ^["']@ngrok/mantle/scatter-plot["']$
|
|
483
|
+
- has:
|
|
484
|
+
stopBy: end
|
|
485
|
+
kind: import_specifier
|
|
486
|
+
has:
|
|
487
|
+
field: name
|
|
488
|
+
regex: ^ScatterPlot$
|
|
489
|
+
any:
|
|
490
|
+
- kind: import_specifier
|
|
491
|
+
has:
|
|
492
|
+
field: alias
|
|
493
|
+
pattern: $SCATTER
|
|
494
|
+
- kind: import_specifier
|
|
495
|
+
not:
|
|
496
|
+
has:
|
|
497
|
+
field: alias
|
|
498
|
+
kind: identifier
|
|
499
|
+
has:
|
|
500
|
+
field: name
|
|
501
|
+
pattern: $SCATTER
|
|
502
|
+
# A series part of a chart family: Line, Bar, Area, or Point on the name
|
|
503
|
+
# the family's import binds.
|
|
504
|
+
series-part:
|
|
505
|
+
any:
|
|
506
|
+
- kind: jsx_opening_element
|
|
507
|
+
- kind: jsx_self_closing_element
|
|
508
|
+
has:
|
|
509
|
+
field: name
|
|
510
|
+
kind: member_expression
|
|
511
|
+
any:
|
|
512
|
+
- all:
|
|
513
|
+
- has:
|
|
514
|
+
field: object
|
|
515
|
+
pattern: $LINE
|
|
516
|
+
- has:
|
|
517
|
+
field: property
|
|
518
|
+
regex: ^Line$
|
|
519
|
+
- inside:
|
|
520
|
+
stopBy: end
|
|
521
|
+
kind: program
|
|
522
|
+
has:
|
|
523
|
+
matches: linechart-import
|
|
524
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
525
|
+
# rules cannot tell which binding the element reads.
|
|
526
|
+
- not:
|
|
527
|
+
inside:
|
|
528
|
+
stopBy: end
|
|
529
|
+
matches: scope
|
|
530
|
+
has:
|
|
531
|
+
stopBy:
|
|
532
|
+
matches: scope
|
|
533
|
+
any:
|
|
534
|
+
- matches: binding-name
|
|
535
|
+
pattern: $LINE
|
|
536
|
+
- matches: function-declaration
|
|
537
|
+
has:
|
|
538
|
+
field: name
|
|
539
|
+
pattern: $LINE
|
|
540
|
+
- all:
|
|
541
|
+
- has:
|
|
542
|
+
field: object
|
|
543
|
+
pattern: $BAR
|
|
544
|
+
- has:
|
|
545
|
+
field: property
|
|
546
|
+
regex: ^Bar$
|
|
547
|
+
- inside:
|
|
548
|
+
stopBy: end
|
|
549
|
+
kind: program
|
|
550
|
+
has:
|
|
551
|
+
matches: barchart-import
|
|
552
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
553
|
+
# rules cannot tell which binding the element reads.
|
|
554
|
+
- not:
|
|
555
|
+
inside:
|
|
556
|
+
stopBy: end
|
|
557
|
+
matches: scope
|
|
558
|
+
has:
|
|
559
|
+
stopBy:
|
|
560
|
+
matches: scope
|
|
561
|
+
any:
|
|
562
|
+
- matches: binding-name
|
|
563
|
+
pattern: $BAR
|
|
564
|
+
- matches: function-declaration
|
|
565
|
+
has:
|
|
566
|
+
field: name
|
|
567
|
+
pattern: $BAR
|
|
568
|
+
- all:
|
|
569
|
+
- has:
|
|
570
|
+
field: object
|
|
571
|
+
pattern: $AREA
|
|
572
|
+
- has:
|
|
573
|
+
field: property
|
|
574
|
+
regex: ^Area$
|
|
575
|
+
- inside:
|
|
576
|
+
stopBy: end
|
|
577
|
+
kind: program
|
|
578
|
+
has:
|
|
579
|
+
matches: areachart-import
|
|
580
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
581
|
+
# rules cannot tell which binding the element reads.
|
|
582
|
+
- not:
|
|
583
|
+
inside:
|
|
584
|
+
stopBy: end
|
|
585
|
+
matches: scope
|
|
586
|
+
has:
|
|
587
|
+
stopBy:
|
|
588
|
+
matches: scope
|
|
589
|
+
any:
|
|
590
|
+
- matches: binding-name
|
|
591
|
+
pattern: $AREA
|
|
592
|
+
- matches: function-declaration
|
|
593
|
+
has:
|
|
594
|
+
field: name
|
|
595
|
+
pattern: $AREA
|
|
596
|
+
- all:
|
|
597
|
+
- has:
|
|
598
|
+
field: object
|
|
599
|
+
pattern: $SCATTER
|
|
600
|
+
- has:
|
|
601
|
+
field: property
|
|
602
|
+
regex: ^Point$
|
|
603
|
+
- inside:
|
|
604
|
+
stopBy: end
|
|
605
|
+
kind: program
|
|
606
|
+
has:
|
|
607
|
+
matches: scatterplot-import
|
|
608
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
609
|
+
# rules cannot tell which binding the element reads.
|
|
610
|
+
- not:
|
|
611
|
+
inside:
|
|
612
|
+
stopBy: end
|
|
613
|
+
matches: scope
|
|
614
|
+
has:
|
|
615
|
+
stopBy:
|
|
616
|
+
matches: scope
|
|
617
|
+
any:
|
|
618
|
+
- matches: binding-name
|
|
619
|
+
pattern: $SCATTER
|
|
620
|
+
- matches: function-declaration
|
|
621
|
+
has:
|
|
622
|
+
field: name
|
|
623
|
+
pattern: $SCATTER
|
|
624
|
+
# The `color` attribute of a series part.
|
|
625
|
+
series-color:
|
|
626
|
+
kind: jsx_attribute
|
|
627
|
+
has:
|
|
628
|
+
kind: property_identifier
|
|
629
|
+
regex: ^color$
|
|
630
|
+
inside:
|
|
631
|
+
matches: series-part
|
|
632
|
+
rule:
|
|
633
|
+
kind: jsx_attribute
|
|
634
|
+
has:
|
|
635
|
+
kind: property_identifier
|
|
636
|
+
regex: ^seriesSlot$
|
|
637
|
+
inside:
|
|
638
|
+
matches: series-part
|
|
639
|
+
has:
|
|
640
|
+
matches: series-color
|
|
641
|
+
fix: ""
|
|
642
|
+
---
|
|
643
|
+
id: chart-series-slot-number
|
|
644
|
+
language: tsx
|
|
645
|
+
message: seriesSlot is gone; a series names its color instead
|
|
646
|
+
utils:
|
|
647
|
+
# A node that opens a lexical scope. The shadow search below stops at a
|
|
648
|
+
# nested one, so a sibling function's local name does not count.
|
|
649
|
+
scope:
|
|
650
|
+
any:
|
|
651
|
+
- kind: statement_block
|
|
652
|
+
- kind: function_declaration
|
|
653
|
+
- kind: generator_function_declaration
|
|
654
|
+
- kind: function_expression
|
|
655
|
+
- kind: generator_function
|
|
656
|
+
- kind: arrow_function
|
|
657
|
+
- kind: method_definition
|
|
658
|
+
- kind: class_body
|
|
659
|
+
- kind: for_statement
|
|
660
|
+
- kind: for_in_statement
|
|
661
|
+
- kind: catch_clause
|
|
662
|
+
# An identifier in a binding position: a parameter, a destructured name, a
|
|
663
|
+
# local variable, a function name, or a class name.
|
|
664
|
+
binding-name:
|
|
665
|
+
any:
|
|
666
|
+
- kind: shorthand_property_identifier_pattern
|
|
667
|
+
- kind: identifier
|
|
668
|
+
any:
|
|
669
|
+
- inside: { kind: variable_declarator, field: name }
|
|
670
|
+
- inside: { kind: function_declaration, field: name }
|
|
671
|
+
- inside: { kind: generator_function_declaration, field: name }
|
|
672
|
+
- inside: { kind: function_expression, field: name }
|
|
673
|
+
- inside: { kind: required_parameter, field: pattern }
|
|
674
|
+
- inside: { kind: optional_parameter, field: pattern }
|
|
675
|
+
- inside: { kind: assignment_pattern, field: left }
|
|
676
|
+
- inside: { kind: pair_pattern, field: value }
|
|
677
|
+
- inside: { kind: array_pattern }
|
|
678
|
+
- inside: { kind: rest_pattern }
|
|
679
|
+
- inside: { kind: arrow_function, field: parameter }
|
|
680
|
+
- inside: { kind: catch_clause, field: parameter }
|
|
681
|
+
- kind: type_identifier
|
|
682
|
+
inside: { kind: class_declaration, field: name }
|
|
683
|
+
# A function declaration opens a scope, so the search above stops at it and
|
|
684
|
+
# never reads its name. This matches the declaration itself instead.
|
|
685
|
+
function-declaration:
|
|
686
|
+
any:
|
|
687
|
+
- kind: function_declaration
|
|
688
|
+
- kind: generator_function_declaration
|
|
689
|
+
linechart-import:
|
|
690
|
+
kind: import_statement
|
|
691
|
+
all:
|
|
692
|
+
- has:
|
|
693
|
+
field: source
|
|
694
|
+
regex: ^["']@ngrok/mantle/line-chart["']$
|
|
695
|
+
- has:
|
|
696
|
+
stopBy: end
|
|
697
|
+
kind: import_specifier
|
|
698
|
+
has:
|
|
699
|
+
field: name
|
|
700
|
+
regex: ^LineChart$
|
|
701
|
+
any:
|
|
702
|
+
- kind: import_specifier
|
|
703
|
+
has:
|
|
704
|
+
field: alias
|
|
705
|
+
pattern: $LINE
|
|
706
|
+
- kind: import_specifier
|
|
707
|
+
not:
|
|
708
|
+
has:
|
|
709
|
+
field: alias
|
|
710
|
+
kind: identifier
|
|
711
|
+
has:
|
|
712
|
+
field: name
|
|
713
|
+
pattern: $LINE
|
|
714
|
+
barchart-import:
|
|
715
|
+
kind: import_statement
|
|
716
|
+
all:
|
|
717
|
+
- has:
|
|
718
|
+
field: source
|
|
719
|
+
regex: ^["']@ngrok/mantle/bar-chart["']$
|
|
720
|
+
- has:
|
|
721
|
+
stopBy: end
|
|
722
|
+
kind: import_specifier
|
|
723
|
+
has:
|
|
724
|
+
field: name
|
|
725
|
+
regex: ^BarChart$
|
|
726
|
+
any:
|
|
727
|
+
- kind: import_specifier
|
|
728
|
+
has:
|
|
729
|
+
field: alias
|
|
730
|
+
pattern: $BAR
|
|
731
|
+
- kind: import_specifier
|
|
732
|
+
not:
|
|
733
|
+
has:
|
|
734
|
+
field: alias
|
|
735
|
+
kind: identifier
|
|
736
|
+
has:
|
|
737
|
+
field: name
|
|
738
|
+
pattern: $BAR
|
|
739
|
+
areachart-import:
|
|
740
|
+
kind: import_statement
|
|
741
|
+
all:
|
|
742
|
+
- has:
|
|
743
|
+
field: source
|
|
744
|
+
regex: ^["']@ngrok/mantle/area-chart["']$
|
|
745
|
+
- has:
|
|
746
|
+
stopBy: end
|
|
747
|
+
kind: import_specifier
|
|
748
|
+
has:
|
|
749
|
+
field: name
|
|
750
|
+
regex: ^AreaChart$
|
|
751
|
+
any:
|
|
752
|
+
- kind: import_specifier
|
|
753
|
+
has:
|
|
754
|
+
field: alias
|
|
755
|
+
pattern: $AREA
|
|
756
|
+
- kind: import_specifier
|
|
757
|
+
not:
|
|
758
|
+
has:
|
|
759
|
+
field: alias
|
|
760
|
+
kind: identifier
|
|
761
|
+
has:
|
|
762
|
+
field: name
|
|
763
|
+
pattern: $AREA
|
|
764
|
+
scatterplot-import:
|
|
765
|
+
kind: import_statement
|
|
766
|
+
all:
|
|
767
|
+
- has:
|
|
768
|
+
field: source
|
|
769
|
+
regex: ^["']@ngrok/mantle/scatter-plot["']$
|
|
770
|
+
- has:
|
|
771
|
+
stopBy: end
|
|
772
|
+
kind: import_specifier
|
|
773
|
+
has:
|
|
774
|
+
field: name
|
|
775
|
+
regex: ^ScatterPlot$
|
|
776
|
+
any:
|
|
777
|
+
- kind: import_specifier
|
|
778
|
+
has:
|
|
779
|
+
field: alias
|
|
780
|
+
pattern: $SCATTER
|
|
781
|
+
- kind: import_specifier
|
|
782
|
+
not:
|
|
783
|
+
has:
|
|
784
|
+
field: alias
|
|
785
|
+
kind: identifier
|
|
786
|
+
has:
|
|
787
|
+
field: name
|
|
788
|
+
pattern: $SCATTER
|
|
789
|
+
# A series part of a chart family: Line, Bar, Area, or Point on the name
|
|
790
|
+
# the family's import binds.
|
|
791
|
+
series-part:
|
|
792
|
+
any:
|
|
793
|
+
- kind: jsx_opening_element
|
|
794
|
+
- kind: jsx_self_closing_element
|
|
795
|
+
has:
|
|
796
|
+
field: name
|
|
797
|
+
kind: member_expression
|
|
798
|
+
any:
|
|
799
|
+
- all:
|
|
800
|
+
- has:
|
|
801
|
+
field: object
|
|
802
|
+
pattern: $LINE
|
|
803
|
+
- has:
|
|
804
|
+
field: property
|
|
805
|
+
regex: ^Line$
|
|
806
|
+
- inside:
|
|
807
|
+
stopBy: end
|
|
808
|
+
kind: program
|
|
809
|
+
has:
|
|
810
|
+
matches: linechart-import
|
|
811
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
812
|
+
# rules cannot tell which binding the element reads.
|
|
813
|
+
- not:
|
|
814
|
+
inside:
|
|
815
|
+
stopBy: end
|
|
816
|
+
matches: scope
|
|
817
|
+
has:
|
|
818
|
+
stopBy:
|
|
819
|
+
matches: scope
|
|
820
|
+
any:
|
|
821
|
+
- matches: binding-name
|
|
822
|
+
pattern: $LINE
|
|
823
|
+
- matches: function-declaration
|
|
824
|
+
has:
|
|
825
|
+
field: name
|
|
826
|
+
pattern: $LINE
|
|
827
|
+
- all:
|
|
828
|
+
- has:
|
|
829
|
+
field: object
|
|
830
|
+
pattern: $BAR
|
|
831
|
+
- has:
|
|
832
|
+
field: property
|
|
833
|
+
regex: ^Bar$
|
|
834
|
+
- inside:
|
|
835
|
+
stopBy: end
|
|
836
|
+
kind: program
|
|
837
|
+
has:
|
|
838
|
+
matches: barchart-import
|
|
839
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
840
|
+
# rules cannot tell which binding the element reads.
|
|
841
|
+
- not:
|
|
842
|
+
inside:
|
|
843
|
+
stopBy: end
|
|
844
|
+
matches: scope
|
|
845
|
+
has:
|
|
846
|
+
stopBy:
|
|
847
|
+
matches: scope
|
|
848
|
+
any:
|
|
849
|
+
- matches: binding-name
|
|
850
|
+
pattern: $BAR
|
|
851
|
+
- matches: function-declaration
|
|
852
|
+
has:
|
|
853
|
+
field: name
|
|
854
|
+
pattern: $BAR
|
|
855
|
+
- all:
|
|
856
|
+
- has:
|
|
857
|
+
field: object
|
|
858
|
+
pattern: $AREA
|
|
859
|
+
- has:
|
|
860
|
+
field: property
|
|
861
|
+
regex: ^Area$
|
|
862
|
+
- inside:
|
|
863
|
+
stopBy: end
|
|
864
|
+
kind: program
|
|
865
|
+
has:
|
|
866
|
+
matches: areachart-import
|
|
867
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
868
|
+
# rules cannot tell which binding the element reads.
|
|
869
|
+
- not:
|
|
870
|
+
inside:
|
|
871
|
+
stopBy: end
|
|
872
|
+
matches: scope
|
|
873
|
+
has:
|
|
874
|
+
stopBy:
|
|
875
|
+
matches: scope
|
|
876
|
+
any:
|
|
877
|
+
- matches: binding-name
|
|
878
|
+
pattern: $AREA
|
|
879
|
+
- matches: function-declaration
|
|
880
|
+
has:
|
|
881
|
+
field: name
|
|
882
|
+
pattern: $AREA
|
|
883
|
+
- all:
|
|
884
|
+
- has:
|
|
885
|
+
field: object
|
|
886
|
+
pattern: $SCATTER
|
|
887
|
+
- has:
|
|
888
|
+
field: property
|
|
889
|
+
regex: ^Point$
|
|
890
|
+
- inside:
|
|
891
|
+
stopBy: end
|
|
892
|
+
kind: program
|
|
893
|
+
has:
|
|
894
|
+
matches: scatterplot-import
|
|
895
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
896
|
+
# rules cannot tell which binding the element reads.
|
|
897
|
+
- not:
|
|
898
|
+
inside:
|
|
899
|
+
stopBy: end
|
|
900
|
+
matches: scope
|
|
901
|
+
has:
|
|
902
|
+
stopBy:
|
|
903
|
+
matches: scope
|
|
904
|
+
any:
|
|
905
|
+
- matches: binding-name
|
|
906
|
+
pattern: $SCATTER
|
|
907
|
+
- matches: function-declaration
|
|
908
|
+
has:
|
|
909
|
+
field: name
|
|
910
|
+
pattern: $SCATTER
|
|
911
|
+
# The `color` attribute of a series part.
|
|
912
|
+
series-color:
|
|
913
|
+
kind: jsx_attribute
|
|
914
|
+
has:
|
|
915
|
+
kind: property_identifier
|
|
916
|
+
regex: ^color$
|
|
917
|
+
inside:
|
|
918
|
+
matches: series-part
|
|
919
|
+
rule:
|
|
920
|
+
kind: jsx_attribute
|
|
921
|
+
has:
|
|
922
|
+
kind: property_identifier
|
|
923
|
+
regex: ^seriesSlot$
|
|
924
|
+
all:
|
|
925
|
+
- has:
|
|
926
|
+
kind: jsx_expression
|
|
927
|
+
has:
|
|
928
|
+
kind: number
|
|
929
|
+
regex: ^[1-8]$
|
|
930
|
+
pattern: $S
|
|
931
|
+
- inside:
|
|
932
|
+
matches: series-part
|
|
933
|
+
not:
|
|
934
|
+
has:
|
|
935
|
+
matches: series-color
|
|
936
|
+
transform:
|
|
937
|
+
T1:
|
|
938
|
+
replace:
|
|
939
|
+
source: $S
|
|
940
|
+
replace: ^1$
|
|
941
|
+
by: blue
|
|
942
|
+
T2:
|
|
943
|
+
replace:
|
|
944
|
+
source: $T1
|
|
945
|
+
replace: ^2$
|
|
946
|
+
by: emerald
|
|
947
|
+
T3:
|
|
948
|
+
replace:
|
|
949
|
+
source: $T2
|
|
950
|
+
replace: ^3$
|
|
951
|
+
by: pink
|
|
952
|
+
T4:
|
|
953
|
+
replace:
|
|
954
|
+
source: $T3
|
|
955
|
+
replace: ^4$
|
|
956
|
+
by: orange
|
|
957
|
+
T5:
|
|
958
|
+
replace:
|
|
959
|
+
source: $T4
|
|
960
|
+
replace: ^5$
|
|
961
|
+
by: teal
|
|
962
|
+
T6:
|
|
963
|
+
replace:
|
|
964
|
+
source: $T5
|
|
965
|
+
replace: ^6$
|
|
966
|
+
by: fuchsia
|
|
967
|
+
T7:
|
|
968
|
+
replace:
|
|
969
|
+
source: $T6
|
|
970
|
+
replace: ^7$
|
|
971
|
+
by: violet
|
|
972
|
+
T8:
|
|
973
|
+
replace:
|
|
974
|
+
source: $T7
|
|
975
|
+
replace: ^8$
|
|
976
|
+
by: amber
|
|
977
|
+
fix: color="$T8"
|
|
978
|
+
---
|
|
979
|
+
id: chart-series-slot-other
|
|
980
|
+
language: tsx
|
|
981
|
+
message: seriesSlot is gone; an "Other" series wears neutral
|
|
982
|
+
utils:
|
|
983
|
+
# A node that opens a lexical scope. The shadow search below stops at a
|
|
984
|
+
# nested one, so a sibling function's local name does not count.
|
|
985
|
+
scope:
|
|
986
|
+
any:
|
|
987
|
+
- kind: statement_block
|
|
988
|
+
- kind: function_declaration
|
|
989
|
+
- kind: generator_function_declaration
|
|
990
|
+
- kind: function_expression
|
|
991
|
+
- kind: generator_function
|
|
992
|
+
- kind: arrow_function
|
|
993
|
+
- kind: method_definition
|
|
994
|
+
- kind: class_body
|
|
995
|
+
- kind: for_statement
|
|
996
|
+
- kind: for_in_statement
|
|
997
|
+
- kind: catch_clause
|
|
998
|
+
# An identifier in a binding position: a parameter, a destructured name, a
|
|
999
|
+
# local variable, a function name, or a class name.
|
|
1000
|
+
binding-name:
|
|
1001
|
+
any:
|
|
1002
|
+
- kind: shorthand_property_identifier_pattern
|
|
1003
|
+
- kind: identifier
|
|
1004
|
+
any:
|
|
1005
|
+
- inside: { kind: variable_declarator, field: name }
|
|
1006
|
+
- inside: { kind: function_declaration, field: name }
|
|
1007
|
+
- inside: { kind: generator_function_declaration, field: name }
|
|
1008
|
+
- inside: { kind: function_expression, field: name }
|
|
1009
|
+
- inside: { kind: required_parameter, field: pattern }
|
|
1010
|
+
- inside: { kind: optional_parameter, field: pattern }
|
|
1011
|
+
- inside: { kind: assignment_pattern, field: left }
|
|
1012
|
+
- inside: { kind: pair_pattern, field: value }
|
|
1013
|
+
- inside: { kind: array_pattern }
|
|
1014
|
+
- inside: { kind: rest_pattern }
|
|
1015
|
+
- inside: { kind: arrow_function, field: parameter }
|
|
1016
|
+
- inside: { kind: catch_clause, field: parameter }
|
|
1017
|
+
- kind: type_identifier
|
|
1018
|
+
inside: { kind: class_declaration, field: name }
|
|
1019
|
+
# A function declaration opens a scope, so the search above stops at it and
|
|
1020
|
+
# never reads its name. This matches the declaration itself instead.
|
|
1021
|
+
function-declaration:
|
|
1022
|
+
any:
|
|
1023
|
+
- kind: function_declaration
|
|
1024
|
+
- kind: generator_function_declaration
|
|
1025
|
+
linechart-import:
|
|
1026
|
+
kind: import_statement
|
|
1027
|
+
all:
|
|
1028
|
+
- has:
|
|
1029
|
+
field: source
|
|
1030
|
+
regex: ^["']@ngrok/mantle/line-chart["']$
|
|
1031
|
+
- has:
|
|
1032
|
+
stopBy: end
|
|
1033
|
+
kind: import_specifier
|
|
1034
|
+
has:
|
|
1035
|
+
field: name
|
|
1036
|
+
regex: ^LineChart$
|
|
1037
|
+
any:
|
|
1038
|
+
- kind: import_specifier
|
|
1039
|
+
has:
|
|
1040
|
+
field: alias
|
|
1041
|
+
pattern: $LINE
|
|
1042
|
+
- kind: import_specifier
|
|
1043
|
+
not:
|
|
1044
|
+
has:
|
|
1045
|
+
field: alias
|
|
1046
|
+
kind: identifier
|
|
1047
|
+
has:
|
|
1048
|
+
field: name
|
|
1049
|
+
pattern: $LINE
|
|
1050
|
+
barchart-import:
|
|
1051
|
+
kind: import_statement
|
|
1052
|
+
all:
|
|
1053
|
+
- has:
|
|
1054
|
+
field: source
|
|
1055
|
+
regex: ^["']@ngrok/mantle/bar-chart["']$
|
|
1056
|
+
- has:
|
|
1057
|
+
stopBy: end
|
|
1058
|
+
kind: import_specifier
|
|
1059
|
+
has:
|
|
1060
|
+
field: name
|
|
1061
|
+
regex: ^BarChart$
|
|
1062
|
+
any:
|
|
1063
|
+
- kind: import_specifier
|
|
1064
|
+
has:
|
|
1065
|
+
field: alias
|
|
1066
|
+
pattern: $BAR
|
|
1067
|
+
- kind: import_specifier
|
|
1068
|
+
not:
|
|
1069
|
+
has:
|
|
1070
|
+
field: alias
|
|
1071
|
+
kind: identifier
|
|
1072
|
+
has:
|
|
1073
|
+
field: name
|
|
1074
|
+
pattern: $BAR
|
|
1075
|
+
areachart-import:
|
|
1076
|
+
kind: import_statement
|
|
1077
|
+
all:
|
|
1078
|
+
- has:
|
|
1079
|
+
field: source
|
|
1080
|
+
regex: ^["']@ngrok/mantle/area-chart["']$
|
|
1081
|
+
- has:
|
|
1082
|
+
stopBy: end
|
|
1083
|
+
kind: import_specifier
|
|
1084
|
+
has:
|
|
1085
|
+
field: name
|
|
1086
|
+
regex: ^AreaChart$
|
|
1087
|
+
any:
|
|
1088
|
+
- kind: import_specifier
|
|
1089
|
+
has:
|
|
1090
|
+
field: alias
|
|
1091
|
+
pattern: $AREA
|
|
1092
|
+
- kind: import_specifier
|
|
1093
|
+
not:
|
|
1094
|
+
has:
|
|
1095
|
+
field: alias
|
|
1096
|
+
kind: identifier
|
|
1097
|
+
has:
|
|
1098
|
+
field: name
|
|
1099
|
+
pattern: $AREA
|
|
1100
|
+
scatterplot-import:
|
|
1101
|
+
kind: import_statement
|
|
1102
|
+
all:
|
|
1103
|
+
- has:
|
|
1104
|
+
field: source
|
|
1105
|
+
regex: ^["']@ngrok/mantle/scatter-plot["']$
|
|
1106
|
+
- has:
|
|
1107
|
+
stopBy: end
|
|
1108
|
+
kind: import_specifier
|
|
1109
|
+
has:
|
|
1110
|
+
field: name
|
|
1111
|
+
regex: ^ScatterPlot$
|
|
1112
|
+
any:
|
|
1113
|
+
- kind: import_specifier
|
|
1114
|
+
has:
|
|
1115
|
+
field: alias
|
|
1116
|
+
pattern: $SCATTER
|
|
1117
|
+
- kind: import_specifier
|
|
1118
|
+
not:
|
|
1119
|
+
has:
|
|
1120
|
+
field: alias
|
|
1121
|
+
kind: identifier
|
|
1122
|
+
has:
|
|
1123
|
+
field: name
|
|
1124
|
+
pattern: $SCATTER
|
|
1125
|
+
# A series part of a chart family: Line, Bar, Area, or Point on the name
|
|
1126
|
+
# the family's import binds.
|
|
1127
|
+
series-part:
|
|
1128
|
+
any:
|
|
1129
|
+
- kind: jsx_opening_element
|
|
1130
|
+
- kind: jsx_self_closing_element
|
|
1131
|
+
has:
|
|
1132
|
+
field: name
|
|
1133
|
+
kind: member_expression
|
|
1134
|
+
any:
|
|
1135
|
+
- all:
|
|
1136
|
+
- has:
|
|
1137
|
+
field: object
|
|
1138
|
+
pattern: $LINE
|
|
1139
|
+
- has:
|
|
1140
|
+
field: property
|
|
1141
|
+
regex: ^Line$
|
|
1142
|
+
- inside:
|
|
1143
|
+
stopBy: end
|
|
1144
|
+
kind: program
|
|
1145
|
+
has:
|
|
1146
|
+
matches: linechart-import
|
|
1147
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
1148
|
+
# rules cannot tell which binding the element reads.
|
|
1149
|
+
- not:
|
|
1150
|
+
inside:
|
|
1151
|
+
stopBy: end
|
|
1152
|
+
matches: scope
|
|
1153
|
+
has:
|
|
1154
|
+
stopBy:
|
|
1155
|
+
matches: scope
|
|
1156
|
+
any:
|
|
1157
|
+
- matches: binding-name
|
|
1158
|
+
pattern: $LINE
|
|
1159
|
+
- matches: function-declaration
|
|
1160
|
+
has:
|
|
1161
|
+
field: name
|
|
1162
|
+
pattern: $LINE
|
|
1163
|
+
- all:
|
|
1164
|
+
- has:
|
|
1165
|
+
field: object
|
|
1166
|
+
pattern: $BAR
|
|
1167
|
+
- has:
|
|
1168
|
+
field: property
|
|
1169
|
+
regex: ^Bar$
|
|
1170
|
+
- inside:
|
|
1171
|
+
stopBy: end
|
|
1172
|
+
kind: program
|
|
1173
|
+
has:
|
|
1174
|
+
matches: barchart-import
|
|
1175
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
1176
|
+
# rules cannot tell which binding the element reads.
|
|
1177
|
+
- not:
|
|
1178
|
+
inside:
|
|
1179
|
+
stopBy: end
|
|
1180
|
+
matches: scope
|
|
1181
|
+
has:
|
|
1182
|
+
stopBy:
|
|
1183
|
+
matches: scope
|
|
1184
|
+
any:
|
|
1185
|
+
- matches: binding-name
|
|
1186
|
+
pattern: $BAR
|
|
1187
|
+
- matches: function-declaration
|
|
1188
|
+
has:
|
|
1189
|
+
field: name
|
|
1190
|
+
pattern: $BAR
|
|
1191
|
+
- all:
|
|
1192
|
+
- has:
|
|
1193
|
+
field: object
|
|
1194
|
+
pattern: $AREA
|
|
1195
|
+
- has:
|
|
1196
|
+
field: property
|
|
1197
|
+
regex: ^Area$
|
|
1198
|
+
- inside:
|
|
1199
|
+
stopBy: end
|
|
1200
|
+
kind: program
|
|
1201
|
+
has:
|
|
1202
|
+
matches: areachart-import
|
|
1203
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
1204
|
+
# rules cannot tell which binding the element reads.
|
|
1205
|
+
- not:
|
|
1206
|
+
inside:
|
|
1207
|
+
stopBy: end
|
|
1208
|
+
matches: scope
|
|
1209
|
+
has:
|
|
1210
|
+
stopBy:
|
|
1211
|
+
matches: scope
|
|
1212
|
+
any:
|
|
1213
|
+
- matches: binding-name
|
|
1214
|
+
pattern: $AREA
|
|
1215
|
+
- matches: function-declaration
|
|
1216
|
+
has:
|
|
1217
|
+
field: name
|
|
1218
|
+
pattern: $AREA
|
|
1219
|
+
- all:
|
|
1220
|
+
- has:
|
|
1221
|
+
field: object
|
|
1222
|
+
pattern: $SCATTER
|
|
1223
|
+
- has:
|
|
1224
|
+
field: property
|
|
1225
|
+
regex: ^Point$
|
|
1226
|
+
- inside:
|
|
1227
|
+
stopBy: end
|
|
1228
|
+
kind: program
|
|
1229
|
+
has:
|
|
1230
|
+
matches: scatterplot-import
|
|
1231
|
+
# Why: a parameter or a local under the import's name shadows it, and the
|
|
1232
|
+
# rules cannot tell which binding the element reads.
|
|
1233
|
+
- not:
|
|
1234
|
+
inside:
|
|
1235
|
+
stopBy: end
|
|
1236
|
+
matches: scope
|
|
1237
|
+
has:
|
|
1238
|
+
stopBy:
|
|
1239
|
+
matches: scope
|
|
1240
|
+
any:
|
|
1241
|
+
- matches: binding-name
|
|
1242
|
+
pattern: $SCATTER
|
|
1243
|
+
- matches: function-declaration
|
|
1244
|
+
has:
|
|
1245
|
+
field: name
|
|
1246
|
+
pattern: $SCATTER
|
|
1247
|
+
# The `color` attribute of a series part.
|
|
1248
|
+
series-color:
|
|
1249
|
+
kind: jsx_attribute
|
|
1250
|
+
has:
|
|
1251
|
+
kind: property_identifier
|
|
1252
|
+
regex: ^color$
|
|
1253
|
+
inside:
|
|
1254
|
+
matches: series-part
|
|
1255
|
+
rule:
|
|
1256
|
+
kind: jsx_attribute
|
|
1257
|
+
has:
|
|
1258
|
+
kind: property_identifier
|
|
1259
|
+
regex: ^seriesSlot$
|
|
1260
|
+
all:
|
|
1261
|
+
- any:
|
|
1262
|
+
- has:
|
|
1263
|
+
kind: string
|
|
1264
|
+
has:
|
|
1265
|
+
kind: string_fragment
|
|
1266
|
+
regex: ^other$
|
|
1267
|
+
- has:
|
|
1268
|
+
kind: jsx_expression
|
|
1269
|
+
has:
|
|
1270
|
+
kind: string
|
|
1271
|
+
has:
|
|
1272
|
+
kind: string_fragment
|
|
1273
|
+
regex: ^other$
|
|
1274
|
+
- inside:
|
|
1275
|
+
matches: series-part
|
|
1276
|
+
not:
|
|
1277
|
+
has:
|
|
1278
|
+
matches: series-color
|
|
1279
|
+
fix: color="neutral"
|
|
1280
|
+
---
|
|
1281
|
+
id: chart-token-in-string-tsx
|
|
1282
|
+
language: tsx
|
|
1283
|
+
message: the chart tokens take color names, so --color-chart-1 and bg-chart-1 become --color-chart-blue and bg-chart-blue
|
|
1284
|
+
rule:
|
|
1285
|
+
kind: string_fragment
|
|
1286
|
+
regex: '(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-(?:[1-8]|other)\b'
|
|
1287
|
+
pattern: $V
|
|
1288
|
+
transform:
|
|
1289
|
+
T1:
|
|
1290
|
+
replace:
|
|
1291
|
+
source: $V
|
|
1292
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)1\b'
|
|
1293
|
+
by: "${p}blue"
|
|
1294
|
+
T2:
|
|
1295
|
+
replace:
|
|
1296
|
+
source: $T1
|
|
1297
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)2\b'
|
|
1298
|
+
by: "${p}emerald"
|
|
1299
|
+
T3:
|
|
1300
|
+
replace:
|
|
1301
|
+
source: $T2
|
|
1302
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)3\b'
|
|
1303
|
+
by: "${p}pink"
|
|
1304
|
+
T4:
|
|
1305
|
+
replace:
|
|
1306
|
+
source: $T3
|
|
1307
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)4\b'
|
|
1308
|
+
by: "${p}orange"
|
|
1309
|
+
T5:
|
|
1310
|
+
replace:
|
|
1311
|
+
source: $T4
|
|
1312
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)5\b'
|
|
1313
|
+
by: "${p}teal"
|
|
1314
|
+
T6:
|
|
1315
|
+
replace:
|
|
1316
|
+
source: $T5
|
|
1317
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)6\b'
|
|
1318
|
+
by: "${p}fuchsia"
|
|
1319
|
+
T7:
|
|
1320
|
+
replace:
|
|
1321
|
+
source: $T6
|
|
1322
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)7\b'
|
|
1323
|
+
by: "${p}violet"
|
|
1324
|
+
T8:
|
|
1325
|
+
replace:
|
|
1326
|
+
source: $T7
|
|
1327
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)8\b'
|
|
1328
|
+
by: "${p}amber"
|
|
1329
|
+
T9:
|
|
1330
|
+
replace:
|
|
1331
|
+
source: $T8
|
|
1332
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)other\b'
|
|
1333
|
+
by: "${p}neutral"
|
|
1334
|
+
fix: $T9
|
|
1335
|
+
---
|
|
1336
|
+
id: chart-token-in-string-typescript
|
|
1337
|
+
language: typescript
|
|
1338
|
+
message: the chart tokens take color names, so --color-chart-1 and bg-chart-1 become --color-chart-blue and bg-chart-blue
|
|
1339
|
+
rule:
|
|
1340
|
+
kind: string_fragment
|
|
1341
|
+
regex: '(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-(?:[1-8]|other)\b'
|
|
1342
|
+
pattern: $V
|
|
1343
|
+
transform:
|
|
1344
|
+
T1:
|
|
1345
|
+
replace:
|
|
1346
|
+
source: $V
|
|
1347
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)1\b'
|
|
1348
|
+
by: "${p}blue"
|
|
1349
|
+
T2:
|
|
1350
|
+
replace:
|
|
1351
|
+
source: $T1
|
|
1352
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)2\b'
|
|
1353
|
+
by: "${p}emerald"
|
|
1354
|
+
T3:
|
|
1355
|
+
replace:
|
|
1356
|
+
source: $T2
|
|
1357
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)3\b'
|
|
1358
|
+
by: "${p}pink"
|
|
1359
|
+
T4:
|
|
1360
|
+
replace:
|
|
1361
|
+
source: $T3
|
|
1362
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)4\b'
|
|
1363
|
+
by: "${p}orange"
|
|
1364
|
+
T5:
|
|
1365
|
+
replace:
|
|
1366
|
+
source: $T4
|
|
1367
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)5\b'
|
|
1368
|
+
by: "${p}teal"
|
|
1369
|
+
T6:
|
|
1370
|
+
replace:
|
|
1371
|
+
source: $T5
|
|
1372
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)6\b'
|
|
1373
|
+
by: "${p}fuchsia"
|
|
1374
|
+
T7:
|
|
1375
|
+
replace:
|
|
1376
|
+
source: $T6
|
|
1377
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)7\b'
|
|
1378
|
+
by: "${p}violet"
|
|
1379
|
+
T8:
|
|
1380
|
+
replace:
|
|
1381
|
+
source: $T7
|
|
1382
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)8\b'
|
|
1383
|
+
by: "${p}amber"
|
|
1384
|
+
T9:
|
|
1385
|
+
replace:
|
|
1386
|
+
source: $T8
|
|
1387
|
+
replace: '(?P<p>(?:--color-|bg-|text-|fill-|stroke-|border-|border-[xytrblse]-|divide-|ring-|ring-offset-|outline-|from-|via-|to-|decoration-|shadow-|accent-|caret-|placeholder-)chart-)other\b'
|
|
1388
|
+
by: "${p}neutral"
|
|
1389
|
+
fix: $T9
|