Compare commits

..

17 commits

Author SHA1 Message Date
ea7274d4ab
fix(tailwindcss): use the correct icon resolution for the entrypoint icon
All checks were successful
Actions / Build Plugins (pull_request) Successful in 38s
2024-12-28 12:51:18 -05:00
086a9791d6
refactor(tailwindcss): cleanup
All checks were successful
Actions / Build Plugins (pull_request) Successful in 39s
2024-12-28 12:47:00 -05:00
cd2a37c679
chore(tailwindcss): add icon to gauntlet ui 2024-12-28 12:46:47 -05:00
8aaab98785
refactor(utils): log urls opened by open-url.open() to console 2024-12-28 12:46:36 -05:00
bca9468392
Merge remote-tracking branch 'origin/main' into tailwindcss
All checks were successful
Actions / Build Plugins (pull_request) Successful in 40s
2024-12-28 09:57:39 -05:00
f2304ffdca
chore(tailwindcss): add a comment linking to a Gauntlet issue explaining why we're setting LD_LIBRARY_PATH in open-url.open()
All checks were successful
Actions / Build Plugins (pull_request) Successful in 42s
2024-12-28 09:48:52 -05:00
cbc64e1880
chore(repo): move utils directory to repository root
All checks were successful
Actions / Build Plugins (pull_request) Successful in 40s
2024-12-28 09:46:52 -05:00
a4a2859b12
remove @opensrc/deno-open
All checks were successful
Actions / Build Plugins (pull_request) Successful in 41s
2024-12-28 09:45:44 -05:00
c6ad8bf111
feat(tailwindcss): open selected page in browser on click
All checks were successful
Actions / Build Plugins (pull_request) Successful in 43s
2024-12-28 09:44:57 -05:00
4a7fc2aed0
chore(vscode): change some settings around 2024-12-28 09:44:06 -05:00
3b59447602
formatting
All checks were successful
Actions / Build Plugins (pull_request) Successful in 38s
2024-12-23 19:26:53 -05:00
a82a971999
move classes.json into the generated folder
All checks were successful
Actions / Build Plugins (pull_request) Successful in 39s
2024-12-23 19:22:33 -05:00
95183524a2
add a searchbar
All checks were successful
Actions / Build Plugins (pull_request) Successful in 37s
2024-12-23 18:03:01 -05:00
91e5669667
add icon, use clipboard instead of open
All checks were successful
Actions / Build Plugins (pull_request) Successful in 38s
the clipboard change is a temporary fix for https://github.com/project-gauntlet/gauntlet/issues/28
2024-12-23 17:44:11 -05:00
d8f2e05a42
Merge branch 'main' into tailwindcss
All checks were successful
Actions / Build Plugins (pull_request) Successful in 38s
2024-12-23 17:18:01 -05:00
99c8d83a80
i think i might go insane
All checks were successful
Actions / Build Plugins (push) Successful in 26s
Actions / Build Plugins (pull_request) Successful in 39s
2024-12-23 17:08:44 -05:00
53ff052229
(tailwindcss): init
Some checks failed
Actions / Build Plugins (push) Failing after 7s
2024-12-23 16:55:52 -05:00
22 changed files with 631176 additions and 6209 deletions

2
.gitignore vendored
View file

