Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bcca22694 |
264
.eslintrc-auto-import.json
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
{
|
||||||
|
"globals": {
|
||||||
|
"Component": true,
|
||||||
|
"ComponentPublicInstance": true,
|
||||||
|
"ComputedRef": true,
|
||||||
|
"EffectScope": true,
|
||||||
|
"InjectionKey": true,
|
||||||
|
"PropType": true,
|
||||||
|
"Ref": true,
|
||||||
|
"VNode": true,
|
||||||
|
"asyncComputed": true,
|
||||||
|
"autoResetRef": true,
|
||||||
|
"computed": true,
|
||||||
|
"computedAsync": true,
|
||||||
|
"computedEager": true,
|
||||||
|
"computedInject": true,
|
||||||
|
"computedWithControl": true,
|
||||||
|
"controlledComputed": true,
|
||||||
|
"controlledRef": true,
|
||||||
|
"createApp": true,
|
||||||
|
"createEventHook": true,
|
||||||
|
"createGlobalState": true,
|
||||||
|
"createInjectionState": true,
|
||||||
|
"createReactiveFn": true,
|
||||||
|
"createSharedComposable": true,
|
||||||
|
"createUnrefFn": true,
|
||||||
|
"customRef": true,
|
||||||
|
"debouncedRef": true,
|
||||||
|
"debouncedWatch": true,
|
||||||
|
"defineAsyncComponent": true,
|
||||||
|
"defineComponent": true,
|
||||||
|
"eagerComputed": true,
|
||||||
|
"effectScope": true,
|
||||||
|
"extendRef": true,
|
||||||
|
"getCurrentInstance": true,
|
||||||
|
"getCurrentScope": true,
|
||||||
|
"h": true,
|
||||||
|
"ignorableWatch": true,
|
||||||
|
"inject": true,
|
||||||
|
"isDefined": true,
|
||||||
|
"isProxy": true,
|
||||||
|
"isReactive": true,
|
||||||
|
"isReadonly": true,
|
||||||
|
"isRef": true,
|
||||||
|
"logicAnd": true,
|
||||||
|
"logicNot": true,
|
||||||
|
"logicOr": true,
|
||||||
|
"makeDestructurable": true,
|
||||||
|
"markRaw": true,
|
||||||
|
"nextTick": true,
|
||||||
|
"onActivated": true,
|
||||||
|
"onBeforeMount": true,
|
||||||
|
"onBeforeRouteLeave": true,
|
||||||
|
"onBeforeRouteUpdate": true,
|
||||||
|
"onBeforeUnmount": true,
|
||||||
|
"onBeforeUpdate": true,
|
||||||
|
"onClickOutside": true,
|
||||||
|
"onDeactivated": true,
|
||||||
|
"onErrorCaptured": true,
|
||||||
|
"onKeyStroke": true,
|
||||||
|
"onLongPress": true,
|
||||||
|
"onMounted": true,
|
||||||
|
"onRenderTracked": true,
|
||||||
|
"onRenderTriggered": true,
|
||||||
|
"onScopeDispose": true,
|
||||||
|
"onServerPrefetch": true,
|
||||||
|
"onStartTyping": true,
|
||||||
|
"onUnmounted": true,
|
||||||
|
"onUpdated": true,
|
||||||
|
"pausableWatch": true,
|
||||||
|
"provide": true,
|
||||||
|
"reactify": true,
|
||||||
|
"reactifyObject": true,
|
||||||
|
"reactive": true,
|
||||||
|
"reactiveComputed": true,
|
||||||
|
"reactiveOmit": true,
|
||||||
|
"reactivePick": true,
|
||||||
|
"readonly": true,
|
||||||
|
"ref": true,
|
||||||
|
"refAutoReset": true,
|
||||||
|
"refDebounced": true,
|
||||||
|
"refDefault": true,
|
||||||
|
"refThrottled": true,
|
||||||
|
"refWithControl": true,
|
||||||
|
"resolveComponent": true,
|
||||||
|
"resolveRef": true,
|
||||||
|
"resolveUnref": true,
|
||||||
|
"shallowReactive": true,
|
||||||
|
"shallowReadonly": true,
|
||||||
|
"shallowRef": true,
|
||||||
|
"syncRef": true,
|
||||||
|
"syncRefs": true,
|
||||||
|
"templateRef": true,
|
||||||
|
"throttledRef": true,
|
||||||
|
"throttledWatch": true,
|
||||||
|
"toRaw": true,
|
||||||
|
"toReactive": true,
|
||||||
|
"toRef": true,
|
||||||
|
"toRefs": true,
|
||||||
|
"triggerRef": true,
|
||||||
|
"tryOnBeforeMount": true,
|
||||||
|
"tryOnBeforeUnmount": true,
|
||||||
|
"tryOnMounted": true,
|
||||||
|
"tryOnScopeDispose": true,
|
||||||
|
"tryOnUnmounted": true,
|
||||||
|
"unref": true,
|
||||||
|
"unrefElement": true,
|
||||||
|
"until": true,
|
||||||
|
"useActiveElement": true,
|
||||||
|
"useAsyncQueue": true,
|
||||||
|
"useAsyncState": true,
|
||||||
|
"useAttrs": true,
|
||||||
|
"useBase64": true,
|
||||||
|
"useBattery": true,
|
||||||
|
"useBluetooth": true,
|
||||||
|
"useBreakpoints": true,
|
||||||
|
"useBroadcastChannel": true,
|
||||||
|
"useBrowserLocation": true,
|
||||||
|
"useCached": true,
|
||||||
|
"useClamp": true,
|
||||||
|
"useClipboard": true,
|
||||||
|
"useColorMode": true,
|
||||||
|
"useConfirmDialog": true,
|
||||||
|
"useCounter": true,
|
||||||
|
"useCssModule": true,
|
||||||
|
"useCssVar": true,
|
||||||
|
"useCssVars": true,
|
||||||
|
"useCurrentElement": true,
|
||||||
|
"useCycleList": true,
|
||||||
|
"useDark": true,
|
||||||
|
"useDateFormat": true,
|
||||||
|
"useDebounce": true,
|
||||||
|
"useDebounceFn": true,
|
||||||
|
"useDebouncedRefHistory": true,
|
||||||
|
"useDeviceMotion": true,
|
||||||
|
"useDeviceOrientation": true,
|
||||||
|
"useDevicePixelRatio": true,
|
||||||
|
"useDevicesList": true,
|
||||||
|
"useDialog": true,
|
||||||
|
"useDisplayMedia": true,
|
||||||
|
"useDocumentVisibility": true,
|
||||||
|
"useDraggable": true,
|
||||||
|
"useDropZone": true,
|
||||||
|
"useElementBounding": true,
|
||||||
|
"useElementByPoint": true,
|
||||||
|
"useElementHover": true,
|
||||||
|
"useElementSize": true,
|
||||||
|
"useElementVisibility": true,
|
||||||
|
"useEventBus": true,
|
||||||
|
"useEventListener": true,
|
||||||
|
"useEventSource": true,
|
||||||
|
"useEyeDropper": true,
|
||||||
|
"useFavicon": true,
|
||||||
|
"useFetch": true,
|
||||||
|
"useFileDialog": true,
|
||||||
|
"useFileSystemAccess": true,
|
||||||
|
"useFocus": true,
|
||||||
|
"useFocusWithin": true,
|
||||||
|
"useFps": true,
|
||||||
|
"useFullscreen": true,
|
||||||
|
"useGamepad": true,
|
||||||
|
"useGeolocation": true,
|
||||||
|
"useIdle": true,
|
||||||
|
"useImage": true,
|
||||||
|
"useInfiniteScroll": true,
|
||||||
|
"useIntersectionObserver": true,
|
||||||
|
"useInterval": true,
|
||||||
|
"useIntervalFn": true,
|
||||||
|
"useKeyModifier": true,
|
||||||
|
"useLastChanged": true,
|
||||||
|
"useLink": true,
|
||||||
|
"useLoadingBar": true,
|
||||||
|
"useLocalStorage": true,
|
||||||
|
"useMagicKeys": true,
|
||||||
|
"useManualRefHistory": true,
|
||||||
|
"useMediaControls": true,
|
||||||
|
"useMediaQuery": true,
|
||||||
|
"useMemoize": true,
|
||||||
|
"useMemory": true,
|
||||||
|
"useMessage": true,
|
||||||
|
"useMounted": true,
|
||||||
|
"useMouse": true,
|
||||||
|
"useMouseInElement": true,
|
||||||
|
"useMousePressed": true,
|
||||||
|
"useMutationObserver": true,
|
||||||
|
"useNavigatorLanguage": true,
|
||||||
|
"useNetwork": true,
|
||||||
|
"useNotification": true,
|
||||||
|
"useNow": true,
|
||||||
|
"useObjectUrl": true,
|
||||||
|
"useOffsetPagination": true,
|
||||||
|
"useOnline": true,
|
||||||
|
"usePageLeave": true,
|
||||||
|
"useParallax": true,
|
||||||
|
"usePermission": true,
|
||||||
|
"usePointer": true,
|
||||||
|
"usePointerSwipe": true,
|
||||||
|
"usePreferredColorScheme": true,
|
||||||
|
"usePreferredDark": true,
|
||||||
|
"usePreferredLanguages": true,
|
||||||
|
"useRafFn": true,
|
||||||
|
"useRefHistory": true,
|
||||||
|
"useResizeObserver": true,
|
||||||
|
"useRoute": true,
|
||||||
|
"useRouter": true,
|
||||||
|
"useScreenOrientation": true,
|
||||||
|
"useScreenSafeArea": true,
|
||||||
|
"useScriptTag": true,
|
||||||
|
"useScroll": true,
|
||||||
|
"useScrollLock": true,
|
||||||
|
"useSessionStorage": true,
|
||||||
|
"useShare": true,
|
||||||
|
"useSlots": true,
|
||||||
|
"useSpeechRecognition": true,
|
||||||
|
"useSpeechSynthesis": true,
|
||||||
|
"useStepper": true,
|
||||||
|
"useStorage": true,
|
||||||
|
"useStorageAsync": true,
|
||||||
|
"useStyleTag": true,
|
||||||
|
"useSwipe": true,
|
||||||
|
"useTemplateRefsList": true,
|
||||||
|
"useTextSelection": true,
|
||||||
|
"useTextareaAutosize": true,
|
||||||
|
"useThrottle": true,
|
||||||
|
"useThrottleFn": true,
|
||||||
|
"useThrottledRefHistory": true,
|
||||||
|
"useTimeAgo": true,
|
||||||
|
"useTimeout": true,
|
||||||
|
"useTimeoutFn": true,
|
||||||
|
"useTimeoutPoll": true,
|
||||||
|
"useTimestamp": true,
|
||||||
|
"useTitle": true,
|
||||||
|
"useToggle": true,
|
||||||
|
"useTransition": true,
|
||||||
|
"useUrlSearchParams": true,
|
||||||
|
"useUserMedia": true,
|
||||||
|
"useVModel": true,
|
||||||
|
"useVModels": true,
|
||||||
|
"useVibrate": true,
|
||||||
|
"useVirtualList": true,
|
||||||
|
"useWakeLock": true,
|
||||||
|
"useWebNotification": true,
|
||||||
|
"useWebSocket": true,
|
||||||
|
"useWebWorker": true,
|
||||||
|
"useWebWorkerFn": true,
|
||||||
|
"useWindowFocus": true,
|
||||||
|
"useWindowScroll": true,
|
||||||
|
"useWindowSize": true,
|
||||||
|
"watch": true,
|
||||||
|
"watchArray": true,
|
||||||
|
"watchAtMost": true,
|
||||||
|
"watchDebounced": true,
|
||||||
|
"watchEffect": true,
|
||||||
|
"watchIgnorable": true,
|
||||||
|
"watchOnce": true,
|
||||||
|
"watchPausable": true,
|
||||||
|
"watchPostEffect": true,
|
||||||
|
"watchSyncEffect": true,
|
||||||
|
"watchThrottled": true,
|
||||||
|
"watchTriggerable": true,
|
||||||
|
"watchWithFilter": true,
|
||||||
|
"whenever": true
|
||||||
|
}
|
||||||
|
}
|
||||||
39
.eslintrc.cjs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/* eslint-env node */
|
||||||
|
require('@rushstack/eslint-patch/modern-module-resolution');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: [
|
||||||
|
'plugin:vue/vue3-essential',
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:vue/vue3-recommended',
|
||||||
|
'@vue/eslint-config-typescript/recommended',
|
||||||
|
'@vue/eslint-config-prettier',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
'./.eslintrc-auto-import.json',
|
||||||
|
'@unocss',
|
||||||
|
],
|
||||||
|
|
||||||
|
settings: {
|
||||||
|
'import/resolver': { typescript: { project: './tsconfig.app.json' } },
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
'vue/setup-compiler-macros': true,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'vue/multi-word-component-names': ['off'],
|
||||||
|
'prettier/prettier': ['error'],
|
||||||
|
'import/no-duplicates': ['error', { considerQueryString: true }],
|
||||||
|
'import/order': ['error', { groups: [['builtin', 'external', 'internal']] }],
|
||||||
|
'import/extensions': [
|
||||||
|
'error',
|
||||||
|
'ignorePackages',
|
||||||
|
{
|
||||||
|
js: 'never',
|
||||||
|
ts: 'never',
|
||||||
|
tsx: 'never',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
|
||||||
|
},
|
||||||
|
};
|
||||||
34
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve our tools
|
||||||
|
title: '[BUG] '
|
||||||
|
labels: bug
|
||||||
|
assignees: CorentinTh
|
||||||
|
---
|
||||||
|
|
||||||
|
**Which tool is impacted?**
|
||||||
|
Example: the token generator
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Configuration (please complete the following information):**
|
||||||
|
|
||||||
|
- Device: [e.g. iPhone6, ]
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
48
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
name: 🐞 Bug Report
|
|
||||||
description: File a bug report.
|
|
||||||
labels: ['bug', 'triage']
|
|
||||||
assignees:
|
|
||||||
- CorentinTh
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thanks for taking the time to fill out this bug report!
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: bug-description
|
|
||||||
attributes:
|
|
||||||
label: Describe the bug
|
|
||||||
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
|
|
||||||
placeholder: Bug description
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: what-happened
|
|
||||||
attributes:
|
|
||||||
label: What happened?
|
|
||||||
description: Also tell us, what did you expect to happen? If you have a screenshot, you can paste it here.
|
|
||||||
placeholder: Tell us what you see!
|
|
||||||
value: 'A bug happened!'
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: System information
|
|
||||||
description: What is you environment? You can use the `npx envinfo --system --browsers` command to get this information.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: app-type
|
|
||||||
attributes:
|
|
||||||
label: Where did you encounter the bug?
|
|
||||||
options:
|
|
||||||
- Public app (it-tools.tech)
|
|
||||||
- A self hosted
|
|
||||||
- Other (installations, docker, etc.)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1 +0,0 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
56
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -1,56 +0,0 @@
|
|||||||
name: 🚀 New feature proposal
|
|
||||||
description: Propose a new feature/enhancement or tool idea for IT-Tools
|
|
||||||
labels: ['enhancement', 'triage']
|
|
||||||
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thanks for your interest in the project and taking the time to fill out this feature report!
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: request-type
|
|
||||||
attributes:
|
|
||||||
label: What type of request is this?
|
|
||||||
options:
|
|
||||||
- New tool idea
|
|
||||||
- New feature for an existing tool
|
|
||||||
- Deployment or CI/CD improvement
|
|
||||||
- Self-hosting improvement
|
|
||||||
- Other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: feature-description
|
|
||||||
attributes:
|
|
||||||
label: Clear and concise description of the feature you are proposing
|
|
||||||
description: A clear and concise description of what the feature is.
|
|
||||||
placeholder: 'Example: a token generator tool'
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: alternative
|
|
||||||
attributes:
|
|
||||||
label: Is their example of this tool in the wild?
|
|
||||||
description: Provide link to already existing tool (like websites, apps, cli, ...) or npm packages that could be used or provide inspiration for the feature.
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: additional-context
|
|
||||||
attributes:
|
|
||||||
label: Additional context
|
|
||||||
description: Any other context or screenshots about the feature request here.
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
id: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Validations
|
|
||||||
description: Before submitting the issue, please make sure you do the following
|
|
||||||
options:
|
|
||||||
- label: Check the feature is not already implemented in the project.
|
|
||||||
required: true
|
|
||||||
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
|
|
||||||
required: true
|
|
||||||
- label: Check that the feature can be implemented in a client side only app (IT-Tools is client side only, no server).
|
|
||||||
required: true
|
|
||||||
19
.github/ISSUE_TEMPLATE/new-tool-request.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
name: New tool request
|
||||||
|
about: Suggest a new tool idea
|
||||||
|
title: '[NEW TOOL]'
|
||||||
|
labels: new tool
|
||||||
|
assignees: CorentinTh
|
||||||
|
---
|
||||||
|
|
||||||
|
**Which tool is impacted?**
|
||||||
|
Example: the token generator
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Is their example of this tool in the wild?**
|
||||||
|
Provide link to already existing tool or npm packages if any exists
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the feature request here.
|
||||||
13
.github/ISSUE_TEMPLATE/other-request.md
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
name: Other request
|
||||||
|
about: Any request that does not concern a tool creation, a new feature request on a tool or a bug
|
||||||
|
title: '[OTHER] '
|
||||||
|
labels:
|
||||||
|
assignees: CorentinTh
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the feature request here.
|
||||||
13
.github/ISSUE_TEMPLATE/tool-improvement.md
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
name: Tool improvement
|
||||||
|
about: Improvement on an existing tool
|
||||||
|
title: '[TOOL IMPROVEMENT]'
|
||||||
|
labels: enhancement
|
||||||
|
assignees: CorentinTh
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the feature request here.
|
||||||
BIN
.github/logo.png
vendored
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
17
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 60
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 7
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- pinned
|
||||||
|
- security
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: wontfix
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
||||||
43
.github/workflows/cd-app-prod.yaml
vendored
@@ -1,43 +0,0 @@
|
|||||||
name: CD - Production
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- next
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-app-prod:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
deployments: write
|
|
||||||
name: Publish app to production
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
|
||||||
- run: corepack enable
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
corepack: true
|
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm i
|
|
||||||
|
|
||||||
- name: Build the app
|
|
||||||
run: pnpm -F @it-tools/app build
|
|
||||||
|
|
||||||
- name: Publish to Cloudflare Pages
|
|
||||||
uses: AdrianGonz97/refined-cf-pages-action@v1
|
|
||||||
with:
|
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
projectName: it-tools
|
|
||||||
workingDirectory: packages/app
|
|
||||||
directory: dist
|
|
||||||
deploymentName: Production App
|
|
||||||
branch: next
|
|
||||||
wranglerVersion: '3'
|
|
||||||
|
|
||||||
|
|
||||||
7
.github/workflows/ci.yml
vendored
@@ -11,11 +11,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 16
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -27,8 +27,5 @@ jobs:
|
|||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
|
||||||
- name: Type check
|
|
||||||
run: pnpm typecheck
|
|
||||||
|
|
||||||
- name: Build the app
|
- name: Build the app
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
|||||||
69
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ dev ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ dev ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'javascript' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
# Learn more:
|
||||||
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
87
.github/workflows/docker-nightly-release.yml
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
name: Docker nightly release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_date:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Check latest commit
|
||||||
|
outputs:
|
||||||
|
should_run: ${{ steps.should_run.outputs.should_run }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: print latest_commit
|
||||||
|
run: echo ${{ github.sha }}
|
||||||
|
|
||||||
|
- id: should_run
|
||||||
|
continue-on-error: true
|
||||||
|
name: check latest commit is less than a day
|
||||||
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
|
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
|
||||||
|
|
||||||
|
ci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: check_date
|
||||||
|
if: ${{ needs.check_date.outputs.should_run != 'false' }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: corepack enable
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm i
|
||||||
|
|
||||||
|
- name: Run linters
|
||||||
|
run: pnpm lint
|
||||||
|
|
||||||
|
- name: Run unit test
|
||||||
|
run: pnpm test
|
||||||
|
|
||||||
|
- name: Build the app
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- ci
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
corentinth/it-tools:nightly
|
||||||
|
ghcr.io/corentinth/it-tools:nightly
|
||||||
23
.github/workflows/playwright.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: E2E tests
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
timeout-minutes: 60
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: corepack enable
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
- name: Install Playwright Browsers
|
||||||
|
run: pnpm exec playwright install --with-deps
|
||||||
|
- name: Run Playwright tests
|
||||||
|
run: pnpm exec playwright test
|
||||||
104
.github/workflows/releases.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
name: Release new versions
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get release version
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
corentinth/it-tools:latest
|
||||||
|
corentinth/it-tools:${{ env.RELEASE_VERSION }}
|
||||||
|
ghcr.io/corentinth/it-tools:latest
|
||||||
|
ghcr.io/corentinth/it-tools:${{ env.RELEASE_VERSION}}
|
||||||
|
|
||||||
|
github-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: docker-release
|
||||||
|
steps:
|
||||||
|
- name: Get release version
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: corepack enable
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm i
|
||||||
|
|
||||||
|
- name: Build the app
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Zip the app
|
||||||
|
run: zip -r it-tools-${{ env.RELEASE_VERSION }}.zip dist/*
|
||||||
|
|
||||||
|
- name: Get changelog
|
||||||
|
id: changelog
|
||||||
|
run: |
|
||||||
|
EOF=$(openssl rand -hex 8)
|
||||||
|
echo "changelog<<$EOF" >> $GITHUB_OUTPUT
|
||||||
|
node ./scripts/getLatestChangelog.mjs >> $GITHUB_OUTPUT
|
||||||
|
echo "$EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: it-tools-${{ env.RELEASE_VERSION }}.zip
|
||||||
|
tag_name: v${{ env.RELEASE_VERSION }}
|
||||||
|
draft: true
|
||||||
|
prerelease: false
|
||||||
|
body: |
|
||||||
|
## Docker images
|
||||||
|
|
||||||
|
- Docker Hub
|
||||||
|
- `corentinth/it-tools:latest`
|
||||||
|
- `corentinth/it-tools:${{ env.RELEASE_VERSION }}`
|
||||||
|
- GitHub Container Registry
|
||||||
|
- `ghcr.io/corentinth/it-tools:latest`
|
||||||
|
- `ghcr.io/corentinth/it-tools:${{ env.RELEASE_VERSION}}`
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
${{ steps.changelog.outputs.changelog }}
|
||||||
53
.gitignore
vendored
@@ -1,32 +1,33 @@
|
|||||||
# Nuxt dev/build outputs
|
|
||||||
.output
|
|
||||||
.data
|
|
||||||
.nuxt
|
|
||||||
.nitro
|
|
||||||
.cache
|
|
||||||
dist
|
|
||||||
dist-app
|
|
||||||
dist-node
|
|
||||||
dist-cloudflare
|
|
||||||
|
|
||||||
# Node dependencies
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
# Misc
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.fleet
|
dist
|
||||||
.idea
|
dist-ssr
|
||||||
|
|
||||||
# Local env files
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
!.env.example
|
|
||||||
|
|
||||||
.wrangler
|
|
||||||
coverage
|
coverage
|
||||||
cache
|
*.local
|
||||||
.zed
|
|
||||||
|
/cypress/videos/
|
||||||
|
/cypress/screenshots/
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
.env
|
||||||
|
/test-results/
|
||||||
|
/playwright-report/
|
||||||
|
/playwright/.cache/
|
||||||
|
|||||||
7
.prettierrc
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"singleQuote": true,
|
||||||
|
"semi": true,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "all",
|
||||||
|
"printWidth": 120
|
||||||
|
}
|
||||||
14
.versionrc
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"types": [
|
||||||
|
{"type": "feat", "section": "Features"},
|
||||||
|
{"type": "fix", "section": "Bug Fixes"},
|
||||||
|
{"type": "docs", "section": "Documentation"},
|
||||||
|
{"type": "style", "section": "Styling"},
|
||||||
|
{"type": "refactor", "section": "Refactors"},
|
||||||
|
{"type": "perf", "section": "Performance"},
|
||||||
|
{"type": "test", "section": "Tests"},
|
||||||
|
{"type": "build", "section": "Build System"},
|
||||||
|
{"type": "ci", "section": "CI"},
|
||||||
|
{"type": "revert", "section": "Reverts"}
|
||||||
|
]
|
||||||
|
}
|
||||||
3
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin", "dbaeumer.vscode-eslint"]
|
||||||
|
}
|
||||||
55
CHANGELOG.md
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
## Version 2023.04.14-dbad773
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- **new-tool**: http status codes (8355bd2)
|
||||||
|
|
||||||
|
### Refactoring
|
||||||
|
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||||
|
|
||||||
|
### Chores
|
||||||
|
- **release**: create a github release on new version (dbad773)
|
||||||
|
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||||
|
|
||||||
|
## Version 2023.04.14-f9b77b7
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- **new-tool**: http status codes (8355bd2)
|
||||||
|
|
||||||
|
### Refactoring
|
||||||
|
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||||
|
|
||||||
|
### Chores
|
||||||
|
- **release**: create a github release on new version (f9b77b7)
|
||||||
|
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||||
|
|
||||||
|
## Version 2023.04.14-2f0d239
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- **new-tool**: http status codes (8355bd2)
|
||||||
|
|
||||||
|
### Refactoring
|
||||||
|
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||||
|
|
||||||
|
### Chores
|
||||||
|
- **release**: create a github release on new version (2f0d239)
|
||||||
|
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||||
|
|
||||||
|
## Version 2023.04.14-474cae4
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- **new-tool**: http status codes (8355bd2)
|
||||||
|
|
||||||
|
### Refactoring
|
||||||
|
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||||
|
|
||||||
|
### Chores
|
||||||
|
- **release**: create a github release on new version (474cae4)
|
||||||
|
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||||
|
|
||||||
|
## Version v2023.4.13-dce9ff9
|
||||||
|
|
||||||
|
_Diff not available_
|
||||||
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# build stage
|
||||||
|
FROM node:lts-alpine AS build-stage
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
RUN pnpm i --frozen-lockfile
|
||||||
|
RUN pnpm build
|
||||||
|
|
||||||
|
# production stage
|
||||||
|
FROM nginx:stable-alpine AS production-stage
|
||||||
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
101
README.md
@@ -1 +1,100 @@
|
|||||||
# IT-Tools
|

|
||||||
|
|
||||||
|
Useful tools for developer and people working in IT. [Have a look !](https://it-tools.tech).
|
||||||
|
|
||||||
|
## Functionalities and roadmap
|
||||||
|
|
||||||
|
Please check the [issues](https://github.com/CorentinTh/it-tools/issues) to see if some feature listed to be implemented.
|
||||||
|
|
||||||
|
You have an idea of a tool? Submit a [feature request](https://github.com/CorentinTh/it-tools/issues/new?assignees=corentinth&labels=&template=feature_request.md&title=)!
|
||||||
|
|
||||||
|
## Self host
|
||||||
|
|
||||||
|
Self host solutions for your homelab
|
||||||
|
|
||||||
|
**From docker hub:**
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -d --name it-tools --restart unless-stopped -p 8080:80 corentinth/it-tools:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
**From github packages:**
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -d --name it-tools --restart unless-stopped -p 8080:80 ghcr.io/corentinth/it-tools:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
**Other solutions:**
|
||||||
|
|
||||||
|
- [Tipi](https://www.runtipi.io/docs/apps-available)
|
||||||
|
- [Unraid](https://unraid.net/community/apps?q=it-tools)
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
|
||||||
|
### Recommended IDE Setup
|
||||||
|
|
||||||
|
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||||
|
|
||||||
|
### Type Support for `.vue` Imports in TS
|
||||||
|
|
||||||
|
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
||||||
|
|
||||||
|
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
||||||
|
|
||||||
|
1. Disable the built-in TypeScript Extension
|
||||||
|
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
||||||
|
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
||||||
|
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
||||||
|
|
||||||
|
### Project Setup
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pnpm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile and Hot-Reload for Development
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pnpm dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Type-Check, Compile and Minify for Production
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pnpm build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pnpm test
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lint with [ESLint](https://eslint.org/)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pnpm lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create a new tool
|
||||||
|
|
||||||
|
To create a new tool, there is a script that generate the boilerplate of the new tool, simply run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pnpm run script:create-new-tool my-tool-name
|
||||||
|
```
|
||||||
|
|
||||||
|
It will create a directory in `src/tools` with the correct files, and a the import in `src/tools/index.ts`. You will just need to add the inported tool in the proper category and develop the tool.
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
Coded with ❤️ by [Corentin Thomasset](//corentin-thomasset.fr).
|
||||||
|
|
||||||
|
This project is continuously deployed using [vercel.com](https://vercel.com).
|
||||||
|
|
||||||
|
<a href="https://www.producthunt.com/posts/it-tools?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-it-tools" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=345793&theme=light" alt="IT Tools - Collection of handy online tools for devs, with great UX | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||||
|
<a href="https://www.producthunt.com/posts/it-tools?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-it-tools" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=345793&theme=light&period=daily" alt="IT Tools - Collection of handy online tools for devs, with great UX | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is under the [GNU GPLv3](LICENSE).
|
||||||
|
|||||||
524
auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,524 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// @ts-nocheck
|
||||||
|
// Generated by unplugin-auto-import
|
||||||
|
export {}
|
||||||
|
declare global {
|
||||||
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
|
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||||
|
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||||
|
const computed: typeof import('vue')['computed']
|
||||||
|
const computedAsync: typeof import('@vueuse/core')['computedAsync']
|
||||||
|
const computedEager: typeof import('@vueuse/core')['computedEager']
|
||||||
|
const computedInject: typeof import('@vueuse/core')['computedInject']
|
||||||
|
const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
|
||||||
|
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
|
||||||
|
const controlledRef: typeof import('@vueuse/core')['controlledRef']
|
||||||
|
const createApp: typeof import('vue')['createApp']
|
||||||
|
const createEventHook: typeof import('@vueuse/core')['createEventHook']
|
||||||
|
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||||
|
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||||
|
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||||
|
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||||
|
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||||
|
const customRef: typeof import('vue')['customRef']
|
||||||
|
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||||
|
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||||
|
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||||
|
const defineComponent: typeof import('vue')['defineComponent']
|
||||||
|
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||||
|
const effectScope: typeof import('vue')['effectScope']
|
||||||
|
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||||
|
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||||
|
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||||
|
const h: typeof import('vue')['h']
|
||||||
|
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||||
|
const inject: typeof import('vue')['inject']
|
||||||
|
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||||
|
const isProxy: typeof import('vue')['isProxy']
|
||||||
|
const isReactive: typeof import('vue')['isReactive']
|
||||||
|
const isReadonly: typeof import('vue')['isReadonly']
|
||||||
|
const isRef: typeof import('vue')['isRef']
|
||||||
|
const logicAnd: typeof import('@vueuse/core')['logicAnd']
|
||||||
|
const logicNot: typeof import('@vueuse/core')['logicNot']
|
||||||
|
const logicOr: typeof import('@vueuse/core')['logicOr']
|
||||||
|
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
|
||||||
|
const markRaw: typeof import('vue')['markRaw']
|
||||||
|
const nextTick: typeof import('vue')['nextTick']
|
||||||
|
const onActivated: typeof import('vue')['onActivated']
|
||||||
|
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||||
|
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||||
|
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||||
|
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||||
|
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||||
|
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
|
||||||
|
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||||
|
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||||
|
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
|
||||||
|
const onLongPress: typeof import('@vueuse/core')['onLongPress']
|
||||||
|
const onMounted: typeof import('vue')['onMounted']
|
||||||
|
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||||
|
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||||
|
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||||
|
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||||
|
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||||
|
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||||
|
const onUpdated: typeof import('vue')['onUpdated']
|
||||||
|
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||||
|
const provide: typeof import('vue')['provide']
|
||||||
|
const reactify: typeof import('@vueuse/core')['reactify']
|
||||||
|
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||||
|
const reactive: typeof import('vue')['reactive']
|
||||||
|
const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
|
||||||
|
const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
|
||||||
|
const reactivePick: typeof import('@vueuse/core')['reactivePick']
|
||||||
|
const readonly: typeof import('vue')['readonly']
|
||||||
|
const ref: typeof import('vue')['ref']
|
||||||
|
const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
|
||||||
|
const refDebounced: typeof import('@vueuse/core')['refDebounced']
|
||||||
|
const refDefault: typeof import('@vueuse/core')['refDefault']
|
||||||
|
const refThrottled: typeof import('@vueuse/core')['refThrottled']
|
||||||
|
const refWithControl: typeof import('@vueuse/core')['refWithControl']
|
||||||
|
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||||
|
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||||
|
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
|
||||||
|
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||||
|
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||||
|
const shallowRef: typeof import('vue')['shallowRef']
|
||||||
|
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||||
|
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
||||||
|
const templateRef: typeof import('@vueuse/core')['templateRef']
|
||||||
|
const throttledRef: typeof import('@vueuse/core')['throttledRef']
|
||||||
|
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
|
||||||
|
const toRaw: typeof import('vue')['toRaw']
|
||||||
|
const toReactive: typeof import('@vueuse/core')['toReactive']
|
||||||
|
const toRef: typeof import('vue')['toRef']
|
||||||
|
const toRefs: typeof import('vue')['toRefs']
|
||||||
|
const triggerRef: typeof import('vue')['triggerRef']
|
||||||
|
const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
|
||||||
|
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
|
||||||
|
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
|
||||||
|
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
|
||||||
|
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
|
||||||
|
const unref: typeof import('vue')['unref']
|
||||||
|
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||||
|
const until: typeof import('@vueuse/core')['until']
|
||||||
|
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||||
|
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
|
||||||
|
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
|
||||||
|
const useAttrs: typeof import('vue')['useAttrs']
|
||||||
|
const useBase64: typeof import('@vueuse/core')['useBase64']
|
||||||
|
const useBattery: typeof import('@vueuse/core')['useBattery']
|
||||||
|
const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
|
||||||
|
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
|
||||||
|
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
|
||||||
|
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||||
|
const useCached: typeof import('@vueuse/core')['useCached']
|
||||||
|
const useClamp: typeof import('@vueuse/core')['useClamp']
|
||||||
|
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||||
|
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||||
|
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||||
|
const useCounter: typeof import('@vueuse/core')['useCounter']
|
||||||
|
const useCssModule: typeof import('vue')['useCssModule']
|
||||||
|
const useCssVar: typeof import('@vueuse/core')['useCssVar']
|
||||||
|
const useCssVars: typeof import('vue')['useCssVars']
|
||||||
|
const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
|
||||||
|
const useCycleList: typeof import('@vueuse/core')['useCycleList']
|
||||||
|
const useDark: typeof import('@vueuse/core')['useDark']
|
||||||
|
const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
|
||||||
|
const useDebounce: typeof import('@vueuse/core')['useDebounce']
|
||||||
|
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
|
||||||
|
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
|
||||||
|
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
|
||||||
|
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
|
||||||
|
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
|
||||||
|
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
|
||||||
|
const useDialog: typeof import('naive-ui')['useDialog']
|
||||||
|
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||||
|
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||||
|
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||||
|
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||||
|
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||||
|
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||||
|
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||||
|
const useElementSize: typeof import('@vueuse/core')['useElementSize']
|
||||||
|
const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
|
||||||
|
const useEventBus: typeof import('@vueuse/core')['useEventBus']
|
||||||
|
const useEventListener: typeof import('@vueuse/core')['useEventListener']
|
||||||
|
const useEventSource: typeof import('@vueuse/core')['useEventSource']
|
||||||
|
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
|
||||||
|
const useFavicon: typeof import('@vueuse/core')['useFavicon']
|
||||||
|
const useFetch: typeof import('@vueuse/core')['useFetch']
|
||||||
|
const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
|
||||||
|
const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
|
||||||
|
const useFocus: typeof import('@vueuse/core')['useFocus']
|
||||||
|
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
|
||||||
|
const useFps: typeof import('@vueuse/core')['useFps']
|
||||||
|
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
|
||||||
|
const useGamepad: typeof import('@vueuse/core')['useGamepad']
|
||||||
|
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
|
||||||
|
const useIdle: typeof import('@vueuse/core')['useIdle']
|
||||||
|
const useImage: typeof import('@vueuse/core')['useImage']
|
||||||
|
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
|
||||||
|
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
|
||||||
|
const useInterval: typeof import('@vueuse/core')['useInterval']
|
||||||
|
const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
|
||||||
|
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
|
||||||
|
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
|
||||||
|
const useLink: typeof import('vue-router')['useLink']
|
||||||
|
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
|
||||||
|
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
|
||||||
|
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
|
||||||
|
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
|
||||||
|
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
|
||||||
|
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
|
||||||
|
const useMemoize: typeof import('@vueuse/core')['useMemoize']
|
||||||
|
const useMemory: typeof import('@vueuse/core')['useMemory']
|
||||||
|
const useMessage: typeof import('naive-ui')['useMessage']
|
||||||
|
const useMounted: typeof import('@vueuse/core')['useMounted']
|
||||||
|
const useMouse: typeof import('@vueuse/core')['useMouse']
|
||||||
|
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
|
||||||
|
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
|
||||||
|
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
|
||||||
|
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
|
||||||
|
const useNetwork: typeof import('@vueuse/core')['useNetwork']
|
||||||
|
const useNotification: typeof import('naive-ui')['useNotification']
|
||||||
|
const useNow: typeof import('@vueuse/core')['useNow']
|
||||||
|
const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
|
||||||
|
const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
|
||||||
|
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||||
|
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||||
|
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||||
|
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||||
|
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||||
|
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
|
||||||
|
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
|
||||||
|
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
|
||||||
|
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
|
||||||
|
const useRafFn: typeof import('@vueuse/core')['useRafFn']
|
||||||
|
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
|
||||||
|
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
|
||||||
|
const useRoute: typeof import('vue-router')['useRoute']
|
||||||
|
const useRouter: typeof import('vue-router')['useRouter']
|
||||||
|
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
|
||||||
|
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
|
||||||
|
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||||
|
const useScroll: typeof import('@vueuse/core')['useScroll']
|
||||||
|
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
||||||
|
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
||||||
|
const useShare: typeof import('@vueuse/core')['useShare']
|
||||||
|
const useSlots: typeof import('vue')['useSlots']
|
||||||
|
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
|
||||||
|
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
|
||||||
|
const useStepper: typeof import('@vueuse/core')['useStepper']
|
||||||
|
const useStorage: typeof import('@vueuse/core')['useStorage']
|
||||||
|
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
|
||||||
|
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
|
||||||
|
const useSwipe: typeof import('@vueuse/core')['useSwipe']
|
||||||
|
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
|
||||||
|
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
|
||||||
|
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
|
||||||
|
const useThrottle: typeof import('@vueuse/core')['useThrottle']
|
||||||
|
const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
|
||||||
|
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
|
||||||
|
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
|
||||||
|
const useTimeout: typeof import('@vueuse/core')['useTimeout']
|
||||||
|
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
|
||||||
|
const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
|
||||||
|
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
|
||||||
|
const useTitle: typeof import('@vueuse/core')['useTitle']
|
||||||
|
const useToggle: typeof import('@vueuse/core')['useToggle']
|
||||||
|
const useTransition: typeof import('@vueuse/core')['useTransition']
|
||||||
|
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
|
||||||
|
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
|
||||||
|
const useVModel: typeof import('@vueuse/core')['useVModel']
|
||||||
|
const useVModels: typeof import('@vueuse/core')['useVModels']
|
||||||
|
const useVibrate: typeof import('@vueuse/core')['useVibrate']
|
||||||
|
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
|
||||||
|
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
|
||||||
|
const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
|
||||||
|
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
|
||||||
|
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
|
||||||
|
const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
|
||||||
|
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
||||||
|
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
||||||
|
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
||||||
|
const watch: typeof import('vue')['watch']
|
||||||
|
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||||
|
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||||
|
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
||||||
|
const watchEffect: typeof import('vue')['watchEffect']
|
||||||
|
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
||||||
|
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||||
|
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
||||||
|
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||||
|
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||||
|
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
|
||||||
|
const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
|
||||||
|
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
|
||||||
|
const whenever: typeof import('@vueuse/core')['whenever']
|
||||||
|
}
|
||||||
|
// for type re-export
|
||||||
|
declare global {
|
||||||
|
// @ts-ignore
|
||||||
|
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
|
||||||
|
}
|
||||||
|
// for vue template auto import
|
||||||
|
import { UnwrapRef } from 'vue'
|
||||||
|
declare module 'vue' {
|
||||||
|
interface ComponentCustomProperties {
|
||||||
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
||||||
|
readonly computedAsync: UnwrapRef<typeof import('@vueuse/core')['computedAsync']>
|
||||||
|
readonly computedEager: UnwrapRef<typeof import('@vueuse/core')['computedEager']>
|
||||||
|
readonly computedInject: UnwrapRef<typeof import('@vueuse/core')['computedInject']>
|
||||||
|
readonly computedWithControl: UnwrapRef<typeof import('@vueuse/core')['computedWithControl']>
|
||||||
|
readonly controlledComputed: UnwrapRef<typeof import('@vueuse/core')['controlledComputed']>
|
||||||
|
readonly controlledRef: UnwrapRef<typeof import('@vueuse/core')['controlledRef']>
|
||||||
|
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
|
||||||
|
readonly createEventHook: UnwrapRef<typeof import('@vueuse/core')['createEventHook']>
|
||||||
|
readonly createGlobalState: UnwrapRef<typeof import('@vueuse/core')['createGlobalState']>
|
||||||
|
readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']>
|
||||||
|
readonly createReactiveFn: UnwrapRef<typeof import('@vueuse/core')['createReactiveFn']>
|
||||||
|
readonly createSharedComposable: UnwrapRef<typeof import('@vueuse/core')['createSharedComposable']>
|
||||||
|
readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']>
|
||||||
|
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
|
||||||
|
readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']>
|
||||||
|
readonly debouncedWatch: UnwrapRef<typeof import('@vueuse/core')['debouncedWatch']>
|
||||||
|
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
|
||||||
|
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
|
||||||
|
readonly eagerComputed: UnwrapRef<typeof import('@vueuse/core')['eagerComputed']>
|
||||||
|
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
||||||
|
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
|
||||||
|
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
||||||
|
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
|
||||||
|
readonly h: UnwrapRef<typeof import('vue')['h']>
|
||||||
|
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
||||||
|
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
||||||
|
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
||||||
|
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
||||||
|
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
||||||
|
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
|
||||||
|
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
|
||||||
|
readonly logicAnd: UnwrapRef<typeof import('@vueuse/core')['logicAnd']>
|
||||||
|
readonly logicNot: UnwrapRef<typeof import('@vueuse/core')['logicNot']>
|
||||||
|
readonly logicOr: UnwrapRef<typeof import('@vueuse/core')['logicOr']>
|
||||||
|
readonly makeDestructurable: UnwrapRef<typeof import('@vueuse/core')['makeDestructurable']>
|
||||||
|
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
|
||||||
|
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
|
||||||
|
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
|
||||||
|
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
|
||||||
|
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
|
||||||
|
readonly onBeforeRouteUpdate: UnwrapRef<typeof import('vue-router')['onBeforeRouteUpdate']>
|
||||||
|
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
|
||||||
|
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
|
||||||
|
readonly onClickOutside: UnwrapRef<typeof import('@vueuse/core')['onClickOutside']>
|
||||||
|
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
|
||||||
|
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
|
||||||
|
readonly onKeyStroke: UnwrapRef<typeof import('@vueuse/core')['onKeyStroke']>
|
||||||
|
readonly onLongPress: UnwrapRef<typeof import('@vueuse/core')['onLongPress']>
|
||||||
|
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
|
||||||
|
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
|
||||||
|
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
|
||||||
|
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
|
||||||
|
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
|
||||||
|
readonly onStartTyping: UnwrapRef<typeof import('@vueuse/core')['onStartTyping']>
|
||||||
|
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
|
||||||
|
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
||||||
|
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
|
||||||
|
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
||||||
|
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
|
||||||
|
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
|
||||||
|
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
||||||
|
readonly reactiveComputed: UnwrapRef<typeof import('@vueuse/core')['reactiveComputed']>
|
||||||
|
readonly reactiveOmit: UnwrapRef<typeof import('@vueuse/core')['reactiveOmit']>
|
||||||
|
readonly reactivePick: UnwrapRef<typeof import('@vueuse/core')['reactivePick']>
|
||||||
|
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
|
||||||
|
readonly ref: UnwrapRef<typeof import('vue')['ref']>
|
||||||
|
readonly refAutoReset: UnwrapRef<typeof import('@vueuse/core')['refAutoReset']>
|
||||||
|
readonly refDebounced: UnwrapRef<typeof import('@vueuse/core')['refDebounced']>
|
||||||
|
readonly refDefault: UnwrapRef<typeof import('@vueuse/core')['refDefault']>
|
||||||
|
readonly refThrottled: UnwrapRef<typeof import('@vueuse/core')['refThrottled']>
|
||||||
|
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
|
||||||
|
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||||
|
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
||||||
|
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
|
||||||
|
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
|
||||||
|
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
|
||||||
|
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
|
||||||
|
readonly syncRef: UnwrapRef<typeof import('@vueuse/core')['syncRef']>
|
||||||
|
readonly syncRefs: UnwrapRef<typeof import('@vueuse/core')['syncRefs']>
|
||||||
|
readonly templateRef: UnwrapRef<typeof import('@vueuse/core')['templateRef']>
|
||||||
|
readonly throttledRef: UnwrapRef<typeof import('@vueuse/core')['throttledRef']>
|
||||||
|
readonly throttledWatch: UnwrapRef<typeof import('@vueuse/core')['throttledWatch']>
|
||||||
|
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
|
||||||
|
readonly toReactive: UnwrapRef<typeof import('@vueuse/core')['toReactive']>
|
||||||
|
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
|
||||||
|
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
|
||||||
|
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
|
||||||
|
readonly tryOnBeforeMount: UnwrapRef<typeof import('@vueuse/core')['tryOnBeforeMount']>
|
||||||
|
readonly tryOnBeforeUnmount: UnwrapRef<typeof import('@vueuse/core')['tryOnBeforeUnmount']>
|
||||||
|
readonly tryOnMounted: UnwrapRef<typeof import('@vueuse/core')['tryOnMounted']>
|
||||||
|
readonly tryOnScopeDispose: UnwrapRef<typeof import('@vueuse/core')['tryOnScopeDispose']>
|
||||||
|
readonly tryOnUnmounted: UnwrapRef<typeof import('@vueuse/core')['tryOnUnmounted']>
|
||||||
|
readonly unref: UnwrapRef<typeof import('vue')['unref']>
|
||||||
|
readonly unrefElement: UnwrapRef<typeof import('@vueuse/core')['unrefElement']>
|
||||||
|
readonly until: UnwrapRef<typeof import('@vueuse/core')['until']>
|
||||||
|
readonly useActiveElement: UnwrapRef<typeof import('@vueuse/core')['useActiveElement']>
|
||||||
|
readonly useAsyncQueue: UnwrapRef<typeof import('@vueuse/core')['useAsyncQueue']>
|
||||||
|
readonly useAsyncState: UnwrapRef<typeof import('@vueuse/core')['useAsyncState']>
|
||||||
|
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
|
||||||
|
readonly useBase64: UnwrapRef<typeof import('@vueuse/core')['useBase64']>
|
||||||
|
readonly useBattery: UnwrapRef<typeof import('@vueuse/core')['useBattery']>
|
||||||
|
readonly useBluetooth: UnwrapRef<typeof import('@vueuse/core')['useBluetooth']>
|
||||||
|
readonly useBreakpoints: UnwrapRef<typeof import('@vueuse/core')['useBreakpoints']>
|
||||||
|
readonly useBroadcastChannel: UnwrapRef<typeof import('@vueuse/core')['useBroadcastChannel']>
|
||||||
|
readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']>
|
||||||
|
readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']>
|
||||||
|
readonly useClamp: UnwrapRef<typeof import('@vueuse/core')['useClamp']>
|
||||||
|
readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']>
|
||||||
|
readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']>
|
||||||
|
readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']>
|
||||||
|
readonly useCounter: UnwrapRef<typeof import('@vueuse/core')['useCounter']>
|
||||||
|
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
||||||
|
readonly useCssVar: UnwrapRef<typeof import('@vueuse/core')['useCssVar']>
|
||||||
|
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
||||||
|
readonly useCurrentElement: UnwrapRef<typeof import('@vueuse/core')['useCurrentElement']>
|
||||||
|
readonly useCycleList: UnwrapRef<typeof import('@vueuse/core')['useCycleList']>
|
||||||
|
readonly useDark: UnwrapRef<typeof import('@vueuse/core')['useDark']>
|
||||||
|
readonly useDateFormat: UnwrapRef<typeof import('@vueuse/core')['useDateFormat']>
|
||||||
|
readonly useDebounce: UnwrapRef<typeof import('@vueuse/core')['useDebounce']>
|
||||||
|
readonly useDebounceFn: UnwrapRef<typeof import('@vueuse/core')['useDebounceFn']>
|
||||||
|
readonly useDebouncedRefHistory: UnwrapRef<typeof import('@vueuse/core')['useDebouncedRefHistory']>
|
||||||
|
readonly useDeviceMotion: UnwrapRef<typeof import('@vueuse/core')['useDeviceMotion']>
|
||||||
|
readonly useDeviceOrientation: UnwrapRef<typeof import('@vueuse/core')['useDeviceOrientation']>
|
||||||
|
readonly useDevicePixelRatio: UnwrapRef<typeof import('@vueuse/core')['useDevicePixelRatio']>
|
||||||
|
readonly useDevicesList: UnwrapRef<typeof import('@vueuse/core')['useDevicesList']>
|
||||||
|
readonly useDialog: UnwrapRef<typeof import('naive-ui')['useDialog']>
|
||||||
|
readonly useDisplayMedia: UnwrapRef<typeof import('@vueuse/core')['useDisplayMedia']>
|
||||||
|
readonly useDocumentVisibility: UnwrapRef<typeof import('@vueuse/core')['useDocumentVisibility']>
|
||||||
|
readonly useDraggable: UnwrapRef<typeof import('@vueuse/core')['useDraggable']>
|
||||||
|
readonly useDropZone: UnwrapRef<typeof import('@vueuse/core')['useDropZone']>
|
||||||
|
readonly useElementBounding: UnwrapRef<typeof import('@vueuse/core')['useElementBounding']>
|
||||||
|
readonly useElementByPoint: UnwrapRef<typeof import('@vueuse/core')['useElementByPoint']>
|
||||||
|
readonly useElementHover: UnwrapRef<typeof import('@vueuse/core')['useElementHover']>
|
||||||
|
readonly useElementSize: UnwrapRef<typeof import('@vueuse/core')['useElementSize']>
|
||||||
|
readonly useElementVisibility: UnwrapRef<typeof import('@vueuse/core')['useElementVisibility']>
|
||||||
|
readonly useEventBus: UnwrapRef<typeof import('@vueuse/core')['useEventBus']>
|
||||||
|
readonly useEventListener: UnwrapRef<typeof import('@vueuse/core')['useEventListener']>
|
||||||
|
readonly useEventSource: UnwrapRef<typeof import('@vueuse/core')['useEventSource']>
|
||||||
|
readonly useEyeDropper: UnwrapRef<typeof import('@vueuse/core')['useEyeDropper']>
|
||||||
|
readonly useFavicon: UnwrapRef<typeof import('@vueuse/core')['useFavicon']>
|
||||||
|
readonly useFetch: UnwrapRef<typeof import('@vueuse/core')['useFetch']>
|
||||||
|
readonly useFileDialog: UnwrapRef<typeof import('@vueuse/core')['useFileDialog']>
|
||||||
|
readonly useFileSystemAccess: UnwrapRef<typeof import('@vueuse/core')['useFileSystemAccess']>
|
||||||
|
readonly useFocus: UnwrapRef<typeof import('@vueuse/core')['useFocus']>
|
||||||
|
readonly useFocusWithin: UnwrapRef<typeof import('@vueuse/core')['useFocusWithin']>
|
||||||
|
readonly useFps: UnwrapRef<typeof import('@vueuse/core')['useFps']>
|
||||||
|
readonly useFullscreen: UnwrapRef<typeof import('@vueuse/core')['useFullscreen']>
|
||||||
|
readonly useGamepad: UnwrapRef<typeof import('@vueuse/core')['useGamepad']>
|
||||||
|
readonly useGeolocation: UnwrapRef<typeof import('@vueuse/core')['useGeolocation']>
|
||||||
|
readonly useIdle: UnwrapRef<typeof import('@vueuse/core')['useIdle']>
|
||||||
|
readonly useImage: UnwrapRef<typeof import('@vueuse/core')['useImage']>
|
||||||
|
readonly useInfiniteScroll: UnwrapRef<typeof import('@vueuse/core')['useInfiniteScroll']>
|
||||||
|
readonly useIntersectionObserver: UnwrapRef<typeof import('@vueuse/core')['useIntersectionObserver']>
|
||||||
|
readonly useInterval: UnwrapRef<typeof import('@vueuse/core')['useInterval']>
|
||||||
|
readonly useIntervalFn: UnwrapRef<typeof import('@vueuse/core')['useIntervalFn']>
|
||||||
|
readonly useKeyModifier: UnwrapRef<typeof import('@vueuse/core')['useKeyModifier']>
|
||||||
|
readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']>
|
||||||
|
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
|
||||||
|
readonly useLoadingBar: UnwrapRef<typeof import('naive-ui')['useLoadingBar']>
|
||||||
|
readonly useLocalStorage: UnwrapRef<typeof import('@vueuse/core')['useLocalStorage']>
|
||||||
|
readonly useMagicKeys: UnwrapRef<typeof import('@vueuse/core')['useMagicKeys']>
|
||||||
|
readonly useManualRefHistory: UnwrapRef<typeof import('@vueuse/core')['useManualRefHistory']>
|
||||||
|
readonly useMediaControls: UnwrapRef<typeof import('@vueuse/core')['useMediaControls']>
|
||||||
|
readonly useMediaQuery: UnwrapRef<typeof import('@vueuse/core')['useMediaQuery']>
|
||||||
|
readonly useMemoize: UnwrapRef<typeof import('@vueuse/core')['useMemoize']>
|
||||||
|
readonly useMemory: UnwrapRef<typeof import('@vueuse/core')['useMemory']>
|
||||||
|
readonly useMessage: UnwrapRef<typeof import('naive-ui')['useMessage']>
|
||||||
|
readonly useMounted: UnwrapRef<typeof import('@vueuse/core')['useMounted']>
|
||||||
|
readonly useMouse: UnwrapRef<typeof import('@vueuse/core')['useMouse']>
|
||||||
|
readonly useMouseInElement: UnwrapRef<typeof import('@vueuse/core')['useMouseInElement']>
|
||||||
|
readonly useMousePressed: UnwrapRef<typeof import('@vueuse/core')['useMousePressed']>
|
||||||
|
readonly useMutationObserver: UnwrapRef<typeof import('@vueuse/core')['useMutationObserver']>
|
||||||
|
readonly useNavigatorLanguage: UnwrapRef<typeof import('@vueuse/core')['useNavigatorLanguage']>
|
||||||
|
readonly useNetwork: UnwrapRef<typeof import('@vueuse/core')['useNetwork']>
|
||||||
|
readonly useNotification: UnwrapRef<typeof import('naive-ui')['useNotification']>
|
||||||
|
readonly useNow: UnwrapRef<typeof import('@vueuse/core')['useNow']>
|
||||||
|
readonly useObjectUrl: UnwrapRef<typeof import('@vueuse/core')['useObjectUrl']>
|
||||||
|
readonly useOffsetPagination: UnwrapRef<typeof import('@vueuse/core')['useOffsetPagination']>
|
||||||
|
readonly useOnline: UnwrapRef<typeof import('@vueuse/core')['useOnline']>
|
||||||
|
readonly usePageLeave: UnwrapRef<typeof import('@vueuse/core')['usePageLeave']>
|
||||||
|
readonly useParallax: UnwrapRef<typeof import('@vueuse/core')['useParallax']>
|
||||||
|
readonly usePermission: UnwrapRef<typeof import('@vueuse/core')['usePermission']>
|
||||||
|
readonly usePointer: UnwrapRef<typeof import('@vueuse/core')['usePointer']>
|
||||||
|
readonly usePointerSwipe: UnwrapRef<typeof import('@vueuse/core')['usePointerSwipe']>
|
||||||
|
readonly usePreferredColorScheme: UnwrapRef<typeof import('@vueuse/core')['usePreferredColorScheme']>
|
||||||
|
readonly usePreferredDark: UnwrapRef<typeof import('@vueuse/core')['usePreferredDark']>
|
||||||
|
readonly usePreferredLanguages: UnwrapRef<typeof import('@vueuse/core')['usePreferredLanguages']>
|
||||||
|
readonly useRafFn: UnwrapRef<typeof import('@vueuse/core')['useRafFn']>
|
||||||
|
readonly useRefHistory: UnwrapRef<typeof import('@vueuse/core')['useRefHistory']>
|
||||||
|
readonly useResizeObserver: UnwrapRef<typeof import('@vueuse/core')['useResizeObserver']>
|
||||||
|
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
|
||||||
|
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
|
||||||
|
readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']>
|
||||||
|
readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']>
|
||||||
|
readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']>
|
||||||
|
readonly useScroll: UnwrapRef<typeof import('@vueuse/core')['useScroll']>
|
||||||
|
readonly useScrollLock: UnwrapRef<typeof import('@vueuse/core')['useScrollLock']>
|
||||||
|
readonly useSessionStorage: UnwrapRef<typeof import('@vueuse/core')['useSessionStorage']>
|
||||||
|
readonly useShare: UnwrapRef<typeof import('@vueuse/core')['useShare']>
|
||||||
|
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
|
||||||
|
readonly useSpeechRecognition: UnwrapRef<typeof import('@vueuse/core')['useSpeechRecognition']>
|
||||||
|
readonly useSpeechSynthesis: UnwrapRef<typeof import('@vueuse/core')['useSpeechSynthesis']>
|
||||||
|
readonly useStepper: UnwrapRef<typeof import('@vueuse/core')['useStepper']>
|
||||||
|
readonly useStorage: UnwrapRef<typeof import('@vueuse/core')['useStorage']>
|
||||||
|
readonly useStorageAsync: UnwrapRef<typeof import('@vueuse/core')['useStorageAsync']>
|
||||||
|
readonly useStyleTag: UnwrapRef<typeof import('@vueuse/core')['useStyleTag']>
|
||||||
|
readonly useSwipe: UnwrapRef<typeof import('@vueuse/core')['useSwipe']>
|
||||||
|
readonly useTemplateRefsList: UnwrapRef<typeof import('@vueuse/core')['useTemplateRefsList']>
|
||||||
|
readonly useTextSelection: UnwrapRef<typeof import('@vueuse/core')['useTextSelection']>
|
||||||
|
readonly useTextareaAutosize: UnwrapRef<typeof import('@vueuse/core')['useTextareaAutosize']>
|
||||||
|
readonly useThrottle: UnwrapRef<typeof import('@vueuse/core')['useThrottle']>
|
||||||
|
readonly useThrottleFn: UnwrapRef<typeof import('@vueuse/core')['useThrottleFn']>
|
||||||
|
readonly useThrottledRefHistory: UnwrapRef<typeof import('@vueuse/core')['useThrottledRefHistory']>
|
||||||
|
readonly useTimeAgo: UnwrapRef<typeof import('@vueuse/core')['useTimeAgo']>
|
||||||
|
readonly useTimeout: UnwrapRef<typeof import('@vueuse/core')['useTimeout']>
|
||||||
|
readonly useTimeoutFn: UnwrapRef<typeof import('@vueuse/core')['useTimeoutFn']>
|
||||||
|
readonly useTimeoutPoll: UnwrapRef<typeof import('@vueuse/core')['useTimeoutPoll']>
|
||||||
|
readonly useTimestamp: UnwrapRef<typeof import('@vueuse/core')['useTimestamp']>
|
||||||
|
readonly useTitle: UnwrapRef<typeof import('@vueuse/core')['useTitle']>
|
||||||
|
readonly useToggle: UnwrapRef<typeof import('@vueuse/core')['useToggle']>
|
||||||
|
readonly useTransition: UnwrapRef<typeof import('@vueuse/core')['useTransition']>
|
||||||
|
readonly useUrlSearchParams: UnwrapRef<typeof import('@vueuse/core')['useUrlSearchParams']>
|
||||||
|
readonly useUserMedia: UnwrapRef<typeof import('@vueuse/core')['useUserMedia']>
|
||||||
|
readonly useVModel: UnwrapRef<typeof import('@vueuse/core')['useVModel']>
|
||||||
|
readonly useVModels: UnwrapRef<typeof import('@vueuse/core')['useVModels']>
|
||||||
|
readonly useVibrate: UnwrapRef<typeof import('@vueuse/core')['useVibrate']>
|
||||||
|
readonly useVirtualList: UnwrapRef<typeof import('@vueuse/core')['useVirtualList']>
|
||||||
|
readonly useWakeLock: UnwrapRef<typeof import('@vueuse/core')['useWakeLock']>
|
||||||
|
readonly useWebNotification: UnwrapRef<typeof import('@vueuse/core')['useWebNotification']>
|
||||||
|
readonly useWebSocket: UnwrapRef<typeof import('@vueuse/core')['useWebSocket']>
|
||||||
|
readonly useWebWorker: UnwrapRef<typeof import('@vueuse/core')['useWebWorker']>
|
||||||
|
readonly useWebWorkerFn: UnwrapRef<typeof import('@vueuse/core')['useWebWorkerFn']>
|
||||||
|
readonly useWindowFocus: UnwrapRef<typeof import('@vueuse/core')['useWindowFocus']>
|
||||||
|
readonly useWindowScroll: UnwrapRef<typeof import('@vueuse/core')['useWindowScroll']>
|
||||||
|
readonly useWindowSize: UnwrapRef<typeof import('@vueuse/core')['useWindowSize']>
|
||||||
|
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
||||||
|
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
||||||
|
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
||||||
|
readonly watchDebounced: UnwrapRef<typeof import('@vueuse/core')['watchDebounced']>
|
||||||
|
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
||||||
|
readonly watchIgnorable: UnwrapRef<typeof import('@vueuse/core')['watchIgnorable']>
|
||||||
|
readonly watchOnce: UnwrapRef<typeof import('@vueuse/core')['watchOnce']>
|
||||||
|
readonly watchPausable: UnwrapRef<typeof import('@vueuse/core')['watchPausable']>
|
||||||
|
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
||||||
|
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
|
||||||
|
readonly watchThrottled: UnwrapRef<typeof import('@vueuse/core')['watchThrottled']>
|
||||||
|
readonly watchTriggerable: UnwrapRef<typeof import('@vueuse/core')['watchTriggerable']>
|
||||||
|
readonly watchWithFilter: UnwrapRef<typeof import('@vueuse/core')['watchWithFilter']>
|
||||||
|
readonly whenever: UnwrapRef<typeof import('@vueuse/core')['whenever']>
|
||||||
|
}
|
||||||
|
}
|
||||||
73
components.d.ts
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// @ts-nocheck
|
||||||
|
// Generated by unplugin-vue-components
|
||||||
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
|
import '@vue/runtime-core'
|
||||||
|
|
||||||
|
export {}
|
||||||
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
export interface GlobalComponents {
|
||||||
|
CollapsibleToolMenu: typeof import('./src/components/CollapsibleToolMenu.vue')['default']
|
||||||
|
ColoredCard: typeof import('./src/components/ColoredCard.vue')['default']
|
||||||
|
FavoriteButton: typeof import('./src/components/FavoriteButton.vue')['default']
|
||||||
|
FormatTransformer: typeof import('./src/components/FormatTransformer.vue')['default']
|
||||||
|
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
||||||
|
MenuIconItem: typeof import('./src/components/MenuIconItem.vue')['default']
|
||||||
|
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
||||||
|
NAlert: typeof import('naive-ui')['NAlert']
|
||||||
|
NAutoComplete: typeof import('naive-ui')['NAutoComplete']
|
||||||
|
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||||
|
NButton: typeof import('naive-ui')['NButton']
|
||||||
|
NCard: typeof import('naive-ui')['NCard']
|
||||||
|
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||||
|
NCode: typeof import('naive-ui')['NCode']
|
||||||
|
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||||
|
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||||
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
|
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||||
|
NDivider: typeof import('naive-ui')['NDivider']
|
||||||
|
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||||
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
|
NForm: typeof import('naive-ui')['NForm']
|
||||||
|
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||||
|
NGi: typeof import('naive-ui')['NGi']
|
||||||
|
NGrid: typeof import('naive-ui')['NGrid']
|
||||||
|
NH1: typeof import('naive-ui')['NH1']
|
||||||
|
NH2: typeof import('naive-ui')['NH2']
|
||||||
|
NH3: typeof import('naive-ui')['NH3']
|
||||||
|
NH4: typeof import('naive-ui')['NH4']
|
||||||
|
NIcon: typeof import('naive-ui')['NIcon']
|
||||||
|
NImage: typeof import('naive-ui')['NImage']
|
||||||
|
NInput: typeof import('naive-ui')['NInput']
|
||||||
|
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||||
|
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
||||||
|
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||||
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
|
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||||
|
NMenu: typeof import('naive-ui')['NMenu']
|
||||||
|
NP: typeof import('naive-ui')['NP']
|
||||||
|
NPageHeader: typeof import('naive-ui')['NPageHeader']
|
||||||
|
NProgress: typeof import('naive-ui')['NProgress']
|
||||||
|
NResult: typeof import('naive-ui')['NResult']
|
||||||
|
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||||
|
NSelect: typeof import('naive-ui')['NSelect']
|
||||||
|
NSlider: typeof import('naive-ui')['NSlider']
|
||||||
|
NSpace: typeof import('naive-ui')['NSpace']
|
||||||
|
NStatistic: typeof import('naive-ui')['NStatistic']
|
||||||
|
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||||
|
NTable: typeof import('naive-ui')['NTable']
|
||||||
|
NTag: typeof import('naive-ui')['NTag']
|
||||||
|
NText: typeof import('naive-ui')['NText']
|
||||||
|
NTooltip: typeof import('naive-ui')['NTooltip']
|
||||||
|
NUpload: typeof import('naive-ui')['NUpload']
|
||||||
|
NUploadDragger: typeof import('naive-ui')['NUploadDragger']
|
||||||
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
SearchBar: typeof import('./src/components/SearchBar.vue')['default']
|
||||||
|
SearchBarItem: typeof import('./src/components/SearchBarItem.vue')['default']
|
||||||
|
TextareaCopyable: typeof import('./src/components/TextareaCopyable.vue')['default']
|
||||||
|
ToolCard: typeof import('./src/components/ToolCard.vue')['default']
|
||||||
|
}
|
||||||
|
}
|
||||||
14
env.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
|
/// <reference types="vite-svg-loader" />
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
VITE_PLAUSIBLE_API_HOST: string;
|
||||||
|
VITE_PLAUSIBLE_DOMAIN: string;
|
||||||
|
PACKAGE_VERSION: string;
|
||||||
|
GIT_SHORT_SHA: string;
|
||||||
|
PROD: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv;
|
||||||
|
}
|
||||||
52
index.html
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>IT Tools - Handy online tools for developers</title>
|
||||||
|
<meta itemprop="name" content="IT Tools - Handy online tools for developers" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT."
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
itemprop="description"
|
||||||
|
content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT."
|
||||||
|
/>
|
||||||
|
<link rel="author" href="/humans.txt" />
|
||||||
|
<link rel="canonical" href="https://it-tools.tech" />
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||||
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#18a058" />
|
||||||
|
<meta name="msapplication-TileColor" content="#da532c" />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
<meta property="og:url" content="https://it-tools.tech/" />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:title" content="IT Tools - Handy online tools for developers" />
|
||||||
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT."
|
||||||
|
/>
|
||||||
|
<meta property="og:image" content="https://it-tools.tech/banner.png?v=2" />
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:site" content="@ittoolsdottech" />
|
||||||
|
<meta name="twitter:creator" content="@cthmsst" />
|
||||||
|
|
||||||
|
<meta name="twitter:title" content="IT Tools - Handy online tools for developers" />
|
||||||
|
<meta
|
||||||
|
name="twitter:description"
|
||||||
|
content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT."
|
||||||
|
/>
|
||||||
|
<meta name="twitter:image" content="https://it-tools.tech/banner.png?v=2" />
|
||||||
|
<meta name="twitter:image:alt" content="IT Tools - Handy online tools for developers" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
10
nginx.conf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
131
package.json
@@ -1,15 +1,128 @@
|
|||||||
{
|
{
|
||||||
"name": "@it-tools/root",
|
"name": "it-tools",
|
||||||
"version": "0.0.0",
|
"version": "2023.4.14-dbad773",
|
||||||
"description": "IT Tools monorepo root",
|
"description": "Collection of handy online tools for developers, with great UX. ",
|
||||||
"scripts": {
|
"keywords": [
|
||||||
"dev": "pnpm -F @it-tools/app dev"
|
"productivity",
|
||||||
},
|
"converter",
|
||||||
"keywords": [],
|
"website",
|
||||||
"author": "Corentin Thomasset <corentinth@proton.me> (https://corentin.tech)",
|
"vuejs",
|
||||||
|
"tools",
|
||||||
|
"frontend",
|
||||||
|
"tool",
|
||||||
|
"developer-tools",
|
||||||
|
"developer-productivity"
|
||||||
|
],
|
||||||
|
"author": "Corentin Th <corentin.thomasset74+it-tools@gmail.com> (https://github.com/CorentinTh)",
|
||||||
|
"license": "GNU GPLv3",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/CorentinTh/it-tools"
|
"url": "https://github.com/CorentinTh/it-tools"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.11.0"
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
|
"preview": "vite preview --port 5050",
|
||||||
|
"test": "npm run test:unit",
|
||||||
|
"test:unit": "vitest --environment jsdom",
|
||||||
|
"test:e2e": "playwright test",
|
||||||
|
"coverage": "vitest run --coverage",
|
||||||
|
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
||||||
|
"lint": "eslint src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
|
||||||
|
"script:create-new-tool": "node scripts/create-tool.mjs",
|
||||||
|
"release": "node ./scripts/release.mjs"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@it-tools/bip39": "^0.0.4",
|
||||||
|
"@it-tools/oggen": "^1.3.0",
|
||||||
|
"@sindresorhus/slugify": "^2.2.0",
|
||||||
|
"@tiptap/pm": "2.0.0-beta.220",
|
||||||
|
"@tiptap/starter-kit": "2.0.0-beta.220",
|
||||||
|
"@tiptap/vue-3": "2.0.0-beta.220",
|
||||||
|
"@vicons/material": "^0.12.0",
|
||||||
|
"@vicons/tabler": "^0.12.0",
|
||||||
|
"@vueuse/core": "^8.9.4",
|
||||||
|
"@vueuse/head": "^0.7.13",
|
||||||
|
"@vueuse/router": "^9.13.0",
|
||||||
|
"bcryptjs": "^2.4.3",
|
||||||
|
"change-case": "^4.1.2",
|
||||||
|
"colord": "^2.9.3",
|
||||||
|
"composerize-ts": "^0.6.2",
|
||||||
|
"cron-validator": "^1.3.1",
|
||||||
|
"cronstrue": "^2.26.0",
|
||||||
|
"crypto-js": "^4.1.1",
|
||||||
|
"date-fns": "^2.29.3",
|
||||||
|
"figue": "^1.2.0",
|
||||||
|
"fuse.js": "^6.6.2",
|
||||||
|
"hash-wasm": "^4.9.0",
|
||||||
|
"highlight.js": "^11.7.0",
|
||||||
|
"json5": "^2.2.3",
|
||||||
|
"jwt-decode": "^3.1.2",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"mathjs": "^10.6.4",
|
||||||
|
"mime-types": "^2.1.35",
|
||||||
|
"naive-ui": "^2.34.3",
|
||||||
|
"netmask": "^2.0.2",
|
||||||
|
"node-forge": "^1.3.1",
|
||||||
|
"oui": "^12.0.52",
|
||||||
|
"pinia": "^2.0.34",
|
||||||
|
"plausible-tracker": "^0.3.8",
|
||||||
|
"qrcode": "^1.5.1",
|
||||||
|
"randombytes": "^2.1.0",
|
||||||
|
"sql-formatter": "^8.2.0",
|
||||||
|
"ts-pattern": "^4.2.2",
|
||||||
|
"ua-parser-js": "^1.0.35",
|
||||||
|
"uuid": "^8.3.2",
|
||||||
|
"vue": "^3.2.47",
|
||||||
|
"vue-router": "^4.1.6",
|
||||||
|
"yaml": "^2.2.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@playwright/test": "^1.32.3",
|
||||||
|
"@rushstack/eslint-patch": "^1.2.0",
|
||||||
|
"@types/bcryptjs": "^2.4.2",
|
||||||
|
"@types/crypto-js": "^4.1.1",
|
||||||
|
"@types/jsdom": "^16.2.15",
|
||||||
|
"@types/lodash": "^4.14.192",
|
||||||
|
"@types/mime-types": "^2.1.1",
|
||||||
|
"@types/netmask": "^2.0.0",
|
||||||
|
"@types/node": "^16.18.23",
|
||||||
|
"@types/node-forge": "^1.3.2",
|
||||||
|
"@types/prettier": "^2.7.2",
|
||||||
|
"@types/qrcode": "^1.5.0",
|
||||||
|
"@types/randombytes": "^2.0.0",
|
||||||
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
|
"@types/uuid": "^8.3.4",
|
||||||
|
"@typescript-eslint/parser": "^5.58.0",
|
||||||
|
"@unocss/eslint-config": "^0.50.8",
|
||||||
|
"@vitejs/plugin-vue": "^2.3.4",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
||||||
|
"@vue/eslint-config-prettier": "^7.1.0",
|
||||||
|
"@vue/eslint-config-typescript": "^10.0.0",
|
||||||
|
"@vue/test-utils": "^2.3.2",
|
||||||
|
"@vue/tsconfig": "^0.1.3",
|
||||||
|
"c8": "^7.13.0",
|
||||||
|
"consola": "^3.0.2",
|
||||||
|
"eslint": "^8.38.0",
|
||||||
|
"eslint-config-prettier": "^8.8.0",
|
||||||
|
"eslint-import-resolver-typescript": "^3.5.5",
|
||||||
|
"eslint-plugin-import": "^2.27.5",
|
||||||
|
"eslint-plugin-vue": "^8.7.1",
|
||||||
|
"jsdom": "^19.0.0",
|
||||||
|
"less": "^4.1.3",
|
||||||
|
"prettier": "^2.8.7",
|
||||||
|
"start-server-and-test": "^1.15.4",
|
||||||
|
"typescript": "~4.5.5",
|
||||||
|
"unocss": "^0.50.8",
|
||||||
|
"unplugin-auto-import": "^0.15.2",
|
||||||
|
"unplugin-vue-components": "^0.24.1",
|
||||||
|
"vite": "^2.9.15",
|
||||||
|
"vite-plugin-md": "^0.12.4",
|
||||||
|
"vite-plugin-pwa": "^0.11.13",
|
||||||
|
"vite-svg-loader": "^3.6.0",
|
||||||
|
"vitest": "^0.13.1",
|
||||||
|
"vue-tsc": "^0.31.4",
|
||||||
|
"workbox-window": "^6.5.4",
|
||||||
|
"zx": "^7.2.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://shadcn-solid.com/schema.json",
|
|
||||||
"uno": {
|
|
||||||
"config": "uno.config.ts",
|
|
||||||
"css": {
|
|
||||||
"path": "src/client/app.css",
|
|
||||||
"variable": true
|
|
||||||
},
|
|
||||||
"color": "neutral",
|
|
||||||
"prefix": ""
|
|
||||||
},
|
|
||||||
"alias": {
|
|
||||||
"component": "@/modules/ui/components",
|
|
||||||
"ui": "@/modules/ui/components",
|
|
||||||
"cn": "@/modules/ui/utils/cn"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import antfu from '@antfu/eslint-config';
|
|
||||||
|
|
||||||
export default antfu({
|
|
||||||
stylistic: {
|
|
||||||
semi: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
// To allow export on top of files
|
|
||||||
'ts/no-use-before-define': ['error', { allowNamedExports: true, functions: false }],
|
|
||||||
'curly': ['error', 'all'],
|
|
||||||
'vitest/consistent-test-it': ['error', { fn: 'test' }],
|
|
||||||
'ts/consistent-type-definitions': ['error', 'type'],
|
|
||||||
'style/brace-style': ['error', '1tbs', { allowSingleLine: false }],
|
|
||||||
'unused-imports/no-unused-vars': ['error', {
|
|
||||||
argsIgnorePattern: '^_',
|
|
||||||
varsIgnorePattern: '^_',
|
|
||||||
caughtErrorsIgnorePattern: '^_',
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="theme-color" content="#000000" />
|
|
||||||
<title>IT Tools - Handy online tools for developers</title>
|
|
||||||
|
|
||||||
<meta name="title" content="IT Tools - Handy online tools for developers" />
|
|
||||||
<meta name="description" content="Collection of handy online tools for developers, with great UX. IT Tools is a free and open-source collection of handy online tools for developers & people working in IT." />
|
|
||||||
|
|
||||||
<link rel="author" href="humans.txt" />
|
|
||||||
<link rel="canonical" href="https://enclosed.cc/" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
|
|
||||||
<script src="/src/client.tsx" type="module"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
2381
packages/app/package-lock.json
generated
@@ -1,54 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@it-tools/app",
|
|
||||||
"type": "module",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"packageManager": "pnpm@9.11.0",
|
|
||||||
"description": "Collection of handy online tools for developers, with great UX.",
|
|
||||||
"author": "Corentin Thomasset <corentinth@proton.me> (https://corentin.tech)",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/CorentinTh/it-tools"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vite",
|
|
||||||
"build": "vite build",
|
|
||||||
"serve": "vite preview",
|
|
||||||
"lint": "eslint .",
|
|
||||||
"lint:fix": "eslint --fix .",
|
|
||||||
"typecheck": "tsc --noEmit",
|
|
||||||
"test": "pnpm run test:unit",
|
|
||||||
"test:unit": "vitest run",
|
|
||||||
"test:unit:watch": "vitest watch",
|
|
||||||
"create:tool": "HYGEN_TMPLS=templates hygen tools new"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@corentinth/chisels": "^1.1.0",
|
|
||||||
"@kobalte/core": "^0.13.6",
|
|
||||||
"@solid-primitives/i18n": "^2.1.1",
|
|
||||||
"@solid-primitives/storage": "^4.2.1",
|
|
||||||
"@solidjs/router": "^0.14.7",
|
|
||||||
"@unocss/reset": "^0.62.4",
|
|
||||||
"class-variance-authority": "^0.7.0",
|
|
||||||
"clsx": "^2.1.1",
|
|
||||||
"cmdk-solid": "^1.1.0",
|
|
||||||
"lodash-es": "^4.17.21",
|
|
||||||
"solid-js": "^1.9.1",
|
|
||||||
"solid-sonner": "^0.2.8",
|
|
||||||
"tailwind-merge": "^2.5.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@antfu/eslint-config": "^3.7.3",
|
|
||||||
"@iconify-json/tabler": "^1.2.3",
|
|
||||||
"@types/lodash-es": "^4.17.12",
|
|
||||||
"@vitest/coverage-v8": "2.1.2",
|
|
||||||
"eslint": "^9.11.1",
|
|
||||||
"hygen": "^6.2.11",
|
|
||||||
"typescript": "^5.6.2",
|
|
||||||
"unocss": "^0.62.4",
|
|
||||||
"unocss-preset-animations": "^1.1.0",
|
|
||||||
"vite": "^5.4.8",
|
|
||||||
"vite-plugin-solid": "^2.10.2",
|
|
||||||
"vitest": "^2.1.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
:root {
|
|
||||||
--background: 0 0% 100%;
|
|
||||||
--foreground: 0 0% 3.9%;
|
|
||||||
|
|
||||||
--card: 0 0% 100%;
|
|
||||||
--card-foreground: 0 0% 3.9%;
|
|
||||||
|
|
||||||
--popover: 0 0% 100%;
|
|
||||||
--popover-foreground: 0 0% 3.9%;
|
|
||||||
|
|
||||||
--primary: 0 0% 9%;
|
|
||||||
--primary-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--secondary: 0 0% 96.1%;
|
|
||||||
--secondary-foreground: 0 0% 9%;
|
|
||||||
|
|
||||||
--muted: 0 0% 96.1%;
|
|
||||||
--muted-foreground: 0 0% 45.1%;
|
|
||||||
|
|
||||||
--accent: 0 0% 96.1%;
|
|
||||||
--accent-foreground: 0 0% 9%;
|
|
||||||
|
|
||||||
--destructive: 0 84.2% 60.2%;
|
|
||||||
--destructive-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--warning: 31 98% 50%;
|
|
||||||
--warning-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--border: 0 0% 89.8%;
|
|
||||||
--input: 0 0% 89.8%;
|
|
||||||
--ring: 0 0% 3.9%;
|
|
||||||
|
|
||||||
--radius: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-kb-theme="dark"] {
|
|
||||||
--background: 0 0% 9%;
|
|
||||||
--foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--card: 0 0% 7%;
|
|
||||||
--card-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--popover: 0 0% 3.9%;
|
|
||||||
--popover-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--primary: 83 79% 55%;
|
|
||||||
--primary-foreground: 0 0% 9%;
|
|
||||||
|
|
||||||
--secondary: 0 0% 14.9%;
|
|
||||||
--secondary-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--muted: 0 0% 14.9%;
|
|
||||||
--muted-foreground: 0 0% 63.9%;
|
|
||||||
|
|
||||||
--accent: 0 0% 14.9%;
|
|
||||||
--accent-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--destructive: 0 62.8% 30.6%;
|
|
||||||
--destructive-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--warning: 31 98% 50%;
|
|
||||||
--warning-foreground: 0 0% 98%;
|
|
||||||
|
|
||||||
--border: 0 0% 14.9%;
|
|
||||||
--input: 0 0% 14.9%;
|
|
||||||
--ring: 0 0% 83.1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
* {
|
|
||||||
@apply border-border;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
@apply bg-background text-foreground;
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
import type { LocaleKey } from './modules/i18n/i18n.types';
|
|
||||||
import { A, Navigate, type RouteDefinition, useParams } from '@solidjs/router';
|
|
||||||
import { localeKeys } from './modules/i18n/i18n.constants';
|
|
||||||
import { useI18n } from './modules/i18n/i18n.provider';
|
|
||||||
import { HomePage } from './modules/pages/home.page';
|
|
||||||
import { ToolPage } from './modules/tools/pages/tool.page';
|
|
||||||
import { toolSlugs } from './modules/tools/tools.registry';
|
|
||||||
import { Button } from './modules/ui/components/button';
|
|
||||||
import { AppLayout } from './modules/ui/layouts/app.layout';
|
|
||||||
|
|
||||||
export const routes: RouteDefinition[] = [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
component: () => {
|
|
||||||
const { getLocale } = useI18n();
|
|
||||||
|
|
||||||
return <Navigate href={`/${getLocale()}`} />;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
component: AppLayout,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/:localeKey',
|
|
||||||
matchFilters: {
|
|
||||||
localeKey: localeKeys,
|
|
||||||
},
|
|
||||||
component: (props) => {
|
|
||||||
const params = useParams();
|
|
||||||
const { setLocale } = useI18n();
|
|
||||||
|
|
||||||
setLocale(params.localeKey as LocaleKey);
|
|
||||||
|
|
||||||
return props.children;
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
component: HomePage,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/:toolSlug',
|
|
||||||
matchFilters: {
|
|
||||||
toolSlug: toolSlugs,
|
|
||||||
},
|
|
||||||
component: ToolPage,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '*404',
|
|
||||||
component: () => (
|
|
||||||
<div class="flex flex-col items-center justify-center mt-6">
|
|
||||||
<div class="text-3xl font-light text-muted-foreground">404</div>
|
|
||||||
<h1 class="font-semibold text-lg my-2">Page Not Found</h1>
|
|
||||||
<p class="text-muted-foreground">The page you are looking for does not exist.</p>
|
|
||||||
<p class="text-muted-foreground">Please check the URL and try again.</p>
|
|
||||||
<Button as={A} href="/" class="mt-4" variant="secondary">
|
|
||||||
<div class="i-tabler-arrow-left mr-2"></div>
|
|
||||||
Go back home
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
];
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/* @refresh reload */
|
|
||||||
|
|
||||||
import { ColorModeProvider, ColorModeScript, createLocalStorageManager } from '@kobalte/core/color-mode';
|
|
||||||
import { Router } from '@solidjs/router';
|
|
||||||
import { render, Suspense } from 'solid-js/web';
|
|
||||||
import { routes } from './client-routes';
|
|
||||||
import { CommandPaletteProvider } from './modules/command-palette/command-palette.provider';
|
|
||||||
import { RootI18nProvider } from './modules/i18n/i18n.provider';
|
|
||||||
import { Toaster } from './modules/ui/components/sonner';
|
|
||||||
import '@unocss/reset/tailwind.css';
|
|
||||||
import 'virtual:uno.css';
|
|
||||||
import './app.css';
|
|
||||||
|
|
||||||
render(
|
|
||||||
() => {
|
|
||||||
const initialColorMode = 'system';
|
|
||||||
const colorModeStorageKey = 'it_tools_color_mode';
|
|
||||||
const localStorageManager = createLocalStorageManager(colorModeStorageKey);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Router
|
|
||||||
children={routes}
|
|
||||||
root={props => (
|
|
||||||
<Suspense>
|
|
||||||
<RootI18nProvider>
|
|
||||||
<ColorModeScript storageType={localStorageManager.type} storageKey={colorModeStorageKey} initialColorMode={initialColorMode} />
|
|
||||||
<ColorModeProvider
|
|
||||||
initialColorMode={initialColorMode}
|
|
||||||
storageManager={localStorageManager}
|
|
||||||
>
|
|
||||||
<CommandPaletteProvider>
|
|
||||||
<Toaster />
|
|
||||||
<div class="min-h-screen font-sans text-sm font-400">{props.children}</div>
|
|
||||||
</CommandPaletteProvider>
|
|
||||||
</ColorModeProvider>
|
|
||||||
</RootI18nProvider>
|
|
||||||
</Suspense>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
document.getElementById('root')!,
|
|
||||||
);
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
{
|
|
||||||
"app": {
|
|
||||||
"title": "IT-Tools",
|
|
||||||
"description": "The open-source collection of handy online tools to help developers in their daily life."
|
|
||||||
},
|
|
||||||
"navbar": {
|
|
||||||
"theme": {
|
|
||||||
"theme": "Theme",
|
|
||||||
"light-mode": "Light mode",
|
|
||||||
"dark-mode": "Dark mode",
|
|
||||||
"system-mode": "System"
|
|
||||||
},
|
|
||||||
"language": "Language",
|
|
||||||
"contribute-to-i18n": "Contribute to i18n",
|
|
||||||
"github": "GitHub",
|
|
||||||
"support": "Support IT-Tools",
|
|
||||||
"report-bug": "Report a bug"
|
|
||||||
},
|
|
||||||
"footer": {
|
|
||||||
"resources": {
|
|
||||||
"title": "Resources",
|
|
||||||
"all-tools": "All the tools",
|
|
||||||
"github": "GitHub repository",
|
|
||||||
"support": "Support IT-Tools",
|
|
||||||
"license": "License"
|
|
||||||
},
|
|
||||||
"support": {
|
|
||||||
"title": "Support",
|
|
||||||
"report-bug": "Report a bug",
|
|
||||||
"request-feature": "Request a feature",
|
|
||||||
"contribute": "Contribute to the project",
|
|
||||||
"contact": "Contact me"
|
|
||||||
},
|
|
||||||
"friends": {
|
|
||||||
"title": "Friends"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"commandPalette": {
|
|
||||||
"input-placeholder": "Type to search for a tool or a command...",
|
|
||||||
"go-home": "Go to home",
|
|
||||||
"sections": {
|
|
||||||
"tools": "Tools",
|
|
||||||
"navigation": "Navigation",
|
|
||||||
"language": "Language",
|
|
||||||
"theme": "Theme"
|
|
||||||
},
|
|
||||||
"theme": {
|
|
||||||
"switch-to-light": "Switch to light theme",
|
|
||||||
"switch-to-dark": "Switch to dark theme",
|
|
||||||
"switch-to-system": "Use to system theme"
|
|
||||||
},
|
|
||||||
"trigger": {
|
|
||||||
"search": "Search for a tool"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"all-tools": "All the tools",
|
|
||||||
"search-tools": "Search for a tool",
|
|
||||||
"open-source": "Open Source",
|
|
||||||
"free": "Free",
|
|
||||||
"self-hostable": "Self-hostable"
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"token-generator": {
|
|
||||||
"name": "Token Generator",
|
|
||||||
"description": "Generate random string with the characters you want, uppercase, lowercase letters, numbers and/or symbols."
|
|
||||||
},
|
|
||||||
"random-port-generator": {
|
|
||||||
"name": "Random Port Generator",
|
|
||||||
"description": "Generate a random port number outside of the reserved ports range (0-1023)."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"app": {
|
|
||||||
"title": "IT-Tools",
|
|
||||||
"description": "La collection open-source d'outils en ligne pour aider les devs dans leur vie quotidienne."
|
|
||||||
},
|
|
||||||
"navbar": {
|
|
||||||
"theme": {
|
|
||||||
"theme": "Thème",
|
|
||||||
"light-mode": "Mode clair",
|
|
||||||
"dark-mode": "Mode sombre",
|
|
||||||
"system-mode": "Système"
|
|
||||||
},
|
|
||||||
"language": "Langue",
|
|
||||||
"contribute-to-i18n": "Contribuer à l'i18n",
|
|
||||||
"github": "GitHub",
|
|
||||||
"support": "Soutenir IT-Tools",
|
|
||||||
"report-bug": "Signaler un bug"
|
|
||||||
},
|
|
||||||
"footer": {
|
|
||||||
"resources": {
|
|
||||||
"title": "Ressources",
|
|
||||||
"all-tools": "Tous les outils",
|
|
||||||
"github": "Dépôt GitHub",
|
|
||||||
"support": "Soutenir IT-Tools",
|
|
||||||
"license": "Licence"
|
|
||||||
},
|
|
||||||
"support": {
|
|
||||||
"title": "Support",
|
|
||||||
"report-bug": "Signaler un bug",
|
|
||||||
"request-feature": "Demander une fonctionnalité",
|
|
||||||
"contribute": "Contribuer au projet",
|
|
||||||
"contact": "Me contacter"
|
|
||||||
},
|
|
||||||
"friends": {
|
|
||||||
"title": "Ami·e·s"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"commandPalette": {
|
|
||||||
"input-placeholder": "Tapez pour rechercher un outil...",
|
|
||||||
"go-home": "Aller à l'accueil",
|
|
||||||
"sections": {
|
|
||||||
"tools": "Outils",
|
|
||||||
"navigation": "Navigation",
|
|
||||||
"theme": "Thème"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"all-tools": "Tous les outils",
|
|
||||||
"open-source": "Open Source",
|
|
||||||
"free": "Gratuit",
|
|
||||||
"self-hostable": "Self-hostable"
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"token-generator": {
|
|
||||||
"name": "Générateur de token",
|
|
||||||
"description": "Générer des string aléatoires, contrôlez les caractères que vous voulez, lettres majuscules, minuscules, chiffres et/ou symboles."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
import type { Accessor, ParentComponent } from 'solid-js';
|
|
||||||
import { useNavigate } from '@solidjs/router';
|
|
||||||
import { createContext, createMemo, createSignal, For, onCleanup, onMount, useContext } from 'solid-js';
|
|
||||||
import { locales } from '../i18n/i18n.constants';
|
|
||||||
import { useI18n } from '../i18n/i18n.provider';
|
|
||||||
import { useToolsStore } from '../tools/tools.store';
|
|
||||||
import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '../ui/components/command';
|
|
||||||
import { useThemeStore } from '../ui/themes/theme.store';
|
|
||||||
import { cn } from '../ui/utils/cn';
|
|
||||||
|
|
||||||
const CommandPaletteContext = createContext<{
|
|
||||||
getIsCommandPaletteOpen: Accessor<boolean>;
|
|
||||||
openCommandPalette: () => void;
|
|
||||||
closeCommandPalette: () => void;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
export function useCommandPalette() {
|
|
||||||
const context = useContext(CommandPaletteContext);
|
|
||||||
|
|
||||||
if (!context) {
|
|
||||||
throw new Error('CommandPalette context not found');
|
|
||||||
}
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const CommandPaletteProvider: ParentComponent = (props) => {
|
|
||||||
const [getIsCommandPaletteOpen, setIsCommandPaletteOpen] = createSignal(false);
|
|
||||||
|
|
||||||
const handleKeyDown = (e: KeyboardEvent) => {
|
|
||||||
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
|
|
||||||
e.preventDefault();
|
|
||||||
setIsCommandPaletteOpen(true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
document.addEventListener('keydown', handleKeyDown);
|
|
||||||
});
|
|
||||||
|
|
||||||
onCleanup(() => {
|
|
||||||
document.removeEventListener('keydown', handleKeyDown);
|
|
||||||
});
|
|
||||||
|
|
||||||
const { getTools } = useToolsStore();
|
|
||||||
const navigate = useNavigate();
|
|
||||||
const { t, createLocalizedUrl, changeLocale } = useI18n();
|
|
||||||
const { setColorMode } = useThemeStore();
|
|
||||||
|
|
||||||
const getCommandData = createMemo(() => [
|
|
||||||
{
|
|
||||||
label: t('commandPalette.sections.tools'),
|
|
||||||
options: [
|
|
||||||
...getTools().map(tool => ({
|
|
||||||
label: tool.name,
|
|
||||||
icon: tool.icon,
|
|
||||||
action: () => navigate(createLocalizedUrl({ path: tool.slug })),
|
|
||||||
})),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('commandPalette.sections.navigation'),
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: t('commandPalette.go-home'),
|
|
||||||
icon: 'i-tabler-home',
|
|
||||||
action: () => navigate(createLocalizedUrl({ path: '' })),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('commandPalette.sections.language'),
|
|
||||||
options: [
|
|
||||||
...locales.map(locale => ({
|
|
||||||
label: locale.switchToLabel,
|
|
||||||
icon: 'i-custom-language',
|
|
||||||
action: () => changeLocale(locale.key),
|
|
||||||
keywords: [locale.name, locale.key],
|
|
||||||
})),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('commandPalette.sections.theme'),
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: t('commandPalette.theme.switch-to-light'),
|
|
||||||
icon: 'i-tabler-sun',
|
|
||||||
action: () => setColorMode({ mode: 'light' }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('commandPalette.theme.switch-to-dark'),
|
|
||||||
icon: 'i-tabler-moon',
|
|
||||||
action: () => setColorMode({ mode: 'dark' }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('commandPalette.theme.switch-to-system'),
|
|
||||||
icon: 'i-tabler-device-laptop',
|
|
||||||
action: () => setColorMode({ mode: 'system' }),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const onCommandSelect = ({ action }: { action: () => void }) => {
|
|
||||||
action();
|
|
||||||
setIsCommandPaletteOpen(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPaletteContext.Provider value={{
|
|
||||||
getIsCommandPaletteOpen,
|
|
||||||
openCommandPalette: () => setIsCommandPaletteOpen(true),
|
|
||||||
closeCommandPalette: () => setIsCommandPaletteOpen(false),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CommandDialog
|
|
||||||
class="rounded-lg border shadow-md"
|
|
||||||
open={getIsCommandPaletteOpen()}
|
|
||||||
onOpenChange={setIsCommandPaletteOpen}
|
|
||||||
>
|
|
||||||
<CommandInput placeholder={t('commandPalette.input-placeholder')} />
|
|
||||||
<CommandList>
|
|
||||||
<CommandEmpty>No results found.</CommandEmpty>
|
|
||||||
<For each={getCommandData()}>
|
|
||||||
{section => (
|
|
||||||
<CommandGroup heading={section.label}>
|
|
||||||
<For each={section.options}>
|
|
||||||
{item => (
|
|
||||||
<CommandItem onSelect={() => onCommandSelect(item)}>
|
|
||||||
<span class={cn('mr-2 ml-1 size-4 text-muted-foreground', item.icon)} />
|
|
||||||
<span>{item.label}</span>
|
|
||||||
</CommandItem>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</CommandGroup>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</CommandList>
|
|
||||||
</CommandDialog>
|
|
||||||
|
|
||||||
{props.children}
|
|
||||||
</CommandPaletteContext.Provider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import { map } from 'lodash-es';
|
|
||||||
|
|
||||||
export const locales = [
|
|
||||||
{
|
|
||||||
key: 'en',
|
|
||||||
file: 'en',
|
|
||||||
name: 'English',
|
|
||||||
switchToLabel: 'Change language to English',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'fr',
|
|
||||||
file: 'fr',
|
|
||||||
name: 'Français',
|
|
||||||
switchToLabel: 'Changer la langue en Français',
|
|
||||||
},
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export const localeKeys = map(locales, 'key');
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
import type { ParentComponent } from 'solid-js';
|
|
||||||
import type { LocaleKey } from './i18n.types';
|
|
||||||
import { joinUrlPaths } from '@corentinth/chisels';
|
|
||||||
import * as i18n from '@solid-primitives/i18n';
|
|
||||||
import { makePersisted } from '@solid-primitives/storage';
|
|
||||||
import { useNavigate } from '@solidjs/router';
|
|
||||||
import { merge } from 'lodash-es';
|
|
||||||
import { createContext, createResource, createSignal, Show, useContext } from 'solid-js';
|
|
||||||
import defaultDict from '../../locales/en.json';
|
|
||||||
import { locales } from './i18n.constants';
|
|
||||||
|
|
||||||
export {
|
|
||||||
useI18n,
|
|
||||||
};
|
|
||||||
|
|
||||||
type RawDictionary = typeof defaultDict;
|
|
||||||
type Dictionary = i18n.Flatten<RawDictionary>;
|
|
||||||
|
|
||||||
const RootI18nContext = createContext<{
|
|
||||||
t: i18n.Translator<Dictionary>;
|
|
||||||
getLocale: () => LocaleKey;
|
|
||||||
setLocale: (locale: LocaleKey) => void;
|
|
||||||
locales: typeof locales;
|
|
||||||
} | undefined>(undefined);
|
|
||||||
|
|
||||||
function useI18n() {
|
|
||||||
const context = useContext(RootI18nContext);
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
if (!context) {
|
|
||||||
throw new Error('I18n context not found');
|
|
||||||
}
|
|
||||||
|
|
||||||
const { t, getLocale, setLocale, locales } = context;
|
|
||||||
|
|
||||||
return {
|
|
||||||
t,
|
|
||||||
getLocale,
|
|
||||||
setLocale,
|
|
||||||
locales,
|
|
||||||
createLocalizedUrl: ({ path }: { path: string }) => {
|
|
||||||
const newPath = joinUrlPaths(getLocale(), path);
|
|
||||||
|
|
||||||
return `/${newPath}`;
|
|
||||||
},
|
|
||||||
changeLocale: (locale: LocaleKey) => {
|
|
||||||
setLocale(locale);
|
|
||||||
|
|
||||||
const pathWithoutLocale = location.pathname.split('/').slice(2).join('/');
|
|
||||||
const newPath = joinUrlPaths(locale, pathWithoutLocale);
|
|
||||||
navigate(`/${newPath}`);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function fetchDictionary(locale: LocaleKey): Promise<Dictionary> {
|
|
||||||
const dict: RawDictionary = (await import(`../../locales/${locale}.json`));
|
|
||||||
const mergedDict = merge({}, defaultDict, dict);
|
|
||||||
const flattened = i18n.flatten(mergedDict);
|
|
||||||
|
|
||||||
return flattened;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getBrowserLocale(): LocaleKey {
|
|
||||||
const browserLocale = navigator.language?.split('-')[0];
|
|
||||||
|
|
||||||
if (!browserLocale) {
|
|
||||||
return 'en';
|
|
||||||
}
|
|
||||||
|
|
||||||
return locales.find(locale => locale.key === browserLocale)?.key ?? 'en';
|
|
||||||
}
|
|
||||||
|
|
||||||
export const RootI18nProvider: ParentComponent = (props) => {
|
|
||||||
const browserLocale = getBrowserLocale();
|
|
||||||
const [getLocale, setLocale] = makePersisted(createSignal<LocaleKey>(browserLocale), { name: 'it_tools_locale', storage: localStorage });
|
|
||||||
|
|
||||||
const [dict] = createResource(getLocale, fetchDictionary);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Show when={dict()}>
|
|
||||||
{dict => (
|
|
||||||
<RootI18nContext.Provider
|
|
||||||
value={{
|
|
||||||
t: i18n.translator(dict),
|
|
||||||
getLocale,
|
|
||||||
setLocale,
|
|
||||||
locales,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{props.children}
|
|
||||||
</RootI18nContext.Provider>
|
|
||||||
)}
|
|
||||||
</Show>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import type { locales } from './i18n.constants';
|
|
||||||
|
|
||||||
export type LocaleKey = typeof locales[number]['key'];
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
import type { Component } from 'solid-js';
|
|
||||||
import { A } from '@solidjs/router';
|
|
||||||
import { useCommandPalette } from '../command-palette/command-palette.provider';
|
|
||||||
import { useI18n } from '../i18n/i18n.provider';
|
|
||||||
import { useToolsStore } from '../tools/tools.store';
|
|
||||||
import { Badge } from '../ui/components/badge';
|
|
||||||
import { Button } from '../ui/components/button';
|
|
||||||
import { Card, CardDescription, CardHeader, CardTitle } from '../ui/components/card';
|
|
||||||
import { cn } from '../ui/utils/cn';
|
|
||||||
|
|
||||||
export const HomePage: Component = () => {
|
|
||||||
const { t } = useI18n();
|
|
||||||
const { getTools } = useToolsStore();
|
|
||||||
const { openCommandPalette } = useCommandPalette();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div class="w-full bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] pt-20">
|
|
||||||
|
|
||||||
<div class="flex justify-center gap-24 items-center p-6">
|
|
||||||
<div class="max-w-xl flex flex-col gap-6 ">
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<Badge class="text-primary bg-primary/10 hover:bg-primary/10">
|
|
||||||
{t('home.open-source')}
|
|
||||||
</Badge>
|
|
||||||
|
|
||||||
<Badge class="text-primary bg-primary/10 hover:bg-primary/10">
|
|
||||||
{t('home.free')}
|
|
||||||
</Badge>
|
|
||||||
|
|
||||||
<Badge class="text-primary bg-primary/10 hover:bg-primary/10">
|
|
||||||
{t('home.self-hostable')}
|
|
||||||
</Badge>
|
|
||||||
</div>
|
|
||||||
<h1 class="text-5xl font-semibold border-b border-transparent hover:no-underline h-auto py-0 px-1 ml--1 rounded-none !transition-border-color-250">
|
|
||||||
<span class="font-bold ">IT</span>
|
|
||||||
<span class="text-90% text-primary font-extrabold border border-5px leading-none border-current rounded-xl px-2 py-0.5 ml-3">TOOLS</span>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p class="text-xl text-muted-foreground">
|
|
||||||
{t('app.description')}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="flex items-center gap-4">
|
|
||||||
<Button variant="default" as={A} href="tools">
|
|
||||||
{t('home.all-tools')}
|
|
||||||
<div class="i-tabler-arrow-right ml-2 text-base"></div>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button variant="outline" onClick={openCommandPalette}>
|
|
||||||
<div class="i-tabler-search mr-2 text-base" />
|
|
||||||
{t('home.search-tools')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="relative hidden md:block">
|
|
||||||
<div class="absolute top-4 left-0 w-full h-full flex items-center justify-center blur-2xl rounded-full opacity-20 bg-gradient-to-br from-primary to-transparent" />
|
|
||||||
<div class="i-tabler-terminal text-9xl text-primary m-8" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-gradient-to-t dark:from-background to-transparent h-24 mt-24"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 max-w-1200px mx-auto p-6">
|
|
||||||
{getTools().map(tool => (
|
|
||||||
<A href={tool.slug} class="h-full">
|
|
||||||
<Card class="hover:(shadow-md transform scale-101) transition-transform h-full">
|
|
||||||
<CardHeader>
|
|
||||||
<div class={cn(tool.icon, 'size-12 text-muted-foreground/60')} />
|
|
||||||
|
|
||||||
<CardTitle class="text-base font-semibold">
|
|
||||||
{tool.name}
|
|
||||||
</CardTitle>
|
|
||||||
|
|
||||||
<CardDescription>
|
|
||||||
{tool.description}
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
</Card>
|
|
||||||
</A>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import type { Accessor, Component, ComponentProps } from 'solid-js';
|
|
||||||
import { Button } from '@/modules/ui/components/button';
|
|
||||||
import { omit } from 'lodash-es';
|
|
||||||
import { Show, splitProps } from 'solid-js';
|
|
||||||
import { useCopy } from './copy';
|
|
||||||
|
|
||||||
export const CopyButton: Component<{ textToCopy: Accessor<string | number>; toastMessage?: string } & ComponentProps<typeof Button>> = (props) => {
|
|
||||||
const [localProps, buttonProps] = splitProps(props, ['textToCopy', 'toastMessage']);
|
|
||||||
const { copy, getIsJustCopied } = useCopy(localProps.textToCopy, { toastMessage: localProps.toastMessage });
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Button onClick={copy} {...omit(buttonProps, ['textToCopy', 'toastMessage'])}>
|
|
||||||
<Show
|
|
||||||
when={buttonProps.children}
|
|
||||||
fallback={(
|
|
||||||
|
|
||||||
getIsJustCopied()
|
|
||||||
? (
|
|
||||||
<>
|
|
||||||
<div class="i-tabler-check mr-2 text-base" />
|
|
||||||
Copied!
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
: (
|
|
||||||
<>
|
|
||||||
<div class="i-tabler-copy mr-2 text-base" />
|
|
||||||
Copy to clipboard
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{buttonProps.children}
|
|
||||||
</Show>
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import type { Accessor } from 'solid-js';
|
|
||||||
import { createSignal } from 'solid-js';
|
|
||||||
import { toast } from '../../ui/components/sonner';
|
|
||||||
|
|
||||||
export { useCopy, writeTextToClipboard };
|
|
||||||
|
|
||||||
function writeTextToClipboard({ text }: { text: string }) {
|
|
||||||
return navigator.clipboard.writeText(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
function useCopy(getText: Accessor<string | number>, { toastMessage = 'Copied to clipboard' }: { toastMessage?: string } = {}) {
|
|
||||||
const [getIsJustCopied, setIsJustCopied] = createSignal(false);
|
|
||||||
|
|
||||||
return {
|
|
||||||
getIsJustCopied,
|
|
||||||
copy: () => {
|
|
||||||
writeTextToClipboard({ text: String(getText()) });
|
|
||||||
setIsJustCopied(true);
|
|
||||||
setTimeout(() => setIsJustCopied(false), 2000);
|
|
||||||
toast(toastMessage);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import { describe, expect, test } from 'vitest';
|
|
||||||
import { createRefreshableSignal } from './signals';
|
|
||||||
|
|
||||||
describe('signals', () => {
|
|
||||||
describe('createRefreshableSignal', () => {
|
|
||||||
test('the state initially has the value returned by the getter', () => {
|
|
||||||
const [getState] = createRefreshableSignal(() => 42);
|
|
||||||
expect(getState()).to.eql(42);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('calling the refresh function updates the state', () => {
|
|
||||||
let value = 0;
|
|
||||||
const [getState, refresh] = createRefreshableSignal(() => value++);
|
|
||||||
|
|
||||||
expect(getState()).to.eql(0);
|
|
||||||
|
|
||||||
refresh();
|
|
||||||
|
|
||||||
expect(getState()).to.eql(1);
|
|
||||||
expect(getState()).to.eql(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('the state can be muted using the setState function', () => {
|
|
||||||
const [getState, , { setState }] = createRefreshableSignal(() => 0);
|
|
||||||
|
|
||||||
expect(getState()).to.eql(0);
|
|
||||||
|
|
||||||
setState(42);
|
|
||||||
|
|
||||||
expect(getState()).to.eql(42);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { createSignal } from 'solid-js';
|
|
||||||
|
|
||||||
export { createRefreshableSignal };
|
|
||||||
|
|
||||||
function createRefreshableSignal<T>(getValue: () => T) {
|
|
||||||
const [getState, setState] = createSignal<T>(getValue());
|
|
||||||
|
|
||||||
return [
|
|
||||||
getState,
|
|
||||||
() => setState(() => getValue()),
|
|
||||||
{ setState },
|
|
||||||
] as const;
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import type { Component, ParentComponent } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
|
|
||||||
export const ToolHeader: ParentComponent<{ name: string; description: string; icon: string }> = (props) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div class="w-full bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] pt-12">
|
|
||||||
|
|
||||||
<div class="flex gap-4 mb-8 max-w-1200px mx-auto px-6 items-start flex-col md:flex-row md:items-center">
|
|
||||||
<div class="bg-card p-4 rounded-lg">
|
|
||||||
<div class={cn(props.icon, 'size-8 md:size-12 text-muted-foreground')} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h1 class="text-xl font-semibold">
|
|
||||||
{props.name}
|
|
||||||
</h1>
|
|
||||||
<div class="text-muted-foreground text-base">
|
|
||||||
{props.description}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-gradient-to-t dark:from-background to-transparent h-24 mt-12 mb--24"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Random Port Generator",
|
|
||||||
"description": "Generate a random port number outside of the reserved ports range (0-1023).",
|
|
||||||
"refresh": "Refresh port",
|
|
||||||
"copy-toast": "Port copied to clipboard"
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
import type { Component } from 'solid-js';
|
|
||||||
import { CopyButton } from '@/modules/shared/copy/copy-button';
|
|
||||||
import { createRefreshableSignal } from '@/modules/shared/signals';
|
|
||||||
import { Button } from '@/modules/ui/components/button';
|
|
||||||
import { Card, CardContent, CardHeader } from '@/modules/ui/components/card';
|
|
||||||
import { ToolHeader } from '../../components/tool-header';
|
|
||||||
import { useCurrentTool } from '../../tools.provider';
|
|
||||||
import defaultDictionary from './locales/en.json';
|
|
||||||
import { generateRandomPort } from './random-port-generator.services';
|
|
||||||
|
|
||||||
const RandomPortGenerator: Component = () => {
|
|
||||||
const [getPort, refreshPort] = createRefreshableSignal(generateRandomPort);
|
|
||||||
const { t, getTool } = useCurrentTool({ defaultDictionary });
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<ToolHeader {...getTool()} />
|
|
||||||
|
|
||||||
<div class="max-w-600px mx-auto px-6">
|
|
||||||
<Card>
|
|
||||||
<CardHeader class="flex justify-between items-center">
|
|
||||||
<div class="my-6 text-center">
|
|
||||||
|
|
||||||
<div class="text-base text-muted-foreground mb-2">
|
|
||||||
Random port:
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-4xl font-mono">
|
|
||||||
|
|
||||||
{getPort()}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex gap-2 md:gap-4 mt-4 flex-col md:flex-row w-full justify-center">
|
|
||||||
<Button onClick={refreshPort} variant="outline">
|
|
||||||
<div class="i-tabler-refresh mr-2 text-base text-muted-foreground" />
|
|
||||||
{t('refresh')}
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<CopyButton textToCopy={getPort} toastMessage={t('copy-toast')} />
|
|
||||||
</div>
|
|
||||||
</CardHeader>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default RandomPortGenerator;
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import { random } from 'lodash-es';
|
|
||||||
|
|
||||||
export function generateRandomPort() {
|
|
||||||
return random(1024, 65535);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { defineTool } from '../../tools.models';
|
|
||||||
|
|
||||||
export const randomPortGeneratorTool = defineTool({
|
|
||||||
slug: 'random-port-generator',
|
|
||||||
entryFile: () => import('./random-port-generator.page'),
|
|
||||||
icon: 'i-tabler-server',
|
|
||||||
createdAt: new Date('2024-10-03'),
|
|
||||||
dirName: 'random-port-generator',
|
|
||||||
});
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Token Generator",
|
|
||||||
"description": "Generate random string with the characters you want, uppercase, lowercase letters, numbers and/or symbols.",
|
|
||||||
"uppercase": "Uppercase letters (A-Z)",
|
|
||||||
"lowercase": "Lowercase letters (a-z)",
|
|
||||||
"numbers": "Numbers (0-9)",
|
|
||||||
"symbols": "Special characters (!@#...)",
|
|
||||||
"length": "Length",
|
|
||||||
"result-placeholder": "Your token will appear here"
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Générateur de token",
|
|
||||||
"description": "Génère une chaîne de caractères aléatoire, contrôlez les caractères que vous voulez, lettres majuscules, minuscules, chiffres et/ou symboles.",
|
|
||||||
"uppercase": "Lettres majuscules (A-Z)",
|
|
||||||
"lowercase": "Lettres minuscules (a-z)",
|
|
||||||
"numbers": "Chiffres (0-9)",
|
|
||||||
"symbols": "Caractères spéciaux (!@#...)",
|
|
||||||
"length": "Longueur",
|
|
||||||
"result-placeholder": "Le token apparaîtra ici"
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import { sample as sampleImpl, times } from 'lodash-es';
|
|
||||||
|
|
||||||
export function createToken({
|
|
||||||
withUppercase = true,
|
|
||||||
withLowercase = true,
|
|
||||||
withNumbers = true,
|
|
||||||
withSymbols = false,
|
|
||||||
length = 64,
|
|
||||||
alphabet,
|
|
||||||
sample = sampleImpl,
|
|
||||||
}: {
|
|
||||||
withUppercase?: boolean;
|
|
||||||
withLowercase?: boolean;
|
|
||||||
withNumbers?: boolean;
|
|
||||||
withSymbols?: boolean;
|
|
||||||
length?: number;
|
|
||||||
alphabet?: string;
|
|
||||||
sample?: (str: string) => string;
|
|
||||||
}) {
|
|
||||||
const allAlphabet = alphabet ?? [
|
|
||||||
withUppercase ? 'ABCDEFGHIJKLMOPQRSTUVWXYZ' : '',
|
|
||||||
withLowercase ? 'abcdefghijklmopqrstuvwxyz' : '',
|
|
||||||
withNumbers ? '0123456789' : '',
|
|
||||||
withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : '',
|
|
||||||
].join('');
|
|
||||||
|
|
||||||
return times(length, () => sample(allAlphabet)).join('');
|
|
||||||
}
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
import { CopyButton } from '@/modules/shared/copy/copy-button';
|
|
||||||
import { createRefreshableSignal } from '@/modules/shared/signals';
|
|
||||||
import { Button } from '@/modules/ui/components/button';
|
|
||||||
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/modules/ui/components/card';
|
|
||||||
import { Switch, SwitchControl, SwitchLabel, SwitchThumb } from '@/modules/ui/components/switch';
|
|
||||||
import { TextArea } from '@/modules/ui/components/textarea';
|
|
||||||
import { TextFieldRoot } from '@/modules/ui/components/textfield';
|
|
||||||
import { type Component, createSignal } from 'solid-js';
|
|
||||||
import { ToolHeader } from '../../components/tool-header';
|
|
||||||
import { useCurrentTool } from '../../tools.provider';
|
|
||||||
import defaultDictionary from './locales/en.json';
|
|
||||||
import { createToken } from './token-generator.models';
|
|
||||||
|
|
||||||
const TokenGeneratorTool: Component = () => {
|
|
||||||
const [getUseUpperCase, setUseUpperCase] = createSignal(true);
|
|
||||||
const [getUseLowerCase, setUseLowerCase] = createSignal(true);
|
|
||||||
const [getUseNumbers, setUseNumbers] = createSignal(true);
|
|
||||||
const [getUseSpecialCharacters, setUseSpecialCharacters] = createSignal(false);
|
|
||||||
const [getLength] = createSignal(64);
|
|
||||||
|
|
||||||
const { t, getTool } = useCurrentTool({ defaultDictionary });
|
|
||||||
|
|
||||||
const [getToken, refreshToken] = createRefreshableSignal(() => createToken({
|
|
||||||
withUppercase: getUseUpperCase(),
|
|
||||||
withLowercase: getUseLowerCase(),
|
|
||||||
withNumbers: getUseNumbers(),
|
|
||||||
withSymbols: getUseSpecialCharacters(),
|
|
||||||
length: getLength(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<ToolHeader {...getTool()} />
|
|
||||||
|
|
||||||
<div class="mx-auto max-w-1200px p-6 flex flex-col gap-4 md:flex-row items-start">
|
|
||||||
<Card>
|
|
||||||
<CardHeader class="border-b border-border">
|
|
||||||
<CardTitle class="text-muted-foreground">
|
|
||||||
Configuration
|
|
||||||
</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent class="pt-6 flex flex-col gap-2">
|
|
||||||
<Switch class="flex items-center gap-2" checked={getUseUpperCase()} onChange={setUseUpperCase}>
|
|
||||||
<SwitchControl>
|
|
||||||
<SwitchThumb />
|
|
||||||
</SwitchControl>
|
|
||||||
<SwitchLabel class="text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70">
|
|
||||||
{t('uppercase')}
|
|
||||||
</SwitchLabel>
|
|
||||||
</Switch>
|
|
||||||
|
|
||||||
<Switch class="flex items-center gap-2" checked={getUseLowerCase()} onChange={setUseLowerCase}>
|
|
||||||
<SwitchControl>
|
|
||||||
<SwitchThumb />
|
|
||||||
</SwitchControl>
|
|
||||||
<SwitchLabel class="text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70">
|
|
||||||
{t('lowercase')}
|
|
||||||
</SwitchLabel>
|
|
||||||
</Switch>
|
|
||||||
|
|
||||||
<Switch class="flex items-center gap-2" checked={getUseNumbers()} onChange={setUseNumbers}>
|
|
||||||
<SwitchControl>
|
|
||||||
<SwitchThumb />
|
|
||||||
</SwitchControl>
|
|
||||||
<SwitchLabel class="text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70">
|
|
||||||
{t('numbers')}
|
|
||||||
</SwitchLabel>
|
|
||||||
</Switch>
|
|
||||||
|
|
||||||
<Switch class="flex items-center gap-2" checked={getUseSpecialCharacters()} onChange={setUseSpecialCharacters}>
|
|
||||||
<SwitchControl>
|
|
||||||
<SwitchThumb />
|
|
||||||
</SwitchControl>
|
|
||||||
<SwitchLabel class="text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70">
|
|
||||||
{t('symbols')}
|
|
||||||
</SwitchLabel>
|
|
||||||
</Switch>
|
|
||||||
</CardContent>
|
|
||||||
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card class="flex-1">
|
|
||||||
<CardHeader class="border-b border-border flex justify-between flex-row py-3 items-center">
|
|
||||||
<CardTitle class="text-muted-foreground">
|
|
||||||
Your token
|
|
||||||
</CardTitle>
|
|
||||||
|
|
||||||
<div class="flex justify-center items-center gap-2">
|
|
||||||
<Button onClick={refreshToken} variant="outline">
|
|
||||||
<div class="i-tabler-refresh mr-2 text-base text-muted-foreground" />
|
|
||||||
Refresh token
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<CopyButton textToCopy={getToken} toastMessage={t('copy-toast')} />
|
|
||||||
</div>
|
|
||||||
</CardHeader>
|
|
||||||
|
|
||||||
<CardContent class="pt-6 text-center">
|
|
||||||
{getToken()}
|
|
||||||
</CardContent>
|
|
||||||
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default TokenGeneratorTool;
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { defineTool } from '../../tools.models';
|
|
||||||
|
|
||||||
export const tokenGeneratorTool = defineTool({
|
|
||||||
slug: 'token-generator',
|
|
||||||
entryFile: () => import('./token-generator.page'),
|
|
||||||
icon: 'i-tabler-key',
|
|
||||||
createdAt: new Date('2024-02-13'),
|
|
||||||
dirName: 'token-generator',
|
|
||||||
});
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
import { useI18n } from '@/modules/i18n/i18n.provider';
|
|
||||||
import { safely } from '@corentinth/chisels';
|
|
||||||
import { useParams } from '@solidjs/router';
|
|
||||||
import { type Component, createResource, lazy, Show } from 'solid-js';
|
|
||||||
import { CurrentToolProvider } from '../tools.provider';
|
|
||||||
import { getToolDefinitionBySlug } from '../tools.registry';
|
|
||||||
|
|
||||||
export const ToolPage: Component = () => {
|
|
||||||
const params = useParams();
|
|
||||||
const { getLocale, t } = useI18n();
|
|
||||||
|
|
||||||
const toolDefinition = getToolDefinitionBySlug({ slug: params.toolSlug });
|
|
||||||
const ToolComponent = lazy(toolDefinition.entryFile);
|
|
||||||
|
|
||||||
const [toolDict] = createResource(getLocale, async (locale) => {
|
|
||||||
const [dict, error] = await safely(import(`../definitions/${toolDefinition.dirName}/locales/${locale}.json`));
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dict ?? { default: {} };
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Show when={toolDict()}>
|
|
||||||
{toolLocaleDict => (
|
|
||||||
<CurrentToolProvider
|
|
||||||
toolLocaleDict={toolLocaleDict}
|
|
||||||
tool={() => ({
|
|
||||||
icon: toolDefinition.icon,
|
|
||||||
dirName: toolDefinition.dirName,
|
|
||||||
createdAt: toolDefinition.createdAt,
|
|
||||||
name: t(`tools.${toolDefinition.slug}.name` as any),
|
|
||||||
description: t(`tools.${toolDefinition.slug}.description` as any),
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<ToolComponent />
|
|
||||||
</CurrentToolProvider>
|
|
||||||
)}
|
|
||||||
</Show>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import type { Component } from 'solid-js';
|
|
||||||
|
|
||||||
export { defineTool };
|
|
||||||
|
|
||||||
function defineTool(toolDefinition: {
|
|
||||||
slug: string;
|
|
||||||
entryFile: () => Promise<{ default: Component }>;
|
|
||||||
dirName: string;
|
|
||||||
icon: string;
|
|
||||||
createdAt: Date;
|
|
||||||
}) {
|
|
||||||
return {
|
|
||||||
...toolDefinition,
|
|
||||||
key: toolDefinition.slug,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import type { Accessor, ParentComponent } from 'solid-js';
|
|
||||||
import type { ToolDefinition } from './tools.types';
|
|
||||||
import { flatten, translator } from '@solid-primitives/i18n';
|
|
||||||
import { merge } from 'lodash-es';
|
|
||||||
import { createContext, useContext } from 'solid-js';
|
|
||||||
|
|
||||||
type ToolProviderContext = {
|
|
||||||
toolLocaleDict: Accessor<Record<string, string>>;
|
|
||||||
tool: Accessor<Pick<ToolDefinition, 'icon' | 'dirName' | 'createdAt'> & { name: string; description: string }>;
|
|
||||||
};
|
|
||||||
|
|
||||||
const CurrentToolContext = createContext<ToolProviderContext>();
|
|
||||||
|
|
||||||
export function useCurrentTool<T>({ defaultDictionary }: { defaultDictionary: T }) {
|
|
||||||
const context = useContext(CurrentToolContext);
|
|
||||||
|
|
||||||
if (!context) {
|
|
||||||
throw new Error('useCurrentTool must be used within a CurrentToolProvider');
|
|
||||||
}
|
|
||||||
|
|
||||||
const { toolLocaleDict, tool } = context;
|
|
||||||
|
|
||||||
return {
|
|
||||||
t: translator(() => flatten(merge({}, defaultDictionary, toolLocaleDict()))),
|
|
||||||
getTool: tool,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export const CurrentToolProvider: ParentComponent<ToolProviderContext> = (props) => {
|
|
||||||
return (
|
|
||||||
<CurrentToolContext.Provider value={props}>
|
|
||||||
{props.children}
|
|
||||||
</CurrentToolContext.Provider>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { keyBy, map } from 'lodash-es';
|
|
||||||
import { randomPortGeneratorTool } from './definitions/random-port-generator/random-port-generator.tool';
|
|
||||||
import { tokenGeneratorTool } from './definitions/token-generator/token-generator.tool';
|
|
||||||
|
|
||||||
export const toolDefinitions = [
|
|
||||||
tokenGeneratorTool,
|
|
||||||
randomPortGeneratorTool,
|
|
||||||
];
|
|
||||||
|
|
||||||
export const toolSlugs = map(toolDefinitions, 'slug');
|
|
||||||
export const toolDefinitionBySlug = keyBy(toolDefinitions, 'slug');
|
|
||||||
|
|
||||||
export { getToolDefinitionBySlug };
|
|
||||||
|
|
||||||
function getToolDefinitionBySlug({ slug }: { slug: string }) {
|
|
||||||
return toolDefinitionBySlug[slug];
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { createMemo } from 'solid-js';
|
|
||||||
import { useI18n } from '../i18n/i18n.provider';
|
|
||||||
import { toolDefinitions } from './tools.registry';
|
|
||||||
|
|
||||||
export { useToolsStore };
|
|
||||||
|
|
||||||
function useToolsStore() {
|
|
||||||
const { t } = useI18n();
|
|
||||||
|
|
||||||
const getTools = createMemo(() => toolDefinitions.map((tool) => {
|
|
||||||
return {
|
|
||||||
...tool,
|
|
||||||
name: t(`tools.${tool.slug}.name` as any) ?? tool.slug,
|
|
||||||
description: t(`tools.${tool.slug}.description` as any) ?? tool.slug,
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
|
|
||||||
return { getTools };
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import type { Flatten, Translator } from '@solid-primitives/i18n';
|
|
||||||
import type { defineTool } from './tools.models';
|
|
||||||
|
|
||||||
export type ToolI18nFactory = <T extends Record<string, string>>(args: { defaultDictionary: T }) => { t: Translator<Flatten<T>> };
|
|
||||||
|
|
||||||
export type ToolDefinition = ReturnType<typeof defineTool>;
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import type { VariantProps } from 'class-variance-authority';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { cva } from 'class-variance-authority';
|
|
||||||
import { type ComponentProps, splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
export const badgeVariants = cva(
|
|
||||||
'inline-flex items-center rounded-md px-2.5 py-0.5 text-xs font-semibold transition-shadow focus-visible:(outline-none ring-1.5 ring-ring)',
|
|
||||||
{
|
|
||||||
variants: {
|
|
||||||
variant: {
|
|
||||||
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
|
||||||
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
||||||
destructive: 'bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
|
||||||
outline: 'border text-foreground',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaultVariants: {
|
|
||||||
variant: 'default',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
export function Badge(props: ComponentProps<'div'> & VariantProps<typeof badgeVariants>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class', 'variant']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={cn(
|
|
||||||
badgeVariants({
|
|
||||||
variant: local.variant,
|
|
||||||
}),
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import type { ButtonRootProps } from '@kobalte/core/button';
|
|
||||||
import type { PolymorphicProps } from '@kobalte/core/polymorphic';
|
|
||||||
import type { VariantProps } from 'class-variance-authority';
|
|
||||||
import type { ValidComponent } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { Button as ButtonPrimitive } from '@kobalte/core/button';
|
|
||||||
import { cva } from 'class-variance-authority';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
export const buttonVariants = cva(
|
|
||||||
'inline-flex items-center justify-center rounded-md text-sm font-medium transition-shadow focus-visible:(outline-none ring-1.5 ring-ring) disabled:(pointer-events-none opacity-50) bg-inherit',
|
|
||||||
{
|
|
||||||
variants: {
|
|
||||||
variant: {
|
|
||||||
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
|
|
||||||
destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
|
|
||||||
outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
|
|
||||||
secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
|
|
||||||
ghost: 'hover:(bg-accent text-accent-foreground)',
|
|
||||||
link: 'text-primary underline-offset-4 hover:underline',
|
|
||||||
},
|
|
||||||
size: {
|
|
||||||
default: 'h-9 px-4 py-2',
|
|
||||||
sm: 'h-8 px-3 text-xs',
|
|
||||||
lg: 'h-10 px-8',
|
|
||||||
icon: 'h-9 w-9',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaultVariants: {
|
|
||||||
variant: 'default',
|
|
||||||
size: 'default',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
type buttonProps<T extends ValidComponent = 'button'> = ButtonRootProps<T> &
|
|
||||||
VariantProps<typeof buttonVariants> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function Button<T extends ValidComponent = 'button'>(props: PolymorphicProps<T, buttonProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as buttonProps, [
|
|
||||||
'class',
|
|
||||||
'variant',
|
|
||||||
'size',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ButtonPrimitive
|
|
||||||
class={cn(
|
|
||||||
buttonVariants({
|
|
||||||
size: local.size,
|
|
||||||
variant: local.variant,
|
|
||||||
}),
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import type { ComponentProps, ParentComponent } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
export function Card(props: ComponentProps<'div'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={cn(
|
|
||||||
'rounded-xl border bg-card text-card-foreground shadow',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CardHeader(props: ComponentProps<'div'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div class={cn('flex flex-col space-y-1.5 p-6', local.class)} {...rest} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const CardTitle: ParentComponent<ComponentProps<'h1'>> = (props) => {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<h1
|
|
||||||
class={cn('font-semibold leading-none tracking-tight', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const CardDescription: ParentComponent<ComponentProps<'h3'>> = (
|
|
||||||
props,
|
|
||||||
) => {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<h3 class={cn('text-sm text-muted-foreground', local.class)} {...rest} />
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export function CardContent(props: ComponentProps<'div'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return <div class={cn('p-6 pt-0', local.class)} {...rest} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CardFooter(props: ComponentProps<'div'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div class={cn('flex items-center p-6 pt-0', local.class)} {...rest} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
import type {
|
|
||||||
CommandDialogProps,
|
|
||||||
CommandEmptyProps,
|
|
||||||
CommandGroupProps,
|
|
||||||
CommandInputProps,
|
|
||||||
CommandItemProps,
|
|
||||||
CommandListProps,
|
|
||||||
CommandRootProps,
|
|
||||||
} from 'cmdk-solid';
|
|
||||||
import type { ComponentProps, VoidProps } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { Command as CommandPrimitive } from 'cmdk-solid';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
import { Dialog, DialogContent } from './dialog';
|
|
||||||
|
|
||||||
export function Command(props: CommandRootProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPrimitive
|
|
||||||
class={cn(
|
|
||||||
'flex size-full flex-col overflow-hidden bg-popover text-popover-foreground',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandList(props: CommandListProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPrimitive.List
|
|
||||||
class={cn(
|
|
||||||
'max-h-[300px] overflow-y-auto overflow-x-hidden p-1',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandInput(props: VoidProps<CommandInputProps>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div class="flex items-center border-b px-3" cmdk-input-wrapper="">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
class="mr-2 h-4 w-4 shrink-0 opacity-50"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"
|
|
||||||
/>
|
|
||||||
<title>Search</title>
|
|
||||||
</svg>
|
|
||||||
<CommandPrimitive.Input
|
|
||||||
class={cn(
|
|
||||||
'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:(cursor-not-allowed opacity-50)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandItem(props: CommandItemProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPrimitive.Item
|
|
||||||
class={cn(
|
|
||||||
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5! text-sm outline-none aria-selected:(bg-accent text-accent-foreground) aria-disabled:(pointer-events-none opacity-50)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandShortcut(props: ComponentProps<'span'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span
|
|
||||||
class={cn(
|
|
||||||
'ml-auto text-xs tracking-widest text-muted-foreground',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandDialog(props: CommandDialogProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['children']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Dialog {...rest}>
|
|
||||||
<DialogContent class="overflow-hidden p-0">
|
|
||||||
<Command class="[&_[cmdk-group-heading]]:(px-2 font-medium text-muted-foreground) [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:(px-2 py-3) [&_[cmdk-item]_svg]:size-5">
|
|
||||||
{local.children}
|
|
||||||
</Command>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandEmpty(props: CommandEmptyProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPrimitive.Empty
|
|
||||||
class={cn('py-6 text-center text-sm', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandGroup(props: CommandGroupProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPrimitive.Group
|
|
||||||
class={cn(
|
|
||||||
'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:(px-2 py-1.5 text-xs font-medium text-muted-foreground)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CommandSeparator(props: CommandEmptyProps) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CommandPrimitive.Separator
|
|
||||||
class={cn('-mx-1 h-px bg-border', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
import type {
|
|
||||||
DialogContentProps,
|
|
||||||
DialogDescriptionProps,
|
|
||||||
DialogTitleProps,
|
|
||||||
} from '@kobalte/core/dialog';
|
|
||||||
import type { PolymorphicProps } from '@kobalte/core/polymorphic';
|
|
||||||
import type { ComponentProps, ParentProps, ValidComponent } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { Dialog as DialogPrimitive } from '@kobalte/core/dialog';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
export const Dialog = DialogPrimitive;
|
|
||||||
export const DialogTrigger = DialogPrimitive.Trigger;
|
|
||||||
|
|
||||||
type dialogContentProps<T extends ValidComponent = 'div'> = ParentProps<
|
|
||||||
DialogContentProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
|
|
||||||
export function DialogContent<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dialogContentProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dialogContentProps, [
|
|
||||||
'class',
|
|
||||||
'children',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DialogPrimitive.Portal>
|
|
||||||
<DialogPrimitive.Overlay
|
|
||||||
class={cn(
|
|
||||||
'fixed inset-0 z-50 bg-background/80 data-[expanded]:(animate-in fade-in-0) data-[closed]:(animate-out fade-out-0)',
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
<DialogPrimitive.Content
|
|
||||||
class={cn(
|
|
||||||
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[expanded]:(animate-in fade-in-0 zoom-in-95 slide-in-from-left-1/2 slide-in-from-top-48% duration-200) data-[closed]:(animate-out fade-out-0 zoom-out-95 slide-out-to-left-1/2 slide-out-to-top-48% duration-200) md:w-full sm:rounded-lg',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{local.children}
|
|
||||||
<DialogPrimitive.CloseButton class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:(outline-none ring-1.5 ring-ring ring-offset-2) disabled:pointer-events-none bg-inherit transition-property-[opacity,box-shadow]">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
class="h-4 w-4"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
d="M18 6L6 18M6 6l12 12"
|
|
||||||
/>
|
|
||||||
<title>Close</title>
|
|
||||||
</svg>
|
|
||||||
</DialogPrimitive.CloseButton>
|
|
||||||
</DialogPrimitive.Content>
|
|
||||||
</DialogPrimitive.Portal>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dialogTitleProps<T extends ValidComponent = 'h2'> = DialogTitleProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DialogTitle<T extends ValidComponent = 'h2'>(props: PolymorphicProps<T, dialogTitleProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dialogTitleProps, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DialogPrimitive.Title
|
|
||||||
class={cn('text-lg font-semibold text-foreground', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dialogDescriptionProps<T extends ValidComponent = 'p'> =
|
|
||||||
DialogDescriptionProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DialogDescription<T extends ValidComponent = 'p'>(props: PolymorphicProps<T, dialogDescriptionProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dialogDescriptionProps, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DialogPrimitive.Description
|
|
||||||
class={cn('text-sm text-muted-foreground', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DialogHeader(props: ComponentProps<'div'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={cn(
|
|
||||||
'flex flex-col space-y-2 text-center sm:text-left',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DialogFooter(props: ComponentProps<'div'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={cn(
|
|
||||||
'flex flex-col-reverse sm:(flex-row justify-end space-x-2)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,286 +0,0 @@
|
|||||||
import type {
|
|
||||||
DropdownMenuCheckboxItemProps,
|
|
||||||
DropdownMenuContentProps,
|
|
||||||
DropdownMenuGroupLabelProps,
|
|
||||||
DropdownMenuItemLabelProps,
|
|
||||||
DropdownMenuItemProps,
|
|
||||||
DropdownMenuRadioItemProps,
|
|
||||||
DropdownMenuRootProps,
|
|
||||||
DropdownMenuSeparatorProps,
|
|
||||||
DropdownMenuSubTriggerProps,
|
|
||||||
} from '@kobalte/core/dropdown-menu';
|
|
||||||
import type { PolymorphicProps } from '@kobalte/core/polymorphic';
|
|
||||||
import type { ComponentProps, ParentProps, ValidComponent } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { DropdownMenu as DropdownMenuPrimitive } from '@kobalte/core/dropdown-menu';
|
|
||||||
import { mergeProps, splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
||||||
export const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
||||||
export const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
||||||
export const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
||||||
|
|
||||||
export function DropdownMenu(props: DropdownMenuRootProps) {
|
|
||||||
const merge = mergeProps<DropdownMenuRootProps[]>({ gutter: 4 }, props);
|
|
||||||
|
|
||||||
return <DropdownMenuPrimitive {...merge} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuContentProps<T extends ValidComponent = 'div'> =
|
|
||||||
DropdownMenuContentProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DropdownMenuContent<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuContentProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuContentProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.Portal>
|
|
||||||
<DropdownMenuPrimitive.Content
|
|
||||||
class={cn(
|
|
||||||
'min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[expanded]:(animate-in fade-in-0 zoom-in-95) data-[closed]:(animate-out fade-out-0 zoom-out-95) focus-visible:(outline-none ring-1.5 ring-ring) transition-shadow',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
</DropdownMenuPrimitive.Portal>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuItemProps<T extends ValidComponent = 'div'> =
|
|
||||||
DropdownMenuItemProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
inset?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DropdownMenuItem<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuItemProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuItemProps, [
|
|
||||||
'class',
|
|
||||||
'inset',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.Item
|
|
||||||
class={cn(
|
|
||||||
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:(bg-accent text-accent-foreground) data-[disabled]:(pointer-events-none opacity-50)',
|
|
||||||
local.inset && 'pl-8',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuGroupLabelProps<T extends ValidComponent = 'span'> =
|
|
||||||
DropdownMenuGroupLabelProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DropdownMenuGroupLabel<T extends ValidComponent = 'span'>(props: PolymorphicProps<T, dropdownMenuGroupLabelProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuGroupLabelProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.GroupLabel
|
|
||||||
as="div"
|
|
||||||
class={cn('px-2 py-1.5 text-sm font-semibold', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuItemLabelProps<T extends ValidComponent = 'div'> =
|
|
||||||
DropdownMenuItemLabelProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DropdownMenuItemLabel<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuItemLabelProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuItemLabelProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.ItemLabel
|
|
||||||
as="div"
|
|
||||||
class={cn('px-2 py-1.5 text-sm font-semibold', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuSeparatorProps<T extends ValidComponent = 'hr'> =
|
|
||||||
DropdownMenuSeparatorProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DropdownMenuSeparator<T extends ValidComponent = 'hr'>(props: PolymorphicProps<T, dropdownMenuSeparatorProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuSeparatorProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.Separator
|
|
||||||
class={cn('-mx-1 my-1 h-px bg-muted', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DropdownMenuShortcut(props: ComponentProps<'span'>) {
|
|
||||||
const [local, rest] = splitProps(props, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span
|
|
||||||
class={cn('ml-auto text-xs tracking-widest opacity-60', local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuSubTriggerProps<T extends ValidComponent = 'div'> = ParentProps<DropdownMenuSubTriggerProps<T> & { class?: string }>;
|
|
||||||
|
|
||||||
export function DropdownMenuSubTrigger<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuSubTriggerProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuSubTriggerProps, [
|
|
||||||
'class',
|
|
||||||
'children',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.SubTrigger
|
|
||||||
class={cn(
|
|
||||||
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[expanded]:bg-accent',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{local.children}
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="1em"
|
|
||||||
height="1em"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
class="ml-auto h-4 w-4"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
d="m9 6l6 6l-6 6"
|
|
||||||
/>
|
|
||||||
<title>Arrow</title>
|
|
||||||
</svg>
|
|
||||||
</DropdownMenuPrimitive.SubTrigger>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuSubContentProps<T extends ValidComponent = 'div'> =
|
|
||||||
DropdownMenuSubTriggerProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DropdownMenuSubContent<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuSubContentProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuSubContentProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.Portal>
|
|
||||||
<DropdownMenuPrimitive.SubContent
|
|
||||||
class={cn(
|
|
||||||
'min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[expanded]:(animate-in fade-in-0 zoom-in-95) data-[closed]:(animate-out fade-out-0 zoom-out-95)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
</DropdownMenuPrimitive.Portal>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuCheckboxItemProps<T extends ValidComponent = 'div'> = ParentProps<DropdownMenuCheckboxItemProps<T> & { class?: string }>;
|
|
||||||
|
|
||||||
export function DropdownMenuCheckboxItem<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuCheckboxItemProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuCheckboxItemProps, [
|
|
||||||
'class',
|
|
||||||
'children',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.CheckboxItem
|
|
||||||
class={cn(
|
|
||||||
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:(bg-accent text-accent-foreground) data-[disabled]:(pointer-events-none opacity-50)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
<DropdownMenuPrimitive.ItemIndicator class="absolute left-2 inline-flex h-4 w-4 items-center justify-center">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
class="h-4 w-4"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
d="m5 12l5 5L20 7"
|
|
||||||
/>
|
|
||||||
<title>Checkbox</title>
|
|
||||||
</svg>
|
|
||||||
</DropdownMenuPrimitive.ItemIndicator>
|
|
||||||
{props.children}
|
|
||||||
</DropdownMenuPrimitive.CheckboxItem>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type dropdownMenuRadioItemProps<T extends ValidComponent = 'div'> = ParentProps<
|
|
||||||
DropdownMenuRadioItemProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
|
|
||||||
export function DropdownMenuRadioItem<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, dropdownMenuRadioItemProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as dropdownMenuRadioItemProps, [
|
|
||||||
'class',
|
|
||||||
'children',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DropdownMenuPrimitive.RadioItem
|
|
||||||
class={cn(
|
|
||||||
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:(bg-accent text-accent-foreground) data-[disabled]:(pointer-events-none opacity-50)',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
<DropdownMenuPrimitive.ItemIndicator class="absolute left-2 inline-flex h-4 w-4 items-center justify-center">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
class="h-2 w-2"
|
|
||||||
>
|
|
||||||
<g
|
|
||||||
fill="none"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
>
|
|
||||||
<path d="M0 0h24v24H0z" />
|
|
||||||
<path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M7 3.34a10 10 0 1 1-4.995 8.984L2 12l.005-.324A10 10 0 0 1 7 3.34"
|
|
||||||
/>
|
|
||||||
</g>
|
|
||||||
<title>Radio</title>
|
|
||||||
</svg>
|
|
||||||
</DropdownMenuPrimitive.ItemIndicator>
|
|
||||||
{props.children}
|
|
||||||
</DropdownMenuPrimitive.RadioItem>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
import { Toaster as Sonner, toast } from 'solid-sonner';
|
|
||||||
|
|
||||||
export { toast };
|
|
||||||
|
|
||||||
export function Toaster(props: Parameters<typeof Sonner>[0]) {
|
|
||||||
return (
|
|
||||||
<Sonner
|
|
||||||
class="toaster group"
|
|
||||||
toastOptions={{
|
|
||||||
classes: {
|
|
||||||
toast: 'group toast group-[.toaster]:(bg-background text-foreground border-border shadow-lg)',
|
|
||||||
description: 'group-[.toast]:text-muted-foreground',
|
|
||||||
actionButton: 'group-[.toast]:(bg-primary text-primary-foreground)',
|
|
||||||
cancelButton: 'group-[.toast]:(bg-muted text-muted-foreground)',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
import type { PolymorphicProps } from '@kobalte/core/polymorphic';
|
|
||||||
import type {
|
|
||||||
SwitchControlProps,
|
|
||||||
SwitchThumbProps,
|
|
||||||
} from '@kobalte/core/switch';
|
|
||||||
import type { ParentProps, ValidComponent, VoidProps } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { Switch as SwitchPrimitive } from '@kobalte/core/switch';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
export const SwitchLabel = SwitchPrimitive.Label;
|
|
||||||
export const Switch = SwitchPrimitive;
|
|
||||||
export const SwitchErrorMessage = SwitchPrimitive.ErrorMessage;
|
|
||||||
export const SwitchDescription = SwitchPrimitive.Description;
|
|
||||||
|
|
||||||
type switchControlProps<T extends ValidComponent = 'input'> = ParentProps<SwitchControlProps<T> & { class?: string }>;
|
|
||||||
|
|
||||||
export function SwitchControl<T extends ValidComponent = 'input'>(props: PolymorphicProps<T, switchControlProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as switchControlProps, [
|
|
||||||
'class',
|
|
||||||
'children',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<SwitchPrimitive.Input class="[&:focus-visible+div]:(outline-none ring-1.5 ring-ring ring-offset-2 ring-offset-background)" />
|
|
||||||
<SwitchPrimitive.Control
|
|
||||||
class={cn(
|
|
||||||
'inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent bg-input shadow-sm transition-shadow data-[disabled]:(cursor-not-allowed opacity-50) data-[checked]:bg-primary transition-property-[box-shadow,color,background-color]',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{local.children}
|
|
||||||
</SwitchPrimitive.Control>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type switchThumbProps<T extends ValidComponent = 'div'> = VoidProps<SwitchThumbProps<T> & { class?: string }>;
|
|
||||||
|
|
||||||
export function SwitchThumb<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, switchThumbProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as switchThumbProps, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<SwitchPrimitive.Thumb
|
|
||||||
class={cn(
|
|
||||||
'pointer-events-none block h-4 w-4 translate-x-0 rounded-full bg-background shadow-lg transition-transform data-[checked]:translate-x-4',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import type { PolymorphicProps } from '@kobalte/core/polymorphic';
|
|
||||||
import type { TextFieldTextAreaProps } from '@kobalte/core/text-field';
|
|
||||||
import type { ValidComponent, VoidProps } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { TextArea as TextFieldPrimitive } from '@kobalte/core/text-field';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
type textAreaProps<T extends ValidComponent = 'textarea'> = VoidProps<
|
|
||||||
TextFieldTextAreaProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
|
|
||||||
export function TextArea<T extends ValidComponent = 'textarea'>(props: PolymorphicProps<T, textAreaProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as textAreaProps, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TextFieldPrimitive
|
|
||||||
class={cn(
|
|
||||||
'flex min-h-[60px] w-full rounded-md border border-input bg-inherit px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:(outline-none ring-1.5 ring-ring) disabled:(cursor-not-allowed opacity-50) transition-shadow',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
import type { PolymorphicProps } from '@kobalte/core/polymorphic';
|
|
||||||
import type {
|
|
||||||
TextFieldDescriptionProps,
|
|
||||||
TextFieldErrorMessageProps,
|
|
||||||
TextFieldInputProps,
|
|
||||||
TextFieldLabelProps,
|
|
||||||
TextFieldRootProps,
|
|
||||||
} from '@kobalte/core/text-field';
|
|
||||||
import type { ValidComponent, VoidProps } from 'solid-js';
|
|
||||||
import { cn } from '@/modules/ui/utils/cn';
|
|
||||||
import { TextField as TextFieldPrimitive } from '@kobalte/core/text-field';
|
|
||||||
import { cva } from 'class-variance-authority';
|
|
||||||
import { splitProps } from 'solid-js';
|
|
||||||
|
|
||||||
type textFieldProps<T extends ValidComponent = 'div'> =
|
|
||||||
TextFieldRootProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function TextFieldRoot<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, textFieldProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as textFieldProps, ['class']);
|
|
||||||
|
|
||||||
return <TextFieldPrimitive class={cn('space-y-1', local.class)} {...rest} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const textfieldLabel = cva(
|
|
||||||
'text-sm data-[disabled]:(cursor-not-allowed opacity-70) font-medium',
|
|
||||||
{
|
|
||||||
variants: {
|
|
||||||
label: {
|
|
||||||
true: 'data-[invalid]:text-destructive',
|
|
||||||
},
|
|
||||||
error: {
|
|
||||||
true: 'text-destructive text-xs',
|
|
||||||
},
|
|
||||||
description: {
|
|
||||||
true: 'font-normal text-muted-foreground',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaultVariants: {
|
|
||||||
label: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
type textFieldLabelProps<T extends ValidComponent = 'label'> =
|
|
||||||
TextFieldLabelProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function TextFieldLabel<T extends ValidComponent = 'label'>(props: PolymorphicProps<T, textFieldLabelProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as textFieldLabelProps, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TextFieldPrimitive.Label
|
|
||||||
class={cn(textfieldLabel(), local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type textFieldErrorMessageProps<T extends ValidComponent = 'div'> =
|
|
||||||
TextFieldErrorMessageProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function TextFieldErrorMessage<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, textFieldErrorMessageProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as textFieldErrorMessageProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TextFieldPrimitive.ErrorMessage
|
|
||||||
class={cn(textfieldLabel({ error: true }), local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type textFieldDescriptionProps<T extends ValidComponent = 'div'> =
|
|
||||||
TextFieldDescriptionProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function TextFieldDescription<T extends ValidComponent = 'div'>(props: PolymorphicProps<T, textFieldDescriptionProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as textFieldDescriptionProps, [
|
|
||||||
'class',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TextFieldPrimitive.Description
|
|
||||||
class={cn(textfieldLabel({ description: true }), local.class)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
type textFieldInputProps<T extends ValidComponent = 'input'> = VoidProps<
|
|
||||||
TextFieldInputProps<T> & {
|
|
||||||
class?: string;
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
|
|
||||||
export function TextField<T extends ValidComponent = 'input'>(props: PolymorphicProps<T, textFieldInputProps<T>>) {
|
|
||||||
const [local, rest] = splitProps(props as textFieldInputProps, ['class']);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TextFieldPrimitive.Input
|
|
||||||
class={cn(
|
|
||||||
'flex h-9 w-full rounded-md border border-input bg-inherit px-3 py-1 text-sm shadow-sm file:(border-0 bg-transparent text-sm font-medium) placeholder:text-muted-foreground focus-visible:(outline-none ring-1.5 ring-ring) disabled:(cursor-not-allowed opacity-50) transition-shadow',
|
|
||||||
local.class,
|
|
||||||
)}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
import type { Component, ParentComponent } from 'solid-js';
|
|
||||||
import { useCommandPalette } from '@/modules/command-palette/command-palette.provider';
|
|
||||||
import { useI18n } from '@/modules/i18n/i18n.provider';
|
|
||||||
import { Button } from '@/modules/ui/components/button';
|
|
||||||
import { A } from '@solidjs/router';
|
|
||||||
import { Badge } from '../components/badge';
|
|
||||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '../components/dropdown-menu';
|
|
||||||
import { useThemeStore } from '../themes/theme.store';
|
|
||||||
import { cn } from '../utils/cn';
|
|
||||||
import { socialLinks } from './app.layouts.constants';
|
|
||||||
|
|
||||||
const ThemeSwitcher: Component = () => {
|
|
||||||
const themeStore = useThemeStore();
|
|
||||||
const { t } = useI18n();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<DropdownMenuItem onClick={() => themeStore.setColorMode({ mode: 'light' })} class="flex items-center gap-2 cursor-pointer">
|
|
||||||
<div class="i-tabler-sun text-lg"></div>
|
|
||||||
{t('navbar.theme.light-mode')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
<DropdownMenuItem onClick={() => themeStore.setColorMode({ mode: 'dark' })} class="flex items-center gap-2 cursor-pointer">
|
|
||||||
<div class="i-tabler-moon text-lg"></div>
|
|
||||||
{t('navbar.theme.dark-mode')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
<DropdownMenuItem onClick={() => themeStore.setColorMode({ mode: 'system' })} class="flex items-center gap-2 cursor-pointer">
|
|
||||||
<div class="i-tabler-device-laptop text-lg"></div>
|
|
||||||
{t('navbar.theme.system-mode')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const LanguageSwitcher: Component = () => {
|
|
||||||
const { t, getLocale, changeLocale, locales } = useI18n();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{locales.map(locale => (
|
|
||||||
<DropdownMenuItem onClick={() => changeLocale(locale.key)} class={cn('flex items-center gap-2 cursor-pointer', { 'font-semibold': getLocale() === locale.key })}>
|
|
||||||
{locale.name}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
))}
|
|
||||||
|
|
||||||
<DropdownMenuSeparator />
|
|
||||||
|
|
||||||
<DropdownMenuItem as="a" class="flex items-center gap-2 cursor-pointer" target="_blank" rel="noopener noreferrer" href="https://github.com/CorentinTh/it-tools">
|
|
||||||
{t('navbar.contribute-to-i18n')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const Navbar: Component = () => {
|
|
||||||
const themeStore = useThemeStore();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const { openCommandPalette } = useCommandPalette();
|
|
||||||
const getIsMacOs = () => navigator?.userAgent?.match(/Macintosh;/);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div class="border-b border-border bg-surface">
|
|
||||||
<div class="flex items-center justify-between px-6 py-3 mx-auto max-w-1200px">
|
|
||||||
<div class="flex items-center gap-4">
|
|
||||||
<Button variant="link" class="text-xl font-semibold border-b border-transparent hover:no-underline h-auto py-0 px-1 ml--1 rounded-none !transition-border-color-250" as={A} href="/" aria-label="Home">
|
|
||||||
<span class="font-bold text-foreground">IT</span>
|
|
||||||
<span class="text-80% font-extrabold border border-2px leading-none border-current rounded-md px-1 py-0.5 ml-1 text-primary">TOOLS</span>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button size="sm" variant="outline" class="bg-card transition flex items-center gap-2 text-muted-foreground" onClick={openCommandPalette}>
|
|
||||||
<div class="i-tabler-search text-base"></div>
|
|
||||||
{t('commandPalette.trigger.search')}
|
|
||||||
<Badge variant="secondary" class="text-muted-foreground text-10px!">
|
|
||||||
{getIsMacOs() ? '⌘ + K' : 'Ctrl + K'}
|
|
||||||
</Badge>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<Button variant="ghost" class="text-lg px-0 size-9 hidden md:inline-flex" as={A} href="https://github.com/CorentinTh/enclosed" target="_blank" rel="noopener noreferrer" aria-label="GitHub repository">
|
|
||||||
<div class="i-tabler-brand-github"></div>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<DropdownMenu>
|
|
||||||
<DropdownMenuTrigger as={Button} class="text-lg px-0 size-9 hidden md:inline-flex" variant="ghost" aria-label="Change theme">
|
|
||||||
<div classList={{ 'i-tabler-moon': themeStore.getColorMode() === 'dark', 'i-tabler-sun': themeStore.getColorMode() === 'light' }}></div>
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
<DropdownMenuContent class="w-42">
|
|
||||||
<ThemeSwitcher />
|
|
||||||
</DropdownMenuContent>
|
|
||||||
</DropdownMenu>
|
|
||||||
|
|
||||||
<DropdownMenu>
|
|
||||||
<DropdownMenuTrigger as={Button} class="text-lg px-0 size-9 hidden md:inline-flex" variant="ghost" aria-label="Language">
|
|
||||||
<div class="i-custom-language size-4"></div>
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
<DropdownMenuContent>
|
|
||||||
<LanguageSwitcher />
|
|
||||||
</DropdownMenuContent>
|
|
||||||
</DropdownMenu>
|
|
||||||
|
|
||||||
<DropdownMenu>
|
|
||||||
|
|
||||||
<DropdownMenuTrigger as={Button} class="text-lg px-0 size-9" variant="ghost" aria-label="Menu icon">
|
|
||||||
<div class="i-tabler-dots-vertical hidden md:block"></div>
|
|
||||||
<div class="i-tabler-menu-2 block md:hidden"></div>
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
|
|
||||||
<DropdownMenuContent class="w-46">
|
|
||||||
|
|
||||||
{/* Mobile only items */}
|
|
||||||
<DropdownMenuItem as="a" class="flex items-center gap-2 cursor-pointer md:hidden" target="_blank" href="https://github.com/CorentinTh/enclosed" rel="noopener noreferrer">
|
|
||||||
<div class="i-tabler-brand-github text-lg"></div>
|
|
||||||
{t('navbar.github')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
|
|
||||||
<DropdownMenuSub>
|
|
||||||
<DropdownMenuSubTrigger as="a" class="flex items-center gap-2 md:hidden" aria-label="Change theme">
|
|
||||||
<div class="text-lg" classList={{ 'i-tabler-moon': themeStore.getColorMode() === 'dark', 'i-tabler-sun': themeStore.getColorMode() === 'light' }}></div>
|
|
||||||
{t('navbar.theme.theme')}
|
|
||||||
</DropdownMenuSubTrigger>
|
|
||||||
|
|
||||||
<DropdownMenuSubContent>
|
|
||||||
<ThemeSwitcher />
|
|
||||||
</DropdownMenuSubContent>
|
|
||||||
|
|
||||||
</DropdownMenuSub>
|
|
||||||
|
|
||||||
<DropdownMenuSub>
|
|
||||||
<DropdownMenuSubTrigger as="a" class="flex items-center text-medium gap-2 md:hidden" aria-label="Change language">
|
|
||||||
<div class="i-custom-language size-4"></div>
|
|
||||||
{t('navbar.language')}
|
|
||||||
</DropdownMenuSubTrigger>
|
|
||||||
<DropdownMenuSubContent>
|
|
||||||
<LanguageSwitcher />
|
|
||||||
</DropdownMenuSubContent>
|
|
||||||
</DropdownMenuSub>
|
|
||||||
|
|
||||||
{/* Default items */}
|
|
||||||
|
|
||||||
<DropdownMenuItem as="a" class="flex items-center gap-2 cursor-pointer" target="_blank" href="https://github.com/CorentinTh/it-tools/issues/new/choose" rel="noopener noreferrer">
|
|
||||||
<div class="i-tabler-bug text-lg"></div>
|
|
||||||
{t('navbar.report-bug')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
|
|
||||||
<DropdownMenuItem as="a" class="flex items-center gap-2 cursor-pointer" target="_blank" href="https://buymeacoffee.com/cthmsst" rel="noopener noreferrer">
|
|
||||||
<div class="i-tabler-pig-money text-lg"></div>
|
|
||||||
{t('navbar.support')}
|
|
||||||
</DropdownMenuItem>
|
|
||||||
|
|
||||||
</DropdownMenuContent>
|
|
||||||
|
|
||||||
</DropdownMenu>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const Footer: Component = () => {
|
|
||||||
const { t, createLocalizedUrl } = useI18n();
|
|
||||||
|
|
||||||
const getFooterSections = () => [
|
|
||||||
{
|
|
||||||
title: t('footer.resources.title'),
|
|
||||||
items: [
|
|
||||||
{ label: t('footer.resources.all-tools'), to: createLocalizedUrl({ path: '/tools' }) },
|
|
||||||
{ label: t('footer.resources.github'), href: 'https://github.com/CorentinTh/it-tools' },
|
|
||||||
{ label: t('footer.resources.support'), href: 'https://buymeacoffee.com/cthmsst' },
|
|
||||||
{ label: 'Humans.txt', href: '/humans.txt' },
|
|
||||||
{ label: t('footer.resources.license'), href: 'https://github.com/CorentinTh/it-tools/blob/main/LICENSE' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('footer.support.title'),
|
|
||||||
items: [
|
|
||||||
{ label: t('footer.support.report-bug'), href: 'https://github.com/CorentinTh/it-tools/issues/new/choose' },
|
|
||||||
{ label: t('footer.support.request-feature'), href: 'https://github.com/CorentinTh/it-tools/issues/new/choose' },
|
|
||||||
{ label: t('footer.support.contribute'), href: 'https://github.com/CorentinTh/it-tools/blob/main/CONTRIBUTING.md' },
|
|
||||||
{ label: t('footer.support.contact'), href: 'https://github.com/CorentinTh/it-tools/issues/new/choose' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('footer.friends.title'),
|
|
||||||
items: [
|
|
||||||
{ label: 'Jugly.io', href: 'https://jugly.io' },
|
|
||||||
{ label: 'Enclosed.cc', href: 'https://enclosed.cc' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<footer class="bg-card border-t border-border">
|
|
||||||
<div class="py-12 px-6 mx-auto max-w-1200px">
|
|
||||||
|
|
||||||
<div class="flex items-start justify-between flex-col md:flex-row gap-12">
|
|
||||||
<div>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<A href="/" class="text-2xl font-semibold border-b border-transparent hover:no-underline h-auto py-0 px-1 ml--1 rounded-none !transition-border-color-250 group text-muted-foreground flex items-center gap-1">
|
|
||||||
<span class="font-bold group-hover:text-foreground transition">IT</span>
|
|
||||||
<span class="text-80% font-extrabold border border-2px leading-none border-current rounded-md px-1 py-0.5 ml-1 group-hover:text-primary transition">TOOLS</span>
|
|
||||||
</A>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center gap-2 mt-4">
|
|
||||||
{socialLinks.map(({ icon, href, label }) => (
|
|
||||||
<a href={href} target="_blank" rel="noopener noreferrer" class="text-2xl text-muted-foreground hover:text-primary transition" aria-label={label}>
|
|
||||||
<div class={icon}></div>
|
|
||||||
</a>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-muted-foreground mt-2">
|
|
||||||
Crafted with
|
|
||||||
{' '}
|
|
||||||
<span class="i-tabler-heart inline-block text-base mb--0.5"></span>
|
|
||||||
{' '}
|
|
||||||
by
|
|
||||||
{' '}
|
|
||||||
<a href="https://corentin.tech" target="_blank" rel="noopener" class="hover:text-primary transition">
|
|
||||||
Corentin Thomasset
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-12">
|
|
||||||
{getFooterSections().map(({ title, items }) => (
|
|
||||||
<div>
|
|
||||||
<h4 class="font-semibold text-foreground">{title}</h4>
|
|
||||||
<ul class="mt-4">
|
|
||||||
{items.map(({ label, to, href }) => (
|
|
||||||
<li class="mt-1">
|
|
||||||
{to
|
|
||||||
? (
|
|
||||||
<A href={to} class="text-muted-foreground hover:text-primary transition">
|
|
||||||
{label}
|
|
||||||
</A>
|
|
||||||
)
|
|
||||||
: (
|
|
||||||
<a href={href} target="_blank" rel="noopener" class="text-muted-foreground hover:text-primary transition">
|
|
||||||
{label}
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-xs text-muted-foreground border-t border-border pt-4 mt-12">
|
|
||||||
<span>
|
|
||||||
©
|
|
||||||
{new Date().getFullYear()}
|
|
||||||
{' '}
|
|
||||||
Corentin Thomasset
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="text-xs text-foreground opacity-80%">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const AppLayout: ParentComponent = (props) => {
|
|
||||||
return (
|
|
||||||
<div class="flex flex-col h-screen min-h-0">
|
|
||||||
|
|
||||||
<Navbar />
|
|
||||||
|
|
||||||
<div class="flex-1 pb-20 ">{props.children}</div>
|
|
||||||
|
|
||||||
<Footer />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
export const socialLinks = [
|
|
||||||
{
|
|
||||||
icon: 'i-tabler-brand-github',
|
|
||||||
href: 'https://github.com/CorentinTh/it-tools',
|
|
||||||
label: 'GitHub',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'i-tabler-brand-x',
|
|
||||||
href: 'https://x.com/ittoolsdottech',
|
|
||||||
label: 'X',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'i-tabler-coffee',
|
|
||||||
href: 'https://buymeacoffee.com/cthmsst',
|
|
||||||
label: 'Support the project',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import type { ConfigColorMode } from '@kobalte/core/color-mode';
|
|
||||||
import { useColorMode } from '@kobalte/core/color-mode';
|
|
||||||
|
|
||||||
export function useThemeStore() {
|
|
||||||
const { setColorMode, colorMode: getColorMode } = useColorMode();
|
|
||||||
|
|
||||||
return {
|
|
||||||
setColorMode: ({ mode }: { mode: ConfigColorMode }) => setColorMode(mode),
|
|
||||||
getColorMode,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import type { ClassValue } from 'clsx';
|
|
||||||
import clsx from 'clsx';
|
|
||||||
import { twMerge } from 'tailwind-merge';
|
|
||||||
|
|
||||||
export const cn = (...classLists: ClassValue[]) => twMerge(clsx(classLists));
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
to: src/modules/tools/definitions/<%= h.changeCase.param(name) %>/<%= h.changeCase.param(name) %>.tool.ts
|
|
||||||
---
|
|
||||||
import { defineTool } from '../../tools.models'
|
|
||||||
|
|
||||||
export const <%= h.changeCase.camel(name) %>Tool = defineTool({
|
|
||||||
slug: '<%= h.changeCase.param(name) %>',
|
|
||||||
entryFile: () => import('./<%= h.changeCase.param(name) %>.page'),
|
|
||||||
icon: 'i-tabler-question-mark',
|
|
||||||
createdAt: new Date('<%= new Date().toISOString().split('T')[0] %>'),
|
|
||||||
dirName: '<%= h.changeCase.param(name) %>',
|
|
||||||
})
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
to: src/modules/tools/definitions/<%= h.changeCase.param(name) %>/locales/en.json
|
|
||||||
---
|
|
||||||
{}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
inject: true
|
|
||||||
to: src/modules/tools/tools.registry.ts
|
|
||||||
at_line: 0
|
|
||||||
---
|
|
||||||
import { <%= h.changeCase.camel(name) %>Tool } from './definitions/<%= h.changeCase.param(name) %>/<%= h.changeCase.param(name) %>.tool';
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
inject: true
|
|
||||||
to: src/modules/tools/tools.registry.ts
|
|
||||||
before: "^]"
|
|
||||||
---
|
|
||||||
<%= h.changeCase.camel(name) %>Tool,
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
to: src/modules/tools/definitions/<%= h.changeCase.param(name) %>/<%= h.changeCase.param(name) %>.page.tsx
|
|
||||||
---
|
|
||||||
import type { Component } from 'solid-js';
|
|
||||||
|
|
||||||
const <%= h.changeCase.pascal(name) %>: Component = () => {
|
|
||||||
return (
|
|
||||||
<div class="mx-auto max-w-1200px p-6">
|
|
||||||
<h1><%= h.changeCase.title(name) %></h1>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default <%= h.changeCase.pascal(name) %>;
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "ESNext",
|
|
||||||
"jsx": "preserve",
|
|
||||||
"jsxImportSource": "solid-js",
|
|
||||||
"baseUrl": "./",
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["./src/*"]
|
|
||||||
},
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"types": ["vite/client"],
|
|
||||||
"strict": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"skipLibCheck": true
|
|
||||||
},
|
|
||||||
"include": ["src"]
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
import {
|
|
||||||
defineConfig,
|
|
||||||
presetIcons,
|
|
||||||
presetUno,
|
|
||||||
presetWebFonts,
|
|
||||||
transformerDirectives,
|
|
||||||
transformerVariantGroup,
|
|
||||||
} from 'unocss';
|
|
||||||
import presetAnimations from 'unocss-preset-animations';
|
|
||||||
import { toolDefinitions } from './src/modules/tools/tools.registry';
|
|
||||||
import { socialLinks } from './src/modules/ui/layouts/app.layouts.constants';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
presets: [
|
|
||||||
presetUno({
|
|
||||||
dark: {
|
|
||||||
dark: '[data-kb-theme="dark"]',
|
|
||||||
light: '[data-kb-theme="light"]',
|
|
||||||
},
|
|
||||||
prefix: '',
|
|
||||||
}),
|
|
||||||
presetAnimations(),
|
|
||||||
presetWebFonts({
|
|
||||||
fonts: {
|
|
||||||
sans: 'Inter:400,500,600,700,800,900',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
presetIcons({
|
|
||||||
collections: {
|
|
||||||
custom: {
|
|
||||||
language: '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 512 512"><path fill="currentColor" d="m478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4ZM334.83 362L368 281.65L401.17 362Zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9Z" /></svg>',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
transformers: [transformerVariantGroup(), transformerDirectives()],
|
|
||||||
theme: {
|
|
||||||
colors: {
|
|
||||||
border: 'hsl(var(--border))',
|
|
||||||
input: 'hsl(var(--input))',
|
|
||||||
ring: 'hsl(var(--ring))',
|
|
||||||
background: 'hsl(var(--background))',
|
|
||||||
foreground: 'hsl(var(--foreground))',
|
|
||||||
primary: {
|
|
||||||
DEFAULT: 'hsl(var(--primary))',
|
|
||||||
foreground: 'hsl(var(--primary-foreground))',
|
|
||||||
},
|
|
||||||
secondary: {
|
|
||||||
DEFAULT: 'hsl(var(--secondary))',
|
|
||||||
foreground: 'hsl(var(--secondary-foreground))',
|
|
||||||
},
|
|
||||||
destructive: {
|
|
||||||
DEFAULT: 'hsl(var(--destructive))',
|
|
||||||
foreground: 'hsl(var(--destructive-foreground))',
|
|
||||||
},
|
|
||||||
warning: {
|
|
||||||
DEFAULT: 'hsl(var(--warning))',
|
|
||||||
foreground: 'hsl(var(--warning-foreground))',
|
|
||||||
},
|
|
||||||
muted: {
|
|
||||||
DEFAULT: 'hsl(var(--muted))',
|
|
||||||
foreground: 'hsl(var(--muted-foreground))',
|
|
||||||
},
|
|
||||||
accent: {
|
|
||||||
DEFAULT: 'hsl(var(--accent))',
|
|
||||||
foreground: 'hsl(var(--accent-foreground))',
|
|
||||||
},
|
|
||||||
popover: {
|
|
||||||
DEFAULT: 'hsl(var(--popover))',
|
|
||||||
foreground: 'hsl(var(--popover-foreground))',
|
|
||||||
},
|
|
||||||
card: {
|
|
||||||
DEFAULT: 'hsl(var(--card))',
|
|
||||||
foreground: 'hsl(var(--card-foreground))',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
borderRadius: {
|
|
||||||
lg: 'var(--radius)',
|
|
||||||
md: 'calc(var(--radius) - 2px)',
|
|
||||||
sm: 'calc(var(--radius) - 4px)',
|
|
||||||
},
|
|
||||||
animation: {
|
|
||||||
keyframes: {
|
|
||||||
'accordion-down':
|
|
||||||
'{ from { height: 0 } to { height: var(--kb-accordion-content-height) } }',
|
|
||||||
'accordion-up':
|
|
||||||
'{ from { height: var(--kb-accordion-content-height) } to { height: 0 } }',
|
|
||||||
'collapsible-down':
|
|
||||||
'{ from { height: 0 } to { height: var(--kb-collapsible-content-height) } }',
|
|
||||||
'collapsible-up':
|
|
||||||
'{ from { height: var(--kb-collapsible-content-height) } to { height: 0 } }',
|
|
||||||
'caret-blink': '{ 0%,70%,100% { opacity: 1 } 20%,50% { opacity: 0 } }',
|
|
||||||
},
|
|
||||||
timingFns: {
|
|
||||||
'accordion-down': 'ease-out',
|
|
||||||
'accordion-up': 'ease-out',
|
|
||||||
'collapsible-down': 'ease-out',
|
|
||||||
'collapsible-up': 'ease-out',
|
|
||||||
'caret-blink': 'ease-out',
|
|
||||||
},
|
|
||||||
durations: {
|
|
||||||
'accordion-down': '0.2s',
|
|
||||||
'accordion-up': '0.2s',
|
|
||||||
'collapsible-down': '0.2s',
|
|
||||||
'collapsible-up': '0.2s',
|
|
||||||
'caret-blink': '1.25s',
|
|
||||||
},
|
|
||||||
counts: {
|
|
||||||
'caret-blink': 'infinite',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
safelist: [
|
|
||||||
...toolDefinitions.map(tool => tool.icon),
|
|
||||||
...socialLinks.map(({ icon }) => icon),
|
|
||||||
],
|
|
||||||
shortcuts: {
|
|
||||||
'i-logo': 'i-tabler-terminal',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import path from 'node:path';
|
|
||||||
import unoCssPlugin from 'unocss/vite';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
import solidPlugin from 'vite-plugin-solid';
|
|
||||||
import { configDefaults } from 'vitest/config';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [
|
|
||||||
unoCssPlugin(),
|
|
||||||
solidPlugin(),
|
|
||||||
],
|
|
||||||
server: {
|
|
||||||
proxy: {
|
|
||||||
'/api': {
|
|
||||||
target: 'http://localhost:8787',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
build: {
|
|
||||||
target: 'esnext',
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': path.resolve(__dirname, './src'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
test: {
|
|
||||||
exclude: [
|
|
||||||
...configDefaults.exclude,
|
|
||||||
'**/*.e2e.test.ts',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
82
playwright.config.ts
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
import { defineConfig, devices } from '@playwright/test';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read environment variables from file.
|
||||||
|
* https://github.com/motdotla/dotenv
|
||||||
|
*/
|
||||||
|
// require('dotenv').config();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://playwright.dev/docs/test-configuration.
|
||||||
|
*/
|
||||||
|
export default defineConfig({
|
||||||
|
testDir: './src',
|
||||||
|
testMatch: /.*\.e2e\.(spec\.)?ts/,
|
||||||
|
/* Run tests in files in parallel */
|
||||||
|
fullyParallel: true,
|
||||||
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||||
|
forbidOnly: !!process.env.CI,
|
||||||
|
/* Retry on CI only */
|
||||||
|
retries: process.env.CI ? 2 : 0,
|
||||||
|
/* Opt out of parallel tests on CI. */
|
||||||
|
workers: process.env.CI ? 1 : undefined,
|
||||||
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||||
|
reporter: 'html',
|
||||||
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||||
|
use: {
|
||||||
|
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||||
|
baseURL: 'http://127.0.0.1:3000',
|
||||||
|
|
||||||
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||||
|
trace: 'on-first-retry',
|
||||||
|
|
||||||
|
testIdAttribute: 'data-test-id',
|
||||||
|
locale: 'en-GB',
|
||||||
|
timezoneId: 'Europe/Paris',
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Configure projects for major browsers */
|
||||||
|
projects: [
|
||||||
|
{
|
||||||
|
name: 'chromium',
|
||||||
|
use: { ...devices['Desktop Chrome'] },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: 'firefox',
|
||||||
|
use: { ...devices['Desktop Firefox'] },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: 'webkit',
|
||||||
|
use: { ...devices['Desktop Safari'] },
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Test against mobile viewports. */
|
||||||
|
// {
|
||||||
|
// name: 'Mobile Chrome',
|
||||||
|
// use: { ...devices['Pixel 5'] },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'Mobile Safari',
|
||||||
|
// use: { ...devices['iPhone 12'] },
|
||||||
|
// },
|
||||||
|
|
||||||
|
/* Test against branded browsers. */
|
||||||
|
// {
|
||||||
|
// name: 'Microsoft Edge',
|
||||||
|
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'Google Chrome',
|
||||||
|
// use: { ..devices['Desktop Chrome'], channel: 'chrome' },
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
|
||||||
|
/* Run your local dev server before starting the tests */
|
||||||
|
webServer: {
|
||||||
|
command: 'npm run dev',
|
||||||
|
url: 'http://127.0.0.1:3000',
|
||||||
|
reuseExistingServer: !process.env.CI,
|
||||||
|
},
|
||||||
|
});
|
||||||
13285
pnpm-lock.yaml
generated
@@ -1,2 +0,0 @@
|
|||||||
packages:
|
|
||||||
- 'packages/*'
|
|
||||||
BIN
public/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
public/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
public/banner.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
9
public/browserconfig.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/mstile-150x150.png"/>
|
||||||
|
<TileColor>#da532c</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
||||||
BIN
public/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
public/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |