├── .nvmrc ├── .npmrc ├── src ├── lib │ ├── ts │ │ ├── index.ts │ │ └── types │ │ │ ├── index.ts │ │ │ ├── response.type.ts │ │ │ └── tab.type.ts │ ├── utils │ │ ├── ui │ │ │ ├── index.ts │ │ │ └── ui.util.ts │ │ ├── mapper │ │ │ ├── index.ts │ │ │ └── map.util.ts │ │ ├── theme │ │ │ ├── index.ts │ │ │ └── theme.util.ts │ │ ├── uuid │ │ │ ├── index.ts │ │ │ └── uuid.util.ts │ │ ├── debounce │ │ │ ├── index.ts │ │ │ └── debounce.util.ts │ │ ├── formatter │ │ │ ├── index.ts │ │ │ └── format.util.ts │ │ └── parallel │ │ │ ├── index.ts │ │ │ └── parallel.util.ts │ ├── server │ │ ├── hooks │ │ │ ├── index.ts │ │ │ └── minify │ │ │ │ ├── index.ts │ │ │ │ └── minify.hook.ts │ │ └── utils │ │ │ └── minify │ │ │ ├── index.ts │ │ │ └── minify.util.ts │ ├── actions │ │ └── scroll │ │ │ ├── index.ts │ │ │ └── scroll.action.ts │ ├── configs │ │ └── site │ │ │ ├── index.ts │ │ │ └── site.config.ts │ ├── schemas │ │ ├── rest │ │ │ ├── index.ts │ │ │ └── rest.schema.ts │ │ ├── settings │ │ │ ├── index.ts │ │ │ └── settings.schema.ts │ │ ├── collection │ │ │ ├── index.ts │ │ │ └── collection.schema.ts │ │ ├── file-upload │ │ │ ├── index.ts │ │ │ └── file-upload.schema.ts │ │ └── key-value │ │ │ ├── index.ts │ │ │ └── key-value.schema.ts │ ├── constants │ │ ├── links │ │ │ ├── index.ts │ │ │ └── links.constant.ts │ │ ├── regexes │ │ │ ├── index.ts │ │ │ └── regexes.constant.ts │ │ ├── responses │ │ │ ├── index.ts │ │ │ └── responses.constant.ts │ │ ├── shortcuts │ │ │ ├── index.ts │ │ │ └── shortcuts.constant.ts │ │ ├── unicodes │ │ │ ├── index.ts │ │ │ └── unicodes.constant.ts │ │ └── breakpoints │ │ │ ├── index.ts │ │ │ └── breakpoints.constant.ts │ ├── functions │ │ ├── export │ │ │ ├── index.ts │ │ │ └── export.function.ts │ │ └── fetcher │ │ │ ├── index.ts │ │ │ └── fetcher.function.ts │ ├── contexts │ │ ├── settings │ │ │ └── index.ts │ │ └── rest │ │ │ └── index.ts │ ├── layouts │ │ ├── app │ │ │ ├── index.ts │ │ │ └── app.layout.svelte │ │ └── shared │ │ │ ├── footer │ │ │ └── index.ts │ │ │ ├── toolbar │ │ │ └── index.ts │ │ │ ├── wrapper │ │ │ ├── index.ts │ │ │ └── wrapper.component.svelte │ │ │ └── sidenavs │ │ │ └── sidenav-routes │ │ │ └── index.ts │ ├── repositories │ │ └── rest │ │ │ └── index.ts │ ├── components │ │ ├── ui │ │ │ ├── sonner │ │ │ │ ├── index.ts │ │ │ │ └── sonner.svelte │ │ │ ├── center │ │ │ │ ├── index.ts │ │ │ │ └── center.svelte │ │ │ ├── spinner │ │ │ │ ├── index.ts │ │ │ │ └── spinner.svelte │ │ │ ├── label │ │ │ │ ├── index.ts │ │ │ │ └── label.svelte │ │ │ ├── checkbox │ │ │ │ ├── index.ts │ │ │ │ └── checkbox.svelte │ │ │ ├── switch │ │ │ │ ├── index.ts │ │ │ │ └── switch.svelte │ │ │ ├── separator │ │ │ │ ├── index.ts │ │ │ │ └── separator.svelte │ │ │ ├── shortcut │ │ │ │ ├── index.ts │ │ │ │ ├── shortcut.svelte │ │ │ │ └── shortcut-key.svelte │ │ │ ├── dialog │ │ │ │ ├── dialog-portal.svelte │ │ │ │ ├── dialog-header.svelte │ │ │ │ ├── dialog-footer.svelte │ │ │ │ ├── dialog-title.svelte │ │ │ │ ├── dialog-description.svelte │ │ │ │ ├── dialog-overlay.svelte │ │ │ │ └── dialog-content.svelte │ │ │ ├── form │ │ │ │ ├── form-button.svelte │ │ │ │ ├── form-join.svelte │ │ │ │ ├── form-legend.svelte │ │ │ │ ├── form-description.svelte │ │ │ │ ├── form-label.svelte │ │ │ │ ├── form-field-errors.svelte │ │ │ │ ├── form-fieldset.svelte │ │ │ │ ├── form-field.svelte │ │ │ │ ├── form-element-field.svelte │ │ │ │ └── index.ts │ │ │ ├── alert-dialog │ │ │ │ ├── alert-dialog-portal.svelte │ │ │ │ ├── alert-dialog-header.svelte │ │ │ │ ├── alert-dialog-footer.svelte │ │ │ │ ├── alert-dialog-description.svelte │ │ │ │ ├── alert-dialog-title.svelte │ │ │ │ ├── alert-dialog-action.svelte │ │ │ │ ├── alert-dialog-cancel.svelte │ │ │ │ ├── alert-dialog-overlay.svelte │ │ │ │ ├── alert-dialog-content.svelte │ │ │ │ └── index.ts │ │ │ ├── avatar │ │ │ │ ├── index.ts │ │ │ │ ├── avatar-fallback.svelte │ │ │ │ ├── avatar-image.svelte │ │ │ │ └── avatar.svelte │ │ │ ├── breadcrumb │ │ │ │ ├── index.ts │ │ │ │ ├── breadcrumb.svelte │ │ │ │ ├── breadcrumb-separator.svelte │ │ │ │ └── breadcrumb-item.svelte │ │ │ ├── resizable │ │ │ │ ├── index.ts │ │ │ │ ├── resizable-pane-group.svelte │ │ │ │ └── resizable-handle.svelte │ │ │ ├── popover │ │ │ │ ├── index.ts │ │ │ │ └── popover-content.svelte │ │ │ ├── tooltip │ │ │ │ ├── index.ts │ │ │ │ └── tooltip-content.svelte │ │ │ ├── radio-group │ │ │ │ ├── index.ts │ │ │ │ ├── radio-group.svelte │ │ │ │ └── radio-group-item.svelte │ │ │ ├── context-menu │ │ │ │ ├── context-menu-radio-group.svelte │ │ │ │ ├── context-menu-separator.svelte │ │ │ │ ├── context-menu-shortcut.svelte │ │ │ │ ├── context-menu-label.svelte │ │ │ │ ├── context-menu-content.svelte │ │ │ │ ├── context-menu-sub-content.svelte │ │ │ │ ├── context-menu-item.svelte │ │ │ │ ├── context-menu-sub-trigger.svelte │ │ │ │ ├── context-menu-checkbox-item.svelte │ │ │ │ ├── context-menu-radio-item.svelte │ │ │ │ └── index.ts │ │ │ ├── hover-card │ │ │ │ ├── index.ts │ │ │ │ └── hover-card-content.svelte │ │ │ ├── card │ │ │ │ ├── card-content.svelte │ │ │ │ ├── card-footer.svelte │ │ │ │ ├── card-header.svelte │ │ │ │ ├── card-description.svelte │ │ │ │ ├── card.svelte │ │ │ │ ├── card-title.svelte │ │ │ │ └── index.ts │ │ │ ├── dropdown-menu │ │ │ │ ├── dropdown-menu-radio-group.svelte │ │ │ │ ├── dropdown-menu-shortcut.svelte │ │ │ │ ├── dropdown-menu-separator.svelte │ │ │ │ ├── dropdown-menu-label.svelte │ │ │ │ ├── dropdown-menu-content.svelte │ │ │ │ ├── dropdown-menu-sub-content.svelte │ │ │ │ ├── dropdown-menu-item.svelte │ │ │ │ ├── dropdown-menu-sub-trigger.svelte │ │ │ │ ├── dropdown-menu-radio-item.svelte │ │ │ │ ├── dropdown-menu-checkbox-item.svelte │ │ │ │ └── index.ts │ │ │ ├── collapsible │ │ │ │ ├── index.ts │ │ │ │ └── collapsible-content.svelte │ │ │ ├── sidenav │ │ │ │ ├── index.ts │ │ │ │ ├── sidenav-content.svelte │ │ │ │ ├── sidenav-nav.svelte │ │ │ │ └── sidenav.svelte │ │ │ ├── select │ │ │ │ ├── select-separator.svelte │ │ │ │ ├── select-label.svelte │ │ │ │ ├── index.ts │ │ │ │ ├── select-trigger.svelte │ │ │ │ ├── select-content.svelte │ │ │ │ └── select-item.svelte │ │ │ ├── alert │ │ │ │ ├── alert-description.svelte │ │ │ │ ├── alert.svelte │ │ │ │ ├── alert-title.svelte │ │ │ │ └── index.ts │ │ │ ├── tabs │ │ │ │ ├── index.ts │ │ │ │ ├── tabs-list.svelte │ │ │ │ ├── tabs-content.svelte │ │ │ │ └── tabs-trigger.svelte │ │ │ ├── drawer │ │ │ │ ├── drawer-overlay.svelte │ │ │ │ ├── drawer.svelte │ │ │ │ ├── drawer-footer.svelte │ │ │ │ ├── drawer-nested.svelte │ │ │ │ ├── drawer-description.svelte │ │ │ │ ├── drawer-header.svelte │ │ │ │ ├── drawer-title.svelte │ │ │ │ ├── drawer-content.svelte │ │ │ │ └── index.ts │ │ │ ├── badge │ │ │ │ ├── badge.svelte │ │ │ │ └── index.ts │ │ │ ├── toggle-group │ │ │ │ ├── index.ts │ │ │ │ ├── toggle-group-item.svelte │ │ │ │ └── toggle-group.svelte │ │ │ ├── codemirror │ │ │ │ └── codemirror.svelte │ │ │ ├── button │ │ │ │ ├── button.svelte │ │ │ │ └── index.ts │ │ │ ├── input │ │ │ │ ├── index.ts │ │ │ │ └── input.svelte │ │ │ ├── toggle │ │ │ │ ├── toggle.svelte │ │ │ │ └── index.ts │ │ │ └── textarea │ │ │ │ ├── index.ts │ │ │ │ └── textarea.svelte │ │ ├── service-worker │ │ │ ├── index.ts │ │ │ └── service-worker.svelte │ │ ├── view-transition │ │ │ ├── index.ts │ │ │ └── view-transition.svelte │ │ ├── infra │ │ │ ├── inputs │ │ │ │ └── input-search │ │ │ │ │ ├── index.ts │ │ │ │ │ └── input-search.component.svelte │ │ │ └── feedbacks │ │ │ │ └── feedback-not-found │ │ │ │ ├── index.ts │ │ │ │ └── feedback-not-found.component.svelte │ │ ├── mode-watcher │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ ├── mode-watcher.svelte │ │ │ └── without-transition.ts │ │ ├── screen-watcher │ │ │ ├── index.ts │ │ │ ├── store.ts │ │ │ └── screen-watcher.svelte │ │ └── metadata │ │ │ ├── index.ts │ │ │ └── metadata.svelte │ ├── styles │ │ ├── tailwind.pcss │ │ ├── view-transition.pcss │ │ └── app.pcss │ └── features │ │ ├── rest │ │ ├── views │ │ │ ├── view-rest │ │ │ │ └── index.ts │ │ │ ├── view-editor │ │ │ │ └── index.ts │ │ │ ├── view-welcome │ │ │ │ ├── index.ts │ │ │ │ └── view-welcome.view.svelte │ │ │ ├── view-response │ │ │ │ └── index.ts │ │ │ ├── view-collections │ │ │ │ └── index.ts │ │ │ ├── view-instructions │ │ │ │ ├── index.ts │ │ │ │ └── view-instructions.view.svelte │ │ │ ├── view-import-from-file │ │ │ │ └── index.ts │ │ │ └── view-select-collections │ │ │ │ └── index.ts │ │ └── components │ │ │ ├── tabs │ │ │ ├── tab-body │ │ │ │ ├── index.ts │ │ │ │ └── tab-body.component.svelte │ │ │ ├── tab-params │ │ │ │ └── index.ts │ │ │ ├── tab-headers │ │ │ │ └── index.ts │ │ │ ├── tab-request │ │ │ │ └── index.ts │ │ │ └── tab-collections │ │ │ │ ├── index.ts │ │ │ │ └── tab-collections.component.svelte │ │ │ ├── sidenavs │ │ │ └── sidenav-rest │ │ │ │ └── index.ts │ │ │ ├── toolbars │ │ │ ├── toolbar-body │ │ │ │ └── index.ts │ │ │ ├── toolbar-params │ │ │ │ └── index.ts │ │ │ ├── toolbar-headers │ │ │ │ └── index.ts │ │ │ ├── toolbar-response │ │ │ │ └── index.ts │ │ │ ├── toolbar-collections │ │ │ │ └── index.ts │ │ │ ├── toolbar-response-status │ │ │ │ ├── index.ts │ │ │ │ └── toolbar-response-status.component.svelte │ │ │ └── toolbar-select-collections │ │ │ │ └── index.ts │ │ │ ├── trees │ │ │ ├── tree-collection │ │ │ │ ├── tree-file │ │ │ │ │ └── index.ts │ │ │ │ ├── tree-expand │ │ │ │ │ ├── index.ts │ │ │ │ │ └── tree-expand.component.svelte │ │ │ │ ├── tree-folder │ │ │ │ │ └── index.ts │ │ │ │ ├── tree-wrapper │ │ │ │ │ ├── index.ts │ │ │ │ │ └── tree-wrapper.component.svelte │ │ │ │ ├── index.ts │ │ │ │ ├── tree-collection.component.svelte │ │ │ │ └── store.ts │ │ │ └── tree-select-collection │ │ │ │ ├── tree-file │ │ │ │ └── index.ts │ │ │ │ ├── tree-expand │ │ │ │ ├── index.ts │ │ │ │ └── tree-expand.component.svelte │ │ │ │ ├── tree-folder │ │ │ │ └── index.ts │ │ │ │ ├── tree-wrapper │ │ │ │ ├── index.ts │ │ │ │ └── tree-wrapper.component.svelte │ │ │ │ ├── index.ts │ │ │ │ ├── store.ts │ │ │ │ └── tree-select-collection.component.svelte │ │ │ ├── feedbacks │ │ │ ├── feedback-body-empty │ │ │ │ ├── index.ts │ │ │ │ └── feedback-body-empty.component.svelte │ │ │ ├── feedback-folder-empty │ │ │ │ ├── index.ts │ │ │ │ └── feedback-folder-empty.component.svelte │ │ │ ├── feedback-headers-empty │ │ │ │ ├── index.ts │ │ │ │ └── feedback-headers-empty.component.svelte │ │ │ ├── feedback-collection-empty │ │ │ │ └── index.ts │ │ │ └── feedback-parameters-empty │ │ │ │ ├── index.ts │ │ │ │ └── feedback-parameters-empty.component.svelte │ │ │ ├── popovers │ │ │ └── popover-save-options │ │ │ │ └── index.ts │ │ │ ├── dialogs │ │ │ ├── dialog-import │ │ │ │ ├── index.ts │ │ │ │ └── store.ts │ │ │ ├── dialog-save-as │ │ │ │ ├── index.ts │ │ │ │ └── store.ts │ │ │ ├── dialog-edit-request │ │ │ │ ├── index.ts │ │ │ │ └── store.ts │ │ │ └── dialog-edit-collection │ │ │ │ ├── index.ts │ │ │ │ └── store.ts │ │ │ ├── context-menus │ │ │ └── context-menu-edit-request │ │ │ │ └── index.ts │ │ │ ├── alert-dialogs │ │ │ ├── alert-dialog-unsaved-changes │ │ │ │ └── index.ts │ │ │ ├── alert-dialog-request-deletion │ │ │ │ ├── index.ts │ │ │ │ ├── store.ts │ │ │ │ └── alert-dialog-request-deletion.component.svelte │ │ │ └── alert-dialog-collection-deletion │ │ │ │ ├── index.ts │ │ │ │ ├── store.ts │ │ │ │ └── alert-dialog-collection-deletion.component.svelte │ │ │ └── dropdown-menus │ │ │ ├── dropdown-menu-request-options │ │ │ ├── index.ts │ │ │ └── dropdown-menu-request-options.component.svelte │ │ │ └── dropdown-menu-collection-options │ │ │ └── index.ts │ │ ├── settings │ │ └── views │ │ │ └── view-settings │ │ │ └── index.ts │ │ └── support │ │ └── components │ │ └── dialogs │ │ └── dialog-support │ │ ├── index.ts │ │ └── dialog-support.component.svelte ├── routes │ ├── +layout.ts │ ├── settings │ │ ├── +page.ts │ │ └── +page.svelte │ ├── +page.ts │ ├── +page.svelte │ ├── +layout.svelte │ └── +error.svelte ├── hooks.server.ts ├── app.d.ts └── app.html ├── static ├── favicon.ico ├── images │ ├── banner.png │ └── icons │ │ ├── pwa-64x64.png │ │ ├── pwa-192x192.png │ │ ├── pwa-512x512.png │ │ ├── maskable-icon-512x512.png │ │ └── apple-touch-icon-180x180.png ├── robots.txt └── site.webmanifest ├── eslint.config.js ├── .vscode └── settings.json ├── .gitignore ├── .prettierignore ├── .editorconfig ├── postcss.config.js ├── components.json ├── .prettierrc ├── vite.config.js ├── tsconfig.json ├── svelte.config.js └── LICENSE /.nvmrc: -------------------------------------------------------------------------------- 1 | 20.11.1 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /src/lib/ts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/ui/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ui.util'; 2 | -------------------------------------------------------------------------------- /src/routes/+layout.ts: -------------------------------------------------------------------------------- 1 | export const prerender = true; 2 | -------------------------------------------------------------------------------- /src/lib/server/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './minify'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/mapper/index.ts: -------------------------------------------------------------------------------- 1 | export * from './map.util'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './theme.util'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/uuid/index.ts: -------------------------------------------------------------------------------- 1 | export * from './uuid.util'; 2 | -------------------------------------------------------------------------------- /src/lib/actions/scroll/index.ts: -------------------------------------------------------------------------------- 1 | export * from './scroll.action'; 2 | -------------------------------------------------------------------------------- /src/lib/configs/site/index.ts: -------------------------------------------------------------------------------- 1 | export * from './site.config'; 2 | -------------------------------------------------------------------------------- /src/lib/schemas/rest/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rest.schema'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/debounce/index.ts: -------------------------------------------------------------------------------- 1 | export * from './debounce.util'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/formatter/index.ts: -------------------------------------------------------------------------------- 1 | export * from './format.util'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/parallel/index.ts: -------------------------------------------------------------------------------- 1 | export * from './parallel.util'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/links/index.ts: -------------------------------------------------------------------------------- 1 | export * from './links.constant'; 2 | -------------------------------------------------------------------------------- /src/lib/functions/export/index.ts: -------------------------------------------------------------------------------- 1 | export * from './export.function'; 2 | -------------------------------------------------------------------------------- /src/lib/schemas/settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './settings.schema'; 2 | -------------------------------------------------------------------------------- /src/lib/server/hooks/minify/index.ts: -------------------------------------------------------------------------------- 1 | export * from './minify.hook'; 2 | -------------------------------------------------------------------------------- /src/lib/server/utils/minify/index.ts: -------------------------------------------------------------------------------- 1 | export * from './minify.util'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/regexes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './regexes.constant'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/responses/index.ts: -------------------------------------------------------------------------------- 1 | export * from './responses.constant'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/shortcuts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './shortcuts.constant'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/unicodes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './unicodes.constant'; 2 | -------------------------------------------------------------------------------- /src/lib/contexts/settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './settings.context'; 2 | -------------------------------------------------------------------------------- /src/lib/functions/fetcher/index.ts: -------------------------------------------------------------------------------- 1 | export * from './fetcher.function'; 2 | -------------------------------------------------------------------------------- /src/lib/schemas/collection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './collection.schema'; 2 | -------------------------------------------------------------------------------- /src/lib/schemas/file-upload/index.ts: -------------------------------------------------------------------------------- 1 | export * from './file-upload.schema'; 2 | -------------------------------------------------------------------------------- /src/lib/schemas/key-value/index.ts: -------------------------------------------------------------------------------- 1 | export * from './key-value.schema'; 2 | -------------------------------------------------------------------------------- /src/lib/utils/uuid/uuid.util.ts: -------------------------------------------------------------------------------- 1 | export { v4 as generateUUID } from 'uuid'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/breakpoints/index.ts: -------------------------------------------------------------------------------- 1 | export * from './breakpoints.constant'; 2 | -------------------------------------------------------------------------------- /src/lib/layouts/app/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AppLayout } from './app.layout.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/repositories/rest/index.ts: -------------------------------------------------------------------------------- 1 | export * as RESTRepository from './rest.repository'; 2 | -------------------------------------------------------------------------------- /src/lib/components/ui/sonner/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Toaster } from './sonner.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/ts/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './response.type'; 2 | export * from './tab.type'; 3 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /src/lib/styles/tailwind.pcss: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /src/lib/contexts/rest/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rest.context'; 2 | export * from './rest-tab.context'; 3 | -------------------------------------------------------------------------------- /src/lib/layouts/shared/footer/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Footer } from './footer.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/layouts/shared/toolbar/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Toolbar } from './toolbar.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/layouts/shared/wrapper/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Wrapper } from './wrapper.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/components/ui/center/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './center.svelte'; 2 | 3 | export { Root as Center }; 4 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-rest/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewREST } from './view-rest.view.svelte'; 2 | -------------------------------------------------------------------------------- /static/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/images/banner.png -------------------------------------------------------------------------------- /src/lib/components/service-worker/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ServiceWorker } from './service-worker.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/components/ui/spinner/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './spinner.svelte'; 2 | 3 | export { Root as Spinner }; 4 | -------------------------------------------------------------------------------- /src/lib/components/view-transition/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewTransition } from './view-transition.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-editor/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewEditor } from './view-editor.view.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-welcome/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewWelcome } from './view-welcome.view.svelte'; 2 | -------------------------------------------------------------------------------- /src/routes/settings/+page.ts: -------------------------------------------------------------------------------- 1 | export async function load() { 2 | const title = 'Settings'; 3 | return { title }; 4 | } 5 | -------------------------------------------------------------------------------- /static/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Allow: / 4 | Disallow: /settings/ 5 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/tabs/tab-body/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabBody } from './tab-body.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-response/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewResponse } from './view-response.view.svelte'; 2 | -------------------------------------------------------------------------------- /static/images/icons/pwa-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/images/icons/pwa-64x64.png -------------------------------------------------------------------------------- /src/lib/components/infra/inputs/input-search/index.ts: -------------------------------------------------------------------------------- 1 | export { default as InputSearch } from './input-search.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/tabs/tab-params/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabParams } from './tab-params.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/settings/views/view-settings/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewSettings } from './view-settings.layout.svelte'; 2 | -------------------------------------------------------------------------------- /src/routes/+page.ts: -------------------------------------------------------------------------------- 1 | export async function load() { 2 | const title = 'API Development Ecosystem'; 3 | return { title }; 4 | } 5 | -------------------------------------------------------------------------------- /static/images/icons/pwa-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/images/icons/pwa-192x192.png -------------------------------------------------------------------------------- /static/images/icons/pwa-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/images/icons/pwa-512x512.png -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import config from '@huntabyte/eslint-config'; 2 | 3 | export default config({ svelte: true, typescript: true }); 4 | -------------------------------------------------------------------------------- /src/lib/components/mode-watcher/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mode'; 2 | export { default as ModeWatcher } from './mode-watcher.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/components/ui/label/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './label.svelte'; 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Label 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/tabs/tab-headers/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabHeaders } from './tab-headers.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/tabs/tab-request/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabRequest } from './tab-request.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-collections/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewCollections } from './view-collections.view.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-instructions/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewInstructions } from './view-instructions.view.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/layouts/shared/sidenavs/sidenav-routes/index.ts: -------------------------------------------------------------------------------- 1 | export { default as SidenavRoutes } from './sidenav-routes.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/components/screen-watcher/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as ScreenWatcher } from './screen-watcher.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/components/ui/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './checkbox.svelte'; 2 | export { 3 | Root, 4 | // 5 | Root as Checkbox 6 | }; 7 | -------------------------------------------------------------------------------- /src/lib/components/ui/switch/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './switch.svelte'; 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Switch 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/sidenavs/sidenav-rest/index.ts: -------------------------------------------------------------------------------- 1 | export { default as SidenavREST } from './sidenav-rest.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-body/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarBody } from './toolbar-body.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/tabs/tab-collections/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabCollections } from './tab-collections.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-params/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarParams } from './toolbar-params.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/tree-file/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeFile } from './tree-file.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-import-from-file/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewImportFromFile } from './view-import-from-file.view.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/components/infra/feedbacks/feedback-not-found/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FeedbackNotFound } from './feedback-not-found.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/components/ui/separator/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './separator.svelte'; 2 | 3 | export { 4 | Root, 5 | // 6 | Root as Separator 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-headers/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarHeaders } from './toolbar-headers.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-response/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarResponse } from './toolbar-response.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/tree-expand/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeExpand } from './tree-expand.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/tree-folder/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeFolder } from './tree-folder.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-select-collection/tree-file/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeFile } from './tree-file.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/support/components/dialogs/dialog-support/index.ts: -------------------------------------------------------------------------------- 1 | export { default as DialogSupport } from './dialog-support.component.svelte'; 2 | -------------------------------------------------------------------------------- /static/images/icons/maskable-icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/images/icons/maskable-icon-512x512.png -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/tree-wrapper/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeWrapper } from './tree-wrapper.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-select-collection/tree-expand/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeExpand } from './tree-expand.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-select-collection/tree-folder/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeFolder } from './tree-folder.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/views/view-select-collections/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ViewSelectCollections } from './view-select-collections.view.svelte'; 2 | -------------------------------------------------------------------------------- /static/images/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gustavomorinaga/copyscotch/HEAD/static/images/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /src/lib/features/rest/components/feedbacks/feedback-body-empty/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FeedbackBodyEmpty } from './feedback-body-empty.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-collections/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarCollections } from './toolbar-collections.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-select-collection/tree-wrapper/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TreeWrapper } from './tree-wrapper.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/feedbacks/feedback-folder-empty/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FeedbackFolderEmpty } from './feedback-folder-empty.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/popovers/popover-save-options/index.ts: -------------------------------------------------------------------------------- 1 | export { default as PopoverSaveOptions } from './popover-save-options.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-import/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as DialogImport } from './dialog-import.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/feedbacks/feedback-headers-empty/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FeedbackHeadersEmpty } from './feedback-headers-empty.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-response-status/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarResponseStatus } from './toolbar-response-status.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-save-as/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as DialogSaveAs } from './dialog-save-as.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as TreeCollection } from './tree-collection.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/routes/settings/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/hooks.server.ts: -------------------------------------------------------------------------------- 1 | import { sequence } from '@sveltejs/kit/hooks'; 2 | import { minifyHandle } from '$lib/server/hooks'; 3 | 4 | export const handle = sequence(minifyHandle); 5 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/context-menus/context-menu-edit-request/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ContextMenuEditRequest } from './context-menu-edit-request.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/feedbacks/feedback-collection-empty/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FeedbackCollectionEmpty } from './feedback-collection-empty.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/feedbacks/feedback-parameters-empty/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FeedbackParametersEmpty } from './feedback-parameters-empty.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/toolbars/toolbar-select-collections/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToolbarSelectCollections } from './toolbar-select-collections.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/alert-dialogs/alert-dialog-unsaved-changes/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AlertDialogUnsavedChanges } from './alert-dialog-unsaved-changes.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-edit-request/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as DialogEditRequest } from './dialog-edit-request.component.svelte'; 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "editor.codeActionsOnSave": { 4 | "source.fixAll": "always" 5 | }, 6 | "typescript.tsdk": "node_modules/typescript/lib" 7 | } 8 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-edit-collection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as DialogEditCollection } from './dialog-edit-collection.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dropdown-menus/dropdown-menu-request-options/index.ts: -------------------------------------------------------------------------------- 1 | export { default as DropdownMenuRequestOptions } from './dropdown-menu-request-options.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-select-collection/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as TreeSelectCollection } from './tree-select-collection.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/constants/responses/responses.constant.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Array of supported response types. 3 | */ 4 | export const RESPONSE_TYPES = ['application/json', 'text/html', 'text/plain'] as const; 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | .git-old 12 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dropdown-menus/dropdown-menu-collection-options/index.ts: -------------------------------------------------------------------------------- 1 | export { default as DropdownMenuCollectionOptions } from './dropdown-menu-collection-options.component.svelte'; 2 | -------------------------------------------------------------------------------- /src/lib/constants/regexes/regexes.constant.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Regular expressions map. 3 | */ 4 | export const REGEXES = { 5 | deep: /(\w+)(?:\[(\d+)\])?\.(.+)/ 6 | } as const satisfies Record; 7 | -------------------------------------------------------------------------------- /src/lib/components/mode-watcher/types.ts: -------------------------------------------------------------------------------- 1 | import type { modes } from './stores'; 2 | 3 | export type Mode = (typeof modes)[number]; 4 | export type ThemeColors = { dark: string; light: string; black: string } | undefined; 5 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/alert-dialogs/alert-dialog-request-deletion/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as AlertDialogRequestDeletion } from './alert-dialog-request-deletion.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/alert-dialogs/alert-dialog-collection-deletion/index.ts: -------------------------------------------------------------------------------- 1 | export * from './store'; 2 | export { default as AlertDialogCollectionDeletion } from './alert-dialog-collection-deletion.component.svelte'; 3 | -------------------------------------------------------------------------------- /src/lib/ts/types/response.type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable ts/no-explicit-any */ 2 | export type TResponse = Pick & { 3 | blob: Blob; 4 | raw: string; 5 | time: number; 6 | json?: any; 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/components/ui/shortcut/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './shortcut.svelte'; 2 | import Key from './shortcut-key.svelte'; 3 | 4 | export { 5 | Root, 6 | Key, 7 | // 8 | Root as Shortcut, 9 | Key as ShortcutKey 10 | }; 11 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/tabs/tab-collections/tab-collections.component.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/lib/components/screen-watcher/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | 3 | export type ScreenStore = Pick; 4 | 5 | export const screenStore = writable({ 6 | innerWidth: 0, 7 | innerHeight: 0 8 | }); 9 | -------------------------------------------------------------------------------- /src/lib/constants/unicodes/unicodes.constant.ts: -------------------------------------------------------------------------------- 1 | export type TUnicode = string; 2 | 3 | /** 4 | * Mapping of special characters to their corresponding Unicode representations. 5 | */ 6 | export const UNICODES = { enter: '⤶' } as const satisfies Record; 7 | -------------------------------------------------------------------------------- /src/lib/components/ui/dialog/dialog-portal.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-import/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | 3 | export type TImportDialogStore = { 4 | open: boolean; 5 | }; 6 | 7 | export const dialogImportStore = writable({ 8 | open: false 9 | }); 10 | -------------------------------------------------------------------------------- /src/lib/ts/types/tab.type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable ts/no-explicit-any */ 2 | import type { ComponentType } from 'svelte'; 3 | 4 | export type TTab = { 5 | value: string; 6 | label: string; 7 | icon?: ComponentType; 8 | content: Promise; 9 | disabled?: boolean; 10 | }; 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = tab 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface Platform {} 9 | } 10 | } 11 | 12 | export {}; 13 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | export default { 3 | plugins: { 4 | 'postcss-import': {}, 5 | 'tailwindcss/nesting': {}, 6 | tailwindcss: {}, 7 | autoprefixer: {}, 8 | ...(import.meta.env?.MODE === 'production' && { cssnano: { preset: 'advanced' } }) 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/lib/components/screen-watcher/screen-watcher.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/lib/components/ui/form/form-button.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/lib/components/ui/avatar/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './avatar.svelte'; 2 | import Image from './avatar-image.svelte'; 3 | import Fallback from './avatar-fallback.svelte'; 4 | 5 | export { 6 | Root, 7 | Image, 8 | Fallback, 9 | // 10 | Root as Avatar, 11 | Image as AvatarImage, 12 | Fallback as AvatarFallback 13 | }; 14 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-svelte.com/schema.json", 3 | "aliases": { 4 | "components": "$lib/components", 5 | "utils": "$lib/utils/ui" 6 | }, 7 | "style": "default", 8 | "tailwind": { 9 | "baseColor": "stone", 10 | "config": "tailwind.config.js", 11 | "css": "src/lib/styles/app.pcss" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %sveltekit.head% 7 | 8 | 9 |
%sveltekit.body%
10 | 11 | 12 | -------------------------------------------------------------------------------- /src/lib/components/ui/breadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './breadcrumb.svelte'; 2 | import Item from './breadcrumb-item.svelte'; 3 | import Separator from './breadcrumb-separator.svelte'; 4 | 5 | export { 6 | Root, 7 | Item, 8 | Separator, 9 | // 10 | Root as Breadcrumb, 11 | Item as BreadcrumbItem, 12 | Separator as BreadcrumbSeparator 13 | }; 14 | -------------------------------------------------------------------------------- /src/lib/components/ui/resizable/index.ts: -------------------------------------------------------------------------------- 1 | import { Pane } from 'paneforge'; 2 | import Handle from './resizable-handle.svelte'; 3 | import PaneGroup from './resizable-pane-group.svelte'; 4 | 5 | export { 6 | PaneGroup, 7 | Pane, 8 | Handle, 9 | // 10 | PaneGroup as ResizablePaneGroup, 11 | Pane as ResizablePane, 12 | Handle as ResizableHandle 13 | }; 14 | -------------------------------------------------------------------------------- /src/lib/components/ui/popover/index.ts: -------------------------------------------------------------------------------- 1 | import { Popover as PopoverPrimitive } from 'bits-ui'; 2 | import Content from './popover-content.svelte'; 3 | const Root = PopoverPrimitive.Root; 4 | const Trigger = PopoverPrimitive.Trigger; 5 | 6 | export { 7 | Root, 8 | Content, 9 | Trigger, 10 | // 11 | Root as Popover, 12 | Content as PopoverContent, 13 | Trigger as PopoverTrigger 14 | }; 15 | -------------------------------------------------------------------------------- /src/lib/components/ui/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | import { Tooltip as TooltipPrimitive } from 'bits-ui'; 2 | import Content from './tooltip-content.svelte'; 3 | 4 | const Root = TooltipPrimitive.Root; 5 | const Trigger = TooltipPrimitive.Trigger; 6 | 7 | export { 8 | Root, 9 | Trigger, 10 | Content, 11 | // 12 | Root as Tooltip, 13 | Content as TooltipContent, 14 | Trigger as TooltipTrigger 15 | }; 16 | -------------------------------------------------------------------------------- /src/lib/constants/breakpoints/breakpoints.constant.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines the breakpoints map. 3 | * The keys represent the breakpoint names, and the values represent the breakpoint sizes. 4 | */ 5 | export const BREAKPOINTS = { 6 | sm: 640, 7 | md: 768, 8 | lg: 1024, 9 | xl: 1280 10 | } as const satisfies Record; 11 | 12 | export type TBreakpoint = keyof typeof BREAKPOINTS; 13 | -------------------------------------------------------------------------------- /src/lib/styles/view-transition.pcss: -------------------------------------------------------------------------------- 1 | ::view-transition-old(root), 2 | ::view-transition-new(root) { 3 | animation-duration: 150ms; 4 | animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 5 | } 6 | 7 | @media (prefers-reduced-motion) { 8 | ::view-transition-group(root), 9 | ::view-transition-old(root), 10 | ::view-transition-new(root) { 11 | animation: none !important; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/lib/components/ui/radio-group/index.ts: -------------------------------------------------------------------------------- 1 | import { RadioGroup as RadioGroupPrimitive } from 'bits-ui'; 2 | 3 | import Root from './radio-group.svelte'; 4 | import Item from './radio-group-item.svelte'; 5 | const Input = RadioGroupPrimitive.Input; 6 | 7 | export { 8 | Root, 9 | Input, 10 | Item, 11 | // 12 | Root as RadioGroup, 13 | Input as RadioGroupInput, 14 | Item as RadioGroupItem 15 | }; 16 | -------------------------------------------------------------------------------- /src/lib/components/ui/context-menu/context-menu-radio-group.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/lib/components/ui/hover-card/index.ts: -------------------------------------------------------------------------------- 1 | import { LinkPreview as HoverCardPrimitive } from 'bits-ui'; 2 | 3 | import Content from './hover-card-content.svelte'; 4 | const Root = HoverCardPrimitive.Root; 5 | const Trigger = HoverCardPrimitive.Trigger; 6 | 7 | export { 8 | Root, 9 | Content, 10 | Trigger, 11 | Root as HoverCard, 12 | Content as HoverCardContent, 13 | Trigger as HoverCardTrigger 14 | }; 15 | -------------------------------------------------------------------------------- /src/lib/schemas/file-upload/file-upload.schema.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const FileUploadSchema = z.object({ 4 | file: z 5 | .instanceof(File, { message: 'Please upload a file' }) 6 | .refine((f) => f.size < 2_000_000, 'File size must be less than 2MB') 7 | }); 8 | 9 | export type TFileUploadSchema = typeof FileUploadSchema; 10 | export type TFileUploadInfer = z.infer; 11 | -------------------------------------------------------------------------------- /src/lib/components/metadata/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Metadata } from './metadata.svelte'; 2 | 3 | export type TMetadata = Partial & { 4 | title: string; 5 | }; 6 | 7 | export type TMetadataConfig = { 8 | name: string; 9 | description: string; 10 | url: string; 11 | author: string; 12 | keywords: string; 13 | ogImage: string; 14 | ogType: string; 15 | links: Record; 16 | }; 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/card-content.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/lib/components/ui/form/form-join.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | 12 |
13 | -------------------------------------------------------------------------------- /src/lib/components/ui/collapsible/index.ts: -------------------------------------------------------------------------------- 1 | import { Collapsible as CollapsiblePrimitive } from 'bits-ui'; 2 | import Content from './collapsible-content.svelte'; 3 | 4 | const Root = CollapsiblePrimitive.Root; 5 | const Trigger = CollapsiblePrimitive.Trigger; 6 | 7 | export { 8 | Root, 9 | Content, 10 | Trigger, 11 | // 12 | Root as Collapsible, 13 | Content as CollapsibleContent, 14 | Trigger as CollapsibleTrigger 15 | }; 16 | -------------------------------------------------------------------------------- /src/lib/components/ui/sidenav/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './sidenav.svelte'; 2 | import Content from './sidenav-content.svelte'; 3 | import Nav from './sidenav-nav.svelte'; 4 | import { Separator } from '$lib/components/ui/separator'; 5 | 6 | export { 7 | Root, 8 | Content, 9 | Nav, 10 | Separator, 11 | // 12 | Root as Sidenav, 13 | Content as SidenavContent, 14 | Nav as SidenavNav, 15 | Separator as SidenavSeparator 16 | }; 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/card-footer.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/card-header.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/select/select-separator.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert/alert-description.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/card-description.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |

12 | 13 |

14 | -------------------------------------------------------------------------------- /src/lib/constants/links/links.constant.ts: -------------------------------------------------------------------------------- 1 | import type { HTMLAnchorAttributes } from 'svelte/elements'; 2 | 3 | export type TLink = HTMLAnchorAttributes; 4 | 5 | /** 6 | * Represents a collection of links. 7 | */ 8 | export const LINKS = { 9 | github: { 10 | title: 'GitHub', 11 | href: 'https://github.com/gustavomorinaga/copyscotch', 12 | target: '_blank', 13 | rel: 'noopener noreferrer' 14 | } 15 | } satisfies Record; 16 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-save-as/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TRESTRequestInfer } from '$lib/schemas/rest'; 3 | 4 | export type TSaveAsDialogStore = { 5 | open: boolean; 6 | request?: TRESTRequestInfer; 7 | onSave?: () => void; 8 | }; 9 | 10 | export const dialogSaveAsStore = writable({ 11 | open: false, 12 | request: undefined, 13 | onSave: undefined 14 | }); 15 | -------------------------------------------------------------------------------- /src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | {#await executeParallel([setRESTContext, setRESTTabContext])} 9 | 10 | {:then} 11 | 12 | {/await} 13 | -------------------------------------------------------------------------------- /src/lib/components/ui/sidenav/sidenav-content.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/sidenav/sidenav-nav.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /src/lib/components/ui/tabs/index.ts: -------------------------------------------------------------------------------- 1 | import { Tabs as TabsPrimitive } from 'bits-ui'; 2 | import Content from './tabs-content.svelte'; 3 | import List from './tabs-list.svelte'; 4 | import Trigger from './tabs-trigger.svelte'; 5 | 6 | const Root = TabsPrimitive.Root; 7 | 8 | export { 9 | Root, 10 | Content, 11 | List, 12 | Trigger, 13 | // 14 | Root as Tabs, 15 | Content as TabsContent, 16 | List as TabsList, 17 | Trigger as TabsTrigger 18 | }; 19 | -------------------------------------------------------------------------------- /src/lib/components/view-transition/view-transition.svelte: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/alert-dialogs/alert-dialog-request-deletion/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TRESTRequestInfer } from '$lib/schemas/rest'; 3 | 4 | export type TRequestDeletionDialogStore = { 5 | open: boolean; 6 | requestID?: TRESTRequestInfer['id']; 7 | }; 8 | 9 | export const alertDialogRequestDeletionStore = writable({ 10 | open: false, 11 | requestID: undefined 12 | }); 13 | -------------------------------------------------------------------------------- /src/lib/components/ui/dialog/dialog-header.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/shortcut/shortcut.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], 7 | "overrides": [ 8 | { 9 | "files": "*.svelte", 10 | "options": { 11 | "parser": "svelte", 12 | "svelteIndentScriptAndStyle": true, 13 | "svelteStrictMode": false, 14 | "svelteSortOrder": "scripts-markup-styles-options" 15 | } 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-header.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/card.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import process from 'node:process'; 2 | import { sveltekit } from '@sveltejs/kit/vite'; 3 | import { defineConfig } from 'vite'; 4 | 5 | const isDev = process.env.NODE_ENV === 'development'; 6 | 7 | export default defineConfig({ 8 | plugins: [sveltekit()], 9 | optimizeDeps: { 10 | exclude: [ 11 | ...(isDev ? ['svelte-codemirror-editor'] : []), 12 | 'codemirror', 13 | '@codemirror/lang-html', 14 | '@codemirror/lang-json' 15 | ] 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /src/lib/components/ui/center/center.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /src/lib/components/ui/context-menu/context-menu-separator.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/alert-dialogs/alert-dialog-collection-deletion/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TRESTCollectionInfer } from '$lib/schemas/collection'; 3 | 4 | export type TCollectionDeletionDialogStore = { 5 | open: boolean; 6 | collectionID?: TRESTCollectionInfer['id']; 7 | }; 8 | 9 | export const alertDialogCollectionDeletionStore = writable({ 10 | open: false, 11 | collectionID: undefined 12 | }); 13 | -------------------------------------------------------------------------------- /src/lib/components/ui/dialog/dialog-footer.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | -------------------------------------------------------------------------------- /src/lib/components/ui/select/select-label.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /src/lib/components/ui/context-menu/context-menu-shortcut.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/dialog/dialog-title.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/layouts/shared/wrapper/wrapper.component.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /src/lib/components/ui/dialog/dialog-description.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-overlay.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/lib/components/ui/radio-group/radio-group.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/lib/components/ui/avatar/avatar-fallback.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-footer.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-nested.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/lib/components/ui/form/form-legend.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/lib/schemas/key-value/key-value.schema.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const KeyValueSchema = z.object({ 4 | key: z.string().max(100), 5 | value: z.string().max(100), 6 | active: z.boolean() 7 | }); 8 | 9 | export type TKeyValueSchema = typeof KeyValueSchema; 10 | export type TKeyValueInfer = z.infer; 11 | export type TKeyValueMapped = Record; 12 | 13 | export const DEFAULT_KEY_VALUE: TKeyValueInfer = { 14 | key: '', 15 | value: '', 16 | active: true 17 | }; 18 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-description.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/actions/scroll/scroll.action.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Enables horizontal scrolling behavior on the specified HTML element. 3 | * @param node - The HTML element to enable horizontal scrolling on. 4 | * @param velocity - The velocity of the scroll. Default is 10. 5 | */ 6 | export function horizontalScroll(node: HTMLElement, velocity = 10) { 7 | function handleScroll(event: WheelEvent) { 8 | event.preventDefault(); 9 | node.scrollLeft += event.deltaY * velocity; 10 | } 11 | 12 | node.addEventListener('wheel', handleScroll, { passive: false }); 13 | } 14 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-title.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/lib/components/ui/spinner/spinner.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /src/lib/utils/parallel/parallel.util.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable ts/no-explicit-any */ 2 | 3 | /** 4 | * Executes an array of functions in parallel and returns an array of their results. 5 | * 6 | * @param functions - An array of functions to execute in parallel. 7 | * @returns A promise that resolves to an array of the results of the executed functions. 8 | */ 9 | export function executeParallel any>(functions: Array) { 10 | return Promise.all(functions.map((fn) => new Promise>((resolve) => resolve(fn())))); 11 | } 12 | -------------------------------------------------------------------------------- /src/lib/components/ui/avatar/avatar-image.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/collapsible/collapsible-content.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-description.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-header.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 |
18 | 19 |
20 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-title.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/avatar/avatar.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/tree-collection.component.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /src/lib/components/ui/breadcrumb/breadcrumb.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 |
18 | 19 |
20 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert/alert.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /src/lib/components/ui/shortcut/shortcut-key.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/lib/constants/shortcuts/shortcuts.constant.ts: -------------------------------------------------------------------------------- 1 | export type TShortcut = { key: string; modifier: Array<'ctrl' | 'alt' | 'meta'> }; 2 | 3 | /** 4 | * Mapping of keyboard shortcuts to their corresponding key and modifier combinations. 5 | */ 6 | export const SHORTCUTS = { 7 | fullscreen: { 8 | key: 'f11', 9 | modifier: [] 10 | }, 11 | newTab: { 12 | key: 'n', 13 | modifier: ['ctrl', 'alt'] 14 | }, 15 | send: { 16 | key: 'enter', 17 | modifier: ['ctrl'] 18 | }, 19 | save: { 20 | key: 's', 21 | modifier: ['ctrl'] 22 | } 23 | } as const satisfies Record; 24 | -------------------------------------------------------------------------------- /src/lib/components/ui/form/form-description.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/lib/components/ui/badge/badge.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/lib/components/ui/label/label.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/components/ui/form/form-label.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-edit-collection/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TRESTCollectionInfer } from '$lib/schemas/collection'; 3 | 4 | export type TCollectionDialogStore = { 5 | open: boolean; 6 | parentID?: TRESTCollectionInfer['id']; 7 | collection?: TRESTCollectionInfer; 8 | mode: 'create' | 'edit'; 9 | type: 'collection' | 'folder'; 10 | }; 11 | 12 | export const dialogEditCollectionStore = writable({ 13 | open: false, 14 | parentID: undefined, 15 | collection: undefined, 16 | mode: 'create', 17 | type: 'collection' 18 | }); 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/sidenav/sidenav.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 |
17 | 18 |
19 | -------------------------------------------------------------------------------- /src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-collection/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TFileInfer, TFolderInfer } from '$lib/schemas/collection'; 3 | 4 | export type TTreeCollectionStore = { 5 | expand: boolean; 6 | collapse: boolean; 7 | selected?: TFolderInfer['id'] | TFileInfer['id']; 8 | openedFolders: Array; 9 | expandedFolders: Array; 10 | }; 11 | 12 | export const treeCollectionStore = writable({ 13 | expand: false, 14 | collapse: false, 15 | selected: undefined, 16 | openedFolders: [], 17 | expandedFolders: [] 18 | }); 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/card-title.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/components/ui/tabs/tabs-list.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert/alert-title.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/components/ui/context-menu/context-menu-label.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "resolveJsonModule": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "strict": true, 12 | "moduleResolution": "bundler" 13 | } 14 | // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias 15 | // 16 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes 17 | // from the referenced tsconfig.json - TypeScript does not merge them in 18 | } 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/tabs/tabs-content.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/components/infra/feedbacks/feedback-not-found/feedback-not-found.component.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 |
12 | 13 | 16 | Nothing found for "{term}" 17 | 18 |
19 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/dialogs/dialog-edit-request/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TRESTCollectionInfer } from '$lib/schemas/collection'; 3 | import type { TRESTRequestInfer } from '$lib/schemas/rest'; 4 | 5 | export type TRequestDialogStore = { 6 | open: boolean; 7 | mode: 'create' | 'edit'; 8 | collectionID?: TRESTCollectionInfer['id']; 9 | request?: TRESTRequestInfer; 10 | forceSave?: boolean; 11 | }; 12 | 13 | export const dialogEditRequestStore = writable({ 14 | open: false, 15 | mode: 'create', 16 | collectionID: undefined, 17 | request: undefined, 18 | forceSave: false 19 | }); 20 | -------------------------------------------------------------------------------- /src/lib/components/ui/card/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './card.svelte'; 2 | import Content from './card-content.svelte'; 3 | import Description from './card-description.svelte'; 4 | import Footer from './card-footer.svelte'; 5 | import Header from './card-header.svelte'; 6 | import Title from './card-title.svelte'; 7 | 8 | export { 9 | Root, 10 | Content, 11 | Description, 12 | Footer, 13 | Header, 14 | Title, 15 | // 16 | Root as Card, 17 | Content as CardContent, 18 | Description as CardDescription, 19 | Footer as CardFooter, 20 | Header as CardHeader, 21 | Title as CardTitle 22 | }; 23 | 24 | export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; 25 | -------------------------------------------------------------------------------- /src/lib/components/ui/breadcrumb/breadcrumb-item.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-action.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/functions/export/export.function.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable ts/no-explicit-any */ 2 | 3 | /** 4 | * Exports data as a file with the specified filename and type. 5 | * @param data - The data to be exported. 6 | * @param filename - The name of the file to be downloaded. 7 | * @param type - The MIME type of the file. 8 | */ 9 | export function exportFile(data: any, filename: string, type: string) { 10 | const blob = new Blob([data], { type }); 11 | const url = window.URL.createObjectURL(blob); 12 | const a = document.createElement('a'); 13 | a.href = url; 14 | a.download = filename; 15 | const event = new MouseEvent('click'); 16 | a.dispatchEvent(event); 17 | window.URL.revokeObjectURL(url); 18 | } 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/dialog/dialog-overlay.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 22 | -------------------------------------------------------------------------------- /src/lib/components/ui/toggle-group/index.ts: -------------------------------------------------------------------------------- 1 | import type { VariantProps } from 'tailwind-variants'; 2 | import { getContext, setContext } from 'svelte'; 3 | import Root from './toggle-group.svelte'; 4 | import Item from './toggle-group-item.svelte'; 5 | import type { toggleVariants } from '$lib/components/ui/toggle'; 6 | 7 | export type ToggleVariants = VariantProps; 8 | 9 | export function setToggleGroupCtx(props: ToggleVariants) { 10 | setContext('toggleGroup', props); 11 | } 12 | 13 | export function getToggleGroupCtx() { 14 | return getContext('toggleGroup'); 15 | } 16 | 17 | export { 18 | Root, 19 | Item, 20 | // 21 | Root as ToggleGroup, 22 | Item as ToggleGroupItem 23 | }; 24 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/lib/features/rest/components/trees/tree-select-collection/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import type { TFileInfer, TFolderInfer } from '$lib/schemas/collection'; 3 | 4 | export type TTreeSelectCollectionStore = { 5 | expand: boolean; 6 | collapse: boolean; 7 | selectedID?: TFolderInfer['id'] | TFileInfer['id']; 8 | selectedType?: 'folder' | 'file'; 9 | openedFolders: Array; 10 | expandedFolders: Array; 11 | }; 12 | 13 | export const treeSelectCollectionStore = writable({ 14 | expand: false, 15 | collapse: true, 16 | selectedID: undefined, 17 | selectedType: undefined, 18 | openedFolders: [], 19 | expandedFolders: [] 20 | }); 21 | -------------------------------------------------------------------------------- /src/lib/utils/formatter/format.util.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Formats the given number of bytes into a human-readable string representation. 3 | * @param bytes The number of bytes to format. 4 | * @param decimals The number of decimal places to include in the formatted string. Default is 2. 5 | * @returns A string representation of the formatted bytes. 6 | */ 7 | export function formatBytes(bytes: number, decimals: number): string { 8 | if (bytes === 0) return '0 B'; 9 | const k = 1024; 10 | const dm = decimals || 2; 11 | const sizes: string[] = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; 12 | const i = Math.floor(Math.log(bytes) / Math.log(k)); 13 | return `${Number.parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`; 14 | } 15 | -------------------------------------------------------------------------------- /src/lib/components/ui/resizable/resizable-pane-group.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/lib/configs/site/site.config.ts: -------------------------------------------------------------------------------- 1 | import type { TMetadataConfig } from '$lib/components/metadata'; 2 | 3 | /** 4 | * Configuration object for the site metadata. 5 | */ 6 | export const siteConfig: TMetadataConfig = { 7 | name: 'Copyscotch', 8 | url: 'https://copyscotch.vercel.app', 9 | ogImage: 'https://copyscotch.vercel.app/images/banner.png', 10 | ogType: 'website', 11 | description: 'Helps you create requests faster, saving precious time on development.', 12 | author: 'gustavomorinaga', 13 | links: { 14 | twitter: 'https://twitter.com/gustavomorinaga', 15 | github: 'https://github.com/gustavomorinaga/copyscotch' 16 | }, 17 | keywords: `API,HTTP,SPA,REST,Developer,Tools,shadcn,Svelte,SvelteKit,TailwindCSS,Melt UI,Bit UI` 18 | }; 19 | -------------------------------------------------------------------------------- /src/lib/utils/debounce/debounce.util.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable ts/no-explicit-any */ 2 | 3 | /** 4 | * Debounces a callback function, ensuring that it is only called after a specified delay 5 | * since the last time it was invoked. 6 | * 7 | * @param callback The callback function to be debounced. 8 | * @param wait The delay in milliseconds before invoking the callback function. Default is 300ms. 9 | * @returns A debounced version of the callback function. 10 | */ 11 | export function debounce(callback: (...args: Array) => void, wait = 300) { 12 | let timeout: ReturnType; 13 | 14 | return (...args: Array) => { 15 | clearTimeout(timeout); 16 | timeout = setTimeout(() => callback(...args), wait); 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 22 | -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; 3 | 4 | /** @type {import('@sveltejs/kit').Config} */ 5 | const config = { 6 | // Consult https://kit.svelte.dev/docs/integrations#preprocessors 7 | // for more information about preprocessors 8 | preprocess: vitePreprocess(), 9 | 10 | kit: { 11 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 12 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 13 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 14 | adapter: adapter() 15 | } 16 | }; 17 | 18 | export default config; 19 | -------------------------------------------------------------------------------- /src/lib/components/ui/codemirror/codemirror.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 22 | -------------------------------------------------------------------------------- /src/lib/components/ui/popover/popover-content.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/lib/components/ui/button/button.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/lib/components/ui/drawer/drawer-content.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/lib/components/ui/input/index.ts: -------------------------------------------------------------------------------- 1 | import Root from './input.svelte'; 2 | 3 | type FormInputEvent = T & { 4 | currentTarget: EventTarget & HTMLInputElement; 5 | }; 6 | export type InputEvents = { 7 | blur: FormInputEvent; 8 | change: FormInputEvent; 9 | click: FormInputEvent; 10 | focus: FormInputEvent; 11 | keydown: FormInputEvent; 12 | keypress: FormInputEvent; 13 | keyup: FormInputEvent; 14 | mouseover: FormInputEvent; 15 | mouseenter: FormInputEvent; 16 | mouseleave: FormInputEvent; 17 | paste: FormInputEvent; 18 | input: FormInputEvent; 19 | }; 20 | 21 | export { 22 | Root, 23 | // 24 | Root as Input 25 | }; 26 | -------------------------------------------------------------------------------- /src/lib/components/ui/separator/separator.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 |