@ -3,3 +3,5 @@
dist
node_modules
.idea
.yarn/*
!.yarn/releases

16
.vscode/settings.json vendored
View file

@ -1,8 +1,20 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace",
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.format.enable": true,
"eslint.codeActionsOnSave.mode": "problems",
"eslint.options": {
"overrideConfigFile": "eslint.config.mjs"
}
},
}

934
.yarn/releases/yarn-4.5.3.cjs vendored Executable file

File diff suppressed because one or more lines are too long

7
.yarnrc.yml Normal file
View file

@ -0,0 +1,7 @@
nodeLinker: node-modules
npmScopes:
jsr:
npmRegistryServer: "https://npm.jsr.io"
yarnPath: .yarn/releases/yarn-4.5.3.cjs

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

BIN
assets/tailwindcss/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

View file

@ -223,17 +223,17 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1733477122,
"narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},

View file

@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs";
@ -41,8 +41,10 @@
# https://devenv.sh/reference/options/
languages.javascript = {
enable = true;
corepack.enable = true;
yarn = {
enable = true;
package = pkgs.yarn-berry;
install.enable = true;
};
};

View file

@ -3,9 +3,27 @@ name = "cswimr's Gauntlet Plugins"
description = """
Collection of Gauntlet plugins by cswimr
Repository: https://www.coastalcommits.com/cswimr/gauntlet-emojipicker
Repository: https://www.coastalcommits.com/cswimr/cswimr-gauntlet-plugins
"""
#
# TailwindCSS
#
[[entrypoint]]
id = 'tailwindcss-search-documentation'
name = 'Search TailwindCSS Documentation'
path = 'src/tailwindcss/src/search-documentation.tsx'
icon = 'tailwindcss/entrypoint-icon.png'
type = 'view'
description = """
Search TailwindCSS documentation from Gauntlet!
"""
#
# Miscellaneous
#
[[entrypoint]]
id = 'emojipicker-legacy'
name = 'Emoji Picker'
@ -24,6 +42,18 @@ description = """
Copy emojis to your clipboard from Gauntlet!
"""
[[supported_system]]
os = 'linux'
[[supported_system]]
os = 'macos'
[[supported_system]]
os = 'windows'
[permissions]
main_search_bar = ["read"]
clipboard = ["write"]
[permissions.exec]
command = ["xdg-open", "open", "start", "firefox"]

View file

@ -1,21 +1,30 @@
{
"name": "cswimr-gauntlet-plugins",
"type": "module",
"license": "MIT",
"scripts": {
"publish": "gauntlet publish",
"build": "gauntlet build",
"dev": "gauntlet dev",
"format": "eslint --fix ."
"format": "eslint --fix .",
"generate:css": "yarn dlx tailwindcss -i ./src/tailwindcss/generator/input.css -o ./src/tailwindcss/generator/output.css",
"generate:classes": "node ./src/tailwindcss/generator/index.js",
"generate": "yarn run generate:css && yarn run generate:classes"
},
"dependencies": {
"@project-gauntlet/api": "0.12.0",
"color-convert": "^2.0.1",
"css": "^3.0.0",
"fuse": "^0.12.1",
"tailwindcss": "^3.4.17",
"unicode-emoji": "^2.6.0",
"which": "^5.0.0"
},
"devDependencies": {
"@eslint/js": "9.17.0",
"@project-gauntlet/tools": "0.9.0",
"@types/color-convert": "2.0.4",
"@types/css": "0.0.38",
"@types/deno": "2.0.0",
"@types/react": "19.0.2",
"@types/which": "3.0.4",
@ -28,5 +37,6 @@
"prettier": "3.4.2",
"typescript": "5.7.2",
"typescript-eslint": "8.18.2"
}
},
"packageManager": "yarn@4.5.3"
}

View file

@ -0,0 +1,5 @@
# TailwindCSS
This plugin provides commands to view TailwindCSS documentation and search colors, classes, and components.
A lot of the code in this plugin was adapted from the [Raycast Tailwind CSS extension](https://github.com/raycast/extensions/tree/main/extensions/tailwindcss), which is licensed under the [MIT License](https://github.com/raycast/extensions/blob/075164f28bbd384e938992834b2fb82f6b7379b3/extensions/tailwindcss/package.json#L10).

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,32 @@
import fs from "fs";
import css from "css";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const file = fs.readFileSync(path.join(__dirname, "./output.css"), "utf8");
const json = css
.parse(file)
.stylesheet.rules.filter((rule) => !!rule.selectors)
.map((rule) => {
if (!rule.selectors) {
return;
}
const selector = rule.selectors[0].replace("\\", "").split(" ")[0];
const classes = css
.stringify({ stylesheet: { rules: [rule] } })
.split("\n")
.slice(1, -1)
.map((line) => line.trim())
.join(" ");
return {
selector,
classes,
};
});
fs.writeFileSync(path.join(__dirname, "./classes.json"), JSON.stringify(json));

View file

@ -0,0 +1,2 @@
@tailwind components;
@tailwind utilities;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,800 @@
// See https://github.com/raycast/extensions/blob/main/extensions/tailwindcss/src/documentation/tailwind-css.ts
export default {
"Getting Started": [
{
url: "https://tailwindcss.com/docs/installation",
title: "Installation",
},
{
url: "https://tailwindcss.com/docs/editor-setup",
title: "Editor Setup",
},
{
url: "https://tailwindcss.com/docs/using-with-preprocessors",
title: "Using with Preprocessors",
},
{
url: "https://tailwindcss.com/docs/optimizing-for-production",
title: "Optimizing for Production",
},
{
url: "https://tailwindcss.com/docs/browser-support",
title: "Browser Support",
},
{
url: "https://tailwindcss.com/docs/upgrade-guide",
title: "Upgrade Guide",
},
],
"Core Concepts": [
{
url: "https://tailwindcss.com/docs/utility-first",
title: "Utility-First Fundamentals",
},
{
url: "https://tailwindcss.com/docs/hover-focus-and-other-states",
title: "Hover, Focus, and Other States",
},
{
url: "https://tailwindcss.com/docs/responsive-design",
title: "Responsive Design",
},
{
url: "https://tailwindcss.com/docs/dark-mode",
title: "Dark Mode",
},
{
url: "https://tailwindcss.com/docs/reusing-styles",
title: "Reusing Styles",
},
{
url: "https://tailwindcss.com/docs/adding-custom-styles",
title: "Adding Custom Styles",
},
{
url: "https://tailwindcss.com/docs/functions-and-directives",
title: "Functions & Directives",
},
],
Customization: [
{
url: "https://tailwindcss.com/docs/configuration",
title: "Configuration",
},
{
url: "https://tailwindcss.com/docs/content-configuration",
title: "Content",
},
{
url: "https://tailwindcss.com/docs/theme",
title: "Theme",
},
{
url: "https://tailwindcss.com/docs/screens",
title: "Screens",
},
{
url: "https://tailwindcss.com/docs/customizing-colors",
title: "Colors",
},
{
url: "https://tailwindcss.com/docs/customizing-spacing",
title: "Spacing",
},
{
url: "https://tailwindcss.com/docs/plugins",
title: "Plugins",
},
{
url: "https://tailwindcss.com/docs/presets",
title: "Presets",
},
],
"Base Styles": [
{
url: "https://tailwindcss.com/docs/preflight",
title: "Preflight",
},
],
Layout: [
{
url: "https://tailwindcss.com/docs/aspect-ratio",
title: "Aspect Ratio",
},
{
url: "https://tailwindcss.com/docs/container",
title: "Container",
},
{
url: "https://tailwindcss.com/docs/columns",
title: "Columns",
},
{
url: "https://tailwindcss.com/docs/break-after",
title: "Break After",
},
{
url: "https://tailwindcss.com/docs/break-before",
title: "Break Before",
},
{
url: "https://tailwindcss.com/docs/break-inside",
title: "Break Inside",
},
{
url: "https://tailwindcss.com/docs/box-decoration-break",
title: "Box Decoration Break",
},
{
url: "https://tailwindcss.com/docs/box-sizing",
title: "Box Sizing",
},
{
url: "https://tailwindcss.com/docs/display",
title: "Display",
},
{
url: "https://tailwindcss.com/docs/float",
title: "Floats",
},
{
url: "https://tailwindcss.com/docs/clear",
title: "Clear",
},
{
url: "https://tailwindcss.com/docs/isolation",
title: "Isolation",
},
{
url: "https://tailwindcss.com/docs/object-fit",
title: "Object Fit",
},
{
url: "https://tailwindcss.com/docs/object-position",
title: "Object Position",
},
{
url: "https://tailwindcss.com/docs/overflow",
title: "Overflow",
},
{
url: "https://tailwindcss.com/docs/overscroll-behavior",
title: "Overscroll Behavior",
},
{
url: "https://tailwindcss.com/docs/position",
title: "Position",
},
{
url: "https://tailwindcss.com/docs/top-right-bottom-left",
title: "Top / Right / Bottom / Left",
},
{
url: "https://tailwindcss.com/docs/visibility",
title: "Visibility",
},
{
url: "https://tailwindcss.com/docs/z-index",
title: "Z-Index",
},
],
"Flexbox & Grid": [
{
url: "https://tailwindcss.com/docs/flex-basis",
title: "Flex Basis",
},
{
url: "https://tailwindcss.com/docs/flex-direction",
title: "Flex Direction",
},
{
url: "https://tailwindcss.com/docs/flex-wrap",
title: "Flex Wrap",
},
{
url: "https://tailwindcss.com/docs/flex",
title: "Flex",
},
{
url: "https://tailwindcss.com/docs/flex-grow",
title: "Flex Grow",
},
{
url: "https://tailwindcss.com/docs/flex-shrink",
title: "Flex Shrink",
},
{
url: "https://tailwindcss.com/docs/order",
title: "Order",
},
{
url: "https://tailwindcss.com/docs/grid-template-columns",
title: "Grid Template Columns",
},
{
url: "https://tailwindcss.com/docs/grid-column",
title: "Grid Column Start / End",
},
{
url: "https://tailwindcss.com/docs/grid-template-rows",
title: "Grid Template Rows",
},
{
url: "https://tailwindcss.com/docs/grid-row",
title: "Grid Row Start / End",
},
{
url: "https://tailwindcss.com/docs/grid-auto-flow",
title: "Grid Auto Flow",
},
{
url: "https://tailwindcss.com/docs/grid-auto-columns",
title: "Grid Auto Columns",
},
{
url: "https://tailwindcss.com/docs/grid-auto-rows",
title: "Grid Auto Rows",
},
{
url: "https://tailwindcss.com/docs/gap",
title: "Gap",
},
{
url: "https://tailwindcss.com/docs/justify-content",
title: "Justify Content",
},
{
url: "https://tailwindcss.com/docs/justify-items",
title: "Justify Items",
},
{
url: "https://tailwindcss.com/docs/justify-self",
title: "Justify Self",
},
{
url: "https://tailwindcss.com/docs/align-content",
title: "Align Content",
},
{
url: "https://tailwindcss.com/docs/align-items",
title: "Align Items",
},
{
url: "https://tailwindcss.com/docs/align-self",
title: "Align Self",
},
{
url: "https://tailwindcss.com/docs/place-content",
title: "Place Content",
},
{
url: "https://tailwindcss.com/docs/place-items",
title: "Place Items",
},
{
url: "https://tailwindcss.com/docs/place-self",
title: "Place Self",
},
],
Spacing: [
{
url: "https://tailwindcss.com/docs/padding",
title: "Padding",
},
{
url: "https://tailwindcss.com/docs/margin",
title: "Margin",
},
{
url: "https://tailwindcss.com/docs/space",
title: "Space Between",
},
],
Sizing: [
{
url: "https://tailwindcss.com/docs/width",
title: "Width",
},
{
url: "https://tailwindcss.com/docs/min-width",
title: "Min-Width",
},
{
url: "https://tailwindcss.com/docs/max-width",
title: "Max-Width",
},
{
url: "https://tailwindcss.com/docs/height",
title: "Height",
},
{
url: "https://tailwindcss.com/docs/min-height",
title: "Min-Height",
},
{
url: "https://tailwindcss.com/docs/max-height",
title: "Max-Height",
},
{
url: "https://tailwindcss.com/docs/size",
title: "Size",
},
],
Typography: [
{
url: "https://tailwindcss.com/docs/font-family",
title: "Font Family",
},
{
url: "https://tailwindcss.com/docs/font-size",
title: "Font Size",
},
{
url: "https://tailwindcss.com/docs/font-smoothing",
title: "Font Smoothing",
},
{
url: "https://tailwindcss.com/docs/font-style",
title: "Font Style",
},
{
url: "https://tailwindcss.com/docs/font-weight",
title: "Font Weight",
},
{
url: "https://tailwindcss.com/docs/font-variant-numeric",
title: "Font Variant Numeric",
},
{
url: "https://tailwindcss.com/docs/letter-spacing",
title: "Letter Spacing",
},
{
url: "https://tailwindcss.com/docs/line-clamp",
title: "Line Clamp",
},
{
url: "https://tailwindcss.com/docs/line-height",
title: "Line Height",
},
{
url: "https://tailwindcss.com/docs/list-style-image",
title: "List Style Image",
},
{
url: "https://tailwindcss.com/docs/list-style-position",
title: "List Style Position",
},
{
url: "https://tailwindcss.com/docs/list-style-type",
title: "List Style Type",
},
{
url: "https://tailwindcss.com/docs/text-align",
title: "Text Align",
},
{
url: "https://tailwindcss.com/docs/text-color",
title: "Text Color",
},
{
url: "https://tailwindcss.com/docs/text-decoration",
title: "Text Decoration",
},
{
url: "https://tailwindcss.com/docs/text-decoration-color",
title: "Text Decoration Color",
},
{
url: "https://tailwindcss.com/docs/text-decoration-style",
title: "Text Decoration Style",
},
{
url: "https://tailwindcss.com/docs/text-decoration-thickness",
title: "Text Decoration Thickness",
},
{
url: "https://tailwindcss.com/docs/text-underline-offset",
title: "Text Underline Offset",
},
{
url: "https://tailwindcss.com/docs/text-transform",
title: "Text Transform",
},
{
url: "https://tailwindcss.com/docs/text-overflow",
title: "Text Overflow",
},
{
url: "https://tailwindcss.com/docs/text-wrap",
title: "Text Wrap",
},
{
url: "https://tailwindcss.com/docs/text-indent",
title: "Text Indent",
},
{
url: "https://tailwindcss.com/docs/vertical-align",
title: "Vertical Align",
},
{
url: "https://tailwindcss.com/docs/whitespace",
title: "Whitespace",
},
{
url: "https://tailwindcss.com/docs/word-break",
title: "Word Break",
},
{
url: "https://tailwindcss.com/docs/hyphens",
title: "Hyphens",
},
{
url: "https://tailwindcss.com/docs/content",
title: "Content",
},
],
Backgrounds: [
{
url: "https://tailwindcss.com/docs/background-attachment",
title: "Background Attachment",
},
{
url: "https://tailwindcss.com/docs/background-clip",
title: "Background Clip",
},
{
url: "https://tailwindcss.com/docs/background-color",
title: "Background Color",
},
{
url: "https://tailwindcss.com/docs/background-origin",
title: "Background Origin",
},
{
url: "https://tailwindcss.com/docs/background-position",
title: "Background Position",
},
{
url: "https://tailwindcss.com/docs/background-repeat",
title: "Background Repeat",
},
{
url: "https://tailwindcss.com/docs/background-size",
title: "Background Size",
},
{
url: "https://tailwindcss.com/docs/background-image",
title: "Background Image",
},
{
url: "https://tailwindcss.com/docs/gradient-color-stops",
title: "Gradient Color Stops",
},
],
Borders: [
{
url: "https://tailwindcss.com/docs/border-radius",
title: "Border Radius",
},
{
url: "https://tailwindcss.com/docs/border-width",
title: "Border Width",
},
{
url: "https://tailwindcss.com/docs/border-color",
title: "Border Color",
},
{
url: "https://tailwindcss.com/docs/border-style",
title: "Border Style",
},
{
url: "https://tailwindcss.com/docs/divide-width",
title: "Divide Width",
},
{
url: "https://tailwindcss.com/docs/divide-color",
title: "Divide Color",
},
{
url: "https://tailwindcss.com/docs/divide-style",
title: "Divide Style",
},
{
url: "https://tailwindcss.com/docs/outline-width",
title: "Outline Width",
},
{
url: "https://tailwindcss.com/docs/outline-color",
title: "Outline Color",
},
{
url: "https://tailwindcss.com/docs/outline-style",
title: "Outline Style",
},
{
url: "https://tailwindcss.com/docs/outline-offset",
title: "Outline Offset",
},
{
url: "https://tailwindcss.com/docs/ring-width",
title: "Ring Width",
},
{
url: "https://tailwindcss.com/docs/ring-color",
title: "Ring Color",
},
{
url: "https://tailwindcss.com/docs/ring-offset-width",
title: "Ring Offset Width",
},
{
url: "https://tailwindcss.com/docs/ring-offset-color",
title: "Ring Offset Color",
},
],
Effects: [
{
url: "https://tailwindcss.com/docs/box-shadow",
title: "Box Shadow",
},
{
url: "https://tailwindcss.com/docs/box-shadow-color",
title: "Box Shadow Color",
},
{
url: "https://tailwindcss.com/docs/opacity",
title: "Opacity",
},
{
url: "https://tailwindcss.com/docs/mix-blend-mode",
title: "Mix Blend Mode",
},
{
url: "https://tailwindcss.com/docs/background-blend-mode",
title: "Background Blend Mode",
},
],
Filters: [
{
url: "https://tailwindcss.com/docs/blur",
title: "Blur",
},
{
url: "https://tailwindcss.com/docs/brightness",
title: "Brightness",
},
{
url: "https://tailwindcss.com/docs/contrast",
title: "Contrast",
},
{
url: "https://tailwindcss.com/docs/drop-shadow",
title: "Drop Shadow",
},
{
url: "https://tailwindcss.com/docs/grayscale",
title: "Grayscale",
},
{
url: "https://tailwindcss.com/docs/hue-rotate",
title: "Hue Rotate",
},
{
url: "https://tailwindcss.com/docs/invert",
title: "Invert",
},
{
url: "https://tailwindcss.com/docs/saturate",
title: "Saturate",
},
{
url: "https://tailwindcss.com/docs/sepia",
title: "Sepia",
},
{
url: "https://tailwindcss.com/docs/backdrop-blur",
title: "Backdrop Blur",
},
{
url: "https://tailwindcss.com/docs/backdrop-brightness",
title: "Backdrop Brightness",
},
{
url: "https://tailwindcss.com/docs/backdrop-contrast",
title: "Backdrop Contrast",
},
{
url: "https://tailwindcss.com/docs/backdrop-grayscale",
title: "Backdrop Grayscale",
},
{
url: "https://tailwindcss.com/docs/backdrop-hue-rotate",
title: "Backdrop Hue Rotate",
},
{
url: "https://tailwindcss.com/docs/backdrop-invert",
title: "Backdrop Invert",
},
{
url: "https://tailwindcss.com/docs/backdrop-opacity",
title: "Backdrop Opacity",
},
{
url: "https://tailwindcss.com/docs/backdrop-saturate",
title: "Backdrop Saturate",
},
{
url: "https://tailwindcss.com/docs/backdrop-sepia",
title: "Backdrop Sepia",
},
],
Tables: [
{
url: "https://tailwindcss.com/docs/border-collapse",
title: "Border Collapse",
},
{
url: "https://tailwindcss.com/docs/border-spacing",
title: "Border Spacing",
},
{
url: "https://tailwindcss.com/docs/table-layout",
title: "Table Layout",
},
{
url: "https://tailwindcss.com/docs/caption-side",
title: "Caption Side",
},
],
"Transitions and Animation": [
{
url: "https://tailwindcss.com/docs/transition-property",
title: "Transition Property",
},
{
url: "https://tailwindcss.com/docs/transition-duration",
title: "Transition Duration",
},
{
url: "https://tailwindcss.com/docs/transition-timing-function",
title: "Transition Timing Function",
},
{
url: "https://tailwindcss.com/docs/transition-delay",
title: "Transition Delay",
},
{
url: "https://tailwindcss.com/docs/animation",
title: "Animation",
},
],
Transforms: [
{
url: "https://tailwindcss.com/docs/transform",
title: "Transform",
},
{
url: "https://tailwindcss.com/docs/transform-origin",
title: "Transform Origin",
},
{
url: "https://tailwindcss.com/docs/scale",
title: "Scale",
},
{
url: "https://tailwindcss.com/docs/rotate",
title: "Rotate",
},
{
url: "https://tailwindcss.com/docs/translate",
title: "Translate",
},
{
url: "https://tailwindcss.com/docs/skew",
title: "Skew",
},
{
url: "https://tailwindcss.com/docs/perspective",
title: "Perspective",
},
],
Interactivity: [
{
url: "https://tailwindcss.com/docs/appearance",
title: "Appearance",
},
{
url: "https://tailwindcss.com/docs/cursor",
title: "Cursor",
},
{
url: "https://tailwindcss.com/docs/pointer-events",
title: "Pointer Events",
},
{
url: "https://tailwindcss.com/docs/resize",
title: "Resize",
},
{
url: "https://tailwindcss.com/docs/scroll-behavior",
title: "Scroll Behavior",
},
{
url: "https://tailwindcss.com/docs/scroll-margin",
title: "Scroll Margin",
},
{
url: "https://tailwindcss.com/docs/scroll-padding",
title: "Scroll Padding",
},
{
url: "https://tailwindcss.com/docs/scroll-snap-align",
title: "Scroll Snap Align",
},
{
url: "https://tailwindcss.com/docs/scroll-snap-stop",
title: "Scroll Snap Stop",
},
{
url: "https://tailwindcss.com/docs/scroll-snap-type",
title: "Scroll Snap Type",
},
{
url: "https://tailwindcss.com/docs/touch-action",
title: "Touch Action",
},
{
url: "https://tailwindcss.com/docs/user-select",
title: "User Select",
},
{
url: "https://tailwindcss.com/docs/will-change",
title: "Will Change",
},
],
SVG: [
{
url: "https://tailwindcss.com/docs/fill",
title: "Fill",
},
{
url: "https://tailwindcss.com/docs/stroke",
title: "Stroke",
},
{
url: "https://tailwindcss.com/docs/stroke-width",
title: "Stroke Width",
},
],
Accessibility: [
{
url: "https://tailwindcss.com/docs/screen-readers",
title: "Screen Readers",
},
{
url: "https://tailwindcss.com/docs/forced-color-adjust",
title: "Forced Color Adjust",
},
],
"Official Plugins": [
{
url: "https://github.com/tailwindlabs/tailwindcss-aspect-ratio",
title: "Aspect Ratio",
},
{
url: "https://github.com/tailwindlabs/tailwindcss-forms",
title: "Forms",
},
{
url: "https://github.com/tailwindlabs/tailwindcss-line-clamp",
title: "Line Clamp",
},
{
url: "https://github.com/tailwindlabs/tailwindcss-typography",
title: "Typography",
},
],
};

View file

@ -0,0 +1,428 @@
// The following file is generated by getting the sitemap: https://tailwindui.com/sitemap.xml
// and converting it to JSON using something like: https://jsonformatter.org/xml-to-json
export default [
{
loc: "https://tailwindui.com/",
},
{
loc: "https://tailwindui.com/components",
},
{
loc: "https://tailwindui.com/components/application-ui/data-display/calendars",
},
{
loc: "https://tailwindui.com/components/application-ui/application-shells/stacked",
},
{
loc: "https://tailwindui.com/components/application-ui/application-shells/sidebar",
},
{
loc: "https://tailwindui.com/login",
},
{
loc: "https://tailwindui.com/components/application-ui/lists/tables",
},
{
loc: "https://tailwindui.com/documentation",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/form-layouts",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/input-groups",
},
{
loc: "https://tailwindui.com/all-access",
},
{
loc: "https://tailwindui.com/components/application-ui/headings/page-headings",
},
{
loc: "https://tailwindui.com/templates/catalyst",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/sign-in-forms",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/pagination",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/command-palettes",
},
{
loc: "https://tailwindui.com/components/marketing/sections/heroes",
},
{
loc: "https://tailwindui.com/components/",
},
{
loc: "https://tailwindui.com/components/marketing/sections/testimonials",
},
{
loc: "https://tailwindui.com/components/marketing/sections/feature-sections",
},
{
loc: "https://tailwindui.com/components/marketing/sections/newsletter-sections",
},
{
loc: "https://tailwindui.com/components/marketing/sections/team-sections",
},
{
loc: "https://tailwindui.com/templates",
},
{
loc: "https://tailwindui.com/components/marketing/sections/header",
},
{
loc: "https://tailwindui.com/components/marketing/sections/pricing",
},
{
loc: "https://tailwindui.com/components/marketing/sections/content-sections",
},
{
loc: "https://tailwindui.com/components/marketing/sections/logo-clouds",
},
{
loc: "https://tailwindui.com/components/marketing/sections/faq-sections",
},
{
loc: "https://tailwindui.com/components/marketing/sections/footers",
},
{
loc: "https://tailwindui.com/components/marketing/elements/banners",
},
{
loc: "https://tailwindui.com/components/marketing/elements/flyout-menus",
},
{
loc: "https://tailwindui.com/components/application-ui/lists/feeds",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/select-menus",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/radio-groups",
},
{
loc: "https://tailwindui.com/components/application-ui/overlays/dialogs",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/checkboxes",
},
{
loc: "https://tailwindui.com/components/application-ui/elements/dropdowns",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/product-lists",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/category-previews",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/comboboxes",
},
{
loc: "https://tailwindui.com/components/application-ui/elements/buttons",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/sidebar-navigation",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/product-overviews",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/navbars",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/shopping-carts",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/product-quickviews",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/promo-sections",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/category-filters",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/product-features",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/reviews",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/order-history",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/store-navigation",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/order-summaries",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/checkout-forms",
},
{
loc: "https://tailwindui.com/templates/spotlight",
},
{
loc: "https://tailwindui.com/components/ecommerce/components/incentives",
},
{
loc: "https://tailwindui.com/templates/salient",
},
{
loc: "https://tailwindui.com/templates/primer",
},
{
loc: "https://tailwindui.com/templates/commit",
},
{
loc: "https://tailwindui.com/templates/protocol",
},
{
loc: "https://tailwindui.com/templates/studio",
},
{
loc: "https://tailwindui.com/preview",
},
{
loc: "https://tailwindui.com/templates/transmit",
},
{
loc: "https://tailwindui.com/templates/pocket",
},
{
loc: "https://tailwindui.com/templates/keynote",
},
{
loc: "https://tailwindui.com/privacy-policy",
},
{
loc: "https://tailwindui.com/templates/syntax",
},
{
loc: "https://tailwindui.com/changelog",
},
{
loc: "https://tailwindui.com/components/marketing/sections/bento-grids",
},
{
loc: "https://tailwindui.com/components/marketing/sections/cta-sections",
},
{
loc: "https://tailwindui.com/components/marketing/sections/stats-sections",
},
{
loc: "https://tailwindui.com/components/marketing/sections/blog-sections",
},
{
loc: "https://tailwindui.com/components/marketing/feedback/404-pages",
},
{
loc: "https://tailwindui.com/components/marketing/sections/contact-sections",
},
{
loc: "https://tailwindui.com/components/marketing/elements/headers",
},
{
loc: "https://tailwindui.com/components/application-ui/headings/card-headings",
},
{
loc: "https://tailwindui.com/components/marketing/page-examples/about-pages",
},
{
loc: "https://tailwindui.com/components/marketing/page-examples/landing-pages",
},
{
loc: "https://tailwindui.com/components/application-ui/data-display/description-lists",
},
{
loc: "https://tailwindui.com/components/application-ui/data-display/stats",
},
{
loc: "https://tailwindui.com/components/marketing/page-examples/pricing-pages",
},
{
loc: "https://tailwindui.com/components/application-ui/application-shells/multi-column",
},
{
loc: "https://tailwindui.com/components/application-ui/headings/section-headings",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/textareas",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/toggles",
},
{
loc: "https://tailwindui.com/components/application-ui/forms/action-panels",
},
{
loc: "https://tailwindui.com/components/application-ui/lists/grid-lists",
},
{
loc: "https://tailwindui.com/components/application-ui/feedback/alerts",
},
{
loc: "https://tailwindui.com/components/application-ui/feedback/empty-states",
},
{
loc: "https://tailwindui.com/components/application-ui/lists/stacked-lists",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/breadcrumbs",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/tabs",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/vertical-navigation",
},
{
loc: "https://tailwindui.com/components/application-ui/overlays/modal-dialogs",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/progress-bars",
},
{
loc: "https://tailwindui.com/components/application-ui/overlays/notifications",
},
{
loc: "https://tailwindui.com/components/application-ui/overlays/drawers",
},
{
loc: "https://tailwindui.com/components/application-ui/elements/badges",
},
{
loc: "https://tailwindui.com/components/application-ui/elements/avatars",
},
{
loc: "https://tailwindui.com/components/application-ui/layout/containers",
},
{
loc: "https://tailwindui.com/components/application-ui/elements/button-groups",
},
{
loc: "https://tailwindui.com/components/application-ui/layout/media-objects",
},
{
loc: "https://tailwindui.com/components/application-ui/layout/dividers",
},
{
loc: "https://tailwindui.com/components/application-ui/layout/cards",
},
{
loc: "https://tailwindui.com/components/application-ui/page-examples/home-screens",
},
{
loc: "https://tailwindui.com/components/application-ui/layout/list-containers",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/category-pages",
},
{
loc: "https://tailwindui.com/components/application-ui/page-examples/detail-screens",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/order-detail-pages",
},
{
loc: "https://tailwindui.com/components/application-ui/page-examples/settings-screens",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/product-pages",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/shopping-cart-pages",
},
{
loc: "https://tailwindui.com/checkout/1ab56599-ff3e-4666-9686-edda6c81c82a",
},
{
loc: "https://tailwindui.com/checkout/0ed326ca-c1fc-440b-b1ba-bdfb01c43185",
},
{
loc: "https://tailwindui.com/checkout/7b7130a6-68aa-49cb-9f13-818720c60fe8",
},
{
loc: "https://tailwindui.com/password/reset",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/storefront-pages",
},
{
loc: "https://tailwindui.com/license",
},
{
loc: "https://tailwindui.com/checkout/aa651062-caee-4517-b83a-d2aed4cd00cc",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/checkout-pages",
},
{
loc: "https://tailwindui.com/checkout/cc42453b-bfcd-4a7c-8150-37946e36168e",
},
{
loc: "https://tailwindui.com/checkout/237c84cc-13fd-4ca0-b5ac-d5d0a0ea6ac6",
},
{
loc: "https://tailwindui.com/checkout/88b34469-c305-42da-8615-12b24e1cebfa",
},
{
loc: "https://tailwindui.com/checkout/ea20ca6e-20f1-4532-876d-6879d92f5ef1",
},
{
loc: "https://tailwindui.com/components/ecommerce/page-examples/order-history-pages",
},
{
loc: "https://tailwindui.com/checkout/19d4419f-7684-4425-bb49-7dc7c60556d1",
},
{
loc: "https://tailwindui.com/checkout/add9e0e2-e333-4b8c-880e-18b521f76733",
},
{
loc: "https://tailwindui.com/checkout/6ef9edc3-1962-45a4-968a-c307b2cb8001",
},
{
loc: "https://tailwindui.com/templates/radiant",
},
{
loc: "https://tailwindui.com/checkout/d967e538-a015-4ae7-ac59-e61f59857bf5",
},
{
loc: "https://tailwindui.com/checkout/42741d5e-31c7-4d80-9f55-5637a0584db4",
},
{
loc: "https://tailwindui.com/checkout/8a3351de-d4ee-4443-8d80-3c2a8166ff40",
},
{
loc: "https://tailwindui.com/checkout/1b4567e2-5f64-4785-b367-ebad83d11c00",
},
{
loc: "https://tailwindui.com/components/application-ui/navigation/steps",
},
{
loc: "https://tailwindui.com/checkout/b871a18b-d5bc-4aa4-b7fd-051594adedb4",
},
{
loc: "https://tailwindui.com/components/application-ui/layout/panels",
},
{
loc: "https://tailwindui.com/components/application-ui/overlays/slide-overs",
},
{
loc: "https://tailwindui.com/components/application-ui/overlays/modals",
},
{
loc: "https://tailwindui.com/components/marketing/page-examples/about-pages?include=archived",
},
{
loc: "https://tailwindui.com/checkout/461c6bcc-06bd-4c3b-9a15-ae2e4552534c",
},
{
loc: "https://tailwindui.com/components/preview",
},
];

View file

@ -0,0 +1,55 @@
import { List } from "@project-gauntlet/api/components";
import React, { ReactElement, useState } from "react";
import documentation from "./documentation/tailwind-css";
import open from "../../../utils/open-url";
// @ts-expect-error gauntlet uses deno and not node
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const denoCore: DenoCore = Deno[Deno.internal].core;
export default function SearchDocumentation(): ReactElement {
const [searchText, setSearchText] = useState<string | undefined>("");
//TODO - Migrate this to an Action, so that we can also have a copy to clipboard feature
const onClick = async (url: string) => {
await open(url);
};
return (
<List>
<List.SearchBar
placeholder={"Search TailwindCSS Documentation..."}
value={searchText}
onChange={setSearchText}
/>
{searchText
? // eslint-disable-next-line @typescript-eslint/no-unused-vars
Object.entries(documentation).map(([_section, items]) =>
items
.filter((item: { title: string; url: string }) =>
item.title.toLowerCase().includes(searchText.toLowerCase()),
)
.map((item: { title: string; url: string }) => (
<List.Item
key={item.title}
icon={{ asset: "tailwindcss/list-icon.png" }}
title={item.title}
onClick={() => onClick(item.url)}
/>
)),
)
: Object.entries(documentation).map(([section, items]) => (
<List.Section key={section} title={section}>
{items.map((item) => (
<List.Item
key={item.title}
icon={{ asset: "tailwindcss/list-icon.png" }}
title={item.title}
onClick={() => onClick(item.url)}
/>
))}
</List.Section>
))}
</List>
);
}

10
tailwind.config.js Normal file
View file

@ -0,0 +1,10 @@
/** @type {import('tailwindcss').Config} */
export const safelist = [
{
pattern: /./, // the "." means "everything"
},
];
export const theme = {
extend: {},
};
export const plugins = [];

