diff --git a/extensions/calist/.eslintrc.json b/extensions/calist/.eslintrc.json new file mode 100644 index 0000000000000..e6258e11d9143 --- /dev/null +++ b/extensions/calist/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": ["@raycast"] +} diff --git a/extensions/calist/.gitignore b/extensions/calist/.gitignore new file mode 100644 index 0000000000000..9ff34e3e9f383 --- /dev/null +++ b/extensions/calist/.gitignore @@ -0,0 +1,13 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules + +# Raycast specific files +raycast-env.d.ts +.raycast-swift-build +.swiftpm +compiled_raycast_swift + +# misc +.DS_Store diff --git a/extensions/calist/.prettierrc b/extensions/calist/.prettierrc new file mode 100644 index 0000000000000..b7d51e04aa8d3 --- /dev/null +++ b/extensions/calist/.prettierrc @@ -0,0 +1,4 @@ +{ + "printWidth": 120, + "singleQuote": false +} \ No newline at end of file diff --git a/extensions/calist/CHANGELOG.md b/extensions/calist/CHANGELOG.md new file mode 100644 index 0000000000000..d653bbd0f5302 --- /dev/null +++ b/extensions/calist/CHANGELOG.md @@ -0,0 +1,3 @@ +# calist Changelog + +## [Initial Version] - 2024-04-04 \ No newline at end of file diff --git a/extensions/calist/README.md b/extensions/calist/README.md new file mode 100644 index 0000000000000..b969e079fc78f --- /dev/null +++ b/extensions/calist/README.md @@ -0,0 +1,154 @@ +
+ + +

+ Calist +

+ +This extension consists of two commands, Calendar and Time. The Calendar command displays a calendar with the current date highlighted and very flexible navigation shortcuts. The Time command displays the current time and optional extra timezone. Both commands have a variety of settings that can be customized to your liking. +

+Designed to be a companion for calist.io +

+ +

+ + Find this extension on the Raycast store + + + raycast-extensions is released under the MIT license. + + + Follow @astritmalsija + + + subscribe + +

+
+ +

