@mlola-ui/registry 1.0.10 → 1.0.11
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/components/accordion.json +2 -2
- package/components/alert.json +1 -1
- package/components/app-shell.json +1 -1
- package/components/badge.json +1 -1
- package/components/breadcrumb.json +1 -1
- package/components/button.json +1 -1
- package/components/calendar.json +1 -1
- package/components/carousel.json +2 -2
- package/components/checkbox.json +1 -1
- package/components/color-picker.json +1 -1
- package/components/combobox.json +2 -2
- package/components/command-menu.json +2 -2
- package/components/context-menu.json +2 -2
- package/components/copy-button.json +1 -1
- package/components/date-picker.json +1 -1
- package/components/dropdown-menu.json +2 -2
- package/components/dropzone.json +1 -1
- package/components/hover-card.json +1 -1
- package/components/modal.json +2 -2
- package/components/number-input.json +1 -1
- package/components/pagination.json +1 -1
- package/components/password-input.json +2 -2
- package/components/popover.json +1 -1
- package/components/segmented-control.json +1 -1
- package/components/select.json +2 -2
- package/components/sheet.json +2 -2
- package/components/slider.json +1 -1
- package/components/stepper.json +1 -1
- package/components/tabs.json +1 -1
- package/components/tag-input.json +1 -1
- package/components/time-picker.json +1 -1
- package/components/timeline.json +1 -1
- package/components/toast.json +1 -1
- package/components/tour.json +2 -2
- package/generated/catalog.js +43 -43
- package/index.json +1 -1
- package/package.json +1 -1
- package/snapshot/index.json +46 -46
- package/snapshot/items/components/accordion.json +2 -2
- package/snapshot/items/components/alert.json +1 -1
- package/snapshot/items/components/app-shell.json +1 -1
- package/snapshot/items/components/badge.json +1 -1
- package/snapshot/items/components/breadcrumb.json +1 -1
- package/snapshot/items/components/button.json +1 -1
- package/snapshot/items/components/calendar.json +1 -1
- package/snapshot/items/components/carousel.json +2 -2
- package/snapshot/items/components/checkbox.json +1 -1
- package/snapshot/items/components/color-picker.json +1 -1
- package/snapshot/items/components/combobox.json +2 -2
- package/snapshot/items/components/command-menu.json +2 -2
- package/snapshot/items/components/context-menu.json +2 -2
- package/snapshot/items/components/copy-button.json +1 -1
- package/snapshot/items/components/date-picker.json +1 -1
- package/snapshot/items/components/dropdown-menu.json +2 -2
- package/snapshot/items/components/dropzone.json +1 -1
- package/snapshot/items/components/hover-card.json +1 -1
- package/snapshot/items/components/modal.json +2 -2
- package/snapshot/items/components/number-input.json +1 -1
- package/snapshot/items/components/pagination.json +1 -1
- package/snapshot/items/components/password-input.json +2 -2
- package/snapshot/items/components/popover.json +1 -1
- package/snapshot/items/components/segmented-control.json +1 -1
- package/snapshot/items/components/select.json +2 -2
- package/snapshot/items/components/sheet.json +2 -2
- package/snapshot/items/components/slider.json +1 -1
- package/snapshot/items/components/stepper.json +1 -1
- package/snapshot/items/components/tabs.json +1 -1
- package/snapshot/items/components/tag-input.json +1 -1
- package/snapshot/items/components/time-picker.json +1 -1
- package/snapshot/items/components/timeline.json +1 -1
- package/snapshot/items/components/toast.json +1 -1
- package/snapshot/items/components/tour.json +2 -2
- package/snapshot/source/packages/components/_internal/match.ts +8 -0
- package/snapshot/source-manifest.json +1 -1
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"input"
|
|
23
23
|
],
|
|
24
24
|
"engineDependencies": {
|
|
25
|
-
"@mlola-ui/icons": "^1.0.
|
|
25
|
+
"@mlola-ui/icons": "^1.0.11"
|
|
26
26
|
},
|
|
27
27
|
"options": [
|
|
28
28
|
{
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"path": "packages/components/_internal/match.ts",
|
|
42
42
|
"target": "{{aliases.components}}/_internal/match.ts",
|
|
43
43
|
"type": "registry:ui",
|
|
44
|
-
"integrity": "sha256-
|
|
44
|
+
"integrity": "sha256-3tUYob6xmD2nLerh634E3R5iPbzMeNBzdDynsDFjj28="
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "packages/components/_internal/react.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"modal"
|
|
23
23
|
],
|
|
24
24
|
"engineDependencies": {
|
|
25
|
-
"@mlola-ui/icons": "^1.0.
|
|
25
|
+
"@mlola-ui/icons": "^1.0.11"
|
|
26
26
|
},
|
|
27
27
|
"options": [],
|
|
28
28
|
"variants": [],
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"path": "packages/components/_internal/match.ts",
|
|
33
33
|
"target": "{{aliases.components}}/_internal/match.ts",
|
|
34
34
|
"type": "registry:ui",
|
|
35
|
-
"integrity": "sha256-
|
|
35
|
+
"integrity": "sha256-3tUYob6xmD2nLerh634E3R5iPbzMeNBzdDynsDFjj28="
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"path": "packages/components/_internal/react.ts",
|
|
@@ -22,6 +22,14 @@ export function matchCommand(label: string, query: string, keywords: string[] =
|
|
|
22
22
|
if (inside >= 0) return { score: 60 - inside * 0.5, positions: range(inside) };
|
|
23
23
|
if (keywords.some((keyword) => keyword.toLowerCase().includes(needle))) return { score: 45, positions: [] };
|
|
24
24
|
|
|
25
|
+
// Several words, each starting a word somewhere in the label or keywords ("rate limit head" → "Limit headers" under "Rate limits").
|
|
26
|
+
const words = needle.split(/\s+/);
|
|
27
|
+
if (words.length > 1) {
|
|
28
|
+
const haystack = [text, ...keywords.map((keyword) => keyword.toLowerCase())].join(" ");
|
|
29
|
+
const startsWord = (word: string) => new RegExp(`\\b${word.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`).test(haystack);
|
|
30
|
+
if (words.every(startsWord)) return { score: 40, positions: [] };
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
// Letters in order, preferring word starts and runs.
|
|
26
34
|
const positions: number[] = [];
|
|
27
35
|
let from = 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"packages/components/_internal/clipboard.ts": "sha256-0y5p88CTXWuOrUYlC5J4XP1VCrOwkx9jYWVHmD2LouQ=",
|
|
4
4
|
"packages/components/_internal/dialog.ts": "sha256-796y3oNOVWarLvICTdi+d0/2axqSrzLVJiyBeh9X7bU=",
|
|
5
5
|
"packages/components/_internal/floating.ts": "sha256-+WxgC4CtAlSr2qA1EkoDTgto535XLIPsvtOfdOK6CHk=",
|
|
6
|
-
"packages/components/_internal/match.ts": "sha256-
|
|
6
|
+
"packages/components/_internal/match.ts": "sha256-3tUYob6xmD2nLerh634E3R5iPbzMeNBzdDynsDFjj28=",
|
|
7
7
|
"packages/components/_internal/react.ts": "sha256-SH63/haiB4Q93uFjMIMe5xZbaxENu3VI+GcidV8HELM=",
|
|
8
8
|
"packages/components/_internal/scroll.ts": "sha256-/YxhPPJa6Iax4q5eEs8dmpQp634TbvB+421MphEyscQ=",
|
|
9
9
|
"packages/components/accordion/accordion.tsx": "sha256-0ALaLJd1fvj8Vbx86HLBKm3qUItrtwbrGJTykVfNSMg=",
|