@maizzle/framework 6.0.0-8 → 6.0.0-rc.0
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/bin/maizzle.mjs +10 -0
- package/dist/build.d.mts +19 -0
- package/dist/build.d.mts.map +1 -0
- package/dist/build.mjs +121 -0
- package/dist/build.mjs.map +1 -0
- package/dist/components/Button.vue +141 -0
- package/dist/components/Divider.vue +105 -0
- package/dist/components/NoWidows.vue +123 -0
- package/dist/components/NotOutlook.vue +17 -0
- package/dist/components/Outlook.vue +74 -0
- package/dist/components/Spacer.vue +36 -0
- package/dist/components/Vml.vue +89 -0
- package/dist/components/WithUrl.vue +190 -0
- package/dist/components/utils.d.mts +5 -0
- package/dist/components/utils.d.mts.map +1 -0
- package/dist/components/utils.mjs +9 -0
- package/dist/components/utils.mjs.map +1 -0
- package/dist/components/utils.ts +6 -0
- package/dist/composables/defineConfig.d.mts +14 -0
- package/dist/composables/defineConfig.d.mts.map +1 -0
- package/dist/composables/defineConfig.mjs +34 -0
- package/dist/composables/defineConfig.mjs.map +1 -0
- package/dist/composables/renderContext.d.mts +19 -0
- package/dist/composables/renderContext.d.mts.map +1 -0
- package/dist/composables/renderContext.mjs +6 -0
- package/dist/composables/renderContext.mjs.map +1 -0
- package/dist/composables/useConfig.d.mts +9 -0
- package/dist/composables/useConfig.d.mts.map +1 -0
- package/dist/composables/useConfig.mjs +13 -0
- package/dist/composables/useConfig.mjs.map +1 -0
- package/dist/composables/useDoctype.d.mts +13 -0
- package/dist/composables/useDoctype.d.mts.map +1 -0
- package/dist/composables/useDoctype.mjs +20 -0
- package/dist/composables/useDoctype.mjs.map +1 -0
- package/dist/composables/useEvent.d.mts +17 -0
- package/dist/composables/useEvent.d.mts.map +1 -0
- package/dist/composables/useEvent.mjs +25 -0
- package/dist/composables/useEvent.mjs.map +1 -0
- package/dist/composables/usePlaintext.d.mts +19 -0
- package/dist/composables/usePlaintext.d.mts.map +1 -0
- package/dist/composables/usePlaintext.mjs +22 -0
- package/dist/composables/usePlaintext.mjs.map +1 -0
- package/dist/config/defaults.d.mts +6 -0
- package/dist/config/defaults.d.mts.map +1 -0
- package/dist/config/defaults.mjs +28 -0
- package/dist/config/defaults.mjs.map +1 -0
- package/dist/config/index.d.mts +15 -0
- package/dist/config/index.d.mts.map +1 -0
- package/dist/config/index.mjs +47 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/events/index.d.mts +91 -0
- package/dist/events/index.d.mts.map +1 -0
- package/dist/events/index.mjs +110 -0
- package/dist/events/index.mjs.map +1 -0
- package/dist/index.d.mts +29 -0
- package/dist/index.mjs +29 -0
- package/dist/plaintext.d.mts +5 -0
- package/dist/plaintext.d.mts.map +1 -0
- package/dist/plaintext.mjs +15 -0
- package/dist/plaintext.mjs.map +1 -0
- package/dist/plugin.d.mts +17 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +41 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/plugins/postcss/mergeMediaQueries.d.mts +18 -0
- package/dist/plugins/postcss/mergeMediaQueries.d.mts.map +1 -0
- package/dist/plugins/postcss/mergeMediaQueries.mjs +22 -0
- package/dist/plugins/postcss/mergeMediaQueries.mjs.map +1 -0
- package/dist/plugins/postcss/pruneVars.d.mts +8 -0
- package/dist/plugins/postcss/pruneVars.d.mts.map +1 -0
- package/dist/plugins/postcss/pruneVars.mjs +49 -0
- package/dist/plugins/postcss/pruneVars.mjs.map +1 -0
- package/dist/plugins/postcss/removeDeclarations.d.mts +12 -0
- package/dist/plugins/postcss/removeDeclarations.d.mts.map +1 -0
- package/dist/plugins/postcss/removeDeclarations.mjs +45 -0
- package/dist/plugins/postcss/removeDeclarations.mjs.map +1 -0
- package/dist/plugins/postcss/tailwindCleanup.d.mts +18 -0
- package/dist/plugins/postcss/tailwindCleanup.d.mts.map +1 -0
- package/dist/plugins/postcss/tailwindCleanup.mjs +35 -0
- package/dist/plugins/postcss/tailwindCleanup.mjs.map +1 -0
- package/dist/render/createRenderer.d.mts +34 -0
- package/dist/render/createRenderer.d.mts.map +1 -0
- package/dist/render/createRenderer.mjs +149 -0
- package/dist/render/createRenderer.mjs.map +1 -0
- package/dist/render/index.d.mts +26 -0
- package/dist/render/index.d.mts.map +1 -0
- package/dist/render/index.mjs +40 -0
- package/dist/render/index.mjs.map +1 -0
- package/dist/serve.d.mts +25 -0
- package/dist/serve.d.mts.map +1 -0
- package/dist/serve.mjs +402 -0
- package/dist/serve.mjs.map +1 -0
- package/dist/server/compatibility.d.mts +6 -0
- package/dist/server/compatibility.d.mts.map +1 -0
- package/dist/server/compatibility.mjs +83 -0
- package/dist/server/compatibility.mjs.map +1 -0
- package/dist/server/linter.d.mts +6 -0
- package/dist/server/linter.d.mts.map +1 -0
- package/dist/server/linter.mjs +200 -0
- package/dist/server/linter.mjs.map +1 -0
- package/dist/server/ui/App.vue +360 -0
- package/dist/server/ui/components/ui/button/Button.vue +31 -0
- package/dist/server/ui/components/ui/button/index.ts +38 -0
- package/dist/server/ui/components/ui/command/Command.vue +87 -0
- package/dist/server/ui/components/ui/command/CommandDialog.vue +31 -0
- package/dist/server/ui/components/ui/command/CommandEmpty.vue +27 -0
- package/dist/server/ui/components/ui/command/CommandGroup.vue +45 -0
- package/dist/server/ui/components/ui/command/CommandInput.vue +39 -0
- package/dist/server/ui/components/ui/command/CommandItem.vue +76 -0
- package/dist/server/ui/components/ui/command/CommandList.vue +25 -0
- package/dist/server/ui/components/ui/command/CommandSeparator.vue +21 -0
- package/dist/server/ui/components/ui/command/CommandShortcut.vue +17 -0
- package/dist/server/ui/components/ui/command/index.ts +25 -0
- package/dist/server/ui/components/ui/dialog/Dialog.vue +19 -0
- package/dist/server/ui/components/ui/dialog/DialogClose.vue +15 -0
- package/dist/server/ui/components/ui/dialog/DialogContent.vue +53 -0
- package/dist/server/ui/components/ui/dialog/DialogDescription.vue +23 -0
- package/dist/server/ui/components/ui/dialog/DialogFooter.vue +27 -0
- package/dist/server/ui/components/ui/dialog/DialogHeader.vue +17 -0
- package/dist/server/ui/components/ui/dialog/DialogOverlay.vue +21 -0
- package/dist/server/ui/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/dist/server/ui/components/ui/dialog/DialogTitle.vue +23 -0
- package/dist/server/ui/components/ui/dialog/DialogTrigger.vue +15 -0
- package/dist/server/ui/components/ui/dialog/index.ts +10 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/dist/server/ui/components/ui/dropdown-menu/index.ts +16 -0
- package/dist/server/ui/components/ui/empty/Empty.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyContent.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyDescription.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyHeader.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyMedia.vue +21 -0
- package/dist/server/ui/components/ui/empty/EmptyTitle.vue +17 -0
- package/dist/server/ui/components/ui/empty/index.ts +26 -0
- package/dist/server/ui/components/ui/input/Input.vue +33 -0
- package/dist/server/ui/components/ui/input/index.ts +1 -0
- package/dist/server/ui/components/ui/kbd/Kbd.vue +20 -0
- package/dist/server/ui/components/ui/kbd/KbdGroup.vue +17 -0
- package/dist/server/ui/components/ui/kbd/index.ts +2 -0
- package/dist/server/ui/components/ui/resizable/ResizableHandle.vue +30 -0
- package/dist/server/ui/components/ui/resizable/ResizablePanel.vue +21 -0
- package/dist/server/ui/components/ui/resizable/ResizablePanelGroup.vue +25 -0
- package/dist/server/ui/components/ui/resizable/index.ts +3 -0
- package/dist/server/ui/components/ui/scroll-area/ScrollArea.vue +33 -0
- package/dist/server/ui/components/ui/scroll-area/ScrollBar.vue +32 -0
- package/dist/server/ui/components/ui/scroll-area/index.ts +2 -0
- package/dist/server/ui/components/ui/separator/Separator.vue +29 -0
- package/dist/server/ui/components/ui/separator/index.ts +1 -0
- package/dist/server/ui/components/ui/sheet/Sheet.vue +19 -0
- package/dist/server/ui/components/ui/sheet/SheetClose.vue +15 -0
- package/dist/server/ui/components/ui/sheet/SheetContent.vue +62 -0
- package/dist/server/ui/components/ui/sheet/SheetDescription.vue +21 -0
- package/dist/server/ui/components/ui/sheet/SheetFooter.vue +16 -0
- package/dist/server/ui/components/ui/sheet/SheetHeader.vue +15 -0
- package/dist/server/ui/components/ui/sheet/SheetOverlay.vue +21 -0
- package/dist/server/ui/components/ui/sheet/SheetTitle.vue +21 -0
- package/dist/server/ui/components/ui/sheet/SheetTrigger.vue +15 -0
- package/dist/server/ui/components/ui/sheet/index.ts +8 -0
- package/dist/server/ui/components/ui/sidebar/Sidebar.vue +96 -0
- package/dist/server/ui/components/ui/sidebar/SidebarContent.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
- package/dist/server/ui/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarInput.vue +31 -0
- package/dist/server/ui/components/ui/sidebar/SidebarInset.vue +21 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuAction.vue +35 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuBadge.vue +26 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuButton.vue +48 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuButtonChild.vue +36 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSkeleton.vue +35 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSub.vue +22 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarProvider.vue +82 -0
- package/dist/server/ui/components/ui/sidebar/SidebarRail.vue +33 -0
- package/dist/server/ui/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +28 -0
- package/dist/server/ui/components/ui/sidebar/index.ts +60 -0
- package/dist/server/ui/components/ui/sidebar/utils.ts +19 -0
- package/dist/server/ui/components/ui/skeleton/Skeleton.vue +17 -0
- package/dist/server/ui/components/ui/skeleton/index.ts +1 -0
- package/dist/server/ui/components/ui/tabs/Tabs.vue +24 -0
- package/dist/server/ui/components/ui/tabs/TabsContent.vue +21 -0
- package/dist/server/ui/components/ui/tabs/TabsList.vue +24 -0
- package/dist/server/ui/components/ui/tabs/TabsTrigger.vue +26 -0
- package/dist/server/ui/components/ui/tabs/index.ts +4 -0
- package/dist/server/ui/components/ui/toggle/Toggle.vue +35 -0
- package/dist/server/ui/components/ui/toggle/index.ts +28 -0
- package/dist/server/ui/components/ui/toggle-group/ToggleGroup.vue +49 -0
- package/dist/server/ui/components/ui/toggle-group/ToggleGroupItem.vue +46 -0
- package/dist/server/ui/components/ui/toggle-group/index.ts +2 -0
- package/dist/server/ui/components/ui/tooltip/Tooltip.vue +19 -0
- package/dist/server/ui/components/ui/tooltip/TooltipContent.vue +34 -0
- package/dist/server/ui/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/dist/server/ui/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/dist/server/ui/components/ui/tooltip/index.ts +4 -0
- package/dist/server/ui/favicon.svg +1 -0
- package/dist/server/ui/index.html +13 -0
- package/dist/server/ui/lib/utils.ts +7 -0
- package/dist/server/ui/logo-gradient.svg +1 -0
- package/dist/server/ui/logo.svg +1 -0
- package/dist/server/ui/main.css +129 -0
- package/dist/server/ui/main.ts +16 -0
- package/dist/server/ui/mark-gradient.svg +1 -0
- package/dist/server/ui/mark.svg +1 -0
- package/dist/server/ui/pages/Home.vue +39 -0
- package/dist/server/ui/pages/Preview.vue +609 -0
- package/dist/server/ui/stripes.svg +174 -0
- package/dist/transformers/addAttributes.d.mts +32 -0
- package/dist/transformers/addAttributes.d.mts.map +1 -0
- package/dist/transformers/addAttributes.mjs +101 -0
- package/dist/transformers/addAttributes.mjs.map +1 -0
- package/dist/transformers/attributeToStyle.d.mts +25 -0
- package/dist/transformers/attributeToStyle.d.mts.map +1 -0
- package/dist/transformers/attributeToStyle.mjs +80 -0
- package/dist/transformers/attributeToStyle.mjs.map +1 -0
- package/dist/transformers/base.d.mts +8 -0
- package/dist/transformers/base.d.mts.map +1 -0
- package/dist/transformers/base.mjs +160 -0
- package/dist/transformers/base.mjs.map +1 -0
- package/dist/transformers/entities.d.mts +8 -0
- package/dist/transformers/entities.d.mts.map +1 -0
- package/dist/transformers/entities.mjs +38 -0
- package/dist/transformers/entities.mjs.map +1 -0
- package/dist/transformers/format.d.mts +15 -0
- package/dist/transformers/format.d.mts.map +1 -0
- package/dist/transformers/format.mjs +26 -0
- package/dist/transformers/format.mjs.map +1 -0
- package/dist/transformers/index.d.mts +35 -0
- package/dist/transformers/index.d.mts.map +1 -0
- package/dist/transformers/index.mjs +73 -0
- package/dist/transformers/index.mjs.map +1 -0
- package/dist/transformers/inlineCSS.d.mts +30 -0
- package/dist/transformers/inlineCSS.d.mts.map +1 -0
- package/dist/transformers/inlineCSS.mjs +79 -0
- package/dist/transformers/inlineCSS.mjs.map +1 -0
- package/dist/transformers/inlineLink.d.mts +14 -0
- package/dist/transformers/inlineLink.d.mts.map +1 -0
- package/dist/transformers/inlineLink.mjs +76 -0
- package/dist/transformers/inlineLink.mjs.map +1 -0
- package/dist/transformers/minify.d.mts +17 -0
- package/dist/transformers/minify.d.mts.map +1 -0
- package/dist/transformers/minify.mjs +24 -0
- package/dist/transformers/minify.mjs.map +1 -0
- package/dist/transformers/purgeCSS.d.mts +23 -0
- package/dist/transformers/purgeCSS.d.mts.map +1 -0
- package/dist/transformers/purgeCSS.mjs +66 -0
- package/dist/transformers/purgeCSS.mjs.map +1 -0
- package/dist/transformers/removeAttributes.d.mts +31 -0
- package/dist/transformers/removeAttributes.d.mts.map +1 -0
- package/dist/transformers/removeAttributes.mjs +63 -0
- package/dist/transformers/removeAttributes.mjs.map +1 -0
- package/dist/transformers/replaceStrings.d.mts +16 -0
- package/dist/transformers/replaceStrings.d.mts.map +1 -0
- package/dist/transformers/replaceStrings.mjs +19 -0
- package/dist/transformers/replaceStrings.mjs.map +1 -0
- package/dist/transformers/safeClassNames.d.mts +22 -0
- package/dist/transformers/safeClassNames.d.mts.map +1 -0
- package/dist/transformers/safeClassNames.mjs +103 -0
- package/dist/transformers/safeClassNames.mjs.map +1 -0
- package/dist/transformers/shorthandCSS.d.mts +24 -0
- package/dist/transformers/shorthandCSS.d.mts.map +1 -0
- package/dist/transformers/shorthandCSS.mjs +48 -0
- package/dist/transformers/shorthandCSS.mjs.map +1 -0
- package/dist/transformers/tailwindcss.d.mts +20 -0
- package/dist/transformers/tailwindcss.d.mts.map +1 -0
- package/dist/transformers/tailwindcss.mjs +136 -0
- package/dist/transformers/tailwindcss.mjs.map +1 -0
- package/dist/transformers/urlQuery.d.mts +24 -0
- package/dist/transformers/urlQuery.d.mts.map +1 -0
- package/dist/transformers/urlQuery.mjs +65 -0
- package/dist/transformers/urlQuery.mjs.map +1 -0
- package/dist/types/config.d.mts +129 -0
- package/dist/types/config.d.mts.map +1 -0
- package/dist/types/config.mjs +1 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.mjs +1 -0
- package/dist/utils/ast/index.d.mts +4 -0
- package/dist/utils/ast/index.mjs +5 -0
- package/dist/utils/ast/parser.d.mts +7 -0
- package/dist/utils/ast/parser.d.mts.map +1 -0
- package/dist/utils/ast/parser.mjs +15 -0
- package/dist/utils/ast/parser.mjs.map +1 -0
- package/dist/utils/ast/serializer.d.mts +7 -0
- package/dist/utils/ast/serializer.d.mts.map +1 -0
- package/dist/utils/ast/serializer.mjs +13 -0
- package/dist/utils/ast/serializer.mjs.map +1 -0
- package/dist/utils/ast/walker.d.mts +7 -0
- package/dist/utils/ast/walker.d.mts.map +1 -0
- package/dist/utils/ast/walker.mjs +12 -0
- package/dist/utils/ast/walker.mjs.map +1 -0
- package/dist/utils/url.d.mts +8 -0
- package/dist/utils/url.d.mts.map +1 -0
- package/dist/utils/url.mjs +32 -0
- package/dist/utils/url.mjs.map +1 -0
- package/node_modules/@clack/core/CHANGELOG.md +257 -0
- package/node_modules/@clack/core/LICENSE +9 -0
- package/node_modules/@clack/core/README.md +22 -0
- package/node_modules/@clack/core/dist/index.cjs +15 -0
- package/node_modules/@clack/core/dist/index.cjs.map +1 -0
- package/node_modules/@clack/core/dist/index.d.cts +211 -0
- package/node_modules/@clack/core/dist/index.d.mts +211 -0
- package/node_modules/@clack/core/dist/index.d.ts +211 -0
- package/node_modules/@clack/core/dist/index.mjs +15 -0
- package/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/node_modules/@clack/core/package.json +62 -0
- package/node_modules/@clack/prompts/CHANGELOG.md +412 -0
- package/node_modules/@clack/prompts/LICENSE +9 -0
- package/node_modules/@clack/prompts/README.md +207 -0
- package/node_modules/@clack/prompts/dist/index.cjs +87 -0
- package/node_modules/@clack/prompts/dist/index.cjs.map +1 -0
- package/node_modules/@clack/prompts/dist/index.d.cts +165 -0
- package/node_modules/@clack/prompts/dist/index.d.mts +165 -0
- package/node_modules/@clack/prompts/dist/index.d.ts +165 -0
- package/node_modules/@clack/prompts/dist/index.mjs +87 -0
- package/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
- package/node_modules/@clack/prompts/package.json +61 -0
- package/node_modules/@maizzle/cli/LICENSE +21 -0
- package/node_modules/@maizzle/cli/README.md +58 -0
- package/node_modules/@maizzle/cli/dist/commands/make/component.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/component.mjs +31 -0
- package/node_modules/@maizzle/cli/dist/commands/make/config.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/config.mjs +21 -0
- package/node_modules/@maizzle/cli/dist/commands/make/layout.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/layout.mjs +31 -0
- package/node_modules/@maizzle/cli/dist/commands/make/scaffold.d.mts +5 -0
- package/node_modules/@maizzle/cli/dist/commands/make/scaffold.mjs +28 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/component.vue +9 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/config.ts +9 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/layout.vue +39 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/template.vue +8 -0
- package/node_modules/@maizzle/cli/dist/commands/make/template.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/template.mjs +31 -0
- package/node_modules/@maizzle/cli/dist/index.d.mts +8 -0
- package/node_modules/@maizzle/cli/dist/index.mjs +42 -0
- package/node_modules/@maizzle/cli/package.json +59 -0
- package/node_modules/citty/LICENSE +36 -0
- package/node_modules/citty/README.md +134 -0
- package/node_modules/citty/dist/index.cjs +475 -0
- package/node_modules/citty/dist/index.d.cts +80 -0
- package/node_modules/citty/dist/index.d.mts +80 -0
- package/node_modules/citty/dist/index.d.ts +80 -0
- package/node_modules/citty/dist/index.mjs +463 -0
- package/node_modules/citty/package.json +49 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1149 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +709 -0
- package/node_modules/commander/lib/option.js +367 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/consola/LICENSE +47 -0
- package/node_modules/consola/README.md +352 -0
- package/node_modules/consola/basic.d.ts +1 -0
- package/node_modules/consola/browser.d.ts +1 -0
- package/node_modules/consola/core.d.ts +1 -0
- package/node_modules/consola/dist/basic.cjs +32 -0
- package/node_modules/consola/dist/basic.d.cts +23 -0
- package/node_modules/consola/dist/basic.d.mts +21 -0
- package/node_modules/consola/dist/basic.d.ts +23 -0
- package/node_modules/consola/dist/basic.mjs +24 -0
- package/node_modules/consola/dist/browser.cjs +84 -0
- package/node_modules/consola/dist/browser.d.cts +23 -0
- package/node_modules/consola/dist/browser.d.mts +21 -0
- package/node_modules/consola/dist/browser.d.ts +23 -0
- package/node_modules/consola/dist/browser.mjs +76 -0
- package/node_modules/consola/dist/chunks/prompt.cjs +288 -0
- package/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/node_modules/consola/dist/core.cjs +517 -0
- package/node_modules/consola/dist/core.d.cts +459 -0
- package/node_modules/consola/dist/core.d.mts +459 -0
- package/node_modules/consola/dist/core.d.ts +459 -0
- package/node_modules/consola/dist/core.mjs +512 -0
- package/node_modules/consola/dist/index.cjs +663 -0
- package/node_modules/consola/dist/index.d.cts +24 -0
- package/node_modules/consola/dist/index.d.mts +22 -0
- package/node_modules/consola/dist/index.d.ts +24 -0
- package/node_modules/consola/dist/index.mjs +651 -0
- package/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +75 -0
- package/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/node_modules/consola/dist/shared/consola.DwRq1yyg.cjs +312 -0
- package/node_modules/consola/dist/utils.cjs +64 -0
- package/node_modules/consola/dist/utils.d.cts +286 -0
- package/node_modules/consola/dist/utils.d.mts +286 -0
- package/node_modules/consola/dist/utils.d.ts +286 -0
- package/node_modules/consola/dist/utils.mjs +54 -0
- package/node_modules/consola/lib/index.cjs +10 -0
- package/node_modules/consola/package.json +136 -0
- package/node_modules/consola/utils.d.ts +1 -0
- package/node_modules/create-maizzle/README.md +86 -0
- package/node_modules/create-maizzle/bin/create-maizzle.mjs +4 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/CHANGELOG.md +340 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/LICENSE +9 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/README.md +22 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.d.mts +349 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs +11 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/package.json +60 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/CHANGELOG.md +576 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/LICENSE +9 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/README.md +270 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.d.mts +391 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs +137 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/package.json +65 -0
- package/node_modules/create-maizzle/package.json +47 -0
- package/node_modules/create-maizzle/src/index.js +242 -0
- package/node_modules/defu/LICENSE +21 -0
- package/node_modules/defu/README.md +171 -0
- package/node_modules/defu/dist/defu.cjs +77 -0
- package/node_modules/defu/dist/defu.d.cts +31 -0
- package/node_modules/defu/dist/defu.d.mts +29 -0
- package/node_modules/defu/dist/defu.d.ts +31 -0
- package/node_modules/defu/dist/defu.mjs +69 -0
- package/node_modules/defu/lib/defu.cjs +10 -0
- package/node_modules/defu/lib/defu.d.cts +12 -0
- package/node_modules/defu/package.json +48 -0
- package/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/index.js +171 -0
- package/node_modules/fast-string-truncated-width/dist/types.d.ts +22 -0
- package/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/utils.js +15 -0
- package/node_modules/fast-string-truncated-width/license +21 -0
- package/node_modules/fast-string-truncated-width/package.json +35 -0
- package/node_modules/fast-string-truncated-width/readme.md +60 -0
- package/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-width/dist/index.js +14 -0
- package/node_modules/fast-string-width/license +21 -0
- package/node_modules/fast-string-width/package.json +34 -0
- package/node_modules/fast-string-width/readme.md +45 -0
- package/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/node_modules/fast-wrap-ansi/README.md +26 -0
- package/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/node_modules/fast-wrap-ansi/lib/main.js +216 -0
- package/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
- package/node_modules/fast-wrap-ansi/package.json +51 -0
- package/node_modules/giget/LICENSE +184 -0
- package/node_modules/giget/README.md +248 -0
- package/node_modules/giget/dist/cli.mjs +112 -0
- package/node_modules/giget/dist/index.d.mts +49 -0
- package/node_modules/giget/dist/index.mjs +22 -0
- package/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +468 -0
- package/node_modules/giget/package.json +62 -0
- package/node_modules/node-fetch-native/LICENSE +114 -0
- package/node_modules/node-fetch-native/README.md +225 -0
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +2 -0
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -0
- package/node_modules/node-fetch-native/dist/index.cjs +1 -0
- package/node_modules/node-fetch-native/dist/index.mjs +1 -0
- package/node_modules/node-fetch-native/dist/native.cjs +1 -0
- package/node_modules/node-fetch-native/dist/native.mjs +1 -0
- package/node_modules/node-fetch-native/dist/node.cjs +19 -0
- package/node_modules/node-fetch-native/dist/node.mjs +19 -0
- package/node_modules/node-fetch-native/dist/polyfill.cjs +1 -0
- package/node_modules/node-fetch-native/dist/polyfill.mjs +1 -0
- package/node_modules/node-fetch-native/dist/proxy-stub.cjs +1 -0
- package/node_modules/node-fetch-native/dist/proxy-stub.mjs +1 -0
- package/node_modules/node-fetch-native/dist/proxy.cjs +58 -0
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +1 -0
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +1 -0
- package/node_modules/node-fetch-native/index.d.ts +1 -0
- package/node_modules/node-fetch-native/lib/empty.cjs +0 -0
- package/node_modules/node-fetch-native/lib/empty.mjs +0 -0
- package/node_modules/node-fetch-native/lib/index.cjs +11 -0
- package/node_modules/node-fetch-native/lib/index.d.cts +10 -0
- package/node_modules/node-fetch-native/lib/index.d.mts +10 -0
- package/node_modules/node-fetch-native/lib/index.d.ts +10 -0
- package/node_modules/node-fetch-native/lib/native.cjs +11 -0
- package/node_modules/node-fetch-native/lib/polyfill.d.cts +1 -0
- package/node_modules/node-fetch-native/lib/polyfill.d.mts +1 -0
- package/node_modules/node-fetch-native/lib/polyfill.d.ts +1 -0
- package/node_modules/node-fetch-native/lib/proxy.d.ts +32 -0
- package/node_modules/node-fetch-native/node.d.ts +1 -0
- package/node_modules/node-fetch-native/package.json +138 -0
- package/node_modules/node-fetch-native/polyfill.d.ts +1 -0
- package/node_modules/node-fetch-native/proxy.d.ts +1 -0
- package/node_modules/nypm/LICENSE +21 -0
- package/node_modules/nypm/README.md +152 -0
- package/node_modules/nypm/dist/cli.d.mts +1 -0
- package/node_modules/nypm/dist/cli.mjs +460 -0
- package/node_modules/nypm/dist/index.d.mts +209 -0
- package/node_modules/nypm/dist/index.mjs +423 -0
- package/node_modules/nypm/node_modules/citty/LICENSE +21 -0
- package/node_modules/nypm/node_modules/citty/README.md +231 -0
- package/node_modules/nypm/node_modules/citty/dist/THIRD-PARTY-LICENSES.md +33 -0
- package/node_modules/nypm/node_modules/citty/dist/_chunks/libs/scule.mjs +70 -0
- package/node_modules/nypm/node_modules/citty/dist/index.d.mts +112 -0
- package/node_modules/nypm/node_modules/citty/dist/index.mjs +425 -0
- package/node_modules/nypm/node_modules/citty/package.json +42 -0
- package/node_modules/nypm/package.json +54 -0
- package/node_modules/pathe/LICENSE +70 -0
- package/node_modules/pathe/README.md +73 -0
- package/node_modules/pathe/dist/index.cjs +39 -0
- package/node_modules/pathe/dist/index.d.cts +47 -0
- package/node_modules/pathe/dist/index.d.mts +47 -0
- package/node_modules/pathe/dist/index.d.ts +47 -0
- package/node_modules/pathe/dist/index.mjs +19 -0
- package/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs +266 -0
- package/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +249 -0
- package/node_modules/pathe/dist/utils.cjs +82 -0
- package/node_modules/pathe/dist/utils.d.cts +32 -0
- package/node_modules/pathe/dist/utils.d.mts +32 -0
- package/node_modules/pathe/dist/utils.d.ts +32 -0
- package/node_modules/pathe/dist/utils.mjs +77 -0
- package/node_modules/pathe/package.json +61 -0
- package/node_modules/pathe/utils.d.ts +1 -0
- package/node_modules/picocolors/LICENSE +15 -0
- package/node_modules/picocolors/README.md +21 -0
- package/node_modules/picocolors/package.json +25 -0
- package/node_modules/picocolors/picocolors.browser.js +4 -0
- package/node_modules/picocolors/picocolors.d.ts +5 -0
- package/node_modules/picocolors/picocolors.js +75 -0
- package/node_modules/picocolors/types.d.ts +51 -0
- package/node_modules/sisteransi/license +21 -0
- package/node_modules/sisteransi/package.json +34 -0
- package/node_modules/sisteransi/readme.md +113 -0
- package/node_modules/sisteransi/src/index.js +58 -0
- package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
- package/node_modules/tinyexec/LICENSE +21 -0
- package/node_modules/tinyexec/README.md +269 -0
- package/node_modules/tinyexec/dist/LICENSES.txt +83 -0
- package/node_modules/tinyexec/dist/main.d.mts +71 -0
- package/node_modules/tinyexec/dist/main.mjs +642 -0
- package/node_modules/tinyexec/package.json +62 -0
- package/package.json +74 -74
- package/CHANGELOG.md +0 -764
- package/bin/maizzle +0 -5
- package/src/commands/build.js +0 -348
- package/src/commands/serve.js +0 -3
- package/src/generators/plaintext.js +0 -222
- package/src/generators/render.js +0 -129
- package/src/index.js +0 -49
- package/src/posthtml/defaultComponentsConfig.js +0 -19
- package/src/posthtml/defaultConfig.js +0 -14
- package/src/posthtml/index.js +0 -102
- package/src/posthtml/plugins/combineMediaQueries.js +0 -42
- package/src/posthtml/plugins/envAttributes.js +0 -32
- package/src/posthtml/plugins/envTags.js +0 -33
- package/src/posthtml/plugins/expandLinkTag.js +0 -59
- package/src/posthtml/plugins/postcss/compileCss.js +0 -129
- package/src/posthtml/plugins/removeRawStyleAttributes.js +0 -30
- package/src/server/client.js +0 -182
- package/src/server/index.js +0 -464
- package/src/server/routes/hmr.js +0 -26
- package/src/server/routes/index.js +0 -77
- package/src/server/views/404.html +0 -59
- package/src/server/views/error.html +0 -83
- package/src/server/views/index.html +0 -172
- package/src/server/websockets.js +0 -27
- package/src/transformers/addAttributes.js +0 -29
- package/src/transformers/attributeToStyle.js +0 -90
- package/src/transformers/baseUrl.js +0 -154
- package/src/transformers/core.js +0 -32
- package/src/transformers/filters/defaultFilters.js +0 -146
- package/src/transformers/filters/index.js +0 -18
- package/src/transformers/index.js +0 -259
- package/src/transformers/inline.js +0 -306
- package/src/transformers/markdown.js +0 -26
- package/src/transformers/minify.js +0 -27
- package/src/transformers/posthtmlMso.js +0 -14
- package/src/transformers/prettify.js +0 -29
- package/src/transformers/preventWidows.js +0 -37
- package/src/transformers/purge.js +0 -56
- package/src/transformers/removeAttributes.js +0 -55
- package/src/transformers/replaceStrings.js +0 -37
- package/src/transformers/safeClassNames.js +0 -29
- package/src/transformers/shorthandCss.js +0 -20
- package/src/transformers/sixHex.js +0 -30
- package/src/transformers/template.js +0 -26
- package/src/transformers/urlParameters.js +0 -20
- package/src/transformers/useAttributeSizes.js +0 -63
- package/src/utils/getConfigByFilePath.js +0 -143
- package/src/utils/node.js +0 -68
- package/src/utils/string.js +0 -186
- package/types/build.d.ts +0 -166
- package/types/config.d.ts +0 -638
- package/types/css/combineMediaQueries.d.ts +0 -90
- package/types/css/inline.d.ts +0 -218
- package/types/css/purge.d.ts +0 -125
- package/types/events.d.ts +0 -153
- package/types/index.d.ts +0 -232
- package/types/markdown.d.ts +0 -33
- package/types/minify.d.ts +0 -138
- package/types/plaintext.d.ts +0 -56
- package/types/posthtml.d.ts +0 -162
- package/types/render.d.ts +0 -13
- package/types/urlParameters.d.ts +0 -40
- package/types/widowWords.d.ts +0 -38
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UrlConfig } from "../types/config.mjs";
|
|
2
|
+
import { ChildNode } from "domhandler";
|
|
3
|
+
|
|
4
|
+
//#region src/transformers/urlQuery.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* URL query transformer.
|
|
7
|
+
*
|
|
8
|
+
* Appends query parameters to URLs found in specified attributes of
|
|
9
|
+
* specified HTML tags.
|
|
10
|
+
*
|
|
11
|
+
* Reads config from the `config.url` object in `MaizzleConfig` (pass
|
|
12
|
+
* `config.url` directly when calling as a standalone transformer).
|
|
13
|
+
* The `_options` key inside `query` controls behaviour:
|
|
14
|
+
* - `tags` — CSS selectors for elements to process. Default: `['a']`
|
|
15
|
+
* - `attributes` — attribute names to process. Default: `['src', 'href', 'poster', 'srcset', 'background']`
|
|
16
|
+
* - `strict` — only append to absolute URLs. Default: `true`
|
|
17
|
+
* - `qs` — options forwarded to query-string. Default: `{ encode: false }`
|
|
18
|
+
*
|
|
19
|
+
* All non-`_options` keys inside `query` are treated as URL parameters to append.
|
|
20
|
+
*/
|
|
21
|
+
declare function urlQuery(dom: ChildNode[], config?: UrlConfig): ChildNode[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { urlQuery };
|
|
24
|
+
//# sourceMappingURL=urlQuery.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlQuery.d.mts","names":[],"sources":["../../src/transformers/urlQuery.ts"],"mappings":";;;;;;AA0CA;;;;;;;;;;;;;;iBAAgB,QAAA,CAAS,GAAA,EAAK,SAAA,IAAa,MAAA,GAAQ,SAAA,GAAiB,SAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { isAbsoluteUrl } from "../utils/url.mjs";
|
|
2
|
+
import queryString from "query-string";
|
|
3
|
+
import { selectAll } from "css-select";
|
|
4
|
+
|
|
5
|
+
//#region src/transformers/urlQuery.ts
|
|
6
|
+
const DEFAULT_ATTRIBUTES = [
|
|
7
|
+
"src",
|
|
8
|
+
"href",
|
|
9
|
+
"poster",
|
|
10
|
+
"srcset",
|
|
11
|
+
"background"
|
|
12
|
+
];
|
|
13
|
+
const DEFAULT_TAGS = ["a"];
|
|
14
|
+
/**
|
|
15
|
+
* Append query parameters to a URL string using query-string.
|
|
16
|
+
*/
|
|
17
|
+
function appendParams(url, params, qsOptions, strict) {
|
|
18
|
+
if (strict && !isAbsoluteUrl(url)) return url;
|
|
19
|
+
return queryString.stringifyUrl({
|
|
20
|
+
url,
|
|
21
|
+
query: params
|
|
22
|
+
}, qsOptions);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* URL query transformer.
|
|
26
|
+
*
|
|
27
|
+
* Appends query parameters to URLs found in specified attributes of
|
|
28
|
+
* specified HTML tags.
|
|
29
|
+
*
|
|
30
|
+
* Reads config from the `config.url` object in `MaizzleConfig` (pass
|
|
31
|
+
* `config.url` directly when calling as a standalone transformer).
|
|
32
|
+
* The `_options` key inside `query` controls behaviour:
|
|
33
|
+
* - `tags` — CSS selectors for elements to process. Default: `['a']`
|
|
34
|
+
* - `attributes` — attribute names to process. Default: `['src', 'href', 'poster', 'srcset', 'background']`
|
|
35
|
+
* - `strict` — only append to absolute URLs. Default: `true`
|
|
36
|
+
* - `qs` — options forwarded to query-string. Default: `{ encode: false }`
|
|
37
|
+
*
|
|
38
|
+
* All non-`_options` keys inside `query` are treated as URL parameters to append.
|
|
39
|
+
*/
|
|
40
|
+
function urlQuery(dom, config = {}) {
|
|
41
|
+
const queryConfig = config.query;
|
|
42
|
+
if (!queryConfig || Object.keys(queryConfig).length === 0) return dom;
|
|
43
|
+
const { _options, ...params } = queryConfig;
|
|
44
|
+
const options = _options ?? {};
|
|
45
|
+
if (Object.keys(params).length === 0) return dom;
|
|
46
|
+
const tags = options.tags ?? DEFAULT_TAGS;
|
|
47
|
+
const attributes = options.attributes ?? DEFAULT_ATTRIBUTES;
|
|
48
|
+
const strict = options.strict ?? true;
|
|
49
|
+
const qsOptions = {
|
|
50
|
+
encode: false,
|
|
51
|
+
...options.qs ?? {}
|
|
52
|
+
};
|
|
53
|
+
const elements = selectAll(tags.join(", "), dom);
|
|
54
|
+
for (const el of elements) for (const attr of attributes) {
|
|
55
|
+
const value = el.attribs[attr];
|
|
56
|
+
if (!value) continue;
|
|
57
|
+
const updated = appendParams(value, params, qsOptions, strict);
|
|
58
|
+
if (updated !== value) el.attribs[attr] = updated;
|
|
59
|
+
}
|
|
60
|
+
return dom;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { urlQuery };
|
|
65
|
+
//# sourceMappingURL=urlQuery.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlQuery.mjs","names":[],"sources":["../../src/transformers/urlQuery.ts"],"sourcesContent":["import queryString from 'query-string'\nimport { selectAll } from 'css-select'\nimport type { ChildNode, Element } from 'domhandler'\nimport { isAbsoluteUrl } from '../utils/url.ts'\nimport type { UrlConfig, UrlQueryOptions } from '../types/config.ts'\n\nconst DEFAULT_ATTRIBUTES = ['src', 'href', 'poster', 'srcset', 'background']\nconst DEFAULT_TAGS = ['a']\n\n/**\n * Append query parameters to a URL string using query-string.\n */\nfunction appendParams(\n url: string,\n params: Record<string, unknown>,\n qsOptions: queryString.StringifyOptions,\n strict: boolean,\n): string {\n if (strict && !isAbsoluteUrl(url)) return url\n\n return queryString.stringifyUrl(\n { url, query: params as queryString.StringifiableRecord },\n qsOptions,\n )\n}\n\n/**\n * URL query transformer.\n *\n * Appends query parameters to URLs found in specified attributes of\n * specified HTML tags.\n *\n * Reads config from the `config.url` object in `MaizzleConfig` (pass\n * `config.url` directly when calling as a standalone transformer).\n * The `_options` key inside `query` controls behaviour:\n * - `tags` — CSS selectors for elements to process. Default: `['a']`\n * - `attributes` — attribute names to process. Default: `['src', 'href', 'poster', 'srcset', 'background']`\n * - `strict` — only append to absolute URLs. Default: `true`\n * - `qs` — options forwarded to query-string. Default: `{ encode: false }`\n *\n * All non-`_options` keys inside `query` are treated as URL parameters to append.\n */\nexport function urlQuery(dom: ChildNode[], config: UrlConfig = {}): ChildNode[] {\n const queryConfig = config.query\n\n if (!queryConfig || Object.keys(queryConfig).length === 0) return dom\n\n const { _options, ...params } = queryConfig as Record<string, unknown>\n const options = (_options ?? {}) as UrlQueryOptions\n\n if (Object.keys(params).length === 0) return dom\n\n const tags = options.tags ?? DEFAULT_TAGS\n const attributes = options.attributes ?? DEFAULT_ATTRIBUTES\n const strict = options.strict ?? true\n const qsOptions: queryString.StringifyOptions = { encode: false, ...((options.qs ?? {}) as queryString.StringifyOptions) }\n\n // Use css-select to find all elements matching any of the tag selectors\n const selector = tags.join(', ')\n const elements = selectAll(selector, dom) as Element[]\n\n for (const el of elements) {\n for (const attr of attributes) {\n const value = el.attribs[attr]\n if (!value) continue\n\n const updated = appendParams(value, params, qsOptions, strict)\n if (updated !== value) {\n el.attribs[attr] = updated\n }\n }\n }\n\n return dom\n}\n"],"mappings":";;;;;AAMA,MAAM,qBAAqB;CAAC;CAAO;CAAQ;CAAU;CAAU;CAAa;AAC5E,MAAM,eAAe,CAAC,IAAI;;;;AAK1B,SAAS,aACP,KACA,QACA,WACA,QACQ;AACR,KAAI,UAAU,CAAC,cAAc,IAAI,CAAE,QAAO;AAE1C,QAAO,YAAY,aACjB;EAAE;EAAK,OAAO;EAA2C,EACzD,UACD;;;;;;;;;;;;;;;;;;AAmBH,SAAgB,SAAS,KAAkB,SAAoB,EAAE,EAAe;CAC9E,MAAM,cAAc,OAAO;AAE3B,KAAI,CAAC,eAAe,OAAO,KAAK,YAAY,CAAC,WAAW,EAAG,QAAO;CAElE,MAAM,EAAE,UAAU,GAAG,WAAW;CAChC,MAAM,UAAW,YAAY,EAAE;AAE/B,KAAI,OAAO,KAAK,OAAO,CAAC,WAAW,EAAG,QAAO;CAE7C,MAAM,OAAO,QAAQ,QAAQ;CAC7B,MAAM,aAAa,QAAQ,cAAc;CACzC,MAAM,SAAS,QAAQ,UAAU;CACjC,MAAM,YAA0C;EAAE,QAAQ;EAAO,GAAK,QAAQ,MAAM,EAAE;EAAoC;CAI1H,MAAM,WAAW,UADA,KAAK,KAAK,KAAK,EACK,IAAI;AAEzC,MAAK,MAAM,MAAM,SACf,MAAK,MAAM,QAAQ,YAAY;EAC7B,MAAM,QAAQ,GAAG,QAAQ;AACzB,MAAI,CAAC,MAAO;EAEZ,MAAM,UAAU,aAAa,OAAO,QAAQ,WAAW,OAAO;AAC9D,MAAI,YAAY,MACd,IAAG,QAAQ,QAAQ;;AAKzB,QAAO"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { RemoveValue } from "../plugins/postcss/removeDeclarations.mjs";
|
|
2
|
+
import * as oxfmt from "oxfmt";
|
|
3
|
+
import * as unplugin_vue_markdown_types0 from "unplugin-vue-markdown/types";
|
|
4
|
+
|
|
5
|
+
//#region src/types/config.d.ts
|
|
6
|
+
interface UrlQueryOptions {
|
|
7
|
+
tags?: string[];
|
|
8
|
+
attributes?: string[];
|
|
9
|
+
strict?: boolean;
|
|
10
|
+
qs?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
type UrlQuery = Record<string, unknown> & {
|
|
13
|
+
_options?: UrlQueryOptions;
|
|
14
|
+
};
|
|
15
|
+
interface UrlConfig {
|
|
16
|
+
query?: UrlQuery;
|
|
17
|
+
base?: string | {
|
|
18
|
+
url?: string;
|
|
19
|
+
tags?: string[] | Record<string, Record<string, string | boolean>>;
|
|
20
|
+
attributes?: Record<string, string>;
|
|
21
|
+
styleTag?: boolean;
|
|
22
|
+
inlineCss?: boolean;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface CssConfig {
|
|
26
|
+
base?: string;
|
|
27
|
+
purge?: boolean | Record<string, unknown>;
|
|
28
|
+
inline?: boolean | {
|
|
29
|
+
attributeToStyle?: boolean | string[];
|
|
30
|
+
removeStyleTags?: boolean;
|
|
31
|
+
removeInlinedSelectors?: boolean;
|
|
32
|
+
preferUnitlessValues?: boolean;
|
|
33
|
+
safelist?: string[];
|
|
34
|
+
styleToAttribute?: Record<string, string>;
|
|
35
|
+
applyWidthAttributes?: boolean;
|
|
36
|
+
applyHeightAttributes?: boolean;
|
|
37
|
+
widthElements?: string[];
|
|
38
|
+
heightElements?: string[];
|
|
39
|
+
excludedProperties?: string[];
|
|
40
|
+
codeBlocks?: Record<string, {
|
|
41
|
+
start: string;
|
|
42
|
+
end: string;
|
|
43
|
+
}>;
|
|
44
|
+
customCSS?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
media?: boolean | {
|
|
48
|
+
sort?: 'mobile-first' | 'desktop-first' | ((a: string, b: string) => number);
|
|
49
|
+
};
|
|
50
|
+
preferUnitless?: boolean;
|
|
51
|
+
resolveCalc?: boolean;
|
|
52
|
+
resolveProps?: boolean;
|
|
53
|
+
safe?: boolean | Record<string, string>;
|
|
54
|
+
sixHex?: boolean;
|
|
55
|
+
shorthand?: boolean | {
|
|
56
|
+
tags?: string[];
|
|
57
|
+
};
|
|
58
|
+
removeDeclarations?: Record<string, RemoveValue>;
|
|
59
|
+
exclude?: string[];
|
|
60
|
+
}
|
|
61
|
+
interface AttributesConfig {
|
|
62
|
+
add?: false | Record<string, Record<string, string | boolean | number>>;
|
|
63
|
+
remove?: Array<string | {
|
|
64
|
+
name: string;
|
|
65
|
+
value?: string | RegExp;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
type EntitiesConfig = boolean | Record<string, string>;
|
|
69
|
+
interface PostcssConfig {
|
|
70
|
+
/** Selector prefixes to strip from compiled CSS (e.g. ':host', ':lang'). */
|
|
71
|
+
removeSelectors?: string[];
|
|
72
|
+
/** At-rule names to strip from compiled CSS (e.g. '@layer', '@property'). */
|
|
73
|
+
removeAtRules?: string[];
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
interface HtmlConfig {
|
|
77
|
+
attributes?: AttributesConfig;
|
|
78
|
+
decodeEntities?: EntitiesConfig;
|
|
79
|
+
format?: boolean | oxfmt.FormatOptions;
|
|
80
|
+
minify?: boolean | Record<string, unknown>;
|
|
81
|
+
}
|
|
82
|
+
interface MaizzleConfig {
|
|
83
|
+
markdown?: unplugin_vue_markdown_types0.Options;
|
|
84
|
+
content?: string[];
|
|
85
|
+
output?: {
|
|
86
|
+
path?: string;
|
|
87
|
+
extension?: string;
|
|
88
|
+
};
|
|
89
|
+
static?: {
|
|
90
|
+
source?: string[];
|
|
91
|
+
destination?: string;
|
|
92
|
+
};
|
|
93
|
+
server?: {
|
|
94
|
+
port?: number;
|
|
95
|
+
watch?: string[];
|
|
96
|
+
};
|
|
97
|
+
css?: CssConfig;
|
|
98
|
+
plaintext?: boolean | string | Record<string, unknown>;
|
|
99
|
+
postcss?: PostcssConfig;
|
|
100
|
+
useTransformers?: boolean;
|
|
101
|
+
replaceStrings?: Record<string, string>;
|
|
102
|
+
url?: UrlConfig;
|
|
103
|
+
html?: HtmlConfig;
|
|
104
|
+
beforeCreate?: (params: {
|
|
105
|
+
config: MaizzleConfig;
|
|
106
|
+
}) => void | Promise<void>;
|
|
107
|
+
beforeRender?: (params: {
|
|
108
|
+
config: MaizzleConfig;
|
|
109
|
+
template: string;
|
|
110
|
+
}) => string | void | Promise<string | void>;
|
|
111
|
+
afterRender?: (params: {
|
|
112
|
+
config: MaizzleConfig;
|
|
113
|
+
template: string;
|
|
114
|
+
html: string;
|
|
115
|
+
}) => string | void | Promise<string | void>;
|
|
116
|
+
afterTransform?: (params: {
|
|
117
|
+
config: MaizzleConfig;
|
|
118
|
+
template: string;
|
|
119
|
+
html: string;
|
|
120
|
+
}) => string | void | Promise<string | void>;
|
|
121
|
+
afterBuild?: (params: {
|
|
122
|
+
files: string[];
|
|
123
|
+
config: MaizzleConfig;
|
|
124
|
+
}) => void | Promise<void>;
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { AttributesConfig, CssConfig, EntitiesConfig, HtmlConfig, MaizzleConfig, PostcssConfig, UrlConfig, UrlQuery, UrlQueryOptions };
|
|
129
|
+
//# sourceMappingURL=config.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;UAAiB,eAAA;EACf,IAAA;EACA,UAAA;EACA,MAAA;EACA,EAAA,GAAK,MAAA;AAAA;AAAA,KAGK,QAAA,GAAW,MAAA;EACrB,QAAA,GAAW,eAAA;AAAA;AAAA,UAGI,SAAA;EACf,KAAA,GAAQ,QAAA;EACR,IAAA;IACE,GAAA;IACA,IAAA,cAAkB,MAAA,SAAe,MAAA;IACjC,UAAA,GAAa,MAAA;IACb,QAAA;IACA,SAAA;EAAA;AAAA;AAAA,UAIa,SAAA;EACf,IAAA;EACA,KAAA,aAAkB,MAAA;EAClB,MAAA;IACE,gBAAA;IACA,eAAA;IACA,sBAAA;IACA,oBAAA;IACA,QAAA;IACA,gBAAA,GAAmB,MAAA;IACnB,oBAAA;IACA,qBAAA;IACA,aAAA;IACA,cAAA;IACA,kBAAA;IACA,UAAA,GAAa,MAAA;MAAiB,KAAA;MAAe,GAAA;IAAA;IAC7C,SAAA;IAAA,CACC,GAAA;EAAA;EAEH,KAAA;IACE,IAAA,wCAA4C,CAAA,UAAW,CAAA;EAAA;EAEzD,cAAA;EACA,WAAA;EACA,YAAA;EACA,IAAA,aAAiB,MAAA;EACjB,MAAA;EACA,SAAA;IAAwB,IAAA;EAAA;EACxB,kBAAA,GAAqB,MAAA,SAHE,WAAA;EAIvB,OAAA;AAAA;AAAA,UAGe,gBAAA;EACf,GAAA,WAAc,MAAA,SAAe,MAAA;EAC7B,MAAA,GAAS,KAAA;IAAiB,IAAA;IAAc,KAAA,YAAiB,MAAA;EAAA;AAAA;AAAA,KAG/C,cAAA,aAA2B,MAAA;AAAA,UAEtB,aAAA;EAjCb;EAmCF,eAAA;EAjCE;EAmCF,aAAA;EAAA,CACC,GAAA;AAAA;AAAA,UAGc,UAAA;EACf,UAAA,GAAa,gBAAA;EACb,cAAA,GAAiB,cAAA;EACjB,MAAA,aAD+B,KAAA,CACI,aAAA;EACnC,MAAA,aAAmB,MAAA;AAAA;AAAA,UAGJ,aAAA;EACf,QAAA,GAD4B,4BAAA,CACqB,OAAA;EACjD,OAAA;EACA,MAAA;IACE,IAAA;IACA,SAAA;EAAA;EAEF,MAAA;IACE,MAAA;IACA,WAAA;EAAA;EAEF,MAAA;IACE,IAAA;IACA,KAAA;EAAA;EAEF,GAAA,GAAM,SAAA;EACN,SAAA,sBAA+B,MAAA;EAC/B,OAAA,GAAU,aAAA;EACV,eAAA;EACA,cAAA,GAAiB,MAAA;EACjB,GAAA,GAAM,SAAA;EACN,IAAA,GAAO,UAAA;EAGP,YAAA,IAAgB,MAAA;IAAU,MAAA,EAAQ,aAAA;EAAA,aAA2B,OAAA;EAC7D,YAAA,IAAgB,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,QAAA;EAAA,sBAAuC,OAAA;EACxF,WAAA,IAAe,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,QAAA;IAAkB,IAAA;EAAA,sBAAmC,OAAA;EACrG,cAAA,IAAkB,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,QAAA;IAAkB,IAAA;EAAA,sBAAmC,OAAA;EACxG,UAAA,IAAc,MAAA;IAAU,KAAA;IAAiB,MAAA,EAAQ,aAAA;EAAA,aAA2B,OAAA;EAAA,CAG3E,GAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { AttributesConfig, CssConfig, EntitiesConfig, HtmlConfig, MaizzleConfig, PostcssConfig, UrlConfig, UrlQuery, UrlQueryOptions } from "./config.mjs";
|
|
2
|
+
export { type AttributesConfig, type CssConfig, type EntitiesConfig, type HtmlConfig, type MaizzleConfig, type PostcssConfig, type UrlConfig, type UrlQuery, type UrlQueryOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.mts","names":[],"sources":["../../../src/utils/ast/parser.ts"],"mappings":";;;iBAIgB,KAAA,CAAM,IAAA,UAAc,OAAA,GAAS,iBAAA,GAAyB,SAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Parser } from "htmlparser2";
|
|
2
|
+
import { DomHandler } from "domhandler";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/ast/parser.ts
|
|
5
|
+
function parse(html, options = {}) {
|
|
6
|
+
const handler = new DomHandler();
|
|
7
|
+
const parser = new Parser(handler, options);
|
|
8
|
+
parser.write(html);
|
|
9
|
+
parser.end();
|
|
10
|
+
return handler.dom;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { parse };
|
|
15
|
+
//# sourceMappingURL=parser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.mjs","names":[],"sources":["../../../src/utils/ast/parser.ts"],"sourcesContent":["import { Parser } from 'htmlparser2'\nimport { DomHandler } from 'domhandler'\nimport type { ChildNode, DomHandlerOptions } from 'domhandler'\n\nexport function parse(html: string, options: DomHandlerOptions = {}): ChildNode[] {\n const handler = new DomHandler()\n const parser = new Parser(handler, options)\n parser.write(html)\n parser.end()\n return handler.dom\n}\n"],"mappings":";;;;AAIA,SAAgB,MAAM,MAAc,UAA6B,EAAE,EAAe;CAChF,MAAM,UAAU,IAAI,YAAY;CAChC,MAAM,SAAS,IAAI,OAAO,SAAS,QAAQ;AAC3C,QAAO,MAAM,KAAK;AAClB,QAAO,KAAK;AACZ,QAAO,QAAQ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChildNode, DomHandlerOptions } from "domhandler";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/ast/serializer.d.ts
|
|
4
|
+
declare function serialize(dom: ChildNode[], options?: DomHandlerOptions): string;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { serialize };
|
|
7
|
+
//# sourceMappingURL=serializer.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.d.mts","names":[],"sources":["../../../src/utils/ast/serializer.ts"],"mappings":";;;iBAGgB,SAAA,CAAU,GAAA,EAAK,SAAA,IAAa,OAAA,GAAU,iBAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import render from "dom-serializer";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/ast/serializer.ts
|
|
4
|
+
function serialize(dom, options) {
|
|
5
|
+
return render(dom, {
|
|
6
|
+
encodeEntities: false,
|
|
7
|
+
...options
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { serialize };
|
|
13
|
+
//# sourceMappingURL=serializer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.mjs","names":[],"sources":["../../../src/utils/ast/serializer.ts"],"sourcesContent":["import render from 'dom-serializer'\nimport type { ChildNode, DomHandlerOptions } from 'domhandler'\n\nexport function serialize(dom: ChildNode[], options?: DomHandlerOptions): string {\n return render(dom, { encodeEntities: false, ...options })\n}\n"],"mappings":";;;AAGA,SAAgB,UAAU,KAAkB,SAAqC;AAC/E,QAAO,OAAO,KAAK;EAAE,gBAAgB;EAAO,GAAG;EAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walker.d.mts","names":[],"sources":["../../../src/utils/ast/walker.ts"],"mappings":";;;iBAEgB,IAAA,CAAK,GAAA,EAAK,SAAA,IAAa,QAAA,GAAW,IAAA,EAAM,SAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/utils/ast/walker.ts
|
|
2
|
+
function walk(ast, callback) {
|
|
3
|
+
function traverse(node) {
|
|
4
|
+
callback(node);
|
|
5
|
+
if ("children" in node && node.children && node.children.length > 0) for (const child of node.children) traverse(child);
|
|
6
|
+
}
|
|
7
|
+
for (const node of ast) traverse(node);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { walk };
|
|
12
|
+
//# sourceMappingURL=walker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walker.mjs","names":[],"sources":["../../../src/utils/ast/walker.ts"],"sourcesContent":["import type { ChildNode } from 'domhandler'\n\nexport function walk(ast: ChildNode[], callback: (node: ChildNode) => void): void {\n function traverse(node: ChildNode) {\n callback(node)\n\n if ('children' in node && node.children && node.children.length > 0) {\n for (const child of node.children) {\n traverse(child)\n }\n }\n }\n\n for (const node of ast) {\n traverse(node)\n }\n}\n"],"mappings":";AAEA,SAAgB,KAAK,KAAkB,UAA2C;CAChF,SAAS,SAAS,MAAiB;AACjC,WAAS,KAAK;AAEd,MAAI,cAAc,QAAQ,KAAK,YAAY,KAAK,SAAS,SAAS,EAChE,MAAK,MAAM,SAAS,KAAK,SACvB,UAAS,MAAM;;AAKrB,MAAK,MAAM,QAAQ,IACjB,UAAS,KAAK"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/utils/url.d.ts
|
|
2
|
+
declare const defaultTags: Record<string, string[]>;
|
|
3
|
+
declare const urlAttributes: string[];
|
|
4
|
+
declare function isAbsoluteUrl(url: string): boolean;
|
|
5
|
+
declare function processSrcset(srcset: string, baseUrl: string): string;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { defaultTags, isAbsoluteUrl, processSrcset, urlAttributes };
|
|
8
|
+
//# sourceMappingURL=url.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.mts","names":[],"sources":["../../src/utils/url.ts"],"mappings":";cAEa,WAAA,EAAa,MAAA;AAAA,cAcb,aAAA;AAAA,iBAEG,aAAA,CAAc,GAAA;AAAA,iBAMd,aAAA,CAAc,MAAA,UAAgB,OAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import isUrl from "is-url-superb";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/url.ts
|
|
4
|
+
const defaultTags = {
|
|
5
|
+
a: ["href"],
|
|
6
|
+
img: ["src", "srcset"],
|
|
7
|
+
video: ["src", "poster"],
|
|
8
|
+
source: ["src", "srcset"],
|
|
9
|
+
link: ["href"],
|
|
10
|
+
script: ["src"],
|
|
11
|
+
object: ["data"],
|
|
12
|
+
embed: ["src"],
|
|
13
|
+
iframe: ["src"],
|
|
14
|
+
"v:image": ["src"],
|
|
15
|
+
"v:fill": ["src"]
|
|
16
|
+
};
|
|
17
|
+
const urlAttributes = [...new Set(Object.values(defaultTags).flat())];
|
|
18
|
+
function isAbsoluteUrl(url) {
|
|
19
|
+
if (!url) return true;
|
|
20
|
+
return url.startsWith("//") || url.startsWith("#") || url.startsWith("?") || isUrl(url);
|
|
21
|
+
}
|
|
22
|
+
function processSrcset(srcset, baseUrl) {
|
|
23
|
+
return srcset.split(",").map((entry) => {
|
|
24
|
+
const parts = entry.trim().split(/\s+/);
|
|
25
|
+
if (parts[0] && !isAbsoluteUrl(parts[0])) parts[0] = baseUrl + parts[0];
|
|
26
|
+
return parts.join(" ");
|
|
27
|
+
}).join(", ");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { defaultTags, isAbsoluteUrl, processSrcset, urlAttributes };
|
|
32
|
+
//# sourceMappingURL=url.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.mjs","names":[],"sources":["../../src/utils/url.ts"],"sourcesContent":["import isUrl from 'is-url-superb'\n\nexport const defaultTags: Record<string, string[]> = {\n a: ['href'],\n img: ['src', 'srcset'],\n video: ['src', 'poster'],\n source: ['src', 'srcset'],\n link: ['href'],\n script: ['src'],\n object: ['data'],\n embed: ['src'],\n iframe: ['src'],\n 'v:image': ['src'],\n 'v:fill': ['src'],\n}\n\nexport const urlAttributes = [...new Set(Object.values(defaultTags).flat())]\n\nexport function isAbsoluteUrl(url: string): boolean {\n if (!url) return true\n\n return url.startsWith('//') || url.startsWith('#') || url.startsWith('?') || isUrl(url)\n}\n\nexport function processSrcset(srcset: string, baseUrl: string): string {\n return srcset.split(',').map(entry => {\n const parts = entry.trim().split(/\\s+/)\n\n if (parts[0] && !isAbsoluteUrl(parts[0])) {\n parts[0] = baseUrl + parts[0]\n }\n\n return parts.join(' ')\n }).join(', ')\n}\n"],"mappings":";;;AAEA,MAAa,cAAwC;CACnD,GAAG,CAAC,OAAO;CACX,KAAK,CAAC,OAAO,SAAS;CACtB,OAAO,CAAC,OAAO,SAAS;CACxB,QAAQ,CAAC,OAAO,SAAS;CACzB,MAAM,CAAC,OAAO;CACd,QAAQ,CAAC,MAAM;CACf,QAAQ,CAAC,OAAO;CAChB,OAAO,CAAC,MAAM;CACd,QAAQ,CAAC,MAAM;CACf,WAAW,CAAC,MAAM;CAClB,UAAU,CAAC,MAAM;CAClB;AAED,MAAa,gBAAgB,CAAC,GAAG,IAAI,IAAI,OAAO,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAE5E,SAAgB,cAAc,KAAsB;AAClD,KAAI,CAAC,IAAK,QAAO;AAEjB,QAAO,IAAI,WAAW,KAAK,IAAI,IAAI,WAAW,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,MAAM,IAAI;;AAGzF,SAAgB,cAAc,QAAgB,SAAyB;AACrE,QAAO,OAAO,MAAM,IAAI,CAAC,KAAI,UAAS;EACpC,MAAM,QAAQ,MAAM,MAAM,CAAC,MAAM,MAAM;AAEvC,MAAI,MAAM,MAAM,CAAC,cAAc,MAAM,GAAG,CACtC,OAAM,KAAK,UAAU,MAAM;AAG7B,SAAO,MAAM,KAAK,IAAI;GACtB,CAAC,KAAK,KAAK"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# @clack/core
|
|
2
|
+
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 30aa7ed: Adds a new `selectableGroups` boolean to the group multi-select prompt. Using `selectableGroups: false` will disable the ability to select a top-level group, but still allow every child to be selected individually.
|
|
8
|
+
- 5dfce8a: Fixes an edge case for placeholder values. Previously, when pressing `enter` on an empty prompt, placeholder values would be ignored. Now, placeholder values are treated as the prompt value.
|
|
9
|
+
- f574297: Fix "TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)" error happening on Windows for non-tty terminals.
|
|
10
|
+
|
|
11
|
+
## 0.4.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 8093f3c: Adds `Error` support to the `validate` function
|
|
16
|
+
- e5ba09a: Fixes a cursor display bug in terminals that do not support the "hidden" escape sequence. See [Issue #127](https://github.com/bombshell-dev/clack/issues/127).
|
|
17
|
+
- 8cba8e3: Fixes a rendering bug with cursor positions for `TextPrompt`
|
|
18
|
+
|
|
19
|
+
## 0.4.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings.
|
|
24
|
+
|
|
25
|
+
`updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { updateSettings } from "@clack/core";
|
|
29
|
+
|
|
30
|
+
// Support custom keybindings
|
|
31
|
+
updateSettings({
|
|
32
|
+
aliases: {
|
|
33
|
+
w: "up",
|
|
34
|
+
a: "left",
|
|
35
|
+
s: "down",
|
|
36
|
+
d: "right",
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> [!WARNING]
|
|
42
|
+
> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.
|
|
43
|
+
|
|
44
|
+
- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller).
|
|
45
|
+
|
|
46
|
+
- a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`).
|
|
47
|
+
|
|
48
|
+
| alias | action |
|
|
49
|
+
| ----- | ------ |
|
|
50
|
+
| `k` | up |
|
|
51
|
+
| `l` | right |
|
|
52
|
+
| `j` | down |
|
|
53
|
+
| `h` | left |
|
|
54
|
+
| `esc` | cancel |
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- 51e12bc: Improves types for events and interaction states.
|
|
59
|
+
|
|
60
|
+
## 0.3.5
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 4845f4f: Fixes a bug which kept the terminal cursor hidden after a prompt is cancelled
|
|
65
|
+
- d7b2fb9: Adds missing `LICENSE` file. Since the `package.json` file has always included `"license": "MIT"`, please consider this a licensing clarification rather than a licensing change.
|
|
66
|
+
|
|
67
|
+
## 0.3.4
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- a04e418: fix(@clack/core): keyboard input not working after await in spinner
|
|
72
|
+
- 4f6fcf5: feat(@clack/core): allow tab completion for placeholders
|
|
73
|
+
|
|
74
|
+
## 0.3.3
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- cd79076: fix: restore raw mode on unblock
|
|
79
|
+
|
|
80
|
+
## 0.3.2
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- c96eda5: Enable hard line-wrapping behavior for long words without spaces
|
|
85
|
+
|
|
86
|
+
## 0.3.1
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- 58a1df1: Fix line duplication bug by automatically wrapping prompts to `process.stdout.columns`
|
|
91
|
+
|
|
92
|
+
## 0.3.0
|
|
93
|
+
|
|
94
|
+
### Minor Changes
|
|
95
|
+
|
|
96
|
+
- 8a4a12f: Add `GroupMultiSelect` prompt
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- 8a4a12f: add `groupMultiselect` prompt
|
|
101
|
+
|
|
102
|
+
## 0.2.1
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- ec812b6: fix `readline` hang on Windows
|
|
107
|
+
|
|
108
|
+
## 0.2.0
|
|
109
|
+
|
|
110
|
+
### Minor Changes
|
|
111
|
+
|
|
112
|
+
- d74dd05: Adds a `selectKey` prompt type
|
|
113
|
+
- 54c1bc3: **Breaking Change** `multiselect` has renamed `initialValue` to `initialValues`
|
|
114
|
+
|
|
115
|
+
## 0.1.9
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- 1251132: Multiselect: return `Value[]` instead of `Option[]`.
|
|
120
|
+
- 8994382: Add a password prompt to `@clack/prompts`
|
|
121
|
+
|
|
122
|
+
## 0.1.8
|
|
123
|
+
|
|
124
|
+
### Patch Changes
|
|
125
|
+
|
|
126
|
+
- d96071c: Don't mutate `initialValue` in `multiselect`, fix parameter type for `validate()`.
|
|
127
|
+
|
|
128
|
+
Credits to @banjo for the bug report and initial PR!
|
|
129
|
+
|
|
130
|
+
## 0.1.7
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- 6d9e675: Add support for neovim cursor motion (`hjkl`)
|
|
135
|
+
|
|
136
|
+
Thanks [@esau-morais](https://github.com/esau-morais) for the assist!
|
|
137
|
+
|
|
138
|
+
## 0.1.6
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- 7fb5375: Adds a new `defaultValue` option to the text prompt, removes automatic usage of the placeholder value.
|
|
143
|
+
|
|
144
|
+
## 0.1.5
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- de1314e: Support `required` option for multi-select
|
|
149
|
+
|
|
150
|
+
## 0.1.4
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- ca77da1: Fix multiselect initial value logic
|
|
155
|
+
- 8aed606: Fix `MaxListenersExceededWarning` by detaching `stdin` listeners on close
|
|
156
|
+
|
|
157
|
+
## 0.1.3
|
|
158
|
+
|
|
159
|
+
### Patch Changes
|
|
160
|
+
|
|
161
|
+
- a99c458: Support `initialValue` option for text prompt
|
|
162
|
+
|
|
163
|
+
## 0.1.2
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- Allow isCancel to type guard any unknown value
|
|
168
|
+
- 7dcad8f: Allow placeholder to be passed to TextPrompt
|
|
169
|
+
- 2242f13: Fix multiselect returning undefined
|
|
170
|
+
- b1341d6: Improved placeholder handling
|
|
171
|
+
|
|
172
|
+
## 0.1.1
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- 4be7dbf: Ensure raw mode is unset on submit
|
|
177
|
+
- b480679: Preserve value if validation fails
|
|
178
|
+
|
|
179
|
+
## 0.1.0
|
|
180
|
+
|
|
181
|
+
### Minor Changes
|
|
182
|
+
|
|
183
|
+
- 7015ec9: Create new prompt: multi-select
|
|
184
|
+
|
|
185
|
+
## 0.0.12
|
|
186
|
+
|
|
187
|
+
### Patch Changes
|
|
188
|
+
|
|
189
|
+
- 9d371c3: Fix rendering bug when using y/n to confirm
|
|
190
|
+
|
|
191
|
+
## 0.0.11
|
|
192
|
+
|
|
193
|
+
### Patch Changes
|
|
194
|
+
|
|
195
|
+
- 441d5b7: fix select return undefined
|
|
196
|
+
- d20ef2a: Update keywords, URLs
|
|
197
|
+
- fe13c2f: fix cursor missing after submit
|
|
198
|
+
|
|
199
|
+
## 0.0.10
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- a0cb382: Add `main` entrypoint
|
|
204
|
+
|
|
205
|
+
## 0.0.9
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- Fix node@16 issue (cannot read "createInterface" of undefined)
|
|
210
|
+
|
|
211
|
+
## 0.0.8
|
|
212
|
+
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- a4b5e13: Bug fixes, exposes `block` utility
|
|
216
|
+
|
|
217
|
+
## 0.0.7
|
|
218
|
+
|
|
219
|
+
### Patch Changes
|
|
220
|
+
|
|
221
|
+
- Fix cursor bug
|
|
222
|
+
|
|
223
|
+
## 0.0.6
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Fix error with character check
|
|
228
|
+
|
|
229
|
+
## 0.0.5
|
|
230
|
+
|
|
231
|
+
### Patch Changes
|
|
232
|
+
|
|
233
|
+
- 491f9e0: update readme
|
|
234
|
+
|
|
235
|
+
## 0.0.4
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- 7372d5c: Fix bug with line deletion
|
|
240
|
+
|
|
241
|
+
## 0.0.3
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- 5605d28: Do not bundle dependencies (take II)
|
|
246
|
+
|
|
247
|
+
## 0.0.2
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- 2ee67cb: don't bundle deps
|
|
252
|
+
|
|
253
|
+
## 0.0.1
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- 306598e: Initial publish, still WIP
|