stacks 0.52.10 → 0.56.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +4 -2
- package/README.md +71 -74
- package/api/nitro.config.ts +2 -2
- package/api/package.json +3 -2
- package/api/routes/index.ts +1 -1
- package/art/logo-dark.svg +11 -0
- package/art/logo.svg +11 -0
- package/auto-imports.d.ts +1186 -839
- package/components.d.ts +7 -9
- package/core/actions/build.config.ts +181 -9
- package/core/actions/package.json +6 -12
- package/core/actions/src/build/component-libs.ts +2 -12
- package/core/actions/src/clean.ts +1 -1
- package/core/actions/src/dev/index.ts +6 -14
- package/core/actions/src/generate/index.ts +2 -2
- package/core/actions/src/generate/settings.ts +3 -3
- package/core/actions/src/helpers/lib-entries.ts +47 -40
- package/core/actions/src/helpers/utils.ts +7 -9
- package/core/actions/src/lint/index.ts +14 -2
- package/core/actions/src/make.ts +8 -5
- package/core/actions/src/migrate.ts +2 -2
- package/core/actions/src/prepublish.ts +2 -2
- package/core/actions/src/release.ts +5 -3
- package/core/actions/src/seed.ts +1 -1
- package/core/actions/src/upgrade/framework.ts +29 -29
- package/core/actions/src/upgrade/index.ts +13 -15
- package/core/actions/src/upgrade/node.ts +4 -4
- package/core/actions/src/upgrade/package-manager.ts +4 -4
- package/core/actions/src/upgrade.ts +3 -3
- package/core/ai/build.config.ts +5 -7
- package/core/ai/package.json +5 -9
- package/core/alias/build.config.ts +5 -7
- package/core/alias/package.json +3 -6
- package/core/alias/src/index.ts +6 -7
- package/core/analytics/build.config.ts +5 -7
- package/core/analytics/package.json +6 -6
- package/core/arrays/build.config.ts +4 -7
- package/core/arrays/package.json +8 -4
- package/core/arrays/src/contains.ts +23 -0
- package/core/arrays/src/helpers.ts +206 -0
- package/core/arrays/src/index.ts +4 -226
- package/core/arrays/src/macro.ts +135 -0
- package/core/arrays/src/math.ts +19 -0
- package/core/auth/build.config.ts +4 -7
- package/core/auth/package.json +3 -3
- package/core/buddy/README.md +73 -76
- package/core/buddy/build.config.ts +1 -2
- package/core/buddy/package.json +4 -4
- package/core/buddy/src/cli.ts +12 -43
- package/core/buddy/src/commands/add.ts +2 -2
- package/core/buddy/src/commands/build.ts +23 -16
- package/core/buddy/src/commands/create.ts +2 -2
- package/core/buddy/src/commands/dev.ts +31 -30
- package/core/buddy/src/commands/example.ts +8 -14
- package/core/buddy/src/commands/fresh.ts +1 -1
- package/core/buddy/src/commands/generate.ts +16 -14
- package/core/buddy/src/commands/key.ts +1 -1
- package/core/buddy/src/commands/lint.ts +5 -5
- package/core/buddy/src/commands/make.ts +20 -15
- package/core/buddy/src/commands/onboarding.ts +9 -15
- package/core/buddy/src/commands/setting.ts +10 -12
- package/core/buddy/src/commands/upgrade.ts +18 -22
- package/core/buddy/src/commands/version.ts +7 -19
- package/core/buddy/src/index.ts +0 -21
- package/core/build/build.config.ts +22 -7
- package/core/build/package.json +11 -10
- package/core/build/src/desktop.ts +2 -2
- package/core/build/src/example-vue.ts +5 -4
- package/core/build/src/example-wc.ts +5 -4
- package/core/build/src/functions.ts +11 -13
- package/core/build/src/index.ts +7 -7
- package/core/build/src/stacks.ts +31 -53
- package/core/build/src/{pages.ts → views.ts} +13 -14
- package/core/build/src/vue-components.ts +73 -12
- package/core/build/src/web-components.ts +13 -12
- package/core/build/web-types.ts +3 -3
- package/core/cache/build.config.ts +7 -7
- package/core/cache/package.json +17 -17
- package/core/cache/src/drivers/redis.ts +2 -2
- package/core/cache/tests/DynamoDB.test.ts +19 -33
- package/core/chat/build.config.ts +5 -7
- package/core/chat/package.json +8 -8
- package/core/cli/build.config.ts +3 -2
- package/core/cli/package.json +3 -3
- package/core/cli/src/console.ts +75 -2
- package/core/cli/src/helpers.ts +1 -1
- package/core/cli/src/parse.ts +2 -2
- package/core/cli/src/run.ts +6 -7
- package/core/cloud/build.config.ts +4 -7
- package/core/cloud/package.json +17 -3
- package/core/cloud/src/aws/index.ts +9 -0
- package/core/cloud/src/aws/logger.ts +8 -0
- package/core/cloud/src/aws/metrics.ts +8 -0
- package/core/cloud/src/aws/stack.ts +12 -0
- package/core/cloud/src/aws/tracer.ts +3 -0
- package/core/cloud/src/index.ts +1 -1
- package/core/cloud/src/runtime/nodejs/bootstrap.ts +16 -0
- package/core/cloud/src/runtime/nodejs/build.sh +1 -0
- package/core/collections/build.config.ts +3 -7
- package/core/collections/package.json +3 -3
- package/core/config/build.config.ts +33 -33
- package/core/config/package.json +4 -4
- package/core/config/src/defaults.ts +0 -3
- package/core/config/src/stacks.ts +10 -11
- package/core/database/build.config.ts +1 -2
- package/core/database/package.json +3 -3
- package/core/database/src/factory/index.ts +2 -2
- package/core/database/src/migrations/index.ts +3 -3
- package/core/datetime/build.config.ts +1 -2
- package/core/datetime/package.json +3 -3
- package/core/datetime/src/index.ts +2 -1
- package/core/desktop/build.config.ts +2 -1
- package/core/desktop/package.json +6 -6
- package/core/development/build.config.ts +15 -8
- package/core/development/package.json +11 -5
- package/core/development/src/index.ts +2 -0
- package/core/{domains → dns}/README.md +2 -2
- package/core/dns/build.config.ts +22 -0
- package/core/{domains → dns}/package.json +13 -9
- package/core/dns/src/index.ts +18 -0
- package/core/docs/build.config.ts +1 -2
- package/core/docs/package.json +4 -4
- package/core/email/build.config.ts +1 -2
- package/core/email/package.json +15 -15
- package/core/email/src/actions/send.ts +2 -0
- package/core/email/src/drivers/emailjs.ts +1 -1
- package/core/email/src/drivers/mailgun.ts +1 -1
- package/core/email/src/drivers/mailjet.ts +2 -2
- package/core/email/src/drivers/mandrill.ts +1 -1
- package/core/email/src/drivers/netcore.ts +1 -1
- package/core/email/src/drivers/nodemailer.ts +1 -1
- package/core/email/src/drivers/postmark.ts +1 -1
- package/core/email/src/drivers/sendgrid.ts +1 -1
- package/core/email/src/tailwind.config.ts +3 -3
- package/core/error-handling/build.config.ts +7 -2
- package/core/error-handling/package.json +6 -4
- package/core/error-handling/src/index.ts +45 -0
- package/core/events/README.md +1 -1
- package/core/events/build.config.ts +1 -2
- package/core/events/package.json +3 -3
- package/core/events/src/index.ts +8 -1
- package/core/faker/build.config.ts +3 -1
- package/core/faker/package.json +4 -4
- package/core/git/build.config.ts +3 -1
- package/core/git/package.json +4 -4
- package/core/health/build.config.ts +3 -1
- package/core/health/package.json +3 -3
- package/core/lint/build.config.ts +3 -1
- package/core/lint/package.json +7 -7
- package/core/logging/build.config.ts +5 -3
- package/core/logging/package.json +6 -6
- package/core/modules/build.config.ts +10 -7
- package/core/modules/package.json +3 -3
- package/core/notifications/README.md +1 -1
- package/core/notifications/build.config.ts +2 -1
- package/core/notifications/package.json +25 -25
- package/core/notifications/src/tailwind.config.ts +1 -1
- package/core/notifications/tests/chat/Slack.test.ts +35 -35
- package/core/notifications/tests/email/Mailgun.test.ts +41 -41
- package/core/notifications/tests/email/Sendgrid.test.ts +41 -41
- package/core/notifications/tests/sms/Twilio.test.ts +38 -38
- package/core/objects/build.config.ts +15 -7
- package/core/objects/package.json +5 -4
- package/core/objects/src/index.ts +2 -1
- package/core/orm/build.config.ts +1 -2
- package/core/orm/package.json +3 -3
- package/core/pages/build.config.ts +4 -7
- package/core/pages/package.json +3 -3
- package/core/pages/src/index.ts +39 -39
- package/core/path/build.config.ts +1 -2
- package/core/path/package.json +4 -5
- package/core/path/src/index.ts +94 -65
- package/core/payments/build.config.ts +4 -7
- package/core/payments/package.json +5 -5
- package/core/push/build.config.ts +4 -7
- package/core/push/package.json +5 -5
- package/core/query-builder/build.config.ts +4 -7
- package/core/query-builder/package.json +7 -7
- package/core/queue/build.config.ts +4 -7
- package/core/queue/package.json +3 -3
- package/core/realtime/build.config.ts +4 -7
- package/core/realtime/package.json +3 -3
- package/core/realtime/src/index.ts +3 -1
- package/core/repl/README.md +53 -0
- package/core/repl/build.config.ts +12 -0
- package/core/repl/package.json +56 -0
- package/core/repl/src/index.ts +1 -0
- package/core/repl/tests/example.test.ts +7 -0
- package/core/router/build.config.ts +13 -7
- package/core/router/package.json +4 -4
- package/core/router/src/index.ts +2 -0
- package/core/scheduler/build.config.ts +4 -7
- package/core/scheduler/package.json +4 -4
- package/core/search-engine/build.config.ts +17 -7
- package/core/search-engine/package.json +4 -4
- package/core/search-engine/src/helpers.ts +1 -1
- package/core/search-engine/src/index.ts +2 -2
- package/core/security/build.config.ts +17 -7
- package/core/security/package.json +4 -3
- package/core/security/src/crypt.ts +11 -2
- package/core/server/build.config.ts +3 -7
- package/core/server/package.json +6 -5
- package/core/server/src/index.ts +2 -5
- package/core/server/src/nitro.config.ts +2 -2
- package/core/signals/README.md +2 -2
- package/core/signals/build.config.ts +4 -7
- package/core/signals/package.json +4 -4
- package/core/signals/src/index.ts +1 -1
- package/core/slug/build.config.ts +4 -7
- package/core/slug/package.json +3 -3
- package/core/slug/src/index.ts +2 -1
- package/core/sms/build.config.ts +3 -1
- package/core/sms/package.json +13 -13
- package/core/sms/src/drivers/gupshup.ts +1 -1
- package/core/sms/src/drivers/nexmo.ts +3 -2
- package/core/sms/src/drivers/plivo.ts +3 -2
- package/core/sms/src/drivers/sms77.ts +3 -2
- package/core/sms/src/drivers/sns.ts +1 -1
- package/core/sms/src/drivers/telnyx.ts +3 -2
- package/core/sms/src/drivers/termii.ts +3 -2
- package/core/sms/src/drivers/twilio.ts +3 -2
- package/core/storage/build.config.ts +3 -7
- package/core/storage/package.json +5 -5
- package/core/storage/src/index.ts +2 -24
- package/core/strings/build.config.ts +1 -2
- package/core/strings/package.json +9 -3
- package/core/strings/src/case.ts +12 -0
- package/core/strings/src/index.ts +2 -1
- package/core/strings/src/is.ts +170 -0
- package/core/strings/src/macro.ts +139 -0
- package/core/strings/src/utils.ts +10 -12
- package/core/testing/build.config.ts +3 -1
- package/core/testing/package.json +8 -8
- package/core/tinker/build.config.ts +12 -0
- package/core/tinker/package.json +15 -3
- package/core/tinker/src/index.ts +1 -0
- package/core/types/build.config.ts +17 -8
- package/core/types/package.json +25 -19
- package/core/types/src/app.ts +4 -4
- package/core/types/src/cli.ts +34 -34
- package/core/types/src/cron-jobs.ts +25 -4
- package/core/types/src/database.ts +12 -3
- package/core/types/src/errors.ts +19 -1
- package/core/types/src/events.ts +13 -5
- package/core/types/src/fs.ts +5 -0
- package/core/types/src/git.ts +1 -1
- package/core/types/src/index.ts +2 -1
- package/core/types/src/library.ts +0 -7
- package/core/types/src/model.ts +21 -8
- package/core/types/src/money.ts +3 -0
- package/core/types/src/notifications.ts +9 -7
- package/core/types/src/queue.ts +34 -0
- package/core/types/src/search-engine.ts +3 -3
- package/core/types/src/stacks.ts +1 -12
- package/core/ui/build.config.ts +5 -7
- package/core/ui/package.json +7 -7
- package/core/utils/build.config.ts +32 -7
- package/core/utils/package.json +16 -16
- package/core/utils/src/config.ts +88 -49
- package/core/utils/src/currency.ts +3 -0
- package/core/utils/src/delete.ts +1 -3
- package/core/utils/src/guards.ts +3 -3
- package/core/utils/src/helpers.ts +36 -12
- package/core/utils/src/vendors.ts +1 -0
- package/core/validation/build.config.ts +18 -8
- package/core/validation/package.json +8 -6
- package/core/validation/src/index.ts +2 -0
- package/core/validation/src/is.ts +27 -174
- package/core/validation/src/rules.ts +126 -0
- package/core/validation/src/types/env.ts +147 -0
- package/core/validation/src/types/index.ts +2 -0
- package/core/validation/src/types/money.ts +17 -0
- package/core/validation/src/validate.ts +14 -25
- package/core/vite-plugin/README.md +59 -0
- package/core/vite-plugin/build.config.ts +21 -0
- package/core/vite-plugin/package.json +51 -0
- package/core/vite-plugin/src/index.ts +23 -0
- package/core/vite-plugin/tests/example.test.ts +7 -0
- package/dictionary.txt +228 -0
- package/docs/package.json +3 -2
- package/env.d.ts +7 -0
- package/ide/jetbrains/.fleet/run.json +5 -0
- package/ide/jetbrains/.fleet/settings.json +4 -0
- package/ide/jetbrains/.idea/.gitignore +5 -0
- package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/ide/jetbrains/.idea/jsLibraryMappings.xml +6 -0
- package/ide/jetbrains/.idea/jsLinters/eslint.xml +7 -0
- package/ide/jetbrains/.idea/modules.xml +8 -0
- package/ide/jetbrains/.idea/stacks.iml +69 -0
- package/ide/jetbrains/.idea/vcs.xml +6 -0
- package/ide/jetbrains/.idea/webResources.xml +14 -0
- package/ide/jetbrains/.idea/workspace.xml +225 -0
- package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
- package/ide/jetbrains/installed.txt +4 -0
- package/ide/jetbrains/options/github-copilot.xml +5 -0
- package/ide/jetbrains/options/nodejs.xml +7 -0
- package/ide/jetbrains/options/templates.xml +124 -0
- package/ide/jetbrains/templates/JavaScript.xml +6 -0
- package/ide/jetbrains/templates/Stacks.xml +8 -0
- package/ide/vscode/.vscode/README.md +23 -0
- package/ide/vscode/.vscode/extensions.json +5 -0
- package/ide/vscode/.vscode/settings.json +111 -0
- package/ide/vscode/.vscode/stacks.code-snippets +182 -0
- package/ide/vscode/README.md +42 -0
- package/ide/vscode/logo.png +0 -0
- package/ide/vscode/package.json +64 -0
- package/{components → libs/components}/vue/main.ts +1 -1
- package/{components → libs/components}/vue/package.json +1 -1
- package/{components → libs/components}/web/package.json +1 -1
- package/libs/examples/vue/App.vue +12 -0
- package/libs/examples/vue/favicon.png +0 -0
- package/libs/examples/vue/index.html +20 -0
- package/libs/examples/web/favicon.png +0 -0
- package/libs/examples/web/index.html +13 -0
- package/libs/functions/package.json +41 -0
- package/package.json +104 -98
- package/reset.d.ts +1 -0
- package/scripts/ensure.sh +33 -0
- package/scripts/publish.sh +18 -0
- package/scripts/setup.sh +540 -0
- package/stacks/dashboard/README.md +74 -0
- package/{core/domains → stacks/dashboard}/build.config.ts +1 -1
- package/stacks/dashboard/package.json +46 -0
- package/stacks/dashboard/src/index.ts +0 -0
- package/stacks/dashboard/tests/example.test.ts +7 -0
- package/stacks/tables/README.md +109 -0
- package/stacks/tables/build.config.ts +16 -0
- package/stacks/tables/examples/vue/App.vue +12 -0
- package/stacks/tables/examples/vue/favicon.png +0 -0
- package/stacks/tables/examples/vue/index.html +20 -0
- package/stacks/tables/examples/web/favicon.png +0 -0
- package/stacks/tables/examples/web/index.html +13 -0
- package/stacks/tables/index.html +13 -0
- package/stacks/tables/package.json +57 -0
- package/stacks/tables/src/App.vue +23 -0
- package/stacks/tables/src/components/Demo.vue +84 -0
- package/stacks/tables/src/components/README.md +110 -0
- package/stacks/tables/src/components/Table.vue +342 -0
- package/stacks/tables/src/components/TableBody.vue +32 -0
- package/stacks/tables/src/components/TableCellActionItems.vue +9 -0
- package/stacks/tables/src/components/TableFilters.vue +704 -0
- package/stacks/tables/src/components/TableHead.vue +60 -0
- package/stacks/tables/src/components/TablePagination.vue +131 -0
- package/stacks/tables/src/components/TableRow.vue +73 -0
- package/stacks/tables/src/components/TableSearch.vue +39 -0
- package/stacks/tables/src/components/Tooltip.vue +10 -0
- package/stacks/tables/src/config/tables.ts +1 -0
- package/stacks/tables/src/docs/index.md +0 -0
- package/stacks/tables/src/functions/README.md +8 -0
- package/stacks/tables/src/functions/dark.ts +3 -0
- package/stacks/tables/src/functions/index.ts +2 -0
- package/stacks/tables/src/functions/table.ts +207 -0
- package/stacks/tables/src/main.ts +4 -0
- package/stacks/tables/tests/example.test.ts +7 -0
- package/stacks/tables/vite.config.ts +26 -0
- package/stacks/tinker/package.json +48 -0
- package/stacks/tinker/src/index.ts +1 -0
- package/stacks/x-ray/README.md +55 -0
- package/stacks/x-ray/build.config.ts +15 -0
- package/stacks/x-ray/index.html +13 -0
- package/stacks/x-ray/package.json +55 -0
- package/stacks/x-ray/routes/index.ts +19 -0
- package/stacks/x-ray/src/client.ts +14 -0
- package/stacks/x-ray/src/desktop/api/nitro.config.ts +19 -0
- package/stacks/x-ray/src/desktop/api/routes/api/logs.ts +7 -0
- package/stacks/x-ray/src/desktop/api/routes/api/store-logs.ts +22 -0
- package/stacks/x-ray/src/desktop/api/src/types.ts +7 -0
- package/stacks/x-ray/src/desktop/api/storage/index.ts +7 -0
- package/stacks/x-ray/src/desktop/app.vue +377 -0
- package/stacks/x-ray/src/desktop/functions/http.ts +26 -0
- package/stacks/x-ray/src/desktop/functions/types.ts +7 -0
- package/stacks/x-ray/src/desktop/main.ts +14 -0
- package/stacks/x-ray/src/desktop/modules/counter/mod.vue +44 -0
- package/stacks/x-ray/src/desktop/modules/fetcher/mod.vue +63 -0
- package/stacks/x-ray/src/desktop/plugins/unified/unified-app.ts +5 -0
- package/stacks/x-ray/src/desktop/plugins/unified/unified-styles.scss +0 -0
- package/stacks/x-ray/src/desktop/services/http.ts +45 -0
- package/stacks/x-ray/src/desktop/styles/app.scss +0 -0
- package/stacks/x-ray/src/http.ts +26 -0
- package/stacks/x-ray/src/index.ts +42 -0
- package/stacks/x-ray/src/ray.config.ts +27 -0
- package/stacks/x-ray/src/types.ts +8 -0
- package/stacks/x-ray/tests/example.test.ts +7 -0
- package/stacks.d.ts +22 -0
- package/tsconfig.json +21 -12
- package/vcs/github/CODE_OF_CONDUCT.md +83 -0
- package/vcs/github/CONTRIBUTING.md +190 -0
- package/vcs/github/EXPLANATIONS.md +41 -0
- package/vcs/github/FUNDING.yml +1 -0
- package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +62 -0
- package/vcs/github/ISSUE_TEMPLATE/config.yml +10 -0
- package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +44 -0
- package/vcs/github/SECURITY.md +70 -0
- package/vcs/github/renovate.json +5 -0
- package/vcs/github/stale.yml +14 -0
- package/vcs/github/workflows/README.md +16 -0
- package/vcs/github/workflows/ci.yml +173 -0
- package/vcs/github/workflows/export-size.yml +32 -0
- package/vcs/github/workflows/release.yml +57 -0
- package/{pages → views}/desktop/src/Cargo.lock +363 -46
- package/{pages → views}/desktop/src/Cargo.toml +2 -2
- package/views/web/main.ts +26 -0
- package/api/serverless.yml +0 -11
- package/core/actions/node_modules/.bin/markdown-it +0 -17
- package/core/actions/node_modules/.bin/unbuild +0 -17
- package/core/actions/src/generate/package-jsons.ts +0 -11
- package/core/build/entries/README.md +0 -7
- package/core/build/node_modules/.bin/unbuild +0 -17
- package/core/build/node_modules/.bin/vite +0 -17
- package/core/build/node_modules/.bin/vite-ssg +0 -17
- package/core/build/node_modules/.bin/vue-docgen-web-types +0 -17
- package/core/desktop/node_modules/.bin/tauri +0 -17
- package/core/development/node_modules/.bin/tsc +0 -17
- package/core/development/node_modules/.bin/tsserver +0 -17
- package/core/development/node_modules/.bin/tsx +0 -17
- package/core/development/node_modules/.bin/unbuild +0 -17
- package/core/docs/node_modules/.bin/vitepress +0 -17
- package/core/email/node_modules/.bin/maizzle +0 -17
- package/core/git/node_modules/.bin/bumpp +0 -17
- package/core/git/node_modules/.bin/changelogen +0 -17
- package/core/git/node_modules/.bin/commitizen +0 -17
- package/core/git/node_modules/.bin/cz +0 -17
- package/core/git/node_modules/.bin/giget +0 -17
- package/core/git/node_modules/.bin/git-cz +0 -17
- package/core/git/node_modules/.bin/simple-git-hooks +0 -17
- package/core/lint/node_modules/.bin/eslint +0 -17
- package/core/lint/node_modules/.bin/lint-staged +0 -17
- package/core/lint/node_modules/.bin/publint +0 -17
- package/core/logging/node_modules/.bin/tsc +0 -17
- package/core/logging/node_modules/.bin/tsserver +0 -17
- package/core/logging/node_modules/.bin/tsx +0 -17
- package/core/logging/node_modules/.bin/unbuild +0 -17
- package/core/notifications/node_modules/.bin/maizzle +0 -17
- package/core/server/node_modules/.bin/nitro +0 -17
- package/core/server/node_modules/.bin/nitropack +0 -17
- package/core/server/node_modules/.bin/vite +0 -17
- package/core/testing/node_modules/.bin/playwright +0 -17
- package/core/testing/node_modules/.bin/tsc +0 -17
- package/core/testing/node_modules/.bin/tsserver +0 -17
- package/core/testing/node_modules/.bin/unbuild +0 -17
- package/core/testing/node_modules/.bin/vitest +0 -17
- package/core/tinker/node_modules/.bin/tsx +0 -17
- package/core/types/node_modules/.bin/markdown-it +0 -17
- package/core/types/node_modules/.bin/vite +0 -17
- package/core/types/node_modules/.bin/vite-ssg +0 -17
- package/core/types/node_modules/.bin/vitepress +0 -17
- package/core/types/src/markdown.ts +0 -198
- package/core/ui/node_modules/.bin/vue-tsc +0 -17
- package/core/utils/node_modules/.bin/rimraf +0 -17
- package/core/utils/node_modules/.bin/semver +0 -17
- package/docs/node_modules/.bin/rimraf +0 -17
- package/docs/node_modules/.bin/vitepress +0 -17
- package/pages/web/main.ts +0 -26
- /package/core/{domains → dns}/tests/example.test.ts +0 -0
- /package/{LICENSE.md → ide/vscode/LICENSE.md} +0 -0
- /package/{components → libs/components}/vue/index.html +0 -0
- /package/{core/domains/src → stacks/tables/src/cli}/index.ts +0 -0
- /package/{pages → views}/desktop/.gitignore +0 -0
- /package/{pages → views}/desktop/README.md +0 -0
- /package/{pages → views}/desktop/index.html +0 -0
- /package/{pages → views}/desktop/package.json +0 -0
- /package/{pages → views}/desktop/public/favicon.svg +0 -0
- /package/{pages → views}/desktop/src/.gitignore +0 -0
- /package/{pages → views}/desktop/src/build.rs +0 -0
- /package/{pages → views}/desktop/src/icons/128x128.png +0 -0
- /package/{pages → views}/desktop/src/icons/128x128@2x.png +0 -0
- /package/{pages → views}/desktop/src/icons/32x32.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square107x107Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square142x142Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square150x150Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square284x284Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square30x30Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square310x310Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square44x44Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square71x71Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/Square89x89Logo.png +0 -0
- /package/{pages → views}/desktop/src/icons/StoreLogo.png +0 -0
- /package/{pages → views}/desktop/src/icons/icon.icns +0 -0
- /package/{pages → views}/desktop/src/icons/icon.ico +0 -0
- /package/{pages → views}/desktop/src/icons/icon.png +0 -0
- /package/{pages → views}/desktop/src/src/main.rs +0 -0
- /package/{pages → views}/desktop/src/tauri.conf.json +0 -0
- /package/{pages → views}/web/App.vue +0 -0
- /package/{pages → views}/web/index.html +0 -0
- /package/{pages → views}/web/public/_headers +0 -0
- /package/{pages → views}/web/public/favicon-dark.svg +0 -0
- /package/{pages → views}/web/public/favicon.svg +0 -0
- /package/{pages → views}/web/public/pwa-192x192.png +0 -0
- /package/{pages → views}/web/public/pwa-512x512.png +0 -0
- /package/{pages → views}/web/public/safari-pinned-tab.svg +0 -0
- /package/{pages → views}/web/styles/main.css +0 -0
- /package/{pages → views}/web/styles/markdown.css +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
<!-- <script setup lang="ts">
|
|
2
|
+
import { isString } from '@stacksjs/utils'
|
|
3
|
+
import type { Hits, SearchResponse } from '@stacksjs/types'
|
|
4
|
+
import { useTable } from '../functions/table'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
type: string // the Meilisearch index you would like to use for this table
|
|
8
|
+
columns: string | string[] // used as table heads/column titles
|
|
9
|
+
source?: string // optional: the Meilisearch host name/address (defaults: http://127.0.0.1:7700)
|
|
10
|
+
password?: string // optional: the Meilisearch password (defaults: '')
|
|
11
|
+
searchable?: string | boolean // optional: determines whether the table displays the search bar (defaults: true)
|
|
12
|
+
query?: string // optional: the "query" (= search input) used to search the table (defaults: '')
|
|
13
|
+
sortable?: string | boolean // optional: determines whether the table displays the "table head"-sorts (defaults: true)
|
|
14
|
+
sort?: string // optional: the only active sort to be applied to the table (defaults: '')
|
|
15
|
+
sorts?: string | string[] // optional: the specific type of sorts to be applied to the table (defaults: [])
|
|
16
|
+
filterable?: string | boolean // optional: determines whether the table displays the filters component (defaults: true)
|
|
17
|
+
filters?: string | string[] // optional: the specific type of filters to be displayed/utilized in the table (defaults: [])
|
|
18
|
+
actionable?: string | boolean // optional: determines whether the table displays any "action items" (defaults: true)
|
|
19
|
+
actions?: string | string[] // optional: the specific type of actions to be displayed/utilized in the table (defaults: 'Edit, Delete')
|
|
20
|
+
perPage?: string | number // optional: the number of rows (items) to be displayed per page (defaults: 10)
|
|
21
|
+
currentPage?: number // optional: the current page number (defaults: 1)
|
|
22
|
+
selectable?: string | boolean // optional: determines whether the table displays the checkboxes (defaults: true)
|
|
23
|
+
selectedRows?: number[] | string[] // optional: holds the selected rows (defaults: [])
|
|
24
|
+
selectedAll?: boolean // optional: determines whether all the rows are selected (defaults: false)
|
|
25
|
+
results?: SearchResponse<Record<string, any>> // optional: the Meilisearch search response (defaults: {})
|
|
26
|
+
hits?: Hits // optional: the Meilisearch hits (we could also name this "rows" as that would be more applicable to the "table domain" but choosing to stay in sync with Meilisearch right now until we implement for a second search engine driver)
|
|
27
|
+
// stickyHeader?: string | boolean // optional: holds the selected rows (defaults: [])
|
|
28
|
+
// stickyFooter?: string | boolean // optional: determines whether all the rows are selected (defaults: false)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
type,
|
|
33
|
+
columns,
|
|
34
|
+
source = 'http://127.0.0.1:7700',
|
|
35
|
+
password = '',
|
|
36
|
+
searchable = true,
|
|
37
|
+
query = '',
|
|
38
|
+
sortable = true,
|
|
39
|
+
sort = '',
|
|
40
|
+
sorts = [],
|
|
41
|
+
filterable = true,
|
|
42
|
+
filters = [],
|
|
43
|
+
actionable = false,
|
|
44
|
+
actions = ['Edit', 'Delete'],
|
|
45
|
+
perPage = 20,
|
|
46
|
+
selectable = true,
|
|
47
|
+
selectedRows = [],
|
|
48
|
+
selectedAll = false,
|
|
49
|
+
} = defineProps<Props>()
|
|
50
|
+
|
|
51
|
+
const parsedColumns = computed((): string[] => {
|
|
52
|
+
if (isString(columns))
|
|
53
|
+
return columns.split(',').map(col => col.trim())
|
|
54
|
+
|
|
55
|
+
return columns
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const parsedSorts = computed((): string[] => {
|
|
59
|
+
if (isString(sorts))
|
|
60
|
+
return sorts.split(',').map(col => col.trim())
|
|
61
|
+
|
|
62
|
+
return sorts
|
|
63
|
+
})
|
|
64
|
+
const parsedFilters = computed((): string[] => {
|
|
65
|
+
if (isString(filters))
|
|
66
|
+
return filters.split(',').map(col => col.trim())
|
|
67
|
+
|
|
68
|
+
return filters
|
|
69
|
+
})
|
|
70
|
+
const itemsPerPage = computed((): number => {
|
|
71
|
+
if (isString(perPage))
|
|
72
|
+
return parseInt(perPage)
|
|
73
|
+
|
|
74
|
+
return perPage
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// let's use (init) the table by passing the default state
|
|
78
|
+
const { table, search, columnName } = await useTable({
|
|
79
|
+
source,
|
|
80
|
+
password,
|
|
81
|
+
type,
|
|
82
|
+
columns: parsedColumns.value,
|
|
83
|
+
searchable,
|
|
84
|
+
query,
|
|
85
|
+
sortable,
|
|
86
|
+
sort,
|
|
87
|
+
sorts: parsedSorts.value,
|
|
88
|
+
filterable,
|
|
89
|
+
filters: parsedFilters.value,
|
|
90
|
+
actionable,
|
|
91
|
+
actions,
|
|
92
|
+
perPage: itemsPerPage.value,
|
|
93
|
+
currentPage: 1,
|
|
94
|
+
selectable: true,
|
|
95
|
+
selectedRows: [],
|
|
96
|
+
selectedAll: false,
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
// let's run the initial search upon page view/load
|
|
100
|
+
|
|
101
|
+
// console.log('running initial search')
|
|
102
|
+
const results = await search()
|
|
103
|
+
// eslint-disable-next-line no-console
|
|
104
|
+
console.log('initial search complete', results)
|
|
105
|
+
|
|
106
|
+
// now that we have the search results, let's update/set the state of the table
|
|
107
|
+
table.source = source
|
|
108
|
+
table.password = password
|
|
109
|
+
table.hits = results?.hits
|
|
110
|
+
table.type = type
|
|
111
|
+
table.columns = parsedColumns.value
|
|
112
|
+
table.searchable = searchable
|
|
113
|
+
table.query = query
|
|
114
|
+
table.filterable = filterable
|
|
115
|
+
table.filters = parsedFilters.value
|
|
116
|
+
table.sortable = sortable
|
|
117
|
+
table.sort = sort
|
|
118
|
+
table.sorts = parsedSorts.value
|
|
119
|
+
table.perPage = itemsPerPage.value
|
|
120
|
+
table.actionable = actionable
|
|
121
|
+
table.actions = actions
|
|
122
|
+
table.selectable = selectable
|
|
123
|
+
table.selectedRows = selectedRows
|
|
124
|
+
table.selectedAll = selectedAll
|
|
125
|
+
table.results = results as SearchResponse,
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<template>
|
|
129
|
+
<div class="px-4 sm:px-6 lg:px-8">
|
|
130
|
+
<div class="flex flex-col mt-8">
|
|
131
|
+
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
|
132
|
+
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
|
|
133
|
+
<div class="overflow-hidden shadow ring-black ring-1 ring-opacity-5 md:rounded-lg">
|
|
134
|
+
<table class="min-w-full divide-y divide-gray-300">
|
|
135
|
+
<TableHead />
|
|
136
|
+
<TableBody>
|
|
137
|
+
<template #action_column="rowData">
|
|
138
|
+
<slot
|
|
139
|
+
name="action_column"
|
|
140
|
+
:value="rowData.rowData"
|
|
141
|
+
/>
|
|
142
|
+
</template>
|
|
143
|
+
<template
|
|
144
|
+
v-for="(col, x) in parsedColumns"
|
|
145
|
+
:key="x"
|
|
146
|
+
#[columnName(col)]="tableBodyData"
|
|
147
|
+
>
|
|
148
|
+
<slot
|
|
149
|
+
:name="columnName(col)"
|
|
150
|
+
:value="tableBodyData.tableRowData"
|
|
151
|
+
/>
|
|
152
|
+
</template>
|
|
153
|
+
</TableBody>
|
|
154
|
+
</table>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</template>
|
|
161
|
+
|
|
162
|
+
<style>
|
|
163
|
+
/* Our reset styles - many thanks to the Tailwind Labs team for gathering many of these */
|
|
164
|
+
|
|
165
|
+
/*
|
|
166
|
+
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
167
|
+
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
*,
|
|
171
|
+
::before,
|
|
172
|
+
::after {
|
|
173
|
+
box-sizing: border-box; /* 1 */
|
|
174
|
+
border-width: 0; /* 2 */
|
|
175
|
+
border-style: solid; /* 2 */
|
|
176
|
+
border-color: currentColor; /* 2 */
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/*
|
|
180
|
+
1. Use a consistent sensible line-height in all browsers.
|
|
181
|
+
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
182
|
+
3. Use a more readable tab size.
|
|
183
|
+
4. Use the user's configured `sans` font-family by default.
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
html {
|
|
187
|
+
line-height: 1.5; /* 1 */
|
|
188
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
189
|
+
-moz-tab-size: 4; /* 3 */
|
|
190
|
+
tab-size: 4; /* 3 */
|
|
191
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/*
|
|
195
|
+
Reset links to optimize for opt-in styling instead of opt-out.
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
a {
|
|
199
|
+
color: inherit;
|
|
200
|
+
text-decoration: inherit;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/*
|
|
204
|
+
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
|
205
|
+
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
206
|
+
3. Remove gaps between table borders by default.
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
table {
|
|
210
|
+
text-indent: 0; /* 1 */
|
|
211
|
+
border-color: inherit; /* 2 */
|
|
212
|
+
border-collapse: collapse; /* 3 */
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/*
|
|
216
|
+
1. Change the font styles in all browsers.
|
|
217
|
+
2. Remove the margin in Firefox and Safari.
|
|
218
|
+
3. Remove default padding in all browsers.
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
button,
|
|
222
|
+
input,
|
|
223
|
+
select {
|
|
224
|
+
font-family: inherit; /* 1 */
|
|
225
|
+
font-size: 100%; /* 1 */
|
|
226
|
+
font-weight: inherit; /* 1 */
|
|
227
|
+
line-height: inherit; /* 1 */
|
|
228
|
+
color: inherit; /* 1 */
|
|
229
|
+
margin: 0; /* 2 */
|
|
230
|
+
padding: 0; /* 3 */
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/*
|
|
234
|
+
Remove the inheritance of text transform in Edge and Firefox.
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
button,
|
|
238
|
+
select {
|
|
239
|
+
text-transform: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/*
|
|
243
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
244
|
+
2. Remove default button styles.
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
button,
|
|
248
|
+
[type='button'],
|
|
249
|
+
[type='submit'] {
|
|
250
|
+
-webkit-appearance: button; /* 1 */
|
|
251
|
+
background-color: transparent; /* 2 */
|
|
252
|
+
background-image: none; /* 2 */
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/*
|
|
256
|
+
Use the modern Firefox focus style for all focusable elements.
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
:-moz-focusring {
|
|
260
|
+
outline: auto;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/*
|
|
264
|
+
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
:-moz-ui-invalid {
|
|
268
|
+
box-shadow: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/*
|
|
272
|
+
Correct the cursor style of increment and decrement buttons in Safari.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
::-webkit-inner-spin-button,
|
|
276
|
+
::-webkit-outer-spin-button {
|
|
277
|
+
height: auto;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/*
|
|
281
|
+
1. Correct the odd appearance in Chrome and Safari.
|
|
282
|
+
2. Correct the outline style in Safari.
|
|
283
|
+
*/
|
|
284
|
+
|
|
285
|
+
[type='search'] {
|
|
286
|
+
-webkit-appearance: textfield; /* 1 */
|
|
287
|
+
outline-offset: -2px; /* 2 */
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/*
|
|
291
|
+
Remove the inner padding in Chrome and Safari on macOS.
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
::-webkit-search-decoration {
|
|
295
|
+
-webkit-appearance: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/*
|
|
299
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
300
|
+
2. Change font properties to `inherit` in Safari.
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
::-webkit-file-upload-button {
|
|
304
|
+
-webkit-appearance: button; /* 1 */
|
|
305
|
+
font: inherit; /* 2 */
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
Prevent resizing textareas horizontally by default.
|
|
310
|
+
*/
|
|
311
|
+
|
|
312
|
+
textarea {
|
|
313
|
+
resize: vertical;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/*
|
|
317
|
+
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
|
318
|
+
2. Set the default placeholder color to the user's configured gray 400 color.
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
input::placeholder,
|
|
322
|
+
textarea::placeholder {
|
|
323
|
+
opacity: 1; /* 1 */
|
|
324
|
+
color: #9ca3af; /* 2 */
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/*
|
|
328
|
+
Set the default cursor for buttons.
|
|
329
|
+
*/
|
|
330
|
+
|
|
331
|
+
button,
|
|
332
|
+
[role="button"] {
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/*
|
|
337
|
+
Make sure disabled buttons don't get the pointer cursor.
|
|
338
|
+
*/
|
|
339
|
+
:disabled {
|
|
340
|
+
cursor: default;
|
|
341
|
+
}
|
|
342
|
+
</style> -->
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- <script setup lang="ts">
|
|
2
|
+
// console.log('TableBody.vue')
|
|
3
|
+
|
|
4
|
+
const { table, columnName } = await useTable(),
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
8
|
+
<TableRow
|
|
9
|
+
v-for="(hit, index) in table.</script>results?.hits"
|
|
10
|
+
:key="index"
|
|
11
|
+
:index="index"
|
|
12
|
+
:hit="hit"
|
|
13
|
+
>
|
|
14
|
+
<template #action_column="rowData">
|
|
15
|
+
<slot
|
|
16
|
+
name="action_column"
|
|
17
|
+
:row-data="rowData.rowData"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
20
|
+
<template
|
|
21
|
+
v-for="(col, x) in table.columns"
|
|
22
|
+
:key="x"
|
|
23
|
+
#[columnName(col)]="tableRowData"
|
|
24
|
+
>
|
|
25
|
+
<slot
|
|
26
|
+
:name="columnName(col)"
|
|
27
|
+
:table-row-data="tableRowData.colData"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</TableRow>
|
|
31
|
+
</tbody>
|
|
32
|
+
</template> -->
|