+ +# ๐Ÿคฏ Searching + +In the search field you can type in `July 1992` and it will change the date to that. +If you type in the number of the month it will change the month to that. +You can search for a specific date by typing the date in the search bar. + +## ๐Ÿงญ Navigation + +Nagivation is a breez since you can use shortcuts such as `shift + w` to toggle the week column, `shift + v` to change the density, and `shift + t` to toggle the time. + +You can also use the shortcuts `shift + left` and `shift + right` to navigate to the previous and next month, respectively. Or use dropdowns to navigate to a specific month or year. + +- **Go to current month** โ€” `shift + c` +- **Go to current year** โ€” `shift + y` +- **Go to previous month** โ€” `shift + left` +- **Go to next month** โ€” `shift + right` +- **Go to previous year** โ€” `shift + up` +- **Go to next year** โ€” `shift + down` + +## โŒ˜ Commands + +- **Calendar** +- **Time** + +## ๐Ÿ—“๏ธ Configuration for Calendar + +- **Show Week Column** + - Toggle using the shortcut `shift + w` +- **Show Weekday Names** +- **Show Event Count** +- **Show Month Name** +- **Enable Month Dropdown** + - Enable or disable the month dropdown for cleaner UI + +## ๐ŸŒ„ Density + +- Normal (Value: normal) +- Comfortable (Value: comfortable) +- Compact (Value: compact) + + > Shortcut: `shift + v` + +## โฐ Time Settings + +- **Enable or disable time** + > Shortcut: `shift + t` +- **Seconds** โ€” Enable or disable seconds in real time +- **Title** โ€” Hide title for distraction free view, applies to the Time command as well +- **AM/PM** โ€” Change time format to 12 hours + +## ๐ŸŒŽ Timezone + +- **Secondary Timezone** + - Enable or disable the secondary timezone + - **Offset** โ€” Second timezone offset in hours + +## ๐Ÿ”Ž Search + +- **Search Custom Placeholder** + +## ๐Ÿ“ Navigation Title + +- **Custom Window Title Text** โ€” When in use will remove weather and date from the title +- **Show Date** โ€” Hide the date from the Nav Title +- **Show Weather** โ€” Shows real time weather in the bottom left corner and command subtitle +- **Show Week Number** - Show week number in the Nav Title + +## ๐ŸŽจ **Theme** + +Customize the look and feel by using themes with colors built in Raycast, applies to current day, weekends and dropdown current month + +- Themes: + - Default + - Blue + - Green + - Magenta + - Orange + - Purple + - Red + - Yellow + +## ๐Ÿš€ **Icon Type** + +Choose between Avatar, Raycast Icons, Font icons + +- Data: + - Avatar + - Raycast Icons + - Font +- Description: Change Icon Type +- Default: Glyph + +## ๐Ÿ“ฐ Icon Type Font Configuration + +- **Font Weight** + - Normal (default) + - Bold +- **Font Family** + - Sans Serif (default) + - Serif + - Monospace + +## โ˜” **Custom Colors** + +Forgranular control over the colors you can have custom colors in hex format for the following: + +- **Current Day Color** +- **Custom Color for Weekends** diff --git a/extensions/calist/assets/calist.png b/extensions/calist/assets/calist.png new file mode 100644 index 0000000000000..ce6e0f6a78f22 Binary files /dev/null and b/extensions/calist/assets/calist.png differ diff --git a/extensions/calist/metadata/calist-1.png b/extensions/calist/metadata/calist-1.png new file mode 100644 index 0000000000000..0cfd68d81e922 Binary files /dev/null and b/extensions/calist/metadata/calist-1.png differ diff --git a/extensions/calist/metadata/calist-10.png b/extensions/calist/metadata/calist-10.png new file mode 100644 index 0000000000000..4b3795ec50f04 Binary files /dev/null and b/extensions/calist/metadata/calist-10.png differ diff --git a/extensions/calist/metadata/calist-2.png b/extensions/calist/metadata/calist-2.png new file mode 100644 index 0000000000000..6ada3b4ff184a Binary files /dev/null and b/extensions/calist/metadata/calist-2.png differ diff --git a/extensions/calist/metadata/calist-3.png b/extensions/calist/metadata/calist-3.png new file mode 100644 index 0000000000000..fed680d988df6 Binary files /dev/null and b/extensions/calist/metadata/calist-3.png differ diff --git a/extensions/calist/metadata/calist-4.png b/extensions/calist/metadata/calist-4.png new file mode 100644 index 0000000000000..46e1958deb55f Binary files /dev/null and b/extensions/calist/metadata/calist-4.png differ diff --git a/extensions/calist/metadata/calist-5.png b/extensions/calist/metadata/calist-5.png new file mode 100644 index 0000000000000..db8ab69e8e591 Binary files /dev/null and b/extensions/calist/metadata/calist-5.png differ diff --git a/extensions/calist/metadata/calist-6.png b/extensions/calist/metadata/calist-6.png new file mode 100644 index 0000000000000..9d03db411b74b Binary files /dev/null and b/extensions/calist/metadata/calist-6.png differ diff --git a/extensions/calist/metadata/calist-7.png b/extensions/calist/metadata/calist-7.png new file mode 100644 index 0000000000000..353c0f1c551d5 Binary files /dev/null and b/extensions/calist/metadata/calist-7.png differ diff --git a/extensions/calist/metadata/calist-8.png b/extensions/calist/metadata/calist-8.png new file mode 100644 index 0000000000000..8047c627e0ac0 Binary files /dev/null and b/extensions/calist/metadata/calist-8.png differ diff --git a/extensions/calist/metadata/calist-9.png b/extensions/calist/metadata/calist-9.png new file mode 100644 index 0000000000000..7e133fa62de5c Binary files /dev/null and b/extensions/calist/metadata/calist-9.png differ diff --git a/extensions/calist/package-lock.json b/extensions/calist/package-lock.json new file mode 100644 index 0000000000000..e37f8dd208b37 --- /dev/null +++ b/extensions/calist/package-lock.json @@ -0,0 +1,2592 @@ +{ + "name": "calist", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "calist", + "license": "MIT", + "dependencies": { + "@raycast/api": "^1.70.1", + "@raycast/utils": "^1.13.6", + "calendar": "^0.1.1", + "date-fns": "^3.6.0", + "node-fetch": "^3.3.2", + "uuid": "^9.0.1", + "weeknumber": "^1.2.1" + }, + "devDependencies": { + "@ianvs/prettier-plugin-sort-imports": "^4.1.1", + "@raycast/eslint-config": "^1.0.6", + "@types/calendar": "^0.1.2", + "@types/node": "20.8.10", + "@types/react": "18.2.27", + "@types/uuid": "^9.0.8", + "eslint": "^8.51.0", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.24.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.4", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@ianvs/prettier-plugin-sort-imports": { + "version": "4.2.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/core": "^7.24.0", + "@babel/generator": "^7.23.6", + "@babel/parser": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", + "semver": "^7.5.2" + }, + "peerDependencies": { + "@vue/compiler-sfc": "2.7.x || 3.x", + "prettier": "2 || 3" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@raycast/api": { + "version": "1.70.3", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@types/node": "^20.8.10", + "@types/react": "^18.2.27", + "react": "18.2.0" + }, + "bin": { + "ray": "bin/ray" + }, + "peerDependencies": { + "@types/node": "20.8.10", + "@types/react": "18.2.27", + "react-devtools": "4.28.4" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react-devtools": { + "optional": true + } + } + }, + "node_modules/@raycast/api/node_modules/@types/node": { + "version": "20.12.5", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@raycast/api/node_modules/@types/react": { + "version": "18.2.74", + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@raycast/eslint-config": { + "version": "1.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@raycast/eslint-plugin": "^1.0.7", + "@rushstack/eslint-patch": "^1.5.1", + "@typescript-eslint/eslint-plugin": "^6.8.0", + "@typescript-eslint/parser": "^6.8.0", + "eslint-config-prettier": "^9.0.0" + }, + "peerDependencies": { + "eslint": ">=7", + "prettier": ">=2", + "typescript": ">=4" + } + }, + "node_modules/@raycast/eslint-plugin": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^5.48.1", + "title-case": "^3.0.3" + }, + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@raycast/eslint-plugin/node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@raycast/utils": { + "version": "1.14.0", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "cross-fetch": "^3.1.6", + "dequal": "^2.0.3", + "media-typer": "^1.1.0", + "object-hash": "^3.0.0", + "signal-exit": "^4.0.2", + "stream-chain": "^2.2.5", + "stream-json": "^1.8.0" + }, + "peerDependencies": { + "@raycast/api": ">=1.69.0" + } + }, + "node_modules/@rushstack/eslint-patch": { + "version": "1.10.1", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/calendar": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.8.10", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/prop-types": { + "version": "15.7.12", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.2.27", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/scheduler": { + "version": "0.23.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "dev": true, + "license": "ISC" + }, + "node_modules/acorn": { + "version": "8.11.3", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.0", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/calendar": { + "version": "0.1.1", + "license": "MIT" + }, + "node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001607", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/content-type": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.7.0", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/date-fns": { + "version": "3.6.0", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/dequal": { + "version": "2.0.3", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.730", + "dev": true, + "license": "ISC" + }, + "node_modules/escalade": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "dev": true, + "license": "ISC" + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-releases": { + "version": "2.0.14", + "dev": true, + "license": "MIT" + }, + "node_modules/object-hash": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.2.5", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "18.2.0", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/stream-chain": { + "version": "2.2.5", + "license": "BSD-3-Clause" + }, + "node_modules/stream-json": { + "version": "1.8.0", + "license": "BSD-3-Clause", + "dependencies": { + "stream-chain": "^2.2.5" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/title-case": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "license": "MIT" + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "dev": true, + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.4.4", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "license": "BSD-2-Clause" + }, + "node_modules/weeknumber": { + "version": "1.2.1", + "license": "Unlicense" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/extensions/calist/package.json b/extensions/calist/package.json new file mode 100644 index 0000000000000..cc0a7af08d4ff --- /dev/null +++ b/extensions/calist/package.json @@ -0,0 +1,355 @@ +{ + "$schema": "https://www.raycast.com/schemas/extension.json", + "name": "calist", + "title": "Calist", + "description": "Calist a calendar extension, companion for calist.io", + "icon": "calist.png", + "author": "astrit", + "categories": [ + "Productivity" + ], + "license": "MIT", + "commands": [ + { + "name": "index", + "title": "Calendar", + "description": "Calist ยท Calendar", + "mode": "view" + }, + { + "name": "time", + "title": "Time", + "description": "Calist ยท Time", + "subtitle": "Show time", + "mode": "view" + } + ], + "preferences": [ + { + "name": "weekFormat", + "type": "dropdown", + "required": true, + "title": "First Day of Week", + "data": [ + { + "title": "Monday", + "value": "1" + }, + { + "title": "Sunday", + "value": "0" + } + ], + "description": "First Day of Week", + "default": "1" + }, + { + "name": "weekEnable", + "type": "checkbox", + "required": true, + "label": "Show Week Column", + "title": "Settings", + "description": "Indicated if it is necessary to show week numbers", + "default": true + }, + { + "name": "weekDays", + "type": "checkbox", + "required": true, + "label": "Show Weekday Names", + "description": "This option shows week days on top", + "default": true + }, + { + "name": "monthDetails", + "type": "checkbox", + "required": true, + "label": "Show Event Count", + "description": "This option enabled details under each day", + "default": true + }, + { + "name": "monthName", + "type": "checkbox", + "required": true, + "label": "Show Month Name", + "description": "This option shows months title or hides it to save space", + "default": true + }, + { + "name": "monthSignal", + "type": "checkbox", + "required": true, + "label": "Event Indicator", + "description": "This option shows a dot in top right corner when day has events", + "default": true + }, + { + "name": "monthDropdown", + "type": "checkbox", + "required": true, + "label": "Enable Month Dropdown", + "description": "This option shows or hides the dropdown", + "default": true + }, + { + "name": "monthViewMode", + "type": "dropdown", + "required": false, + "title": "Density", + "data": [ + { + "title": "Normal", + "value": "normal" + }, + { + "title": "Comfortable", + "value": "comfortable" + }, + { + "title": "Compact", + "value": "compact" + } + ], + "description": "Card Density", + "default": "compact" + }, + { + "name": "enableTime", + "type": "checkbox", + "required": true, + "label": "Time", + "title": "Time Settings", + "description": "Show the time before calendar", + "default": true + }, + { + "name": "enableTimeSeconds", + "type": "checkbox", + "required": false, + "label": "Seconds", + "description": "Hide Seconds in time", + "default": true + }, + { + "name": "enableTimeTitle", + "type": "checkbox", + "required": false, + "label": "Title", + "description": "Hide the time title before calendar", + "default": true + }, + { + "name": "enableTimeFormat", + "type": "checkbox", + "required": false, + "label": "AM/PM", + "description": "Show AM/PM in time", + "default": true + }, + { + "name": "enableTimeSecondary", + "type": "textfield", + "required": false, + "label": "Second timezone title", + "title": "Secondary Timezone", + "description": "Second timezone that displays when time is enabled" + }, + { + "name": "enableTimeSecondaryOffset", + "type": "textfield", + "required": false, + "label": "Second timezone offset", + "title": "Offset", + "description": "Second timezone offset in hours" + }, + { + "name": "searchPlaceholder", + "type": "textfield", + "required": false, + "label": "Search Custom Placeholder", + "title": "Search Placeholder", + "description": "Show or hide time on search placeholder" + }, + { + "name": "navTitle", + "type": "textfield", + "required": false, + "label": "Custom Window title text", + "placeholder": "Custom title", + "title": "Navigation Title", + "description": "Show or hide time on search placeholder" + }, + { + "name": "navDate", + "type": "checkbox", + "required": true, + "label": "Show date", + "description": "This option shows date on navigation title", + "default": true + }, + { + "name": "navWeather", + "type": "checkbox", + "required": true, + "label": "Show weather", + "description": "This option shows a dot in top right corner when day has events", + "default": true + }, + { + "name": "navWeek", + "type": "checkbox", + "required": true, + "label": "Show week number", + "description": "This option shows the week number on the navigation title", + "default": true + }, + { + "name": "customTheme", + "type": "dropdown", + "required": false, + "title": "Theme", + "data": [ + { + "title": "Default", + "value": "default" + }, + { + "title": "Blue", + "value": "Blue" + }, + { + "title": "Green", + "value": "Green" + }, + { + "title": "Magenta", + "value": "Magenta" + }, + { + "title": "Orange", + "value": "Orange" + }, + { + "title": "Purple", + "value": "Purple" + }, + { + "title": "Red", + "value": "Red" + }, + { + "title": "Yellow", + "value": "Yellow" + } + ], + "description": "Change theme", + "default": "default" + }, + { + "name": "iconsType", + "type": "dropdown", + "required": false, + "title": "Icon Type", + "data": [ + { + "title": "Avatar", + "value": "avatar" + }, + { + "title": "Raycast Icons", + "value": "raycast" + }, + { + "title": "Font", + "value": "glyph" + } + ], + "description": "Change Icon Type", + "default": "glyph" + }, + { + "name": "fontWeight", + "type": "dropdown", + "required": false, + "title": "Font Weight", + "data": [ + { + "title": "Normal", + "value": "normal" + }, + { + "title": "Bold", + "value": "bold" + } + ], + "description": "Font Weight", + "default": "normal" + }, + { + "name": "fontFamily", + "type": "dropdown", + "required": false, + "title": "Font Family", + "data": [ + { + "title": "Sans Serif", + "value": "sans-serif" + }, + { + "title": "Serif", + "value": "serif" + }, + { + "title": "Monospace", + "value": "monospace" + } + ], + "description": "Change font family applies to font icon type only", + "default": "sans-serif" + }, + { + "name": "fontColorAccent", + "type": "textfield", + "required": false, + "placeholder": "#5d18dc", + "title": "Current Day Color", + "description": "Change current day color, overrides theme color" + }, + { + "name": "fontColorAccentWeekend", + "type": "textfield", + "required": false, + "placeholder": "#ff8282", + "title": "Custom Color for Weekends", + "description": "Change Weekend color, overrides theme color" + } + ], + "dependencies": { + "@raycast/api": "^1.70.1", + "@raycast/utils": "^1.13.6", + "calendar": "^0.1.1", + "date-fns": "^3.6.0", + "node-fetch": "^3.3.2", + "uuid": "^9.0.1", + "weeknumber": "^1.2.1" + }, + "devDependencies": { + "@raycast/eslint-config": "^1.0.6", + "@ianvs/prettier-plugin-sort-imports": "^4.1.1", + "@types/calendar": "^0.1.2", + "@types/node": "20.8.10", + "@types/uuid": "^9.0.8", + "@types/react": "18.2.27", + "eslint": "^8.51.0", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + }, + "scripts": { + "build": "ray build -e dist", + "dev": "ray develop", + "fix-lint": "ray lint --fix", + "lint": "ray lint", + "publish": "npx @raycast/api@latest publish" + } +} \ No newline at end of file diff --git a/extensions/calist/prettier.config.js b/extensions/calist/prettier.config.js new file mode 100644 index 0000000000000..8d0892b8bbe33 --- /dev/null +++ b/extensions/calist/prettier.config.js @@ -0,0 +1,32 @@ +/** @type {import('prettier').Config} */ +module.exports = { + endOfLine: "lf", + semi: false, + singleQuote: false, + tabWidth: 2, + trailingComma: "es5", + importOrder: [ + "^(react/(.*)$)|^(react$)", + "^(next/(.*)$)|^(next$)", + "", + "", + "^types$", + "^@/types/(.*)$", + "^@/config/(.*)$", + "^@/lib/(.*)$", + "^@/hooks/(.*)$", + "^@/components/ui/(.*)$", + "^@/components/(.*)$", + "^@/styles/(.*)$", + "^@/app/(.*)$", + "", + "^[./]", + ], + importOrderSeparation: false, + importOrderSortSpecifiers: true, + importOrderBuiltinModulesToTop: true, + importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], + importOrderMergeDuplicateImports: true, + importOrderCombineTypeAndValueImports: true, + plugins: ["@ianvs/prettier-plugin-sort-imports"], +}; diff --git a/extensions/calist/src/index.tsx b/extensions/calist/src/index.tsx new file mode 100644 index 0000000000000..1dde5408232ee --- /dev/null +++ b/extensions/calist/src/index.tsx @@ -0,0 +1,10 @@ +import { Provider } from "u/context"; +import Calendar from "@/calendar/calendar"; + +export default function Calist() { + return ( + + + + ); +} diff --git a/extensions/calist/src/parts/actions/actions.tsx b/extensions/calist/src/parts/actions/actions.tsx new file mode 100644 index 0000000000000..b94afd48f9024 --- /dev/null +++ b/extensions/calist/src/parts/actions/actions.tsx @@ -0,0 +1,174 @@ +import React, { useContext } from "react"; +import { ActionPanel, Action, openExtensionPreferences, showToast, Toast, Icon, Image } from "@raycast/api"; +import { Context } from "u/context"; +import { getMonthName, getDayName } from "u/getName"; +import { getAvatarIcon } from "@raycast/utils"; + +export default function Actions({ global, day }: { global?: boolean; day?: number }) { + const { viewMode, setViewMode, enableWeek, setEnableWeek, enableTimer, setEnableTimer } = useContext(Context); + + const { currentYear, setCurrentYear, currentDay, currentMonth, setCurrentMonth } = useContext(Context); + + const showDate = () => { + const dateFormated = `${getDayName(currentDay)} ${currentDay}, ${getMonthName(currentMonth)} ${currentYear}`; + const toast = showToast(Toast.Style.Success, dateFormated); + return toast; + }; + + const navigateMonth = (offset: number) => { + let newMonth = currentMonth + offset; + let newYear = currentYear; + + if (newMonth > 12) { + newMonth = 1; + newYear++; + } else if (newMonth < 1) { + newMonth = 12; + newYear--; + } + + setCurrentMonth(newMonth); + setCurrentYear(newYear); + }; + + const navigateYear = (offset: number) => { + setCurrentYear(currentYear + offset); + showDate(); + }; + + const resetToCurrentDate = () => { + const now = new Date(); + setCurrentMonth(now.getMonth() + 1); + setCurrentYear(now.getFullYear()); + }; + + const viewModes = ["compact", "normal", "comfortable"]; + + const getNextViewMode = (currentViewMode: string) => { + const currentIndex = viewModes.indexOf(currentViewMode); + if (currentIndex === -1 || currentIndex === viewModes.length - 1) { + return viewModes[0]; + } else { + return viewModes[currentIndex + 1]; + } + }; + + const changeViewMode = () => { + const newMode = getNextViewMode(viewMode); + setViewMode(newMode); + showToast(Toast.Style.Success, `View Mode: ${newMode.charAt(0).toUpperCase() + newMode.slice(1).toLowerCase()}`); + }; + + return ( + + + { + resetToCurrentDate(); + }} + /> + showToast(Toast.Style.Success, "Current month")} + /> + { + navigateMonth(-1); + }} + /> + { + navigateMonth(1); + }} + /> + { + navigateYear(-1); + }} + /> + { + navigateYear(1); + }} + /> + + {!global && ( + <> + { + showToast(Toast.Style.Success, "Copied to clipboard"); + }} + /> + + )} + + { + changeViewMode(); + }} + /> + { + setEnableWeek(!enableWeek); + }} + /> + { + setEnableTimer(!enableTimer); + }} + /> + + + + + + + + + + ); +} diff --git a/extensions/calist/src/parts/calendar/calendar.tsx b/extensions/calist/src/parts/calendar/calendar.tsx new file mode 100644 index 0000000000000..e1cab14591905 --- /dev/null +++ b/extensions/calist/src/parts/calendar/calendar.tsx @@ -0,0 +1,94 @@ +import { useContext, useState } from "react"; +import { Grid } from "@raycast/api"; +import { updateCommandMetadata } from "@raycast/api"; +import { Context } from "u/context"; +import { useTitle } from "u/useTitle"; +import Dropdown from "@/dropdow/dropdown"; +import Time from "@/time/time"; +import getViewMode from "u/getViewMode"; +import Month from "@/month/month"; +import Actions from "@/actions/actions"; +import { searchPlaceholder, monthDropdown } from "u/options"; +import { getMonthName } from "u/getDate"; +import { getWeek } from "date-fns"; +import { getSelection } from "u/getSelection"; +import getMonthNumber from "u/getMonthNumber"; + +export default function Calist() { + const { + currentYear, + currentWeek, + currentDay, + currentMonth, + setCurrentMonth, + setCurrentWeek, + setCurrentYear, + enableWeek, + enableTimer, + setSelectedDay, + selectedDay, + } = useContext(Context); + const [isTimerHidden, setIsTimerHidden] = useState(false); + const setViewMode = getViewMode(); + + const titleNav = useTitle({ + month: currentMonth, + year: currentYear, + week: currentWeek, + day: selectedDay, + weather: true, + }); + + const titleCommand = useTitle({ + weather: true, + day: currentDay, + }); + + const placeHolder = searchPlaceholder ? searchPlaceholder : `Search ${getMonthName(currentMonth - 1)}`; + + updateCommandMetadata({ subtitle: titleCommand }); + + const handleSearchTextChange = (searchText: string) => { + setIsTimerHidden(searchText.length > 0); + + if (searchText.length === 0) { + const currentDate = new Date(); + setCurrentMonth(currentDate.getMonth() + 1); + setCurrentYear(currentDate.getFullYear()); + } else { + const [potentialMonth, potentialYear] = searchText.split(" "); + const monthNumber = Number(potentialMonth); + if (!isNaN(monthNumber) && monthNumber >= 1 && monthNumber <= 12) { + setCurrentMonth(monthNumber); + } else { + const monthNumberFromName = getMonthNumber(potentialMonth); + if (monthNumberFromName !== -1) { + setCurrentMonth(monthNumberFromName); + } + } + const yearNumber = Number(potentialYear); + if (!isNaN(yearNumber) && yearNumber >= 1900 && yearNumber <= 2100) { + setCurrentYear(yearNumber); + } + } + }; + + return ( + : undefined} + actions={} + onSearchTextChange={handleSearchTextChange} + onSelectionChange={(id) => { + getSelection(id, setCurrentWeek, setSelectedDay, getWeek, currentYear, currentMonth); + }} + > + {enableTimer && !isTimerHidden && + ); +} diff --git a/extensions/calist/src/parts/days/days.tsx b/extensions/calist/src/parts/days/days.tsx new file mode 100644 index 0000000000000..101cecc92e12d --- /dev/null +++ b/extensions/calist/src/parts/days/days.tsx @@ -0,0 +1,47 @@ +import { useContext } from "react"; +import { Grid } from "@raycast/api"; +import Actions from "@/actions/actions"; +import { v4 as AHD } from "uuid"; +import { getIcon } from "u/getIcon"; +import { getDayName } from "u/getName"; +import { Context } from "u/context"; + +interface DayProps { + type: "day" | "week" | "today" | "saturday" | "sunday" | "empty"; + day: number; + id?: number | string; + hasEvents?: boolean; +} + +export function Day({ type, day, hasEvents }: DayProps) { + const { currentYear, currentMonth } = useContext(Context); + const source = getIcon({ + iconDay: day, + iconToday: type === "today", + iconEvents: hasEvents === false, + iconWeekend: type === "saturday" || type === "sunday", + }); + + const AHID = `SIT:${type}, SID:${day}, SIM:${currentMonth}, SIY:${currentYear} + SIU:${AHD()}`; + + return ( + } + /> + ); +} diff --git a/extensions/calist/src/parts/dropdow/dropdown.tsx b/extensions/calist/src/parts/dropdow/dropdown.tsx new file mode 100644 index 0000000000000..fe74266e7d9be --- /dev/null +++ b/extensions/calist/src/parts/dropdow/dropdown.tsx @@ -0,0 +1,67 @@ +import { useContext } from "react"; +import { Grid } from "@raycast/api"; +import { getAllMonthsOfYear } from "u/getDate"; +import { getAvatarIcon } from "@raycast/utils"; +import { Context } from "u/context"; +import { customTheme } from "u/options"; + +function mapValueToColor(value: string): string | undefined { + switch (value) { + case "Blue": + return "#406c8e"; + case "Green": + return "#47795b"; + case "Magenta": + return "#822a66"; + case "Orange": + return "#925b23"; + case "Purple": + return "#615098"; + case "Red": + return "#8d3f41"; + case "Yellow": + return "#856b00"; + case "Default": + default: + return undefined; + } +} + +export default function Dropdown() { + const { currentMonth, thisMonth, currentYear, setCurrentMonth } = useContext(Context); + const allMonths = getAllMonthsOfYear(); + + const handleMonthChange = (newValue: string) => { + setCurrentMonth(parseInt(newValue)); + }; + + return ( + + + {allMonths.map((month) => { + const monthNumber = month.monthNumberAsString.padStart(2, "0").split("").join(" "); + const isThisMonth = month.monthNumberAsString === thisMonth.toString(); + const source = getAvatarIcon(monthNumber, { + background: isThisMonth ? mapValueToColor(customTheme) : "#333", + gradient: false, + }); + + return ( + + ); + })} + + + ); +} diff --git a/extensions/calist/src/parts/month/getTitle.tsx b/extensions/calist/src/parts/month/getTitle.tsx new file mode 100644 index 0000000000000..55998535a4d27 --- /dev/null +++ b/extensions/calist/src/parts/month/getTitle.tsx @@ -0,0 +1,33 @@ +import { useContext } from "react"; +import { Context } from "u/context"; +import { getDayName, getMonthName, getDayNameAll } from "u/getName"; +import { weekDays, monthName } from "u/options"; + +export const getTitle = () => { + const { currentDay, enableWeek } = useContext(Context); + const dayNames = getDayNameAll(); + const space = " ".repeat(enableWeek ? 18 : 21); + + const dayNamesString = dayNames.join(space); + const weekPrefix = enableWeek ? "Week".padEnd(18) : ""; + + if (weekDays) { + return weekPrefix + dayNamesString; + } + + if (monthName) { + return `${getDayName(currentDay)} ${currentDay}`; + } + + return undefined; +}; + +export const getSubTitle = () => { + const { currentYear, currentMonth } = useContext(Context); + + if (!weekDays && monthName) { + return `${getMonthName(currentMonth)} ${currentYear}`; + } + + return ""; +}; diff --git a/extensions/calist/src/parts/month/month.tsx b/extensions/calist/src/parts/month/month.tsx new file mode 100644 index 0000000000000..f8bbe8da610ff --- /dev/null +++ b/extensions/calist/src/parts/month/month.tsx @@ -0,0 +1,42 @@ +import React, { useContext } from "react"; +import { Grid } from "@raycast/api"; +import { Context } from "u/context"; +import { getTitle, getSubTitle } from "@/month/getTitle"; +import { getWeekNumber } from "u/getDate"; +import { Calendar } from "calendar"; +import { v4 as AHD } from "uuid"; +// import { weekEnable } from "u/options"; +import { Day } from "@/days/days"; + +export default function Month() { + const { currentDay, currentYear, currentMonth, enableWeek } = useContext(Context); + const cal = new Calendar(1); + const weeks = cal.monthDays(currentYear, currentMonth - 1); + + return ( + + {weeks.map((week) => { + const weekNumber = getWeekNumber(new Date(currentYear, currentMonth - 1, week[0] === 0 ? 1 : week[0])); + + return ( + + {enableWeek && } + {week.map((day, dayIndex) => { + if (day === 0) { + return ; + } else if (day === currentDay) { + return ; + } else if (dayIndex === 5) { + return ; + } else if (dayIndex === 6) { + return ; + } else { + return ; + } + })} + + ); + })} + + ); +} diff --git a/extensions/calist/src/parts/time/time.tsx b/extensions/calist/src/parts/time/time.tsx new file mode 100644 index 0000000000000..2999ff3e727d0 --- /dev/null +++ b/extensions/calist/src/parts/time/time.tsx @@ -0,0 +1,127 @@ +import { useState, useEffect, useContext } from "react"; +import { Grid } from "@raycast/api"; +import Actions from "@/actions/actions"; +import { Context } from "u/context"; +import { + enableTimeSeconds, + enableTimeTitle, + enableTimeFormat, + enableTimeSecondary, + enableTimeSecondaryOffset, +} from "u/options"; +import SVG from "u/getSvg"; + +export default function Watch() { + const { enableWeek } = useContext(Context); + + const [time, setTime] = useState({ + hours: "00", + minutes: "00", + seconds: enableTimeSeconds ? "00" : "", + period: enableTimeFormat ? "AM" : "", + }); + + const [secondaryTime, setSecondaryTime] = useState({ + hours: "00", + minutes: "00", + seconds: enableTimeSeconds ? "00" : "", + period: enableTimeFormat ? "AM" : "", + }); + + useEffect(() => { + const intervalId = setInterval(() => { + const now = new Date(); + const offsetNow = new Date(now.getTime() + enableTimeSecondaryOffset * 60 * 60 * 1000); + const timeOptions = { + hour: "numeric" as const, + minute: "numeric" as const, + second: enableTimeSeconds ? ("numeric" as const) : undefined, + hour12: enableTimeFormat !== false, + }; + const timeStr = now.toLocaleTimeString(undefined, timeOptions).split(/[:\s]/); + const secondaryTimeStr = offsetNow.toLocaleTimeString(undefined, timeOptions).split(/[:\s]/); + setTime({ + hours: timeStr[0].padStart(2, "0"), + minutes: timeStr[1].padStart(2, "0"), + seconds: enableTimeSeconds ? timeStr[2].padStart(2, "0") : "", + period: enableTimeFormat !== false ? (enableTimeSeconds ? timeStr[3] : timeStr[2]) : "", + }); + setSecondaryTime({ + hours: secondaryTimeStr[0].padStart(2, "0"), + minutes: secondaryTimeStr[1].padStart(2, "0"), + seconds: enableTimeSeconds ? secondaryTimeStr[2].padStart(2, "0") : "", + period: enableTimeFormat !== false ? (enableTimeSeconds ? secondaryTimeStr[3] : secondaryTimeStr[2]) : "", + }); + }, 1000); + + return () => clearInterval(intervalId); + }, []); + + const zones = [{ name: enableTimeSecondary, offset: enableTimeSecondaryOffset }]; + + const totalWidth = enableTimeFormat !== false && enableWeek ? 94 : 80; + const title1 = "Local time"; + const title2 = zones[0].name; + + const spacesNeeded = totalWidth - (title1.length + title2.length); + return ( + <> + = 0 ? "+" : ""}${enableTimeSecondaryOffset}` + : undefined + } + key={"Section Time"} + > + + {!enableTimeTitle && !enableTimeSeconds && ( + <> + } + /> + + )} + {enableTimeSecondary && enableTimeSecondaryOffset && ( + + )} + + + ); +} + +function TimeDisplay({ + time, + enableWeek, +}: { + time: { hours: string; minutes: string; seconds: string; period: string }; + enableWeek: boolean; +}) { + const timeUnits = [ + { key: "hours", value: time.hours, tooltip: "Hours" }, + { key: "minutes", value: time.minutes, tooltip: "Minutes" }, + ...(enableTimeSeconds ? [{ key: "seconds", value: time.seconds, tooltip: "Seconds" }] : []), + ...(enableTimeFormat && enableWeek ? [{ key: "period", value: time.period.toUpperCase(), tooltip: "AM/PM" }] : []), + ]; + + return timeUnits.map((unit) => ( + } + /> + )); +} diff --git a/extensions/calist/src/time.tsx b/extensions/calist/src/time.tsx new file mode 100644 index 0000000000000..b134e949fb24c --- /dev/null +++ b/extensions/calist/src/time.tsx @@ -0,0 +1,104 @@ +import { Provider } from "u/context"; +import { Grid } from "@raycast/api"; +import getViewMode from "u/getViewMode"; +import { useState, useEffect } from "react"; +import Actions from "@/actions/actions"; + +import { + enableTimeSeconds, + enableTimeFormat, + enableTimeSecondary, + enableTimeSecondaryOffset, + enableTimeTitle, +} from "u/options"; +import SVG from "u/getSvg"; + +export default function Calist() { + const setViewMode = getViewMode(); + const [time, setTime] = useState({ + hours: "00", + minutes: "00", + seconds: enableTimeSeconds ? "00" : "", + period: enableTimeFormat ? "AM" : "", + }); + + const [secondaryTime, setSecondaryTime] = useState({ + hours: "00", + minutes: "00", + seconds: enableTimeSeconds ? "00" : "", + period: enableTimeFormat ? "AM" : "", + }); + + useEffect(() => { + const intervalId = setInterval(() => { + const now = new Date(); + const offsetNow = new Date(now.getTime() + enableTimeSecondaryOffset * 60 * 60 * 1000); + const timeOptions = { + hour: "numeric" as const, + minute: "numeric" as const, + second: enableTimeSeconds ? ("numeric" as const) : undefined, + hour12: enableTimeFormat !== false, + }; + const timeStr = now.toLocaleTimeString(undefined, timeOptions).split(/[:\s]/); + const secondaryTimeStr = offsetNow.toLocaleTimeString(undefined, timeOptions).split(/[:\s]/); + setTime({ + hours: timeStr[0].padStart(2, "0"), + minutes: timeStr[1].padStart(2, "0"), + seconds: enableTimeSeconds ? timeStr[2].padStart(2, "0") : "", + period: enableTimeFormat !== false ? (enableTimeSeconds ? timeStr[3] : timeStr[2]) : "", + }); + setSecondaryTime({ + hours: secondaryTimeStr[0].padStart(2, "0"), + minutes: secondaryTimeStr[1].padStart(2, "0"), + seconds: enableTimeSeconds ? secondaryTimeStr[2].padStart(2, "0") : "", + period: enableTimeFormat !== false ? (enableTimeSeconds ? secondaryTimeStr[3] : secondaryTimeStr[2]) : "", + }); + }, 1000); + + return () => clearInterval(intervalId); + }, []); + + const zones = [{ name: enableTimeSecondary, offset: enableTimeSecondaryOffset }]; + const secondaryTimeTitle = zones[0].name; + return ( + + + + + + {enableTimeSecondary && enableTimeSecondaryOffset && ( + + + + )} + + + ); +} + +function TimeDisplay({ time }: { time: { hours: string; minutes: string; seconds: string; period: string } }) { + const timeUnits = [ + { key: "hours", value: time.hours, tooltip: "Hours" }, + { key: "minutes", value: time.minutes, tooltip: "Minutes" }, + ...(enableTimeSeconds ? [{ key: "seconds", value: time.seconds, tooltip: "Seconds" }] : []), + ...(enableTimeFormat ? [{ key: "period", value: time.period.toUpperCase(), tooltip: "AM/PM" }] : []), + ]; + + return timeUnits.map((unit) => ( + } + /> + )); +} diff --git a/extensions/calist/src/utils/constants.tsx b/extensions/calist/src/utils/constants.tsx new file mode 100644 index 0000000000000..32f19b9cb8187 --- /dev/null +++ b/extensions/calist/src/utils/constants.tsx @@ -0,0 +1,40 @@ +import { Icon } from "@raycast/api"; + +export const DAYS = [ + ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"], + ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"], +]; + +export const ICONS = { + "1": Icon.Number01, + "2": Icon.Number02, + "3": Icon.Number03, + "4": Icon.Number04, + "5": Icon.Number05, + "6": Icon.Number06, + "7": Icon.Number07, + "8": Icon.Number08, + "9": Icon.Number09, + "10": Icon.Number10, + "11": Icon.Number11, + "12": Icon.Number12, + "13": Icon.Number13, + "14": Icon.Number14, + "15": Icon.Number15, + "16": Icon.Number16, + "17": Icon.Number17, + "18": Icon.Number18, + "19": Icon.Number19, + "20": Icon.Number20, + "21": Icon.Number21, + "22": Icon.Number22, + "23": Icon.Number23, + "24": Icon.Number24, + "25": Icon.Number25, + "26": Icon.Number26, + "27": Icon.Number27, + "28": Icon.Number28, + "29": Icon.Number29, + "30": Icon.Number30, + "31": Icon.Number31, +}; diff --git a/extensions/calist/src/utils/context.tsx b/extensions/calist/src/utils/context.tsx new file mode 100644 index 0000000000000..faa5969744297 --- /dev/null +++ b/extensions/calist/src/utils/context.tsx @@ -0,0 +1,91 @@ +import React, { useState } from "react"; +import { useCachedState } from "@raycast/utils"; +import { getCurrentMonth, getCurrentWeek } from "u/getDate"; +import { monthViewMode, weekEnable, enableTime } from "u/options"; + +type ContextType = { + selectedMonth: number; + setSelectedMonth: (month: number) => void; + currentYear: number; + setCurrentYear: (year: number) => void; + currentWeek: number; + setCurrentWeek: (week: number) => void; + currentDay: number; + setCurrentDay: (day: number) => void; + currentMonth: number; + setCurrentMonth: (month: number) => void; + thisMonth: number; + viewMode: string; + setViewMode: (mode: string) => void; + enableWeek: boolean; + setEnableWeek: (enable: boolean) => void; + enableTimer: boolean; + setEnableTimer: (enable: boolean) => void; + + selectedDay: number; + setSelectedDay: (day: number) => void; +}; + +export function Provider({ children }: { children: React.ReactNode }) { + const date = new Date(); + const [currentYear, setCurrentYear] = useState(date.getFullYear()); + const [currentWeek, setCurrentWeek] = useState(getCurrentWeek()); + const [currentDay, setCurrentDay] = useState(date.getDate()); + const [selectedDay, setSelectedDay] = useState(date.getDate()); + const [currentMonth, setCurrentMonth] = useState(getCurrentMonth().monthNumber); + const [thisMonth] = useState(date.getMonth() + 1); + const [viewMode, setViewMode] = useCachedState("view-mode", monthViewMode); + const [enableWeek, setEnableWeek] = useState(weekEnable); + const [enableTimer, setEnableTimer] = useState(enableTime); + const [selectedMonth, setSelectedMonth] = useCachedState("selected-month", getCurrentMonth().monthNumber); + + return ( + + {children} + + ); +} + +export const Context = React.createContext({ + selectedMonth: getCurrentMonth().monthNumber, + setSelectedMonth: () => {}, + currentYear: 0, + setCurrentYear: () => {}, + currentWeek: 0, + setCurrentWeek: () => {}, + currentDay: 0, + setCurrentDay: () => {}, + selectedDay: 0, + setSelectedDay: () => {}, + currentMonth: 0, + setCurrentMonth: () => {}, + thisMonth: 0, + viewMode: monthViewMode, + setViewMode: () => {}, + enableWeek: enableTime, + setEnableWeek: () => {}, + enableTimer: enableTime, + setEnableTimer: () => {}, +}); diff --git a/extensions/calist/src/utils/fuzzyMatch.tsx b/extensions/calist/src/utils/fuzzyMatch.tsx new file mode 100644 index 0000000000000..a42a21843ed62 --- /dev/null +++ b/extensions/calist/src/utils/fuzzyMatch.tsx @@ -0,0 +1,14 @@ +export default function fuzzyMatch(searchText: string, targetText: string): boolean { + const searchTextLower = searchText.toLowerCase(); + const targetTextLower = targetText.toLowerCase(); + let searchIndex = 0; + for (let targetIndex = 0; targetIndex < targetTextLower.length; targetIndex++) { + if (searchTextLower[searchIndex] === targetTextLower[targetIndex]) { + searchIndex++; + if (searchIndex >= searchTextLower.length) { + return true; + } + } + } + return false; +} diff --git a/extensions/calist/src/utils/getDate.tsx b/extensions/calist/src/utils/getDate.tsx new file mode 100644 index 0000000000000..1b84ecd6a01fe --- /dev/null +++ b/extensions/calist/src/utils/getDate.tsx @@ -0,0 +1,61 @@ +import { weekNumber } from "weeknumber"; + +export function getCurrentMonth() { + const now = new Date(); + return { + monthNumber: now.getMonth() + 1, + monthNumberAsString: (now.getMonth() + 1).toString(), + monthStringLong: now.toLocaleString(undefined, { month: "long" }), + monthStringShort: now.toLocaleString(undefined, { month: "short" }), + }; +} + +export function getAllMonthsOfYear() { + const months = Array.from({ length: 12 }, (_, i) => { + const date = new Date(0, i); // 0 represents 1970, but only the month is relevant here + return { + monthNumber: i + 1, + monthNumberAsString: (i + 1).toString(), + monthStringLong: date.toLocaleString(undefined, { month: "long" }), + monthStringShort: date.toLocaleString(undefined, { month: "short" }), + }; + }); + + return months; +} + +export function getWeekNumber(d: Date) { + d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate())); + d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7)); + const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); + const weekNo = Math.ceil(((d.valueOf() - yearStart.valueOf()) / 86400000 + 1) / 7); + return weekNo; +} + +export function getCurrentWeek() { + const now = new Date(); + return weekNumber(now); +} + +export const getMonthName = (monthNumber: number) => { + const date = new Date(); + date.setMonth(monthNumber); + return date.toLocaleString("default", { month: "long" }); +}; + +export function getCurrentYear() { + const now = new Date(); + return now.getFullYear(); +} + +export function getCurrentDay() { + const now = new Date(); + const optionsLong: Intl.DateTimeFormatOptions = { weekday: "long" }; + const optionsShort: Intl.DateTimeFormatOptions = { weekday: "short" }; + + return { + dayNumber: now.getDay(), + dayStringLong: now.toLocaleDateString(undefined, optionsLong), + dayStringShort: now.toLocaleDateString(undefined, optionsShort), + }; +} diff --git a/extensions/calist/src/utils/getIcon.tsx b/extensions/calist/src/utils/getIcon.tsx new file mode 100644 index 0000000000000..40020060a4cfd --- /dev/null +++ b/extensions/calist/src/utils/getIcon.tsx @@ -0,0 +1,38 @@ +import { getAvatarIcon } from "@raycast/utils"; +import { iconsType as defaultIconsType } from "u/options"; +import { ICONS } from "u/constants"; +import SVG from "u/getSvg"; + +interface IconProps { + iconsType?: string; + iconDay?: number; + iconEvents?: boolean; + iconToday?: boolean; + iconWeekend?: boolean; +} + +export const getIcon = ({ + iconsType = defaultIconsType, + iconDay = 0, + iconEvents = false, + iconToday = false, + iconWeekend = false, +}: IconProps) => { + const iconDaySpaced = iconDay.toString().split("").join(" "); + + let source; + switch (iconsType) { + case "avatar": + source = getAvatarIcon(iconDaySpaced, { background: "none", gradient: false }); + break; + case "raycast": + source = ICONS[iconDay.toString() as keyof typeof ICONS]; + break; + case "glyph": + source = SVG({ day: iconDay, isToday: iconToday, hasEvents: iconEvents, isWeekend: iconWeekend }); + break; + default: + source = getAvatarIcon(iconDaySpaced, { background: "none", gradient: false }); + } + return source; +}; diff --git a/extensions/calist/src/utils/getMonthNumber.tsx b/extensions/calist/src/utils/getMonthNumber.tsx new file mode 100644 index 0000000000000..822835012a046 --- /dev/null +++ b/extensions/calist/src/utils/getMonthNumber.tsx @@ -0,0 +1,20 @@ +import fuzzyMatch from "u/fuzzyMatch"; + +export default function getMonthNumber(monthName: string): number { + const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ]; + const index = months.findIndex((month) => fuzzyMatch(monthName, month)); + return index !== -1 ? index + 1 : -1; +} diff --git a/extensions/calist/src/utils/getName.tsx b/extensions/calist/src/utils/getName.tsx new file mode 100644 index 0000000000000..e1d2ad63209ca --- /dev/null +++ b/extensions/calist/src/utils/getName.tsx @@ -0,0 +1,21 @@ +export const getMonthName = (monthNumber: number) => { + const date = new Date(); + date.setMonth(monthNumber - 1); // Subtract 1 to account for 0-based indexing + return date.toLocaleString("default", { month: "long" }); +}; + +export const getDayName = (dayNumber: number) => { + const date = new Date(); + date.setDate(dayNumber); + return date.toLocaleString("default", { weekday: "long" }); +}; + +export const getDayNameShort = (dayNumber: number) => { + const date = new Date(); + date.setDate(dayNumber); + return date.toLocaleString("default", { weekday: "short" }); +}; + +export const getDayNameAll = () => { + return Array.from({ length: 7 }, (_, i) => getDayNameShort(i + 1)); +}; diff --git a/extensions/calist/src/utils/getSelection.tsx b/extensions/calist/src/utils/getSelection.tsx new file mode 100644 index 0000000000000..41f1aa16da0fc --- /dev/null +++ b/extensions/calist/src/utils/getSelection.tsx @@ -0,0 +1,28 @@ +export const getSelection = ( + id: string | null, + setCurrentWeek: (week: number) => void, + setSelectedDay: (day: number) => void, + getWeek: (date: Date) => number, + currentYear: number, + currentMonth: number, +) => { + const getSidValue = (id: string) => { + const parts = id.split(", "); + const sidPart = parts.find((part) => part.startsWith("SID:")); + return sidPart ? sidPart.replace("SID:", "") : ""; + }; + + if (id && id.includes("SIT:week")) { + const sidValue = getSidValue(id); + setCurrentWeek(parseInt(sidValue)); + } else { + const day = getSidValue(id ?? ""); + const parsedDay = parseInt(day); + + if (!isNaN(parsedDay) && parsedDay !== 0) { + const weekOfYear = getWeek(new Date(currentYear, currentMonth - 1, parsedDay)); + setCurrentWeek(weekOfYear); + setSelectedDay(parsedDay); + } + } +}; diff --git a/extensions/calist/src/utils/getSvg.tsx b/extensions/calist/src/utils/getSvg.tsx new file mode 100644 index 0000000000000..28e2c5a38ab08 --- /dev/null +++ b/extensions/calist/src/utils/getSvg.tsx @@ -0,0 +1,106 @@ +import { + fontColorAccent as defFontColorAccent, + fontColorAccentWeekend as defFontColorAccentWeekend, + fontWeight as defFontWeight, + fontFamily as defFontFamily, + monthSignal as defMonthSignal, + customTheme as defCustomTheme, +} from "u/options"; +import { Color, environment } from "@raycast/api"; + +function mapValueToColor(value: string): Color | undefined { + switch (value) { + case "Blue": + return Color.Blue; + case "Green": + return Color.Green; + case "Magenta": + return Color.Magenta; + case "Orange": + return Color.Orange; + case "Purple": + return Color.Purple; + case "Red": + return Color.Red; + case "Yellow": + return Color.Yellow; + case "Default": + default: + return undefined; + } +} + +export default function SVG({ + fontColorAccent = defFontColorAccent.trim().length > 0 + ? defFontColorAccent + : mapValueToColor(defCustomTheme) || Color.Green, + fontColorAccentWeekend = defFontColorAccentWeekend.trim().length > 0 + ? defFontColorAccentWeekend + : mapValueToColor(defCustomTheme) || Color.Orange, + fontWeight = defFontWeight, + fontFamily = defFontFamily, + monthSignal = defMonthSignal, + day, + isWeekend = false, + isToday, + hasEvents, +}: { + fontWeight?: string; + fontFamily?: string; + fontColorAccent?: string; + fontColorAccentWeekend?: string; + isWeekend?: boolean; + monthSignal?: boolean; + day?: number | string; + isToday?: boolean; + hasEvents?: boolean; +}) { + // const color = isToday + // ? fontColorAccent || mapValueToColor(defCustomTheme) || Color.PrimaryText + // : isWeekend + // ? fontColorAccentWeekend || mapValueToColor(defCustomTheme) || Color.SecondaryText + // : environment.appearance === "light" + // ? "#000000" + // : "#ffffff"; + + let color; + + if (isToday) { + color = fontColorAccent || mapValueToColor(defCustomTheme) || Color.PrimaryText; + } else if (isWeekend) { + color = fontColorAccentWeekend || mapValueToColor(defCustomTheme) || Color.SecondaryText; + } else { + color = environment.appearance === "light" ? "#000000" : "#ffffff"; + } + + return `data:image/svg+xml;utf8, + + + ${monthSignal && hasEvents ? `` : ""} + + ${day} + + + ${isToday ? `` : ""} + + `; +} diff --git a/extensions/calist/src/utils/getViewMode.tsx b/extensions/calist/src/utils/getViewMode.tsx new file mode 100644 index 0000000000000..d10fcb40d2794 --- /dev/null +++ b/extensions/calist/src/utils/getViewMode.tsx @@ -0,0 +1,28 @@ +import { useCachedState } from "@raycast/utils"; +import { useContext } from "react"; +import { Context } from "u/context"; + +type RatioType = "3/2" | "1" | "16/9" | "2/3" | "4/3" | "3/4" | "9/16" | undefined; + +export default function getViewMode() { + const [ratio, setRatio] = useCachedState("current-ratio", "16/9"); + const { viewMode } = useContext(Context); + + const densityValue = viewMode; + + switch (densityValue) { + case "normal": + setRatio("4/3"); + break; + case "comfortable": + setRatio("1"); + break; + case "compact": + setRatio("16/9"); + break; + default: + setRatio("16/9"); + } + + return ratio; +} diff --git a/extensions/calist/src/utils/options.tsx b/extensions/calist/src/utils/options.tsx new file mode 100644 index 0000000000000..cd2c6c2cc8f02 --- /dev/null +++ b/extensions/calist/src/utils/options.tsx @@ -0,0 +1,42 @@ +import { getPreferenceValues } from "@raycast/api"; + +// Week Settings +export const weekFormat = Number(getPreferenceValues().weekStart); +export const weekEnable = getPreferenceValues().weekEnable; +export const weekDays = getPreferenceValues().weekDays; + +// Month Settings +export const monthDetails = getPreferenceValues().monthDetails; +export const monthName = getPreferenceValues().monthName; +export const monthSignal = getPreferenceValues().monthSignal; +export const monthViewMode = getPreferenceValues().monthViewMode; +export const monthDropdown = getPreferenceValues().monthDropdown; + +// Time Settings +export const enableTime = getPreferenceValues().enableTime; +export const enableTimeSeconds = getPreferenceValues().enableTimeSeconds; +export const enableTimeTitle = getPreferenceValues().enableTimeTitle; +export const enableTimeFormat = getPreferenceValues().enableTimeFormat; +export const enableTimeSecondary = getPreferenceValues().enableTimeSecondary; +export const enableTimeSecondaryOffset = getPreferenceValues().enableTimeSecondaryOffset; + +//Search +export const searchPlaceholder = getPreferenceValues().searchPlaceholder; + +// Window Title +export const navTitle = getPreferenceValues().navTitle; +export const navDate = getPreferenceValues().navDate; +export const navWeather = getPreferenceValues().navWeather; +export const navWeek = getPreferenceValues().navWeek; + +// Theme Settings +export const customTheme = getPreferenceValues().customTheme; + +// Icon Type +export const iconsType = getPreferenceValues().iconsType; + +// Font Settings +export const fontWeight = getPreferenceValues().fontWeight; +export const fontFamily = getPreferenceValues().fontFamily; +export const fontColorAccent = getPreferenceValues().fontColorAccent; +export const fontColorAccentWeekend = getPreferenceValues().fontColorAccentWeekend; diff --git a/extensions/calist/src/utils/useHolder.tsx b/extensions/calist/src/utils/useHolder.tsx new file mode 100644 index 0000000000000..7b6ad835392fa --- /dev/null +++ b/extensions/calist/src/utils/useHolder.tsx @@ -0,0 +1,7 @@ +export function getUpdateSearch(time: string, timeFormat: boolean) { + const holderWidth = timeFormat ? 70 : 75; + const holderTitle = "Calist"; + const holderEllipsis = " ".repeat(11); // Hide the ellipsis + const spacesNeeded = holderWidth - (holderTitle.length + time.length); + return `${holderTitle}${" ".repeat(spacesNeeded)}${time}${holderEllipsis}`; +} diff --git a/extensions/calist/src/utils/useTime.tsx b/extensions/calist/src/utils/useTime.tsx new file mode 100644 index 0000000000000..e0510f7880952 --- /dev/null +++ b/extensions/calist/src/utils/useTime.tsx @@ -0,0 +1,30 @@ +import { useState, useEffect } from "react"; +import { enableTimeSeconds, enableTimeFormat } from "u/options"; + +export default function useTime() { + const [time, setTime] = useState(`00:00${enableTimeSeconds ? ":00" : ""} ${enableTimeFormat ? "AM" : ""}`); + + useEffect(() => { + const intervalTime = enableTimeSeconds ? 1000 : 60000; // 1000 ms = 1 second, 60000 ms = 1 minute + const intervalId = setInterval(() => { + const now = new Date(); + const timeOptions = { + hour: "numeric" as const, + minute: "numeric" as const, + second: enableTimeSeconds ? ("numeric" as const) : undefined, + hour12: enableTimeFormat, + }; + let timeStr = now.toLocaleTimeString(undefined, timeOptions); + if (enableTimeFormat) { + const parts = timeStr.split(" "); + parts[1] = parts[1].toUpperCase(); + timeStr = parts.join(" "); + } + setTime(timeStr); + }, intervalTime); + + return () => clearInterval(intervalId); + }, []); + + return time; +} diff --git a/extensions/calist/src/utils/useTitle.tsx b/extensions/calist/src/utils/useTitle.tsx new file mode 100644 index 0000000000000..2f103b3208bd3 --- /dev/null +++ b/extensions/calist/src/utils/useTitle.tsx @@ -0,0 +1,32 @@ +import { getDayName, getMonthName } from "u/getName"; +import { getCurrentDay, getCurrentMonth, getCurrentYear, getCurrentWeek } from "u/getDate"; +import { navTitle, navWeather, navWeek, navDate } from "u/options"; + +import getWeather from "u/weather"; +interface TitleProps { + month?: number; + year?: number; + week?: number; + day?: number; + weather?: boolean; +} + +export const useTitle = ({ month, year, week, day, weather }: TitleProps = {}) => { + const getDay = day || getCurrentDay().dayNumber; + const getMonthNumber = month || getCurrentMonth().monthNumber; + const getYear = navDate ? year || getCurrentYear() : ""; + const getWeek = week || getCurrentWeek(); + const getForecast = weather ? getWeather() : ""; + + const weatherString: string = navWeather ? getForecast ?? "" : ""; + const dateStr: string = navDate ? `${getDayName(getDay)} ${getDay}, ${getMonthName(getMonthNumber)} ${getYear}` : ""; + const weekString: string = navWeek ? `${getWeek}` : ""; + + const titleParts = [weatherString, dateStr, weekString].filter(Boolean); + + if (navTitle) { + return navTitle; + } else { + return titleParts.join(" ยท "); + } +}; diff --git a/extensions/calist/src/utils/weather.tsx b/extensions/calist/src/utils/weather.tsx new file mode 100644 index 0000000000000..71e7fb667b47f --- /dev/null +++ b/extensions/calist/src/utils/weather.tsx @@ -0,0 +1,25 @@ +import { useEffect } from "react"; +import fetch from "node-fetch"; +import { useCachedState } from "@raycast/utils"; + +export default function getWeather() { + const [weatherData, setWeatherData] = useCachedState("weather-data", null); + + useEffect(() => { + const fetchData = async () => { + try { + const response = await fetch("https://wttr.in/?format=%f+%w"); + const data = await response.text(); + setWeatherData(data); + } catch (error) { + console.error("Error fetching weather data:", error); + } + }; + + if (!weatherData) { + fetchData(); + } + }, [weatherData]); + + return weatherData; +} diff --git a/extensions/calist/tsconfig.json b/extensions/calist/tsconfig.json new file mode 100644 index 0000000000000..358d4acb1ec52 --- /dev/null +++ b/extensions/calist/tsconfig.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "include": ["src/**/*", "raycast-env.d.ts" ], + "compilerOptions": { + "baseUrl": ".", + "lib": ["ES2023"], + "module": "commonjs", + "target": "ES2022", + "strict": true, + "isolatedModules": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react-jsx", + "resolveJsonModule": true, + "paths": { + "@/menu/*": ["src/menu/*"], + "@/*": ["src/parts/*"], + "u/*": ["src/utils/*"], + } + } +}