39
utils/open-url.ts Normal file
View file

@ -0,0 +1,39 @@
const getOpenCommand = (platform: typeof Deno.build.os): string => {
const commands = {
windows: "start",
darwin: "open",
linux: "xdg-open",
freebsd: "xdg-open",
netbsd: "xdg-open",
android: "open",
solaris: "firefox", //FIXME - use a different command that doesn't force a specific browser
aix: "firefox",
illumos: "firefox",
} as const;
return commands[platform] || commands.linux;
};
/**
* Open a URL in the user's configured default browser
* @param url The url you want to open in the default browser
* @returns Promise<Deno.CommandStatus> The status of the command
*/
const open = async (url: string) => {
// Yes, this function uses Deno. Yes, this repository uses Node.js for tooling.
// Gauntlet runs loaded plugins in a Deno runtime, so this works fine.
// Hop off Copilot I know this isn't using Node.js APIs
console.log("Opening URL:", url);
const platform = Deno.build.os;
const cmd = getOpenCommand(platform);
const process = new Deno.Command(cmd, {
args: [url],
env: {
// https://github.com/project-gauntlet/gauntlet/issues/28
LD_LIBRARY_PATH: "",
},
});
const child = process.spawn();
return await child.status;
};
export default open;

15479
yarn.lock

File diff suppressed because it is too large Load diff