@arcadeai/design-system 1.3.0 → 1.4.0
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 +95 -0
- package/dist/{arcade-49z5mR1G.js → arcade-CadnNaba.js} +139 -137
- package/dist/assets/index.css +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +431 -213
- package/dist/components/ui/atoms/accordion.js +1 -1
- package/dist/components/ui/atoms/avatar.js +2 -2
- package/dist/components/ui/atoms/checkbox.js +1 -1
- package/dist/components/ui/atoms/collapsible.js +1 -1
- package/dist/components/ui/atoms/command.js +1 -1
- package/dist/components/ui/atoms/dialog.js +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +2 -2
- package/dist/components/ui/atoms/hover-card.js +2 -2
- package/dist/components/ui/atoms/icons/adp.d.ts +3 -0
- package/dist/components/ui/atoms/icons/adp.js +40 -0
- package/dist/components/ui/atoms/icons/aha.d.ts +3 -0
- package/dist/components/ui/atoms/icons/aha.js +28 -0
- package/dist/{assets → components/ui/atoms}/icons/airtable.js +4 -0
- package/dist/components/ui/atoms/icons/amplitude.d.ts +3 -0
- package/dist/components/ui/atoms/icons/amplitude.js +33 -0
- package/dist/{assets → components/ui/atoms}/icons/arcade.js +7 -7
- package/dist/{assets → components/ui/atoms}/icons/asana.js +1 -0
- package/dist/components/ui/atoms/icons/ashby.d.ts +3 -0
- package/dist/components/ui/atoms/icons/ashby.js +50 -0
- package/dist/{assets → components/ui/atoms}/icons/atlassian.js +14 -4
- package/dist/{assets → components/ui/atoms}/icons/auth0.js +1 -0
- package/dist/{assets → components/ui/atoms}/icons/azure.js +43 -22
- package/dist/components/ui/atoms/icons/bamboohr.d.ts +3 -0
- package/dist/components/ui/atoms/icons/bamboohr.js +31 -0
- package/dist/components/ui/atoms/icons/basecamp.d.ts +3 -0
- package/dist/components/ui/atoms/icons/basecamp.js +57 -0
- package/dist/components/ui/atoms/icons/bill.d.ts +3 -0
- package/dist/components/ui/atoms/icons/bill.js +55 -0
- package/dist/components/ui/atoms/icons/bitbucket.d.ts +3 -0
- package/dist/components/ui/atoms/icons/bitbucket.js +38 -0
- package/dist/{assets → components/ui/atoms}/icons/bluesky.js +1 -0
- package/dist/{assets → components/ui/atoms}/icons/box.js +1 -0
- package/dist/components/ui/atoms/icons/braze.d.ts +3 -0
- package/dist/components/ui/atoms/icons/braze.js +28 -0
- package/dist/components/ui/atoms/icons/brex.d.ts +3 -0
- package/dist/components/ui/atoms/icons/brex.js +29 -0
- package/dist/components/ui/atoms/icons/buffer.d.ts +3 -0
- package/dist/components/ui/atoms/icons/buffer.js +33 -0
- package/dist/components/ui/atoms/icons/calendly.js +80 -0
- package/dist/components/ui/atoms/icons/clickhouse.d.ts +3 -0
- package/dist/components/ui/atoms/icons/clickhouse.js +26 -0
- package/dist/components/ui/atoms/icons/clickup.d.ts +3 -0
- package/dist/{assets → components/ui/atoms}/icons/clickup.js +16 -4
- package/dist/components/ui/atoms/icons/closeio.d.ts +3 -0
- package/dist/components/ui/atoms/icons/closeio.js +68 -0
- package/dist/{assets → components/ui/atoms}/icons/coinbase.js +21 -8
- package/dist/{assets → components/ui/atoms}/icons/confluence.js +18 -4
- package/dist/{assets → components/ui/atoms}/icons/datadog.js +1 -0
- package/dist/components/ui/atoms/icons/digital-ocean.d.ts +3 -0
- package/dist/components/ui/atoms/icons/digital-ocean.js +22 -0
- package/dist/{assets → components/ui/atoms}/icons/discord.js +1 -0
- package/dist/{assets → components/ui/atoms}/icons/dropbox.js +1 -0
- package/dist/components/ui/atoms/icons/e2b.d.ts +3 -0
- package/dist/components/ui/atoms/icons/e2b.js +19 -0
- package/dist/{assets → components/ui/atoms}/icons/ebay.js +4 -0
- package/dist/components/ui/atoms/icons/evernote.d.ts +3 -0
- package/dist/components/ui/atoms/icons/evernote.js +29 -0
- package/dist/components/ui/atoms/icons/factorial.d.ts +3 -0
- package/dist/components/ui/atoms/icons/factorial.js +50 -0
- package/dist/{assets → components/ui/atoms}/icons/figma.js +18 -2
- package/dist/components/ui/atoms/icons/firecrawl.d.ts +3 -0
- package/dist/components/ui/atoms/icons/firecrawl.js +19 -0
- package/dist/components/ui/atoms/icons/generic.d.ts +3 -0
- package/dist/components/ui/atoms/icons/generic.js +27 -0
- package/dist/{assets → components/ui/atoms}/icons/github.js +4 -3
- package/dist/{assets → components/ui/atoms}/icons/gitlab.js +4 -0
- package/dist/{assets → components/ui/atoms}/icons/gmail.js +11 -2
- package/dist/components/ui/atoms/icons/google-calendar.js +98 -0
- package/dist/{assets → components/ui/atoms}/icons/google-contacts.js +4 -0
- package/dist/components/ui/atoms/icons/google-docs.js +328 -0
- package/dist/{assets → components/ui/atoms}/icons/google-drive.js +6 -0
- package/dist/{assets → components/ui/atoms}/icons/google-finance.js +8 -1
- package/dist/{assets → components/ui/atoms}/icons/google-flight.js +49 -20
- package/dist/components/ui/atoms/icons/google-flights.d.ts +3 -0
- package/dist/components/ui/atoms/icons/google-flights.js +109 -0
- package/dist/{assets → components/ui/atoms}/icons/google-hotels.js +10 -1
- package/dist/components/ui/atoms/icons/google-jobs.d.ts +3 -0
- package/dist/components/ui/atoms/icons/google-jobs.js +103 -0
- package/dist/{assets → components/ui/atoms}/icons/google-maps.js +5 -0
- package/dist/{assets → components/ui/atoms}/icons/google-news.js +27 -3
- package/dist/{assets → components/ui/atoms}/icons/google-sheets.js +3 -0
- package/dist/{assets → components/ui/atoms}/icons/google-shopping.js +9 -1
- package/dist/components/ui/atoms/icons/google-slides.d.ts +3 -0
- package/dist/components/ui/atoms/icons/google-slides.js +243 -0
- package/dist/{assets → components/ui/atoms}/icons/google.js +4 -0
- package/dist/{assets → components/ui/atoms}/icons/heroku.js +1 -0
- package/dist/components/ui/atoms/icons/hootsuite.d.ts +3 -0
- package/dist/components/ui/atoms/icons/hootsuite.js +43 -0
- package/dist/components/ui/atoms/icons/hubspot.d.ts +3 -0
- package/dist/{assets → components/ui/atoms}/icons/hubspot.js +2 -1
- package/dist/{assets → components/ui/atoms}/icons/index.d.ts +47 -0
- package/dist/components/ui/atoms/icons/index.js +220 -0
- package/dist/components/ui/atoms/icons/intercom.d.ts +3 -0
- package/dist/components/ui/atoms/icons/intercom.js +26 -0
- package/dist/{assets → components/ui/atoms}/icons/jira.js +15 -7
- package/dist/{assets → components/ui/atoms}/icons/linear.js +1 -0
- package/dist/components/ui/atoms/icons/linkedin.d.ts +3 -0
- package/dist/{assets → components/ui/atoms}/icons/linkedin.js +5 -4
- package/dist/components/ui/atoms/icons/mailchimp.d.ts +3 -0
- package/dist/components/ui/atoms/icons/mailchimp.js +70 -0
- package/dist/components/ui/atoms/icons/mcp.d.ts +3 -0
- package/dist/components/ui/atoms/icons/mcp.js +23 -0
- package/dist/components/ui/atoms/icons/microsoft-dynamics.d.ts +3 -0
- package/dist/components/ui/atoms/icons/microsoft-dynamics.js +172 -0
- package/dist/components/ui/atoms/icons/microsoft-sharepoint.d.ts +3 -0
- package/dist/components/ui/atoms/icons/microsoft-sharepoint.js +88 -0
- package/dist/components/ui/atoms/icons/microsoft-teams.d.ts +3 -0
- package/dist/components/ui/atoms/icons/microsoft-teams.js +119 -0
- package/dist/{assets → components/ui/atoms}/icons/microsoft.js +4 -0
- package/dist/components/ui/atoms/icons/miro.d.ts +3 -0
- package/dist/components/ui/atoms/icons/miro.js +35 -0
- package/dist/components/ui/atoms/icons/monday.d.ts +3 -0
- package/dist/components/ui/atoms/icons/monday.js +60 -0
- package/dist/components/ui/atoms/icons/netsuite.d.ts +3 -0
- package/dist/{assets → components/ui/atoms}/icons/netsuite.js +35 -26
- package/dist/{assets → components/ui/atoms}/icons/notion.js +2 -0
- package/dist/components/ui/atoms/icons/oauth.d.ts +3 -0
- package/dist/{assets → components/ui/atoms}/icons/oauth.js +66 -8
- package/dist/components/ui/atoms/icons/obsidian.d.ts +3 -0
- package/dist/components/ui/atoms/icons/obsidian.js +220 -0
- package/dist/components/ui/atoms/icons/okta.d.ts +3 -0
- package/dist/components/ui/atoms/icons/okta.js +56 -0
- package/dist/components/ui/atoms/icons/one-drive.d.ts +3 -0
- package/dist/components/ui/atoms/icons/one-drive.js +38 -0
- package/dist/{assets → components/ui/atoms}/icons/outlook-calendar.js +18 -0
- package/dist/{assets → components/ui/atoms}/icons/outlook-mail.js +4 -0
- package/dist/components/ui/atoms/icons/pinecone.d.ts +3 -0
- package/dist/components/ui/atoms/icons/pinecone.js +29 -0
- package/dist/{assets → components/ui/atoms}/icons/pinterest.js +1 -0
- package/dist/components/ui/atoms/icons/pipedrive.d.ts +3 -0
- package/dist/components/ui/atoms/icons/pipedrive.js +59 -0
- package/dist/components/ui/atoms/icons/plaid.d.ts +3 -0
- package/dist/components/ui/atoms/icons/plaid.js +37 -0
- package/dist/{assets → components/ui/atoms}/icons/postgres.js +30 -20
- package/dist/components/ui/atoms/icons/quickbooks.d.ts +3 -0
- package/dist/components/ui/atoms/icons/quickbooks.js +25 -0
- package/dist/components/ui/atoms/icons/reddit.js +315 -0
- package/dist/{assets → components/ui/atoms}/icons/salesforce.js +3 -0
- package/dist/{assets → components/ui/atoms}/icons/shopify.js +3 -0
- package/dist/components/ui/atoms/icons/singlestore.d.ts +3 -0
- package/dist/components/ui/atoms/icons/singlestore.js +284 -0
- package/dist/{assets → components/ui/atoms}/icons/slack.js +7 -1
- package/dist/components/ui/atoms/icons/snowflake.d.ts +3 -0
- package/dist/components/ui/atoms/icons/snowflake.js +26 -0
- package/dist/components/ui/atoms/icons/splunk.d.ts +3 -0
- package/dist/components/ui/atoms/icons/splunk.js +54 -0
- package/dist/{assets → components/ui/atoms}/icons/spotify.js +1 -0
- package/dist/components/ui/atoms/icons/square.d.ts +3 -0
- package/dist/components/ui/atoms/icons/square.js +41 -0
- package/dist/components/ui/atoms/icons/squarespace.d.ts +3 -0
- package/dist/components/ui/atoms/icons/squarespace.js +29 -0
- package/dist/{assets → components/ui/atoms}/icons/stripe.js +1 -0
- package/dist/{assets → components/ui/atoms}/icons/tesla.js +5 -1
- package/dist/{assets → components/ui/atoms}/icons/tiktok.js +3 -0
- package/dist/components/ui/atoms/icons/trello.d.ts +3 -0
- package/dist/components/ui/atoms/icons/trello.js +59 -0
- package/dist/{assets → components/ui/atoms}/icons/twilio.js +11 -4
- package/dist/{assets → components/ui/atoms}/icons/twitch.js +6 -1
- package/dist/components/ui/atoms/icons/utils.d.ts +56 -0
- package/dist/components/ui/atoms/icons/utils.js +41 -0
- package/dist/{assets → components/ui/atoms}/icons/vercel.js +1 -0
- package/dist/{assets → components/ui/atoms}/icons/walmart.js +2 -0
- package/dist/components/ui/atoms/icons/weaviate.d.ts +3 -0
- package/dist/components/ui/atoms/icons/weaviate.js +229 -0
- package/dist/components/ui/atoms/icons/workday.d.ts +3 -0
- package/dist/components/ui/atoms/icons/workday.js +97 -0
- package/dist/components/ui/atoms/icons/wrike.d.ts +3 -0
- package/dist/components/ui/atoms/icons/wrike.js +16 -0
- package/dist/{assets → components/ui/atoms}/icons/x.js +4 -4
- package/dist/components/ui/atoms/icons/xero.js +87 -0
- package/dist/components/ui/atoms/icons/youtube.d.ts +3 -0
- package/dist/{assets → components/ui/atoms}/icons/youtube.js +3 -1
- package/dist/components/ui/atoms/icons/zendesk.d.ts +3 -0
- package/dist/components/ui/atoms/icons/zendesk.js +27 -0
- package/dist/{assets → components/ui/atoms}/icons/zoom.js +30 -17
- package/dist/components/ui/atoms/index.d.ts +2 -0
- package/dist/components/ui/atoms/index.js +416 -198
- package/dist/components/ui/atoms/popover.js +2 -2
- package/dist/components/ui/atoms/progress.js +18 -17
- package/dist/components/ui/atoms/radio-group.js +1 -1
- package/dist/components/ui/atoms/scroll-area.js +3 -3
- package/dist/components/ui/atoms/select.js +3 -3
- package/dist/components/ui/atoms/sheet.js +1 -1
- package/dist/components/ui/atoms/sidebar.js +102 -102
- package/dist/components/ui/atoms/tabs.js +1 -1
- package/dist/components/ui/atoms/tooltip.js +2 -2
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +431 -213
- package/dist/components/ui/molecules/index.d.ts +1 -0
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +6 -5
- package/dist/components/ui/molecules/tool-card.js +18 -18
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/toolkit-picker-trigger.js +47 -38
- package/dist/components/ui/molecules/toolkit-selection-summary.d.ts +4 -3
- package/dist/components/ui/molecules/toolkit-selection-summary.js +32 -29
- package/dist/components/ui/organisms/index.d.ts +1 -0
- package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.js +9 -9
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +5 -4
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +7 -6
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.d.ts +2 -2
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +21 -18
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.js +14 -18
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.js +7 -7
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +12 -11
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +54 -40
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +195 -113
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +126 -116
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +3418 -4391
- package/dist/components/ui/utils/memo.test.d.ts +1 -0
- package/dist/components/ui/utils/memo.test.js +36 -0
- package/dist/{index-CtSXVDca.js → index-BDIfjxqB.js} +1 -1
- package/dist/{index-C8_QusYl.js → index-BGfrl8IX.js} +1 -1
- package/dist/{index-Ez2mlmzx.js → index-BzU0xzeS.js} +1 -1
- package/dist/index-DH9yRdVk.js +1540 -0
- package/dist/lib/arcade/arcade.d.ts +2 -2
- package/dist/lib/arcade/arcade.js +3 -2
- package/dist/lib/arcade/arcade.test.js +2 -2
- package/dist/lib/utils.test.d.ts +1 -0
- package/dist/lib/utils.test.js +43 -0
- package/dist/{magic-string.es-BQ9KnLz-.js → magic-string.es-QnVUNas7.js} +4 -3
- package/dist/main.d.ts +1 -0
- package/dist/main.js +431 -213
- package/dist/metadata/oauth-providers.d.ts +69 -0
- package/dist/metadata/oauth-providers.js +260 -0
- package/dist/metadata/toolkits.d.ts +24 -0
- package/dist/metadata/toolkits.js +1500 -0
- package/dist/{react.esm-369wBsAv.js → react.esm-CFMQn0EI.js} +31 -31
- package/dist/{toolkit-card-GhM_oj4G.js → toolkit-card-UG1sZ0Le.js} +11 -10
- package/dist/{vi.bdSIJ99Y-CZgZQPWH.js → vi.bdSIJ99Y-CQ1FdEM8.js} +3462 -3916
- package/package.json +38 -35
- package/dist/assets/icons/calendly.js +0 -64
- package/dist/assets/icons/clickup.d.ts +0 -3
- package/dist/assets/icons/e2b.d.ts +0 -3
- package/dist/assets/icons/e2b.js +0 -9
- package/dist/assets/icons/firecrawl.d.ts +0 -5
- package/dist/assets/icons/firecrawl.js +0 -17
- package/dist/assets/icons/google-calendar.js +0 -93
- package/dist/assets/icons/google-docs.js +0 -219
- package/dist/assets/icons/hubspot.d.ts +0 -3
- package/dist/assets/icons/index.js +0 -128
- package/dist/assets/icons/linkedin.d.ts +0 -3
- package/dist/assets/icons/netsuite.d.ts +0 -3
- package/dist/assets/icons/oauth.d.ts +0 -3
- package/dist/assets/icons/reddit.js +0 -268
- package/dist/assets/icons/utils.d.ts +0 -435
- package/dist/assets/icons/utils.js +0 -439
- package/dist/assets/icons/xero.js +0 -63
- package/dist/assets/icons/youtube.d.ts +0 -3
- package/dist/components/ui/organisms/toolkit-picker/components/mobile-filter-badges.d.ts +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/mobile-filter-badges.js +0 -96
- package/dist/index-DEJd-dpa.js +0 -1537
- /package/dist/{assets → components/ui/atoms}/icons/airtable.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/arcade.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/asana.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/atlassian.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/auth0.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/azure.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/bluesky.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/box.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/calendly.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/coinbase.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/confluence.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/datadog.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/discord.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/dropbox.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/ebay.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/figma.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/github.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/gitlab.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/gmail.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-calendar.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-contacts.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-docs.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-drive.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-finance.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-flight.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-hotels.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-maps.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-news.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-sheets.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google-shopping.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/google.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/heroku.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/jira.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/linear.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/microsoft.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/notion.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/outlook-calendar.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/outlook-mail.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/pinterest.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/postgres.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/reddit.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/salesforce.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/shopify.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/slack.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/spotify.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/stripe.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/tesla.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/tiktok.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/twilio.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/twitch.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/vercel.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/walmart.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/x.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/xero.d.ts +0 -0
- /package/dist/{assets → components/ui/atoms}/icons/zoom.d.ts +0 -0
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { r as c, a as i } from "../../../../../react.esm-
|
|
3
|
-
import {
|
|
2
|
+
import { r as c, a as i } from "../../../../../react.esm-CFMQn0EI.js";
|
|
3
|
+
import { mockToolkitCollection as a } from "../mocks/toolkit-collection.js";
|
|
4
4
|
import { useToolkitPicker as n, ToolkitPickerProvider as k } from "./use-toolkit-picker.js";
|
|
5
|
-
import { d as T, b as d, i as u, g as e, v as
|
|
5
|
+
import { d as T, b as d, i as u, g as e, v as p } from "../../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
|
|
6
6
|
T("useToolkitPicker - Filter Tests", () => {
|
|
7
7
|
d(() => {
|
|
8
|
-
|
|
8
|
+
p.clearAllMocks();
|
|
9
9
|
}), u("should filter tools by toolkit", () => {
|
|
10
|
-
const
|
|
10
|
+
const l = ({ children: f }) => /* @__PURE__ */ s(k, { toolkitCollection: a, children: f }), { result: t } = c(() => n(), { wrapper: l });
|
|
11
11
|
i(() => {
|
|
12
12
|
t.current.setToolkitFilter("basic");
|
|
13
13
|
});
|
|
14
14
|
const o = t.current.state;
|
|
15
|
-
e(o.toolkitFilter).toBe("basic"), e(o.activeTab).toBe("tools"), e(o.filteredTools.size).toBe(
|
|
16
|
-
const
|
|
17
|
-
e(
|
|
18
|
-
l.every(
|
|
19
|
-
(f) => f.fully_qualified_name.startsWith("basic.")
|
|
20
|
-
)
|
|
21
|
-
).toBe(!0);
|
|
15
|
+
e(o.toolkitFilter).toBe("basic"), e(o.activeTab).toBe("tools"), e(o.filteredTools.size).toBe(1);
|
|
16
|
+
const r = Array.from(o.filteredTools);
|
|
17
|
+
e(r[0].fully_qualified_name).toBe("simple_tool");
|
|
22
18
|
}), u("should handle non-existent toolkit filter", () => {
|
|
23
|
-
const
|
|
19
|
+
const l = ({ children: r }) => /* @__PURE__ */ s(k, { toolkitCollection: a, children: r }), { result: t } = c(() => n(), { wrapper: l });
|
|
24
20
|
i(() => {
|
|
25
21
|
t.current.setToolkitFilter("nonexistent");
|
|
26
22
|
});
|
|
27
23
|
const o = t.current.state;
|
|
28
|
-
e(o.toolkitFilter).toBe("nonexistent"), e(o.filteredTools.size).toBe(
|
|
24
|
+
e(o.toolkitFilter).toBe("nonexistent"), e(o.filteredTools.size).toBe(15);
|
|
29
25
|
}), u("should clear toolkit filter and restore all tools", () => {
|
|
30
|
-
const
|
|
26
|
+
const l = ({ children: r }) => /* @__PURE__ */ s(k, { toolkitCollection: a, children: r }), { result: t } = c(() => n(), { wrapper: l });
|
|
31
27
|
i(() => {
|
|
32
28
|
t.current.setToolkitFilter("basic");
|
|
33
|
-
}), e(t.current.state.filteredTools.size).toBe(
|
|
29
|
+
}), e(t.current.state.filteredTools.size).toBe(1), i(() => {
|
|
34
30
|
t.current.clearFilter();
|
|
35
31
|
});
|
|
36
32
|
const o = t.current.state;
|
|
37
|
-
e(o.toolkitFilter).toBe(""), e(o.filteredTools.size).toBe(
|
|
33
|
+
e(o.toolkitFilter).toBe(""), e(o.filteredTools.size).toBe(15), e(o.filteredToolkits.size).toBe(6);
|
|
38
34
|
}), u("should switch to tools tab when filtering by toolkit", () => {
|
|
39
|
-
const
|
|
35
|
+
const l = ({ children: o }) => /* @__PURE__ */ s(k, { toolkitCollection: a, children: o }), { result: t } = c(() => n(), { wrapper: l });
|
|
40
36
|
e(t.current.state.activeTab).toBe("toolkits"), i(() => {
|
|
41
37
|
t.current.setToolkitFilter("basic");
|
|
42
38
|
}), e(t.current.state.activeTab).toBe("tools");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { r as c, a as l } from "../../../../../react.esm-
|
|
3
|
-
import {
|
|
2
|
+
import { r as c, a as l } from "../../../../../react.esm-CFMQn0EI.js";
|
|
3
|
+
import { mockToolkitCollection as a } from "../mocks/toolkit-collection.js";
|
|
4
4
|
import { useToolkitPicker as n, ToolkitPickerProvider as u } from "./use-toolkit-picker.js";
|
|
5
|
-
import { d as k, b as h, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-
|
|
5
|
+
import { d as k, b as h, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
|
|
6
6
|
k("useToolkitPicker - Search Tests", () => {
|
|
7
7
|
h(() => {
|
|
8
8
|
m.clearAllMocks();
|
|
@@ -12,7 +12,7 @@ k("useToolkitPicker - Search Tests", () => {
|
|
|
12
12
|
t.current.setSearchQuery("basic");
|
|
13
13
|
});
|
|
14
14
|
const e = t.current.state;
|
|
15
|
-
o(e.searchQuery).toBe("basic"), o(e.filteredToolkits.size).toBe(1), o(e.filteredTools.size).toBe(
|
|
15
|
+
o(e.searchQuery).toBe("basic"), o(e.filteredToolkits.size).toBe(1), o(e.filteredTools.size).toBe(1);
|
|
16
16
|
const s = Array.from(
|
|
17
17
|
e.filteredToolkits
|
|
18
18
|
)[0];
|
|
@@ -20,12 +20,12 @@ k("useToolkitPicker - Search Tests", () => {
|
|
|
20
20
|
}), d("should filter tools correctly when searching for tool names", () => {
|
|
21
21
|
const r = ({ children: f }) => /* @__PURE__ */ i(u, { toolkitCollection: a, children: f }), { result: t } = c(() => n(), { wrapper: r });
|
|
22
22
|
l(() => {
|
|
23
|
-
t.current.setSearchQuery("
|
|
23
|
+
t.current.setSearchQuery("secret_required_tool");
|
|
24
24
|
});
|
|
25
25
|
const e = t.current.state;
|
|
26
26
|
o(e.filteredTools.size).toBe(1);
|
|
27
27
|
const s = Array.from(e.filteredTools)[0];
|
|
28
|
-
o(s.fully_qualified_name).toBe("
|
|
28
|
+
o(s.fully_qualified_name).toBe("secret_required_tool");
|
|
29
29
|
}), d("should return empty results for non-matching search query", () => {
|
|
30
30
|
const r = ({ children: s }) => /* @__PURE__ */ i(u, { toolkitCollection: a, children: s }), { result: t } = c(() => n(), { wrapper: r });
|
|
31
31
|
l(() => {
|
|
@@ -41,6 +41,6 @@ k("useToolkitPicker - Search Tests", () => {
|
|
|
41
41
|
t.current.clearSearchQuery();
|
|
42
42
|
});
|
|
43
43
|
const e = t.current.state;
|
|
44
|
-
o(e.searchQuery).toBe(""), o(e.filteredToolkits.size).toBe(
|
|
44
|
+
o(e.searchQuery).toBe(""), o(e.filteredToolkits.size).toBe(6), o(e.filteredTools.size).toBe(15);
|
|
45
45
|
});
|
|
46
46
|
});
|
package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { r as i, a as t } from "../../../../../react.esm-
|
|
2
|
+
import { r as i, a as t } from "../../../../../react.esm-CFMQn0EI.js";
|
|
3
3
|
import { simpleMockToolkitCollection as c } from "../mocks/toolkit-collection.js";
|
|
4
4
|
import { useToolkitPicker as a, ToolkitPickerProvider as n } from "./use-toolkit-picker.js";
|
|
5
|
-
import { d as u, b as k, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-
|
|
5
|
+
import { d as u, b as k, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
|
|
6
6
|
u("useToolkitPicker - Selection Tests", () => {
|
|
7
7
|
k(() => {
|
|
8
8
|
m.clearAllMocks();
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ProcessedTool, ProcessedToolkit, ToolkitCollection } from '../../../../../lib/arcade/arcade';
|
|
3
3
|
import { SelectionMode } from '../index';
|
|
4
|
-
export
|
|
4
|
+
export type UseToolkitPickerProps = {
|
|
5
5
|
toolkitCollection?: ToolkitCollection;
|
|
6
6
|
selectionMode?: SelectionMode;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export type ToolkitPickerTab = 'toolkits' | 'tools';
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export type ToolkitSelectionMap = Map<string, ProcessedToolkit>;
|
|
10
|
+
export type ToolSelectionMap = Map<string, boolean>;
|
|
11
|
+
type UseToolkitPickerState = UseToolkitPickerProps & {
|
|
12
|
+
selectedToolkits: ToolkitSelectionMap;
|
|
13
|
+
selectedTools: ToolSelectionMap;
|
|
14
|
+
committedToolkits: ToolkitSelectionMap;
|
|
15
|
+
committedTools: ToolSelectionMap;
|
|
15
16
|
filteredToolkits: Set<ProcessedToolkit>;
|
|
16
17
|
filteredTools: Set<ProcessedTool>;
|
|
17
18
|
searchQuery: string;
|
|
18
19
|
toolkitFilter: string;
|
|
19
20
|
activeTab: ToolkitPickerTab;
|
|
20
21
|
selectionMode: SelectionMode;
|
|
21
|
-
}
|
|
22
|
-
|
|
22
|
+
};
|
|
23
|
+
type ToolkitPickerContextType = {
|
|
23
24
|
state: UseToolkitPickerState;
|
|
24
25
|
toggleToolkit: (toolkit: ProcessedToolkit) => void;
|
|
25
26
|
toggleTool: (tool: ProcessedTool) => void;
|
|
@@ -32,7 +33,7 @@ interface ToolkitPickerContextType {
|
|
|
32
33
|
setToolkitFilter: (fqName: string) => void;
|
|
33
34
|
clearFilter: () => void;
|
|
34
35
|
setActiveTab: (tab: ToolkitPickerTab) => void;
|
|
35
|
-
}
|
|
36
|
+
};
|
|
36
37
|
export declare function ToolkitPickerProvider({ children, ...props }: {
|
|
37
38
|
children: ReactNode;
|
|
38
39
|
} & UseToolkitPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as S, useReducer as w, useEffect as m, useContext as E } from "react";
|
|
3
|
-
const
|
|
3
|
+
const r = (o, t) => t ? new Set(
|
|
4
4
|
o.filter((e) => e.searchableText?.toLowerCase().includes(t))
|
|
5
|
-
) : new Set(o),
|
|
5
|
+
) : new Set(o), a = (o, t) => {
|
|
6
6
|
if (!t)
|
|
7
7
|
return [];
|
|
8
8
|
const e = t.toolkitMap?.get(o);
|
|
@@ -12,7 +12,7 @@ const n = (o, t) => t ? new Set(
|
|
|
12
12
|
return [];
|
|
13
13
|
const l = new Set(e.tools.map((s) => s.fully_qualified_name));
|
|
14
14
|
return t.tools.filter((s) => l.has(s.fully_qualified_name));
|
|
15
|
-
}, C = (o, t, e) => e ? e.toolkitMap?.get(t)?.tools?.some((s) => o.has(s.fully_qualified_name)) ?? !1 : !1,
|
|
15
|
+
}, C = (o, t, e) => e ? e.toolkitMap?.get(t)?.tools?.some((s) => o.has(s.fully_qualified_name)) ?? !1 : !1, p = (o, t, e) => !t.size && e.size ? "tools" : t.size && !e.size ? "toolkits" : o, _ = (o, t) => {
|
|
16
16
|
if (!t)
|
|
17
17
|
return {
|
|
18
18
|
selectedToolkits: /* @__PURE__ */ new Map(),
|
|
@@ -23,11 +23,14 @@ const n = (o, t) => t ? new Set(
|
|
|
23
23
|
for (const s of o) {
|
|
24
24
|
l.set(s, !0);
|
|
25
25
|
const i = t.toolToToolkitMap?.get(s);
|
|
26
|
-
|
|
26
|
+
if (i) {
|
|
27
|
+
const n = t.toolkitMap?.get(i);
|
|
28
|
+
n && e.set(i, n);
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
else
|
|
29
32
|
for (const s of t.toolkits) {
|
|
30
|
-
e.set(s.name,
|
|
33
|
+
e.set(s.name, s);
|
|
31
34
|
for (const i of s.tools)
|
|
32
35
|
l.set(i.fully_qualified_name, !0);
|
|
33
36
|
}
|
|
@@ -36,33 +39,41 @@ const n = (o, t) => t ? new Set(
|
|
|
36
39
|
if (!e)
|
|
37
40
|
return {
|
|
38
41
|
searchQuery: o,
|
|
42
|
+
activeTab: "toolkits",
|
|
39
43
|
filteredToolkits: /* @__PURE__ */ new Set(),
|
|
40
44
|
filteredTools: /* @__PURE__ */ new Set()
|
|
41
45
|
};
|
|
42
|
-
const l = t ? new Set(
|
|
46
|
+
const l = t ? new Set(a(t, e)) : new Set(e.tools || []);
|
|
43
47
|
return {
|
|
44
48
|
searchQuery: o,
|
|
49
|
+
activeTab: "toolkits",
|
|
45
50
|
filteredToolkits: new Set(e.toolkits || []),
|
|
46
51
|
filteredTools: l
|
|
47
52
|
};
|
|
48
53
|
}, y = (o, t) => {
|
|
49
|
-
const e = o.toLowerCase().trim(), { toolkits: l = [], tools: s = [] } = t.toolkitCollection || {}, i = !l.length,
|
|
50
|
-
if (i &&
|
|
54
|
+
const e = o.toLowerCase().trim(), { toolkits: l = [], tools: s = [] } = t.toolkitCollection || {}, i = !l.length, n = !s.length;
|
|
55
|
+
if (i && n)
|
|
51
56
|
return { searchQuery: o };
|
|
52
|
-
const
|
|
57
|
+
const c = r(l, e), u = t.toolkitFilter ? a(t.toolkitFilter, t.toolkitCollection) : s, k = r(u, e);
|
|
53
58
|
return {
|
|
54
59
|
searchQuery: o,
|
|
55
|
-
filteredToolkits:
|
|
60
|
+
filteredToolkits: c,
|
|
56
61
|
filteredTools: k,
|
|
57
|
-
activeTab:
|
|
62
|
+
activeTab: p(t.activeTab, c, k)
|
|
58
63
|
};
|
|
59
64
|
}, L = (o, t) => {
|
|
60
65
|
const e = t.selectedTools.has(o), l = t.toolkitCollection?.toolToToolkitMap?.get(o), s = new Map(t.selectedToolkits), i = new Map(t.selectedTools);
|
|
61
|
-
|
|
62
|
-
i,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
if (e)
|
|
67
|
+
i.delete(o), l && (C(
|
|
68
|
+
i,
|
|
69
|
+
l,
|
|
70
|
+
t.toolkitCollection
|
|
71
|
+
) || s.delete(l));
|
|
72
|
+
else if (t.selectionMode === "single" && (i.clear(), s.clear()), i.set(o, !0), l) {
|
|
73
|
+
const n = t.toolkitCollection?.toolkitMap?.get(l);
|
|
74
|
+
n && s.set(l, n);
|
|
75
|
+
}
|
|
76
|
+
return { selectedTools: i, selectedToolkits: s };
|
|
66
77
|
}, M = (o) => ({
|
|
67
78
|
...o,
|
|
68
79
|
selectedToolkits: /* @__PURE__ */ new Map(),
|
|
@@ -78,20 +89,20 @@ const n = (o, t) => t ? new Set(
|
|
|
78
89
|
}), I = (o, t) => {
|
|
79
90
|
switch (t.type) {
|
|
80
91
|
case "TOGGLE_TOOLKIT": {
|
|
81
|
-
const { name:
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
for (const c of
|
|
85
|
-
|
|
92
|
+
const e = t.payload, { name: l, tools: s } = e, i = o.selectedToolkits.has(l), n = new Map(o.selectedToolkits), T = new Map(o.selectedTools);
|
|
93
|
+
if (i) {
|
|
94
|
+
n.delete(l);
|
|
95
|
+
for (const c of s)
|
|
96
|
+
T.delete(c.fully_qualified_name);
|
|
86
97
|
} else {
|
|
87
|
-
|
|
88
|
-
for (const c of
|
|
89
|
-
|
|
98
|
+
n.set(l, e);
|
|
99
|
+
for (const c of s)
|
|
100
|
+
T.set(c.fully_qualified_name, !0);
|
|
90
101
|
}
|
|
91
102
|
return {
|
|
92
103
|
...o,
|
|
93
|
-
selectedToolkits:
|
|
94
|
-
selectedTools:
|
|
104
|
+
selectedToolkits: n,
|
|
105
|
+
selectedTools: T
|
|
95
106
|
};
|
|
96
107
|
}
|
|
97
108
|
case "SET_INITIAL_DATA": {
|
|
@@ -111,8 +122,8 @@ const n = (o, t) => t ? new Set(
|
|
|
111
122
|
const e = t.payload, l = e?.length === 0, i = !e && !o.toolkitCollection?.toolkits?.length;
|
|
112
123
|
if (l || i)
|
|
113
124
|
return o;
|
|
114
|
-
const
|
|
115
|
-
return { ...o, ...
|
|
125
|
+
const n = _(e, o.toolkitCollection);
|
|
126
|
+
return { ...o, ...n };
|
|
116
127
|
}
|
|
117
128
|
case "CLEAR_SELECTIONS":
|
|
118
129
|
return {
|
|
@@ -149,17 +160,18 @@ const n = (o, t) => t ? new Set(
|
|
|
149
160
|
}
|
|
150
161
|
case "CLEAR_SEARCH_QUERY": {
|
|
151
162
|
const e = o.toolkitFilter ? new Set(
|
|
152
|
-
|
|
163
|
+
a(o.toolkitFilter, o.toolkitCollection)
|
|
153
164
|
) : new Set(o.toolkitCollection?.tools || []);
|
|
154
165
|
return {
|
|
155
166
|
...o,
|
|
156
167
|
searchQuery: "",
|
|
168
|
+
activeTab: "toolkits",
|
|
157
169
|
filteredToolkits: new Set(o.toolkitCollection?.toolkits || []),
|
|
158
170
|
filteredTools: e
|
|
159
171
|
};
|
|
160
172
|
}
|
|
161
173
|
case "SET_TOOLKIT_FILTER": {
|
|
162
|
-
const e = t.payload, l =
|
|
174
|
+
const e = t.payload, l = a(
|
|
163
175
|
e,
|
|
164
176
|
o.toolkitCollection
|
|
165
177
|
);
|
|
@@ -170,7 +182,7 @@ const n = (o, t) => t ? new Set(
|
|
|
170
182
|
...o,
|
|
171
183
|
toolkitFilter: e,
|
|
172
184
|
activeTab: "tools",
|
|
173
|
-
filteredTools:
|
|
185
|
+
filteredTools: r(l, s)
|
|
174
186
|
};
|
|
175
187
|
}
|
|
176
188
|
case "CLEAR_FILTER": {
|
|
@@ -178,17 +190,19 @@ const n = (o, t) => t ? new Set(
|
|
|
178
190
|
return e ? {
|
|
179
191
|
...o,
|
|
180
192
|
toolkitFilter: "",
|
|
181
|
-
|
|
193
|
+
activeTab: "toolkits",
|
|
194
|
+
filteredToolkits: r(
|
|
182
195
|
o.toolkitCollection?.toolkits || [],
|
|
183
196
|
e
|
|
184
197
|
),
|
|
185
|
-
filteredTools:
|
|
198
|
+
filteredTools: r(
|
|
186
199
|
o.toolkitCollection?.tools || [],
|
|
187
200
|
e
|
|
188
201
|
)
|
|
189
202
|
} : {
|
|
190
203
|
...o,
|
|
191
204
|
toolkitFilter: "",
|
|
205
|
+
activeTab: "toolkits",
|
|
192
206
|
filteredToolkits: new Set(o.toolkitCollection?.toolkits || []),
|
|
193
207
|
filteredTools: new Set(o.toolkitCollection?.tools || [])
|
|
194
208
|
};
|
|
@@ -201,11 +215,11 @@ const n = (o, t) => t ? new Set(
|
|
|
201
215
|
...o,
|
|
202
216
|
activeTab: e,
|
|
203
217
|
toolkitFilter: "",
|
|
204
|
-
filteredToolkits:
|
|
218
|
+
filteredToolkits: r(
|
|
205
219
|
o.toolkitCollection?.toolkits || [],
|
|
206
220
|
l
|
|
207
221
|
),
|
|
208
|
-
filteredTools:
|
|
222
|
+
filteredTools: r(
|
|
209
223
|
o.toolkitCollection?.tools || [],
|
|
210
224
|
l
|
|
211
225
|
)
|
|
@@ -222,7 +236,7 @@ const n = (o, t) => t ? new Set(
|
|
|
222
236
|
default:
|
|
223
237
|
return o;
|
|
224
238
|
}
|
|
225
|
-
},
|
|
239
|
+
}, d = S(
|
|
226
240
|
null
|
|
227
241
|
);
|
|
228
242
|
function R({
|
|
@@ -251,10 +265,10 @@ function R({
|
|
|
251
265
|
clearFilter: () => l({ type: "CLEAR_FILTER" }),
|
|
252
266
|
setActiveTab: (i) => l({ type: "SET_ACTIVE_TAB", payload: i })
|
|
253
267
|
};
|
|
254
|
-
return /* @__PURE__ */ f(
|
|
268
|
+
return /* @__PURE__ */ f(d.Provider, { value: s, children: o });
|
|
255
269
|
}
|
|
256
|
-
function
|
|
257
|
-
const o = E(
|
|
270
|
+
function g() {
|
|
271
|
+
const o = E(d);
|
|
258
272
|
if (!o)
|
|
259
273
|
throw new Error(
|
|
260
274
|
"useToolkitPicker must be used within a ToolkitPickerProvider. Make sure to wrap your component with <ToolkitPickerProvider>."
|
|
@@ -263,5 +277,5 @@ function F() {
|
|
|
263
277
|
}
|
|
264
278
|
export {
|
|
265
279
|
R as ToolkitPickerProvider,
|
|
266
|
-
|
|
280
|
+
g as useToolkitPicker
|
|
267
281
|
};
|