nvim config

This commit is contained in:
andrzej 2024-04-26 19:37:48 +02:00
parent c82eaea876
commit b7be648881
1095 changed files with 192271 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{
"diagnostics.globals": [
"s",
"t",
"f",
"i"
]
}

View File

@ -0,0 +1,8 @@
Here we go agan
The cat sit on the mat.
I runs for congress.
He run for congress.
Aple.
Dont forget to put on the breaks.

View File

@ -0,0 +1,2 @@
require("options/prose")
vim.cmd("PencilSoft")

View File

@ -0,0 +1,49 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.g.have_nerd_font = true
require("options.default")
require("lazy_bootstrap")
require("lazy").setup({ { import = "plugins" } })
--BG HACKS
vim.api.nvim_create_autocmd({ "BufEnter", "BufCreate", "BufAdd" }, {
callback = function()
local buftype = vim.bo.buftype
if buftype == "help" then
--print("This Window is bufType:" .. buftype)
vim.o.winhl = "Normal:CursorColumn"
else
vim.o.winhl = "Normal:Normal"
end
end,
})
require("keymaps")
vim.cmd("colorscheme rose-pine")
--CMD LINE HACKS
vim.opt.cmdheight = 0
vim.api.nvim_create_autocmd({ "RecordingEnter" }, {
callback = function()
vim.opt.cmdheight = 1
end,
})
vim.api.nvim_create_autocmd({ "RecordingLeave" }, {
callback = function()
vim.opt.cmdheight = 0
end,
})
--formatted cwd function
vim.api.nvim_create_autocmd({ "DirChanged", "VimEnter" }, {
callback = function()
local cwdString = vim.fn.getcwd()
local length = cwdString:len()
local desiredLength = 32
if desiredLength < length then
vim.g.cwdShortened = "..." .. cwdString:sub(length - 16, length)
else
vim.g.cwdShortened = cwdString
end
end,
})

View File

@ -0,0 +1,57 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
"auto-session": { "branch": "main", "commit": "64dc86e43c85f0062baafb0b607a6162efc99c91" },
"catppuccin": { "branch": "main", "commit": "02bdd749931a5d739063562e57531c118e081882" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" },
"dashboard-nvim": { "branch": "master", "commit": "681300934baf36f6184ca41f0b26aed22056d4ee" },
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" },
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
"gitsigns.nvim": { "branch": "main", "commit": "c097cb255096f333e14d341082a84f572b394fa2" },
"gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
"lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"markdown.nvim": { "branch": "master", "commit": "fd3d4c65041c62c4f51824ede751c2cf032b7c62" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "b129892f783740e6cf741f2ea09fa5dd512aa584" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"mini.nvim": { "branch": "main", "commit": "2bddcd5980ed79a7cdcdc2ad3e270a5a9c13b90b" },
"modes.nvim": { "branch": "main", "commit": "3188692abf02a8838ec75e59d68c2ce3e4323f5c" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"neoscroll.nvim": { "branch": "master", "commit": "21d52973bde32db998fc8b6590f87eb3c3c6d8e4" },
"nightfox.nvim": { "branch": "main", "commit": "e352a32e0f54feb2550ebdab815ae8f7f26ed63b" },
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
"nvim-lspconfig": { "branch": "master", "commit": "b3014f2209503944f2714cf27c95591433a0c7d8" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-prose": { "branch": "main", "commit": "38aac8c9c94a5725d152bdfea374d60e07fb93d6" },
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
"nvim-treesitter": { "branch": "master", "commit": "b7339ffb9affdd5c843d4aae1d5f949039294d89" },
"nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "67ac27f859ee3f7584f3edef81d0942bb61d5344" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "0563a31b1f46a911865cb85df3ddde2eff9fdada" },
"rose-pine": { "branch": "main", "commit": "9cd7d8aad3606a95d733a45d16275eb7a5a836a3" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "5ee5002373655fd684a4ad0d47a3de876ceacf9a" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" },
"telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
"vim-pencil": { "branch": "master", "commit": "6d70438a8886eaf933c38a7a43a61adb0a7815ed" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
}

View File

@ -0,0 +1,39 @@
local function map(mode, lhs, rhs, opts)
local options = { noremap = true, silent = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.keymap.set(mode, lhs, rhs, options)
end
map({ "i", "v", "t" }, "jk", "<esc>") -- remap escape
map({ "i", "v", "t" }, "JK", "<esc>") -- remap escape
map("n", "<leader>o", "o<esc>")
map("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
map("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
map("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
map("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
map("n", "<leader>z", ":ZenMode<cr>") --open ZenMode (distraction-free)
map("n", "<leader>l", ":LazyGit<cr>") -- open LazyGit
--map("n", "<leader>f", ":lua MiniFiles.open()<cr>")
map("n", "<C-p>", ":pu<CR>")
local prose = require("nvim-prose")
map("n", "cw", function()
print(prose.word_count())
end)
--toggle autocompletion
vim.keymap.set("n", "cc", "<cmd>lua vim.g.cmptoggle = not vim.g.cmptoggle<CR>", { desc = "toggle nvim-cmp" })
--toggle file browser
vim.keymap.set("n", "<leader>f", "<cmd>Telescope file_browser<CR>", { desc = "file browser" })
--toggle terminal
vim.keymap.set({ "n", "t", "i" }, "<C-ñ>", "<cmd>ToggleTerm<CR>", { desc = "[T]erminal" })
vim.keymap.set("t", "jk", [[<C-\><C-n>]])
--delete all buffers
vim.keymap.set("n", "<leader>dab", '<cmd>:%bdelete|edit #|normal`"<CR>', { desc = "delete all buffers" })
--SAVE
vim.keymap.set({ "n", "i" }, "<C-s>", "<cmd>w<CR>", { desc = "save" })

View File

@ -0,0 +1,12 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)

View File

@ -0,0 +1,53 @@
vim.opt.termguicolors = true
vim.opt.undofile = true
vim.opt.number = true
-- vim.opt.relativenumber = true
vim.opt.mouse = "a"
vim.opt.showmode = true
vim.opt.clipboard = "unnamedplus"
vim.opt.breakindent = true
vim.opt.autowriteall = true
vim.opt.undofile = true
-- Case-insensitive searching UNLESS \C or capital in search
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Keep signcolumn on by default
vim.opt.signcolumn = "yes"
-- Decrease update time
vim.opt.updatetime = 250
-- Decrease mapped sequence wait time
-- Displays which-key popup sooner
vim.opt.timeoutlen = 300
-- Configure how new splits should be opened
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace in the editor.
vim.opt.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "" }
-- Preview substitutions live, as you type!
vim.opt.inccommand = "split"
-- Show which line your cursor is on
vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.o.foldtext = ""
vim.o.fillchars = "fold: "
vim.o.foldenable = false
vim.g.markdown_folding = 1
vim.opt.spelllang = "en_us"
vim.opt.spell = true

View File

@ -0,0 +1,6 @@
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.textwidth = 0 --prevent vim from isnerting linebreaks
vim.opt.number = false
vim.opt.signcolumn = "no"

View File

@ -0,0 +1,120 @@
return { -- Autocompletion
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
{
"L3MON4D3/LuaSnip",
build = (function()
-- Build Step is needed for regex support in snippets
-- This step is not supported in many windows environments
-- Remove the below condition to re-enable on windows
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
return
end
return "make install_jsregexp"
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
{
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
},
config = function()
require("luasnip.loaders.from_snipmate").load()
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
end,
},
"saadparwaiz1/cmp_luasnip",
-- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes.
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
},
config = function()
-- See `:help cmp`
local cmp = require("cmp")
local luasnip = require("luasnip")
luasnip.config.setup({})
vim.g.cmptoggle = true --initialise toggle to true
cmp.setup({
--toggle Autocompletion
enabled = function()
return vim.g.cmptoggle
end,
--/toggle Autocompletion
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = "menu,menuone,noinsert" },
-- For an understanding of why these mappings were
-- chosen, you will need to read `:help ins-completion`
--
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert({
-- Select the [n]ext item
["<C-n>"] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
["<C-p>"] = cmp.mapping.select_prev_item(),
-- scroll the documentation window [b]ack / [f]orward
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
["<C-y>"] = cmp.mapping.confirm({ select = true }),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
["<C-Space>"] = cmp.mapping.complete({}),
-- Think of <c-l> as moving to the right of your snippet expansion.
-- So if you have a snippet that's like:
-- function $name($args)
-- $body
-- end
--
-- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards.
["<C-l>"] = cmp.mapping(function()
if luasnip.locally_jumpable() then
luasnip.jump(1)
end
end, { "i", "s" }),
["<C-h>"] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { "i", "s" }),
["<C-e>"] = cmp.mapping(function()
if luasnip.choice_active() then
luasnip.change_choice(1)
end
end, { "i", "s" }),
-- For more advanced luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
}),
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "path" },
},
})
end,
}

View File

@ -0,0 +1,26 @@
return { -- Autoformat
"stevearc/conform.nvim",
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
}
end,
formatters_by_ft = {
lua = { "stylua" },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
javascript = { { "prettierd", "prettier" } },
bash = { "shellcheck" },
},
},
}

View File

@ -0,0 +1,2 @@
--this plugin allows commenting selections
return { "numToStr/Comment.nvim", opts = {} }

View File

@ -0,0 +1,45 @@
return {
"nvimdev/dashboard-nvim",
event = "VimEnter",
config = function()
require("dashboard").setup({
theme = "hyper",
config = {
week_header = {
enable = true,
},
-- header = { "HELLO" },
shortcut = {
{ desc = "󰊳 Update", group = "@property", action = "Lazy update", key = "u" },
{
icon = "",
icon_hl = "@variable",
desc = "Files",
group = "Label",
action = "Telescope find_files",
key = "f",
},
-- {
-- desc = " Apps",
-- group = "DiagnosticHint",
-- action = "Telescope app",
-- key = "a",
-- },
-- {
-- desc = " dotfiles",
-- group = "Number",
-- action = "Telescope dotfiles",
-- key = "d",
-- },
},
},
})
end,
dependencies = { { "nvim-tree/nvim-web-devicons" } },
}
-- return {
-- "goolord/alpha-nvim",
-- config = function()
-- require("alpha").setup(require("alpha.themes.dashboard").config)
-- end,
-- }

View File

@ -0,0 +1 @@
return { "sindrets/diffview.nvim" }

View File

@ -0,0 +1,12 @@
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
"lewis6991/gitsigns.nvim",
opts = {
signs = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
},
},
}

View File

@ -0,0 +1,20 @@
return {
"ThePrimeagen/harpoon",
config = function()
local harpoon_ui = require("harpoon.ui")
--go to user-inputted harpoon
vim.keymap.set({ "n" }, "<C-'>", function()
local user_input = tonumber(vim.fn.input("Where ya goin'?"))
if user_input then
harpoon_ui.nav_file(user_input)
else
vim.cmd("Telescope harpoon marks")
-- harpoon_ui.toggle_quick_menu()
end
end)
vim.keymap.set("n", "<C-¡>", function()
require("harpoon.mark").add_file()
print("Buffer added to harpoon!")
end)
end,
}

View File

@ -0,0 +1,15 @@
return -- nvim v0.8.0
{
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
}

View File

@ -0,0 +1,187 @@
return { -- LSP Configuration & Plugins
"neovim/nvim-lspconfig",
dependencies = {
-- Automatically install LSPs and related tools to stdpath for neovim
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ "j-hui/fidget.nvim", opts = {} },
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{ "folke/neodev.nvim", opts = {} },
},
config = function()
-- This function gets run when an LSP attaches to a particular buffer.
-- That is to say, every time a new file is opened that is associated with
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
-- function will be executed to configure the current buffer
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
callback = function(event)
-- NOTE: Remember that lua is a real programming language, and as such it is possible
-- to define small helper and utility functions so you don't have to repeat yourself
-- many times.
--
-- In this case, we create a function that lets us more easily define mappings specific
-- for LSP related items. It sets the mode, buffer and description for us each time.
local map = function(keys, func, desc)
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
end
-- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
-- Find references for the word under your cursor.
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
-- Jump to the implementation of the word under your cursor.
-- Useful when your language has ways of declaring types without an actual implementation.
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
-- Jump to the type of the word under your cursor.
-- Useful when you're not sure what type a variable is and you want to see
-- the definition of its *type*, not where it was *defined*.
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
-- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc.
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
-- Fuzzy find all the symbols in your current workspace
-- Similar to document symbols, except searches over your whole project.
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
-- Rename the variable under your cursor
-- Most Language Servers support renaming across files, etc.
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
-- Opens a popup that displays documentation about the word under your cursor
-- See `:help K` for why this keymap
map("K", vim.lsp.buf.hover, "Hover Documentation")
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.
-- See `:help CursorHold` for information about when this is executed
--
-- When you move your cursor, the highlights will be cleared (the second autocommand).
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.server_capabilities.documentHighlightProvider then
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = event.buf,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
buffer = event.buf,
callback = vim.lsp.buf.clear_references,
})
end
end,
})
-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP Specification.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
-- Add any additional override configuration in the following tables. Available keys are:
-- - cmd (table): Override the default command used to start the server
-- - filetypes (table): Override the default list of associated filetypes for the server
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
--
local arch = require("jit").arch
--get architecture as string (to blocklist installs that don't work on Android)
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
marksman = {},
tsserver = {},
ltex = {
settings = {
ltex = {
language = "en",
additionalRules = {
languageModel = "~/ngrams/",
},
},
},
}, --
lua_ls = {
-- cmd = {...},
-- filetypes { ...},
-- capabilities = {},
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
},
},
}
-- Ensure the servers and tools above are installed
-- To check the current status of installed tools and/or manually install
-- other tools, you can run
-- :Mason
--
-- You can press `g?` for help in this menu
require("mason").setup()
-- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
"stylua", -- Used to format lua code
})
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup({
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end,
},
})
end,
}

View File

@ -0,0 +1,53 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
config = function()
require("lualine").setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
},
},
sections = {
lualine_a = { "mode", "vim.g.cmptoggle and 'cmp'" },
lualine_b = { "branch", "diff", "diagnostics", "vim.g.cwdShortened" },
lualine_c = { "filename" },
lualine_x = { "buffers" },
lualine_y = { "encoding", "filetype", "progress" },
lualine_z = {
--"vim.g.cwdShortened"
-- "datetime",
-- options: default, us, uk, iso, or your own format string ("%H:%M", etc..)
--style = "uk",
},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = { "toggleterm", "mason", "trouble" },
})
end,
},
}

View File

@ -0,0 +1,9 @@
return {
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && npm install",
init = function()
vim.g.mkdp_filetypes = { "markdown", "mermaid" }
end,
ft = { "markdown" },
}

View File

@ -0,0 +1,75 @@
return { -- Collection of various small independent plugins/modules
"echasnovski/mini.nvim",
config = function()
-- Better Around/Inside textobjects
--
-- Examples:
-- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [']quote
-- - ci' - [C]hange [I]nside [']quote
require("mini.ai").setup({ n_lines = 500 })
-- Add/delete/replace surroundings (brackets, quotes, etc.)
--
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
-- - sd' - [S]urround [D]elete [']quotes
-- - sr)' - [S]urround [R]eplace [)] [']
require("mini.surround").setup()
-- ... and there is more!
-- Check out: https://github.com/echasnovski/mini.nvim
-- require("mini.files").setup(
-- -- No need to copy this inside `setup()`. Will be used automatically.
-- {
-- -- Customization of shown content
-- content = {
-- -- Predicate for which file system entries to show
-- filter = nil,
-- -- What prefix to show to the left of file system entry
-- prefix = nil,
-- -- In which order to show file system entries
-- sort = nil,
-- },
--
-- -- Module mappings created only inside explorer.
-- -- Use `''` (empty string) to not create one.
-- mappings = {
-- close = "q",
-- go_in = "l",
-- go_in_plus = "L",
-- go_out = "h",
-- go_out_plus = "H",
-- reset = "<BS>",
-- reveal_cwd = "@",
-- show_help = "g?",
-- synchronize = "=",
-- trim_left = "<",
-- trim_right = ">",
-- },
--
-- -- General options
-- options = {
-- -- Whether to delete permanently or move into module-specific trash
-- permanent_delete = false,
-- -- Whether to use for editing directories
-- use_as_default_explorer = true,
-- },
--
-- -- Customization of explorer windows
-- windows = {
-- -- Maximum number of windows to show side by side
-- max_number = math.huge,
-- -- Whether to show preview of file/directory under cursor
-- preview = true,
-- -- Width of focused window
-- width_focus = 50,
-- -- Width of non-focused window
-- width_nofocus = 15,
-- -- Width of preview window
-- width_preview = 25,
-- },
-- }
-- )
require("mini.move").setup()
end,
}

View File

@ -0,0 +1,11 @@
return {
"mvllow/modes.nvim",
tag = "v0.2.0",
config = function()
require("modes").setup({
opacity = {
-- visual = 0,
},
})
end,
}

View File

@ -0,0 +1,17 @@
return {
"karb94/neoscroll.nvim",
config = function()
require("neoscroll").setup({
-- All these keys will be mapped to their corresponding default scrolling animation
mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" },
hide_cursor = true, -- Hide cursor while scrolling
stop_eof = true, -- Stop at <EOF> when scrolling downwards
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
easing_function = nil, -- Default easing function
pre_hook = nil, -- Function to run before the scrolling animation starts
post_hook = nil, -- Function to run after the scrolling animation ends
performance_mode = false, -- Disable "Performance Mode" on all buffers.
})
end,
}

View File

@ -0,0 +1,6 @@
return {
"preservim/vim-pencil",
init = function()
vim.g["pencil#wrapModeDefault"] = "soft"
end,
}

View File

@ -0,0 +1,21 @@
return {
"https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
init = function()
require("rainbow-delimiters.setup").setup({
-- strategy = {
-- -- ...
-- },
-- query = {
-- -- ...
-- },
highlight = {
"RainbowDelimiterYellow",
"RainbowDelimiterBlue",
"RainbowDelimiterOrange",
"RainbowDelimiterGreen",
"RainbowDelimiterViolet",
"RainbowDelimiterCyan",
},
})
end,
}

View File

@ -0,0 +1,9 @@
return {
"rmagatti/auto-session",
config = function()
require("auto-session").setup({
log_level = "error",
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
})
end,
}

View File

@ -0,0 +1,3 @@
return {
"tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically
}

View File

@ -0,0 +1,180 @@
return { -- Fuzzy Finder (files, lsp, etc)
"nvim-telescope/telescope.nvim",
event = "VimEnter",
branch = "0.1.x",
dependencies = {
"nvim-telescope/telescope-file-browser.nvim",
"nvim-telescope/telescope-symbols.nvim",
"jvgrootveld/telescope-zoxide",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-project.nvim",
"ThePrimeagen/harpoon",
{ -- If encountering errors, see telescope-fzf-native README for install instructions
"nvim-telescope/telescope-fzf-native.nvim",
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = "make",
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable("make") == 1
end,
},
{ "nvim-telescope/telescope-ui-select.nvim" },
-- Useful for getting pretty icons, but requires a Nerd Font.
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
},
config = function()
local project_actions = require("telescope._extensions.project.actions")
require("telescope").setup({
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
defaults = {
mappings = {
-- ["<esc>"] = act.close,
i = { ["<c-enter>"] = "to_fuzzy_refine" },
},
file_ignore_patterns = {
"node_modules/.*",
-- "%.env",
"yarn.lock",
"package%-lock.json",
"lazy%-lock.json",
"init.sql",
"target/.*",
".git/.*",
},
},
-- pickers = {},
extensions = {
project = {
base_dirs = {
-- "~/dev/src",
-- { "~/dev/src2" },
-- { "~/dev/src3", max_depth = 4 },
-- { path = "~/dev/src4" },
-- { path = "~/dev/src5", max_depth = 2 },
},
hidden_files = true, -- default: false
theme = "dropdown",
order_by = "asc",
search_by = "title",
-- default for on_project_selected = find project files
-- on_project_selected = function(prompt_bufnr)
-- -- Do anything you want in here. For example:
-- project_actions.change_working_directory(prompt_bufnr, false)
-- end,
},
zoxide = {
prompt_title = "[ Zoxide list ]",
mappings = {
default = {
after_action = function(selection)
print("Update to (" .. selection.z_score .. ") " .. selection.path)
end,
},
["<C-s>"] = {
before_action = function(selection)
print("before C-s")
end,
action = function(selection)
vim.cmd.edit(selection.path)
end,
},
["<C-b>"] = {
action = function(selection)
vim.cmd("Telescope file_browser path=" .. selection.path .. " select_buffer=true")
end,
after_action = function(selection)
vim.notify("Directory changed to " .. selection.path)
end,
},
-- Opens the selected entry in a new split
["<C-q>"] = {
action = require("telescope._extensions.zoxide.utils").create_basic_command("split"),
},
},
},
["ui-select"] = {
require("telescope.themes").get_dropdown(),
},
file_browser = {
theme = "ivy",
-- disables netrw and use telescope-file-browser in its place
hijack_netrw = true,
mappings = {
["i"] = {
-- your custom insert mode mappings
},
["n"] = {
-- your custom normal mode mappings
},
},
hidden = true,
},
},
})
-- Enable telescope extensions, if they are installed
pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "ui-select")
pcall(require("telescope").load_extension, "file_browser")
pcall(require("telescope").load_extension, "zoxide")
pcall(require("telescope").load_extension, "project")
pcall(require("telescope").load_extension, "harpoon")
pcall(require("telescope").load_extension, "harpoon")
-- See `:help telescope.builtin`
vim.keymap.set(
"n",
"<leader>cd",
require("telescope").extensions.zoxide.list,
{ desc = "[C]hange [D]irectory (zoxide)" }
)
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
vim.keymap.set("n", "<leader>sf", function()
builtin.find_files({ hidden = true }) -- note how we have to pass the function within a function in order to include arguments
end, { desc = "[S]earch [F]iles" })
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
vim.keymap.set("n", "<leader>sr", builtin.registers, { desc = "[S]earch [R]egisters" })
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
vim.keymap.set("n", "<leader>sc", builtin.colorscheme, { desc = "[S]earch [C]olorscheme" })
vim.keymap.set(
"n",
"<leader>sp",
"<cmd>lua require'telescope'.extensions.project.project{}<CR>",
{ desc = "[S]earch [P]rojects", noremap = true, silent = true }
)
-- Slightly advanced example of overriding default behavior and theme
vim.keymap.set("n", "<leader>/", function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 10,
previewer = false,
}))
end, { desc = "[/] Fuzzily search in current buffer" })
-- Also possible to pass additional configuration options.
-- See `:help telescope.builtin.live_grep()` for information about particular keys
vim.keymap.set("n", "<leader>s/", function()
builtin.live_grep({
grep_open_files = true,
prompt_title = "Live Grep in Open Files",
})
end, { desc = "[S]earch [/] in Open Files" })
-- Shortcut for searching your neovim configuration files
vim.keymap.set("n", "<leader>sn", function()
builtin.find_files({ cwd = vim.fn.stdpath("config") })
end, { desc = "[S]earch [N]eovim files" })
end,
}

View File

@ -0,0 +1,90 @@
return {
{
"rose-pine/neovim",
name = "rose-pine",
priority = 1000,
init = function()
require("rose-pine").setup({
variant = "auto", -- auto, main, moon, or dawn
dark_variant = "main", -- main, moon, or dawn
dim_inactive_windows = false,
extend_background_behind_borders = true,
enable = {
terminal = true,
legacy_highlights = false, -- Improve compatibility for previous versions of Neovim
migrations = true, -- Handle deprecated options automatically
},
styles = {
bold = true,
italic = true,
transparency = true,
},
groups = {
border = "muted",
link = "iris",
panel = "surface",
error = "love",
hint = "iris",
info = "foam",
note = "pine",
todo = "rose",
warn = "gold",
git_add = "foam",
git_change = "rose",
git_delete = "love",
git_dirty = "rose",
git_ignore = "muted",
git_merge = "iris",
git_rename = "pine",
git_stage = "iris",
git_text = "rose",
git_untracked = "subtle",
h1 = "iris",
h2 = "foam",
h3 = "rose",
h4 = "gold",
h5 = "pine",
h6 = "foam",
},
highlight_groups = {
-- Comment = { fg = "foam" },
-- VertSplit = { fg = "muted", bg = "muted" },
Folded = { fg = "foam", bg = "highlight_med" },
CursorLine = { bg = "surface" },
ModesInsert = { bg = "gold" },
--cursor line
ModesInsertCursorLine = { bg = "overlay" },
ModesVisual = { bg = "foam" },
ModesVisualVisual = { bg = "pine" },
},
before_highlight = function(group, highlight, palette)
-- Disable all undercurls
-- if highlight.undercurl then
-- highlight.undercurl = false
-- end
--
-- Change palette colour
-- if highlight.fg == palette.pine then
-- highlight.fg = palette.foam
-- end
end,
})
-- vim.cmd("colorscheme rose-pine-main")
-- vim.cmd("colorscheme rose-pine-moon")
-- vim.cmd("colorscheme rose-pine-dawn")
end,
},
{ "ellisonleao/gruvbox.nvim", priority = 1000, config = true, opts = ... },
{ "EdenEast/nightfox.nvim", priority = 1000 },
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
}

View File

@ -0,0 +1,16 @@
return {
"alexghergh/nvim-tmux-navigation",
config = function()
require("nvim-tmux-navigation").setup({
disable_when_zoomed = true, -- defaults to false
keybindings = {
left = "<C-h>",
down = "<C-j>",
up = "<C-k>",
right = "<C-l>",
last_active = "<C-\\>",
next = "<C-Space>",
},
})
end,
}

View File

@ -0,0 +1,27 @@
return {
{
"akinsho/toggleterm.nvim",
version = "*",
init = function()
require("toggleterm").setup({
highlights = {
-- highlights which map to a highlight group name and a table of it's values
-- NOTE: this is only a subset of values, any group placed here will be set for the terminal window split
Normal = {
guibg = "#26233a",
},
NormalFloat = {
link = "Normal",
},
-- FloatBorder = {
-- guifg = "<VALUE-HERE>",
-- guibg = "<VALUE-HERE>",
-- },
},
shade_terminals = false,
})
end,
opts = {--[[ things you want to change go here]]
},
},
}

View File

@ -0,0 +1,42 @@
return { -- Highlight, edit, and navigate code
"nvim-treesitter/nvim-treesitter",
dependencies = {
"tadmccorkle/markdown.nvim",
"nvim-treesitter/nvim-treesitter-context",
"nvim-treesitter/nvim-treesitter-textobjects",
"windwp/nvim-ts-autotag",
},
build = ":TSUpdate",
opts = {
ensure_installed = { "bash", "c", "html", "lua", "markdown", "markdown_inline", "vim", "vimdoc" },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
enable = true,
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { "ruby" },
},
markdown = {
enable = true, -- must be specified to enable markdown.nvim as a module
-- configuration here or nothing for defaults
},
indent = { enable = true, disable = { "ruby" } },
autotag = {
enable = true,
},
},
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
---@diagnostic disable-next-line: missing-fields
require("nvim-treesitter.configs").setup(opts)
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end,
}

View File

@ -0,0 +1,9 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
}

View File

@ -0,0 +1,23 @@
return {
"folke/twilight.nvim",
opts = {
dimming = {
alpha = 0.60, -- amount of dimming
-- we try to get the foreground from the highlight groups or fallback color
color = { "Normal", "#ffffff" },
term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color
inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer)
},
context = 0, -- amount of lines we will try to show around the current line
treesitter = true, -- use treesitter when available for the filetype
-- treesitter is used to automatically expand the visible text,
-- but you can further control the types of nodes that should always be fully expanded
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
"function",
"method",
"table",
"if_statement",
},
exclude = {}, -- exclude these filetypes
},
}

View File

@ -0,0 +1,20 @@
return { -- Useful plugin to show you pending keybinds.
"folke/which-key.nvim",
event = "VimEnter", -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
require("which-key").setup({
triggers_blacklist = {
n = { "d", "y", "v" },
},
})
-- Document existing key chains
require("which-key").register({
["<leader>c"] = { name = "[C]ode", _ = "which_key_ignore" },
["<leader>d"] = { name = "[D]ocument", _ = "which_key_ignore" },
["<leader>r"] = { name = "[R]ename", _ = "which_key_ignore" },
["<leader>s"] = { name = "[S]earch", _ = "which_key_ignore" },
["<leader>w"] = { name = "[W]orkspace", _ = "which_key_ignore" },
})
end,
}

View File

@ -0,0 +1,13 @@
return {
"skwee357/nvim-prose",
config = function()
require("nvim-prose").setup({
wpm = 200.0,
filetypes = { "markdown", "asciidoc" },
placeholders = {
words = "words",
minutes = "min",
},
})
end,
}

View File

@ -0,0 +1,66 @@
return {
"folke/zen-mode.nvim",
opts = {
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 60, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
-- signcolumn = "no", -- disable signcolumn
-- number = false, -- disable number column
-- relativenumber = false, -- disable relative numbers
-- cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
-- you may turn on/off statusline in zen mode by setting 'laststatus'
-- statusline will be shown only if 'laststatus' == 3
laststatus = 0, -- turn off the statusline in zen mode
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = false,
font = "+4", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = false,
font = "14", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See alse also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = false,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
},
-- callback where you can add custom code when the Zen window opens
on_open = function(win) end,
-- callback where you can add custom code when the Zen window closes
on_close = function() end,
},
}

1
nvim/.config/nvim/node_modules/.bin/semver generated vendored Symbolic link
View File

@ -0,0 +1 @@
../semver/bin/semver.js

364
nvim/.config/nvim/node_modules/.package-lock.json generated vendored Normal file
View File

@ -0,0 +1,364 @@
{
"name": "ajs-nvim",
"lockfileVersion": 3,
"requires": true,
"packages": {
"node_modules/@mongodb-js/saslprep": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.5.tgz",
"integrity": "sha512-XLNOMH66KhJzUJNwT/qlMnS4WsNDWD5ASdyaSH3EtK+F4r/CFGa3jT4GNi4mfOitGvWXtdLgQJkQjxSVrio+jA==",
"dependencies": {
"sparse-bitfield": "^3.0.3"
}
},
"node_modules/@types/webidl-conversions": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
"integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="
},
"node_modules/@types/whatwg-url": {
"version": "11.0.4",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz",
"integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==",
"dependencies": {
"@types/webidl-conversions": "*"
}
},
"node_modules/bson": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/bson/-/bson-6.5.0.tgz",
"integrity": "sha512-DXf1BTAS8vKyR90BO4x5v3rKVarmkdkzwOrnYDFdjAY694ILNDkmA3uRh1xXJEl+C1DAh8XCvAQ+Gh3kzubtpg==",
"engines": {
"node": ">=16.20.1"
}
},
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
},
"node_modules/crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/debug/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"dependencies": {
"safe-buffer": "^5.0.1"
}
},
"node_modules/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
"integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
"dependencies": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^7.5.4"
},
"engines": {
"node": ">=12",
"npm": ">=6"
}
},
"node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/kareem": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz",
"integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
},
"node_modules/lodash.isboolean": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
},
"node_modules/lodash.isinteger": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
},
"node_modules/lodash.isnumber": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
},
"node_modules/lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
},
"node_modules/lodash.isstring": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
},
"node_modules/lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
},
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="
},
"node_modules/mongodb": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz",
"integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==",
"dependencies": {
"@mongodb-js/saslprep": "^1.1.0",
"bson": "^6.2.0",
"mongodb-connection-string-url": "^3.0.0"
},
"engines": {
"node": ">=16.20.1"
},
"peerDependencies": {
"@aws-sdk/credential-providers": "^3.188.0",
"@mongodb-js/zstd": "^1.1.0",
"gcp-metadata": "^5.2.0",
"kerberos": "^2.0.1",
"mongodb-client-encryption": ">=6.0.0 <7",
"snappy": "^7.2.2",
"socks": "^2.7.1"
},
"peerDependenciesMeta": {
"@aws-sdk/credential-providers": {
"optional": true
},
"@mongodb-js/zstd": {
"optional": true
},
"gcp-metadata": {
"optional": true
},
"kerberos": {
"optional": true
},
"mongodb-client-encryption": {
"optional": true
},
"snappy": {
"optional": true
},
"socks": {
"optional": true
}
}
},
"node_modules/mongodb-connection-string-url": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz",
"integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==",
"dependencies": {
"@types/whatwg-url": "^11.0.2",
"whatwg-url": "^13.0.0"
}
},
"node_modules/mongoose": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.2.2.tgz",
"integrity": "sha512-6sMxe1d3k/dBjiOX4ExNTNOP0g1x0iq8eXyg+ttgIXM3HLnQ0IUyXRwVVAPFFY6O4/8uYN5dB0Ec72FrexbPpw==",
"dependencies": {
"bson": "^6.2.0",
"kareem": "2.5.1",
"mongodb": "6.3.0",
"mpath": "0.9.0",
"mquery": "5.0.0",
"ms": "2.1.3",
"sift": "16.0.1"
},
"engines": {
"node": ">=16.20.1"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mongoose"
}
},
"node_modules/mpath": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
"integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
"integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
"dependencies": {
"debug": "4.x"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"engines": {
"node": ">=6"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/semver": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/sift": {
"version": "16.0.1",
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz",
"integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/tr46": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
"integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
"dependencies": {
"punycode": "^2.3.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-url": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",
"integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",
"dependencies": {
"tr46": "^4.1.1",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=16"
}
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}

View File

@ -0,0 +1,22 @@
Copyright (c) 2014 Dmitry Tsvettsikh
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,4 @@
import mod from "./node.js";
export default mod;
export const saslprep = mod.saslprep;

View File

@ -0,0 +1,5 @@
declare const saslprep: (args_0: string, args_1?: {
allowUnassigned?: boolean | undefined;
} | undefined) => string;
export = saslprep;
//# sourceMappingURL=browser.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;wBAAmC,CAAC;AAIlD,SAAS,QAAQ,CAAC"}

View File

@ -0,0 +1,12 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const index_1 = __importDefault(require("./index"));
const memory_code_points_1 = require("./memory-code-points");
const code_points_data_browser_1 = __importDefault(require("./code-points-data-browser"));
const codePoints = (0, memory_code_points_1.createMemoryCodePoints)(code_points_data_browser_1.default);
const saslprep = index_1.default.bind(null, codePoints);
Object.assign(saslprep, { saslprep, default: saslprep });
module.exports = saslprep;
//# sourceMappingURL=browser.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":";;;;AAAA,oDAAgC;AAChC,6DAA8D;AAC9D,0FAA8C;AAE9C,MAAM,UAAU,GAAG,IAAA,2CAAsB,EAAC,kCAAI,CAAC,CAAC;AAEhD,MAAM,QAAQ,GAAG,eAAS,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AAEzD,iBAAS,QAAQ,CAAC"}

View File

@ -0,0 +1,4 @@
/// <reference types="node" />
declare const data: Buffer;
export default data;
//# sourceMappingURL=code-points-data-browser.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"code-points-data-browser.d.ts","sourceRoot":"","sources":["../src/code-points-data-browser.ts"],"names":[],"mappings":";AAAA,QAAA,MAAM,IAAI,QAGT,CAAC;AACF,eAAe,IAAI,CAAC"}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"version":3,"file":"code-points-data-browser.js","sourceRoot":"","sources":["../src/code-points-data-browser.ts"],"names":[],"mappings":";;AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CACtB,8sliBAA8sliB,EAC9sliB,QAAQ,CACT,CAAC;AACF,kBAAe,IAAI,CAAC"}

View File

@ -0,0 +1,4 @@
/// <reference types="node" />
declare const _default: Buffer;
export default _default;
//# sourceMappingURL=code-points-data.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"code-points-data.d.ts","sourceRoot":"","sources":["../src/code-points-data.ts"],"names":[],"mappings":";;AAEA,wBAKE"}

View File

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const zlib_1 = require("zlib");
exports.default = (0, zlib_1.gunzipSync)(Buffer.from('H4sIAAAAAAACA+3dTYgcWR0A8FfTnekQ47aCkBxiZpYV8RhwYQM7bA/ksoLgSRD0IOSiePAkLrowvWSF4CkHEW856MlTQHA9RKZ1ZJODsEcVcTOyhxUEbXdXtpPp1PNVV39Uz4czEyaTVOb3G6a7XtWrr/devX49/+qekG2Go7Aa2jHGyozG+Dmrzi2mP/xb/zMhLI+WlRm2byubm2h0ivVi7BYzusVjuNkt1l9uFWsutWL8OP4rzV9KeXdsKx1HFhbSc6vIG0fKBZ14UNfLFS6FRrGRtXh98ZvphL/x4uLV/IOzaat/vlikv/TixavxR8PQitfPpKNbffXSwgtr8fV07GX+L1967urwg5W0/t0LV37y/oWFlQtX8ping7reXE3LT680r9yPKyn/3Vn64SwdVs6m/KN0yHrp9D+RvXsqpe6MSia5mH6LSog//Xq/++O74YVTjfDFWK2VIuNSemiPppphcVYeyzcudKqFMiq6cs3vVkrzlcnE0mxeZ1Jf2ZXsSvk8TmRZWYdpalydxd5bc8eUkt1wlEbtqTVLr8XQLFpKMb+dpr9SbSOt4ozTgXUq8+Ihm8cTt0shtCvT6dwao6sxPf5ydmU208/Z0yH8IZtlvZi3e5fG12yn3PLSdPvnQ7vsK9rxyKpqevzFZGVfu3YHezvbnbvit9Xdm5fGbf/MZ7PuuNrTjLJnaofH7gm0h+VKU/g/tdUocrer3cO4yOcuycGoyLrba6Ta+lrlnkZ5ntvWCrfV39wLTuNg9QvsvHb37P8BAGCP0eNTOH5szf154JmnNQIcn7b+FziyAfX4eWnn+C6Lm4M0mj31ubkViiDV4WLvs56qN54xGS3HWER5su6nQtZubl9tcY/4atbr9e5kWewew/g2a8fdy2Yaa97+pgQAAAAAAIBHtt+dYmWwaN/byI5g/9PYVfMvb4YvvDpOLJxvFgueP9VbPXh8/yCZViZxNYATaejmDQAAAACgfjJ/3QUA4JD3Px1InT+5PtQCAAAAAAAAAKD2xP8BAAAAAAAAoP7E/wEAAAAAAACg/sT/AQAAAAAAAKD+xP8BAAAAAAAAoP7E/wEAAAAAAACg/sT/AQAAAAAAAKD+xP8BAAAAAAAAoP7E/wEAAAAAAACg/sT/AQAAAAAAAKD+xP8BAAAAAAAAoP6G6+khVCgSAAAAAAAAAKidYQjLYVfNcPSyAE+dhQsnvAAq59/VHAAAAAAAAOCJmv8E/w4HiLqf3nWuWCB1pe0esg/pT3sKd+m4XjhpFpZH3/1THTcU6cfRLnrHf3ZNPZs+bf9rwPuIUPYAWb+j/Zy0EaAxAAAAAADwrPJ1IMBenu6ea99M+0W/17wCAAAAAAAAnGRLm8oA4JnQUAQAAAAAAAAAUHvi/wAAAAAAAABQf+L/AAAAAAAAAFB/4v8AAAAAAAAAUH/i/wAAAAAAAABQf+L/AAAAAAAAAFB/4v8AAAAAAAAAUH/i/wAAAAAAAABQf+L/AAAAAAAAAFB/4v8AAAAAAAAAUH/i/wAAAAAAAABQf+L/AAAAAAAAAFB/jdX0ECsUCQAAAAAAAADUTiMCAAAAAAAAAHU3VAQAAAAAAAAAUH8hLNf1uwsWbhT/uWBzUEx/ei1Nxc001VqrnN2wuRjCK3G4HuNgtuJoSVj17Q9QyBQBAAAAAAAAHMKpuJ4/+Otc5L2XZi8dJlQ/LCPXhc4keJ9UI9uFre3rDfY9uoXZPQBFHL34HSWWm8sx5rH83d967IfZMRZHHG/2Qi8MFnbscXnhnzHei5NND8P2bW2OT3G8vFeebBHbz9dGEf5jDt+fK4/mTve1bnwndsNL92+mE/75xhs/yz65Ed/ZbP29SP96oxvCDxrxcjj333R262/d6X6tG66lYy/z/+rtMn83nHvv9nfOv/dw4+pvspCl4v7+1npa/nHvtbSvjSJ/mf79/VuLC7N03LiW8o/SMU8ldO+jPOul1OVQ3vVwK+TZqBLCt3/RXvveS7eaD0L8YyhrJeV/cC0WGTdD1hzlCo2H98vzK9a+963V7qRVTeaNa+ZGpWp+N62jSmOetJD8dn67fB4n8nzchG7n4+os2tcgzLWUQVg70rta8lE7nqW7IW710v7eDsV1F7e6433njYfd9j9Gl2KIveptMePVamOXQuhXO5tUk6Pv+kiPX43T7/3YevDy4MN+HLw8CHPX6OqOOwKe73z0+pnf3rvT6pX76j/SUU7/3UjqX5r7ZW7PdZU8Vq2id+29Pphdh3n1Tqp/t0aXaWVOPnsFGre+waRdpKf/TK+7fiX3bOWluVeJg77AAPNDwr37fwAA2GP0+BSOHwcn6/231ghwfPr6X+DIBtTj582d47s8LD3xMeYktt+YHXHe6XQuH9P4Nu+H3ctmGmve/qYEAAAAAACAR7bfnWJlsGgSNNoM54tPZ23EI4vYzPY1/fzq1ud/GP/01jjx8P2tYsG7DzrrB4/vHySTz5YB+n8AAAAAgJrJ/XEXAIDHEf/2yXUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgGdABAAAAAAAAADqbqgIAAAAAAAAAKD2hv8DWK79UBhoBgA=', 'base64'));
//# sourceMappingURL=code-points-data.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"code-points-data.js","sourceRoot":"","sources":["../src/code-points-data.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AAElC,kBAAe,IAAA,iBAAU,EACvB,MAAM,CAAC,IAAI,CACT,0nFAA0nF,EAC1nF,QAAQ,CACT,CACF,CAAC"}

View File

@ -0,0 +1,7 @@
export declare const unassigned_code_points: Set<number>;
export declare const commonly_mapped_to_nothing: Set<number>;
export declare const non_ASCII_space_characters: Set<number>;
export declare const prohibited_characters: Set<number>;
export declare const bidirectional_r_al: Set<number>;
export declare const bidirectional_l: Set<number>;
//# sourceMappingURL=code-points-src.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"code-points-src.d.ts","sourceRoot":"","sources":["../src/code-points-src.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,aA6YjC,CAAC;AAMH,eAAO,MAAM,0BAA0B,aAIrC,CAAC;AAMH,eAAO,MAAM,0BAA0B,aASrC,CAAC;AAMH,eAAO,MAAM,qBAAqB,aA6GhC,CAAC;AAMH,eAAO,MAAM,kBAAkB,aAmC7B,CAAC;AAMH,eAAO,MAAM,eAAe,aAyW1B,CAAC"}

View File

@ -0,0 +1,881 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bidirectional_l = exports.bidirectional_r_al = exports.prohibited_characters = exports.non_ASCII_space_characters = exports.commonly_mapped_to_nothing = exports.unassigned_code_points = void 0;
const util_1 = require("./util");
exports.unassigned_code_points = new Set([
0x0221,
...(0, util_1.range)(0x0234, 0x024f),
...(0, util_1.range)(0x02ae, 0x02af),
...(0, util_1.range)(0x02ef, 0x02ff),
...(0, util_1.range)(0x0350, 0x035f),
...(0, util_1.range)(0x0370, 0x0373),
...(0, util_1.range)(0x0376, 0x0379),
...(0, util_1.range)(0x037b, 0x037d),
...(0, util_1.range)(0x037f, 0x0383),
0x038b,
0x038d,
0x03a2,
0x03cf,
...(0, util_1.range)(0x03f7, 0x03ff),
0x0487,
0x04cf,
...(0, util_1.range)(0x04f6, 0x04f7),
...(0, util_1.range)(0x04fa, 0x04ff),
...(0, util_1.range)(0x0510, 0x0530),
...(0, util_1.range)(0x0557, 0x0558),
0x0560,
0x0588,
...(0, util_1.range)(0x058b, 0x0590),
0x05a2,
0x05ba,
...(0, util_1.range)(0x05c5, 0x05cf),
...(0, util_1.range)(0x05eb, 0x05ef),
...(0, util_1.range)(0x05f5, 0x060b),
...(0, util_1.range)(0x060d, 0x061a),
...(0, util_1.range)(0x061c, 0x061e),
0x0620,
...(0, util_1.range)(0x063b, 0x063f),
...(0, util_1.range)(0x0656, 0x065f),
...(0, util_1.range)(0x06ee, 0x06ef),
0x06ff,
0x070e,
...(0, util_1.range)(0x072d, 0x072f),
...(0, util_1.range)(0x074b, 0x077f),
...(0, util_1.range)(0x07b2, 0x0900),
0x0904,
...(0, util_1.range)(0x093a, 0x093b),
...(0, util_1.range)(0x094e, 0x094f),
...(0, util_1.range)(0x0955, 0x0957),
...(0, util_1.range)(0x0971, 0x0980),
0x0984,
...(0, util_1.range)(0x098d, 0x098e),
...(0, util_1.range)(0x0991, 0x0992),
0x09a9,
0x09b1,
...(0, util_1.range)(0x09b3, 0x09b5),
...(0, util_1.range)(0x09ba, 0x09bb),
0x09bd,
...(0, util_1.range)(0x09c5, 0x09c6),
...(0, util_1.range)(0x09c9, 0x09ca),
...(0, util_1.range)(0x09ce, 0x09d6),
...(0, util_1.range)(0x09d8, 0x09db),
0x09de,
...(0, util_1.range)(0x09e4, 0x09e5),
...(0, util_1.range)(0x09fb, 0x0a01),
...(0, util_1.range)(0x0a03, 0x0a04),
...(0, util_1.range)(0x0a0b, 0x0a0e),
...(0, util_1.range)(0x0a11, 0x0a12),
0x0a29,
0x0a31,
0x0a34,
0x0a37,
...(0, util_1.range)(0x0a3a, 0x0a3b),
0x0a3d,
...(0, util_1.range)(0x0a43, 0x0a46),
...(0, util_1.range)(0x0a49, 0x0a4a),
...(0, util_1.range)(0x0a4e, 0x0a58),
0x0a5d,
...(0, util_1.range)(0x0a5f, 0x0a65),
...(0, util_1.range)(0x0a75, 0x0a80),
0x0a84,
0x0a8c,
0x0a8e,
0x0a92,
0x0aa9,
0x0ab1,
0x0ab4,
...(0, util_1.range)(0x0aba, 0x0abb),
0x0ac6,
0x0aca,
...(0, util_1.range)(0x0ace, 0x0acf),
...(0, util_1.range)(0x0ad1, 0x0adf),
...(0, util_1.range)(0x0ae1, 0x0ae5),
...(0, util_1.range)(0x0af0, 0x0b00),
0x0b04,
...(0, util_1.range)(0x0b0d, 0x0b0e),
...(0, util_1.range)(0x0b11, 0x0b12),
0x0b29,
0x0b31,
...(0, util_1.range)(0x0b34, 0x0b35),
...(0, util_1.range)(0x0b3a, 0x0b3b),
...(0, util_1.range)(0x0b44, 0x0b46),
...(0, util_1.range)(0x0b49, 0x0b4a),
...(0, util_1.range)(0x0b4e, 0x0b55),
...(0, util_1.range)(0x0b58, 0x0b5b),
0x0b5e,
...(0, util_1.range)(0x0b62, 0x0b65),
...(0, util_1.range)(0x0b71, 0x0b81),
0x0b84,
...(0, util_1.range)(0x0b8b, 0x0b8d),
0x0b91,
...(0, util_1.range)(0x0b96, 0x0b98),
0x0b9b,
0x0b9d,
...(0, util_1.range)(0x0ba0, 0x0ba2),
...(0, util_1.range)(0x0ba5, 0x0ba7),
...(0, util_1.range)(0x0bab, 0x0bad),
0x0bb6,
...(0, util_1.range)(0x0bba, 0x0bbd),
...(0, util_1.range)(0x0bc3, 0x0bc5),
0x0bc9,
...(0, util_1.range)(0x0bce, 0x0bd6),
...(0, util_1.range)(0x0bd8, 0x0be6),
...(0, util_1.range)(0x0bf3, 0x0c00),
0x0c04,
0x0c0d,
0x0c11,
0x0c29,
0x0c34,
...(0, util_1.range)(0x0c3a, 0x0c3d),
0x0c45,
0x0c49,
...(0, util_1.range)(0x0c4e, 0x0c54),
...(0, util_1.range)(0x0c57, 0x0c5f),
...(0, util_1.range)(0x0c62, 0x0c65),
...(0, util_1.range)(0x0c70, 0x0c81),
0x0c84,
0x0c8d,
0x0c91,
0x0ca9,
0x0cb4,
...(0, util_1.range)(0x0cba, 0x0cbd),
0x0cc5,
0x0cc9,
...(0, util_1.range)(0x0cce, 0x0cd4),
...(0, util_1.range)(0x0cd7, 0x0cdd),
0x0cdf,
...(0, util_1.range)(0x0ce2, 0x0ce5),
...(0, util_1.range)(0x0cf0, 0x0d01),
0x0d04,
0x0d0d,
0x0d11,
0x0d29,
...(0, util_1.range)(0x0d3a, 0x0d3d),
...(0, util_1.range)(0x0d44, 0x0d45),
0x0d49,
...(0, util_1.range)(0x0d4e, 0x0d56),
...(0, util_1.range)(0x0d58, 0x0d5f),
...(0, util_1.range)(0x0d62, 0x0d65),
...(0, util_1.range)(0x0d70, 0x0d81),
0x0d84,
...(0, util_1.range)(0x0d97, 0x0d99),
0x0db2,
0x0dbc,
...(0, util_1.range)(0x0dbe, 0x0dbf),
...(0, util_1.range)(0x0dc7, 0x0dc9),
...(0, util_1.range)(0x0dcb, 0x0dce),
0x0dd5,
0x0dd7,
...(0, util_1.range)(0x0de0, 0x0df1),
...(0, util_1.range)(0x0df5, 0x0e00),
...(0, util_1.range)(0x0e3b, 0x0e3e),
...(0, util_1.range)(0x0e5c, 0x0e80),
0x0e83,
...(0, util_1.range)(0x0e85, 0x0e86),
0x0e89,
...(0, util_1.range)(0x0e8b, 0x0e8c),
...(0, util_1.range)(0x0e8e, 0x0e93),
0x0e98,
0x0ea0,
0x0ea4,
0x0ea6,
...(0, util_1.range)(0x0ea8, 0x0ea9),
0x0eac,
0x0eba,
...(0, util_1.range)(0x0ebe, 0x0ebf),
0x0ec5,
0x0ec7,
...(0, util_1.range)(0x0ece, 0x0ecf),
...(0, util_1.range)(0x0eda, 0x0edb),
...(0, util_1.range)(0x0ede, 0x0eff),
0x0f48,
...(0, util_1.range)(0x0f6b, 0x0f70),
...(0, util_1.range)(0x0f8c, 0x0f8f),
0x0f98,
0x0fbd,
...(0, util_1.range)(0x0fcd, 0x0fce),
...(0, util_1.range)(0x0fd0, 0x0fff),
0x1022,
0x1028,
0x102b,
...(0, util_1.range)(0x1033, 0x1035),
...(0, util_1.range)(0x103a, 0x103f),
...(0, util_1.range)(0x105a, 0x109f),
...(0, util_1.range)(0x10c6, 0x10cf),
...(0, util_1.range)(0x10f9, 0x10fa),
...(0, util_1.range)(0x10fc, 0x10ff),
...(0, util_1.range)(0x115a, 0x115e),
...(0, util_1.range)(0x11a3, 0x11a7),
...(0, util_1.range)(0x11fa, 0x11ff),
0x1207,
0x1247,
0x1249,
...(0, util_1.range)(0x124e, 0x124f),
0x1257,
0x1259,
...(0, util_1.range)(0x125e, 0x125f),
0x1287,
0x1289,
...(0, util_1.range)(0x128e, 0x128f),
0x12af,
0x12b1,
...(0, util_1.range)(0x12b6, 0x12b7),
0x12bf,
0x12c1,
...(0, util_1.range)(0x12c6, 0x12c7),
0x12cf,
0x12d7,
0x12ef,
0x130f,
0x1311,
...(0, util_1.range)(0x1316, 0x1317),
0x131f,
0x1347,
...(0, util_1.range)(0x135b, 0x1360),
...(0, util_1.range)(0x137d, 0x139f),
...(0, util_1.range)(0x13f5, 0x1400),
...(0, util_1.range)(0x1677, 0x167f),
...(0, util_1.range)(0x169d, 0x169f),
...(0, util_1.range)(0x16f1, 0x16ff),
0x170d,
...(0, util_1.range)(0x1715, 0x171f),
...(0, util_1.range)(0x1737, 0x173f),
...(0, util_1.range)(0x1754, 0x175f),
0x176d,
0x1771,
...(0, util_1.range)(0x1774, 0x177f),
...(0, util_1.range)(0x17dd, 0x17df),
...(0, util_1.range)(0x17ea, 0x17ff),
0x180f,
...(0, util_1.range)(0x181a, 0x181f),
...(0, util_1.range)(0x1878, 0x187f),
...(0, util_1.range)(0x18aa, 0x1dff),
...(0, util_1.range)(0x1e9c, 0x1e9f),
...(0, util_1.range)(0x1efa, 0x1eff),
...(0, util_1.range)(0x1f16, 0x1f17),
...(0, util_1.range)(0x1f1e, 0x1f1f),
...(0, util_1.range)(0x1f46, 0x1f47),
...(0, util_1.range)(0x1f4e, 0x1f4f),
0x1f58,
0x1f5a,
0x1f5c,
0x1f5e,
...(0, util_1.range)(0x1f7e, 0x1f7f),
0x1fb5,
0x1fc5,
...(0, util_1.range)(0x1fd4, 0x1fd5),
0x1fdc,
...(0, util_1.range)(0x1ff0, 0x1ff1),
0x1ff5,
0x1fff,
...(0, util_1.range)(0x2053, 0x2056),
...(0, util_1.range)(0x2058, 0x205e),
...(0, util_1.range)(0x2064, 0x2069),
...(0, util_1.range)(0x2072, 0x2073),
...(0, util_1.range)(0x208f, 0x209f),
...(0, util_1.range)(0x20b2, 0x20cf),
...(0, util_1.range)(0x20eb, 0x20ff),
...(0, util_1.range)(0x213b, 0x213c),
...(0, util_1.range)(0x214c, 0x2152),
...(0, util_1.range)(0x2184, 0x218f),
...(0, util_1.range)(0x23cf, 0x23ff),
...(0, util_1.range)(0x2427, 0x243f),
...(0, util_1.range)(0x244b, 0x245f),
0x24ff,
...(0, util_1.range)(0x2614, 0x2615),
0x2618,
...(0, util_1.range)(0x267e, 0x267f),
...(0, util_1.range)(0x268a, 0x2700),
0x2705,
...(0, util_1.range)(0x270a, 0x270b),
0x2728,
0x274c,
0x274e,
...(0, util_1.range)(0x2753, 0x2755),
0x2757,
...(0, util_1.range)(0x275f, 0x2760),
...(0, util_1.range)(0x2795, 0x2797),
0x27b0,
...(0, util_1.range)(0x27bf, 0x27cf),
...(0, util_1.range)(0x27ec, 0x27ef),
...(0, util_1.range)(0x2b00, 0x2e7f),
0x2e9a,
...(0, util_1.range)(0x2ef4, 0x2eff),
...(0, util_1.range)(0x2fd6, 0x2fef),
...(0, util_1.range)(0x2ffc, 0x2fff),
0x3040,
...(0, util_1.range)(0x3097, 0x3098),
...(0, util_1.range)(0x3100, 0x3104),
...(0, util_1.range)(0x312d, 0x3130),
0x318f,
...(0, util_1.range)(0x31b8, 0x31ef),
...(0, util_1.range)(0x321d, 0x321f),
...(0, util_1.range)(0x3244, 0x3250),
...(0, util_1.range)(0x327c, 0x327e),
...(0, util_1.range)(0x32cc, 0x32cf),
0x32ff,
...(0, util_1.range)(0x3377, 0x337a),
...(0, util_1.range)(0x33de, 0x33df),
0x33ff,
...(0, util_1.range)(0x4db6, 0x4dff),
...(0, util_1.range)(0x9fa6, 0x9fff),
...(0, util_1.range)(0xa48d, 0xa48f),
...(0, util_1.range)(0xa4c7, 0xabff),
...(0, util_1.range)(0xd7a4, 0xd7ff),
...(0, util_1.range)(0xfa2e, 0xfa2f),
...(0, util_1.range)(0xfa6b, 0xfaff),
...(0, util_1.range)(0xfb07, 0xfb12),
...(0, util_1.range)(0xfb18, 0xfb1c),
0xfb37,
0xfb3d,
0xfb3f,
0xfb42,
0xfb45,
...(0, util_1.range)(0xfbb2, 0xfbd2),
...(0, util_1.range)(0xfd40, 0xfd4f),
...(0, util_1.range)(0xfd90, 0xfd91),
...(0, util_1.range)(0xfdc8, 0xfdcf),
...(0, util_1.range)(0xfdfd, 0xfdff),
...(0, util_1.range)(0xfe10, 0xfe1f),
...(0, util_1.range)(0xfe24, 0xfe2f),
...(0, util_1.range)(0xfe47, 0xfe48),
0xfe53,
0xfe67,
...(0, util_1.range)(0xfe6c, 0xfe6f),
0xfe75,
...(0, util_1.range)(0xfefd, 0xfefe),
0xff00,
...(0, util_1.range)(0xffbf, 0xffc1),
...(0, util_1.range)(0xffc8, 0xffc9),
...(0, util_1.range)(0xffd0, 0xffd1),
...(0, util_1.range)(0xffd8, 0xffd9),
...(0, util_1.range)(0xffdd, 0xffdf),
0xffe7,
...(0, util_1.range)(0xffef, 0xfff8),
...(0, util_1.range)(0x10000, 0x102ff),
0x1031f,
...(0, util_1.range)(0x10324, 0x1032f),
...(0, util_1.range)(0x1034b, 0x103ff),
...(0, util_1.range)(0x10426, 0x10427),
...(0, util_1.range)(0x1044e, 0x1cfff),
...(0, util_1.range)(0x1d0f6, 0x1d0ff),
...(0, util_1.range)(0x1d127, 0x1d129),
...(0, util_1.range)(0x1d1de, 0x1d3ff),
0x1d455,
0x1d49d,
...(0, util_1.range)(0x1d4a0, 0x1d4a1),
...(0, util_1.range)(0x1d4a3, 0x1d4a4),
...(0, util_1.range)(0x1d4a7, 0x1d4a8),
0x1d4ad,
0x1d4ba,
0x1d4bc,
0x1d4c1,
0x1d4c4,
0x1d506,
...(0, util_1.range)(0x1d50b, 0x1d50c),
0x1d515,
0x1d51d,
0x1d53a,
0x1d53f,
0x1d545,
...(0, util_1.range)(0x1d547, 0x1d549),
0x1d551,
...(0, util_1.range)(0x1d6a4, 0x1d6a7),
...(0, util_1.range)(0x1d7ca, 0x1d7cd),
...(0, util_1.range)(0x1d800, 0x1fffd),
...(0, util_1.range)(0x2a6d7, 0x2f7ff),
...(0, util_1.range)(0x2fa1e, 0x2fffd),
...(0, util_1.range)(0x30000, 0x3fffd),
...(0, util_1.range)(0x40000, 0x4fffd),
...(0, util_1.range)(0x50000, 0x5fffd),
...(0, util_1.range)(0x60000, 0x6fffd),
...(0, util_1.range)(0x70000, 0x7fffd),
...(0, util_1.range)(0x80000, 0x8fffd),
...(0, util_1.range)(0x90000, 0x9fffd),
...(0, util_1.range)(0xa0000, 0xafffd),
...(0, util_1.range)(0xb0000, 0xbfffd),
...(0, util_1.range)(0xc0000, 0xcfffd),
...(0, util_1.range)(0xd0000, 0xdfffd),
0xe0000,
...(0, util_1.range)(0xe0002, 0xe001f),
...(0, util_1.range)(0xe0080, 0xefffd),
]);
exports.commonly_mapped_to_nothing = new Set([
0x00ad, 0x034f, 0x1806, 0x180b, 0x180c, 0x180d, 0x200b, 0x200c, 0x200d,
0x2060, 0xfe00, 0xfe01, 0xfe02, 0xfe03, 0xfe04, 0xfe05, 0xfe06, 0xfe07,
0xfe08, 0xfe09, 0xfe0a, 0xfe0b, 0xfe0c, 0xfe0d, 0xfe0e, 0xfe0f, 0xfeff,
]);
exports.non_ASCII_space_characters = new Set([
0x00a0, 0x1680,
0x2000, 0x2001, 0x2002,
0x2003, 0x2004,
0x2005, 0x2006,
0x2007, 0x2008,
0x2009, 0x200a,
0x200b, 0x202f,
0x205f, 0x3000,
]);
exports.prohibited_characters = new Set([
...exports.non_ASCII_space_characters,
...(0, util_1.range)(0, 0x001f),
0x007f,
...(0, util_1.range)(0x0080, 0x009f),
0x06dd,
0x070f,
0x180e,
0x200c,
0x200d,
0x2028,
0x2029,
0x2060,
0x2061,
0x2062,
0x2063,
...(0, util_1.range)(0x206a, 0x206f),
0xfeff,
...(0, util_1.range)(0xfff9, 0xfffc),
...(0, util_1.range)(0x1d173, 0x1d17a),
...(0, util_1.range)(0xe000, 0xf8ff),
...(0, util_1.range)(0xf0000, 0xffffd),
...(0, util_1.range)(0x100000, 0x10fffd),
...(0, util_1.range)(0xfdd0, 0xfdef),
...(0, util_1.range)(0xfffe, 0xffff),
...(0, util_1.range)(0x1fffe, 0x1ffff),
...(0, util_1.range)(0x2fffe, 0x2ffff),
...(0, util_1.range)(0x3fffe, 0x3ffff),
...(0, util_1.range)(0x4fffe, 0x4ffff),
...(0, util_1.range)(0x5fffe, 0x5ffff),
...(0, util_1.range)(0x6fffe, 0x6ffff),
...(0, util_1.range)(0x7fffe, 0x7ffff),
...(0, util_1.range)(0x8fffe, 0x8ffff),
...(0, util_1.range)(0x9fffe, 0x9ffff),
...(0, util_1.range)(0xafffe, 0xaffff),
...(0, util_1.range)(0xbfffe, 0xbffff),
...(0, util_1.range)(0xcfffe, 0xcffff),
...(0, util_1.range)(0xdfffe, 0xdffff),
...(0, util_1.range)(0xefffe, 0xeffff),
...(0, util_1.range)(0x10fffe, 0x10ffff),
...(0, util_1.range)(0xd800, 0xdfff),
0xfff9,
0xfffa,
0xfffb,
0xfffc,
0xfffd,
...(0, util_1.range)(0x2ff0, 0x2ffb),
0x0340,
0x0341,
0x200e,
0x200f,
0x202a,
0x202b,
0x202c,
0x202d,
0x202e,
0x206a,
0x206b,
0x206c,
0x206d,
0x206e,
0x206f,
0xe0001,
...(0, util_1.range)(0xe0020, 0xe007f),
]);
exports.bidirectional_r_al = new Set([
0x05be,
0x05c0,
0x05c3,
...(0, util_1.range)(0x05d0, 0x05ea),
...(0, util_1.range)(0x05f0, 0x05f4),
0x061b,
0x061f,
...(0, util_1.range)(0x0621, 0x063a),
...(0, util_1.range)(0x0640, 0x064a),
...(0, util_1.range)(0x066d, 0x066f),
...(0, util_1.range)(0x0671, 0x06d5),
0x06dd,
...(0, util_1.range)(0x06e5, 0x06e6),
...(0, util_1.range)(0x06fa, 0x06fe),
...(0, util_1.range)(0x0700, 0x070d),
0x0710,
...(0, util_1.range)(0x0712, 0x072c),
...(0, util_1.range)(0x0780, 0x07a5),
0x07b1,
0x200f,
0xfb1d,
...(0, util_1.range)(0xfb1f, 0xfb28),
...(0, util_1.range)(0xfb2a, 0xfb36),
...(0, util_1.range)(0xfb38, 0xfb3c),
0xfb3e,
...(0, util_1.range)(0xfb40, 0xfb41),
...(0, util_1.range)(0xfb43, 0xfb44),
...(0, util_1.range)(0xfb46, 0xfbb1),
...(0, util_1.range)(0xfbd3, 0xfd3d),
...(0, util_1.range)(0xfd50, 0xfd8f),
...(0, util_1.range)(0xfd92, 0xfdc7),
...(0, util_1.range)(0xfdf0, 0xfdfc),
...(0, util_1.range)(0xfe70, 0xfe74),
...(0, util_1.range)(0xfe76, 0xfefc),
]);
exports.bidirectional_l = new Set([
...(0, util_1.range)(0x0041, 0x005a),
...(0, util_1.range)(0x0061, 0x007a),
0x00aa,
0x00b5,
0x00ba,
...(0, util_1.range)(0x00c0, 0x00d6),
...(0, util_1.range)(0x00d8, 0x00f6),
...(0, util_1.range)(0x00f8, 0x0220),
...(0, util_1.range)(0x0222, 0x0233),
...(0, util_1.range)(0x0250, 0x02ad),
...(0, util_1.range)(0x02b0, 0x02b8),
...(0, util_1.range)(0x02bb, 0x02c1),
...(0, util_1.range)(0x02d0, 0x02d1),
...(0, util_1.range)(0x02e0, 0x02e4),
0x02ee,
0x037a,
0x0386,
...(0, util_1.range)(0x0388, 0x038a),
0x038c,
...(0, util_1.range)(0x038e, 0x03a1),
...(0, util_1.range)(0x03a3, 0x03ce),
...(0, util_1.range)(0x03d0, 0x03f5),
...(0, util_1.range)(0x0400, 0x0482),
...(0, util_1.range)(0x048a, 0x04ce),
...(0, util_1.range)(0x04d0, 0x04f5),
...(0, util_1.range)(0x04f8, 0x04f9),
...(0, util_1.range)(0x0500, 0x050f),
...(0, util_1.range)(0x0531, 0x0556),
...(0, util_1.range)(0x0559, 0x055f),
...(0, util_1.range)(0x0561, 0x0587),
0x0589,
0x0903,
...(0, util_1.range)(0x0905, 0x0939),
...(0, util_1.range)(0x093d, 0x0940),
...(0, util_1.range)(0x0949, 0x094c),
0x0950,
...(0, util_1.range)(0x0958, 0x0961),
...(0, util_1.range)(0x0964, 0x0970),
...(0, util_1.range)(0x0982, 0x0983),
...(0, util_1.range)(0x0985, 0x098c),
...(0, util_1.range)(0x098f, 0x0990),
...(0, util_1.range)(0x0993, 0x09a8),
...(0, util_1.range)(0x09aa, 0x09b0),
0x09b2,
...(0, util_1.range)(0x09b6, 0x09b9),
...(0, util_1.range)(0x09be, 0x09c0),
...(0, util_1.range)(0x09c7, 0x09c8),
...(0, util_1.range)(0x09cb, 0x09cc),
0x09d7,
...(0, util_1.range)(0x09dc, 0x09dd),
...(0, util_1.range)(0x09df, 0x09e1),
...(0, util_1.range)(0x09e6, 0x09f1),
...(0, util_1.range)(0x09f4, 0x09fa),
...(0, util_1.range)(0x0a05, 0x0a0a),
...(0, util_1.range)(0x0a0f, 0x0a10),
...(0, util_1.range)(0x0a13, 0x0a28),
...(0, util_1.range)(0x0a2a, 0x0a30),
...(0, util_1.range)(0x0a32, 0x0a33),
...(0, util_1.range)(0x0a35, 0x0a36),
...(0, util_1.range)(0x0a38, 0x0a39),
...(0, util_1.range)(0x0a3e, 0x0a40),
...(0, util_1.range)(0x0a59, 0x0a5c),
0x0a5e,
...(0, util_1.range)(0x0a66, 0x0a6f),
...(0, util_1.range)(0x0a72, 0x0a74),
0x0a83,
...(0, util_1.range)(0x0a85, 0x0a8b),
0x0a8d,
...(0, util_1.range)(0x0a8f, 0x0a91),
...(0, util_1.range)(0x0a93, 0x0aa8),
...(0, util_1.range)(0x0aaa, 0x0ab0),
...(0, util_1.range)(0x0ab2, 0x0ab3),
...(0, util_1.range)(0x0ab5, 0x0ab9),
...(0, util_1.range)(0x0abd, 0x0ac0),
0x0ac9,
...(0, util_1.range)(0x0acb, 0x0acc),
0x0ad0,
0x0ae0,
...(0, util_1.range)(0x0ae6, 0x0aef),
...(0, util_1.range)(0x0b02, 0x0b03),
...(0, util_1.range)(0x0b05, 0x0b0c),
...(0, util_1.range)(0x0b0f, 0x0b10),
...(0, util_1.range)(0x0b13, 0x0b28),
...(0, util_1.range)(0x0b2a, 0x0b30),
...(0, util_1.range)(0x0b32, 0x0b33),
...(0, util_1.range)(0x0b36, 0x0b39),
...(0, util_1.range)(0x0b3d, 0x0b3e),
0x0b40,
...(0, util_1.range)(0x0b47, 0x0b48),
...(0, util_1.range)(0x0b4b, 0x0b4c),
0x0b57,
...(0, util_1.range)(0x0b5c, 0x0b5d),
...(0, util_1.range)(0x0b5f, 0x0b61),
...(0, util_1.range)(0x0b66, 0x0b70),
0x0b83,
...(0, util_1.range)(0x0b85, 0x0b8a),
...(0, util_1.range)(0x0b8e, 0x0b90),
...(0, util_1.range)(0x0b92, 0x0b95),
...(0, util_1.range)(0x0b99, 0x0b9a),
0x0b9c,
...(0, util_1.range)(0x0b9e, 0x0b9f),
...(0, util_1.range)(0x0ba3, 0x0ba4),
...(0, util_1.range)(0x0ba8, 0x0baa),
...(0, util_1.range)(0x0bae, 0x0bb5),
...(0, util_1.range)(0x0bb7, 0x0bb9),
...(0, util_1.range)(0x0bbe, 0x0bbf),
...(0, util_1.range)(0x0bc1, 0x0bc2),
...(0, util_1.range)(0x0bc6, 0x0bc8),
...(0, util_1.range)(0x0bca, 0x0bcc),
0x0bd7,
...(0, util_1.range)(0x0be7, 0x0bf2),
...(0, util_1.range)(0x0c01, 0x0c03),
...(0, util_1.range)(0x0c05, 0x0c0c),
...(0, util_1.range)(0x0c0e, 0x0c10),
...(0, util_1.range)(0x0c12, 0x0c28),
...(0, util_1.range)(0x0c2a, 0x0c33),
...(0, util_1.range)(0x0c35, 0x0c39),
...(0, util_1.range)(0x0c41, 0x0c44),
...(0, util_1.range)(0x0c60, 0x0c61),
...(0, util_1.range)(0x0c66, 0x0c6f),
...(0, util_1.range)(0x0c82, 0x0c83),
...(0, util_1.range)(0x0c85, 0x0c8c),
...(0, util_1.range)(0x0c8e, 0x0c90),
...(0, util_1.range)(0x0c92, 0x0ca8),
...(0, util_1.range)(0x0caa, 0x0cb3),
...(0, util_1.range)(0x0cb5, 0x0cb9),
0x0cbe,
...(0, util_1.range)(0x0cc0, 0x0cc4),
...(0, util_1.range)(0x0cc7, 0x0cc8),
...(0, util_1.range)(0x0cca, 0x0ccb),
...(0, util_1.range)(0x0cd5, 0x0cd6),
0x0cde,
...(0, util_1.range)(0x0ce0, 0x0ce1),
...(0, util_1.range)(0x0ce6, 0x0cef),
...(0, util_1.range)(0x0d02, 0x0d03),
...(0, util_1.range)(0x0d05, 0x0d0c),
...(0, util_1.range)(0x0d0e, 0x0d10),
...(0, util_1.range)(0x0d12, 0x0d28),
...(0, util_1.range)(0x0d2a, 0x0d39),
...(0, util_1.range)(0x0d3e, 0x0d40),
...(0, util_1.range)(0x0d46, 0x0d48),
...(0, util_1.range)(0x0d4a, 0x0d4c),
0x0d57,
...(0, util_1.range)(0x0d60, 0x0d61),
...(0, util_1.range)(0x0d66, 0x0d6f),
...(0, util_1.range)(0x0d82, 0x0d83),
...(0, util_1.range)(0x0d85, 0x0d96),
...(0, util_1.range)(0x0d9a, 0x0db1),
...(0, util_1.range)(0x0db3, 0x0dbb),
0x0dbd,
...(0, util_1.range)(0x0dc0, 0x0dc6),
...(0, util_1.range)(0x0dcf, 0x0dd1),
...(0, util_1.range)(0x0dd8, 0x0ddf),
...(0, util_1.range)(0x0df2, 0x0df4),
...(0, util_1.range)(0x0e01, 0x0e30),
...(0, util_1.range)(0x0e32, 0x0e33),
...(0, util_1.range)(0x0e40, 0x0e46),
...(0, util_1.range)(0x0e4f, 0x0e5b),
...(0, util_1.range)(0x0e81, 0x0e82),
0x0e84,
...(0, util_1.range)(0x0e87, 0x0e88),
0x0e8a,
0x0e8d,
...(0, util_1.range)(0x0e94, 0x0e97),
...(0, util_1.range)(0x0e99, 0x0e9f),
...(0, util_1.range)(0x0ea1, 0x0ea3),
0x0ea5,
0x0ea7,
...(0, util_1.range)(0x0eaa, 0x0eab),
...(0, util_1.range)(0x0ead, 0x0eb0),
...(0, util_1.range)(0x0eb2, 0x0eb3),
0x0ebd,
...(0, util_1.range)(0x0ec0, 0x0ec4),
0x0ec6,
...(0, util_1.range)(0x0ed0, 0x0ed9),
...(0, util_1.range)(0x0edc, 0x0edd),
...(0, util_1.range)(0x0f00, 0x0f17),
...(0, util_1.range)(0x0f1a, 0x0f34),
0x0f36,
0x0f38,
...(0, util_1.range)(0x0f3e, 0x0f47),
...(0, util_1.range)(0x0f49, 0x0f6a),
0x0f7f,
0x0f85,
...(0, util_1.range)(0x0f88, 0x0f8b),
...(0, util_1.range)(0x0fbe, 0x0fc5),
...(0, util_1.range)(0x0fc7, 0x0fcc),
0x0fcf,
...(0, util_1.range)(0x1000, 0x1021),
...(0, util_1.range)(0x1023, 0x1027),
...(0, util_1.range)(0x1029, 0x102a),
0x102c,
0x1031,
0x1038,
...(0, util_1.range)(0x1040, 0x1057),
...(0, util_1.range)(0x10a0, 0x10c5),
...(0, util_1.range)(0x10d0, 0x10f8),
0x10fb,
...(0, util_1.range)(0x1100, 0x1159),
...(0, util_1.range)(0x115f, 0x11a2),
...(0, util_1.range)(0x11a8, 0x11f9),
...(0, util_1.range)(0x1200, 0x1206),
...(0, util_1.range)(0x1208, 0x1246),
0x1248,
...(0, util_1.range)(0x124a, 0x124d),
...(0, util_1.range)(0x1250, 0x1256),
0x1258,
...(0, util_1.range)(0x125a, 0x125d),
...(0, util_1.range)(0x1260, 0x1286),
0x1288,
...(0, util_1.range)(0x128a, 0x128d),
...(0, util_1.range)(0x1290, 0x12ae),
0x12b0,
...(0, util_1.range)(0x12b2, 0x12b5),
...(0, util_1.range)(0x12b8, 0x12be),
0x12c0,
...(0, util_1.range)(0x12c2, 0x12c5),
...(0, util_1.range)(0x12c8, 0x12ce),
...(0, util_1.range)(0x12d0, 0x12d6),
...(0, util_1.range)(0x12d8, 0x12ee),
...(0, util_1.range)(0x12f0, 0x130e),
0x1310,
...(0, util_1.range)(0x1312, 0x1315),
...(0, util_1.range)(0x1318, 0x131e),
...(0, util_1.range)(0x1320, 0x1346),
...(0, util_1.range)(0x1348, 0x135a),
...(0, util_1.range)(0x1361, 0x137c),
...(0, util_1.range)(0x13a0, 0x13f4),
...(0, util_1.range)(0x1401, 0x1676),
...(0, util_1.range)(0x1681, 0x169a),
...(0, util_1.range)(0x16a0, 0x16f0),
...(0, util_1.range)(0x1700, 0x170c),
...(0, util_1.range)(0x170e, 0x1711),
...(0, util_1.range)(0x1720, 0x1731),
...(0, util_1.range)(0x1735, 0x1736),
...(0, util_1.range)(0x1740, 0x1751),
...(0, util_1.range)(0x1760, 0x176c),
...(0, util_1.range)(0x176e, 0x1770),
...(0, util_1.range)(0x1780, 0x17b6),
...(0, util_1.range)(0x17be, 0x17c5),
...(0, util_1.range)(0x17c7, 0x17c8),
...(0, util_1.range)(0x17d4, 0x17da),
0x17dc,
...(0, util_1.range)(0x17e0, 0x17e9),
...(0, util_1.range)(0x1810, 0x1819),
...(0, util_1.range)(0x1820, 0x1877),
...(0, util_1.range)(0x1880, 0x18a8),
...(0, util_1.range)(0x1e00, 0x1e9b),
...(0, util_1.range)(0x1ea0, 0x1ef9),
...(0, util_1.range)(0x1f00, 0x1f15),
...(0, util_1.range)(0x1f18, 0x1f1d),
...(0, util_1.range)(0x1f20, 0x1f45),
...(0, util_1.range)(0x1f48, 0x1f4d),
...(0, util_1.range)(0x1f50, 0x1f57),
0x1f59,
0x1f5b,
0x1f5d,
...(0, util_1.range)(0x1f5f, 0x1f7d),
...(0, util_1.range)(0x1f80, 0x1fb4),
...(0, util_1.range)(0x1fb6, 0x1fbc),
0x1fbe,
...(0, util_1.range)(0x1fc2, 0x1fc4),
...(0, util_1.range)(0x1fc6, 0x1fcc),
...(0, util_1.range)(0x1fd0, 0x1fd3),
...(0, util_1.range)(0x1fd6, 0x1fdb),
...(0, util_1.range)(0x1fe0, 0x1fec),
...(0, util_1.range)(0x1ff2, 0x1ff4),
...(0, util_1.range)(0x1ff6, 0x1ffc),
0x200e,
0x2071,
0x207f,
0x2102,
0x2107,
...(0, util_1.range)(0x210a, 0x2113),
0x2115,
...(0, util_1.range)(0x2119, 0x211d),
0x2124,
0x2126,
0x2128,
...(0, util_1.range)(0x212a, 0x212d),
...(0, util_1.range)(0x212f, 0x2131),
...(0, util_1.range)(0x2133, 0x2139),
...(0, util_1.range)(0x213d, 0x213f),
...(0, util_1.range)(0x2145, 0x2149),
...(0, util_1.range)(0x2160, 0x2183),
...(0, util_1.range)(0x2336, 0x237a),
0x2395,
...(0, util_1.range)(0x249c, 0x24e9),
...(0, util_1.range)(0x3005, 0x3007),
...(0, util_1.range)(0x3021, 0x3029),
...(0, util_1.range)(0x3031, 0x3035),
...(0, util_1.range)(0x3038, 0x303c),
...(0, util_1.range)(0x3041, 0x3096),
...(0, util_1.range)(0x309d, 0x309f),
...(0, util_1.range)(0x30a1, 0x30fa),
...(0, util_1.range)(0x30fc, 0x30ff),
...(0, util_1.range)(0x3105, 0x312c),
...(0, util_1.range)(0x3131, 0x318e),
...(0, util_1.range)(0x3190, 0x31b7),
...(0, util_1.range)(0x31f0, 0x321c),
...(0, util_1.range)(0x3220, 0x3243),
...(0, util_1.range)(0x3260, 0x327b),
...(0, util_1.range)(0x327f, 0x32b0),
...(0, util_1.range)(0x32c0, 0x32cb),
...(0, util_1.range)(0x32d0, 0x32fe),
...(0, util_1.range)(0x3300, 0x3376),
...(0, util_1.range)(0x337b, 0x33dd),
...(0, util_1.range)(0x33e0, 0x33fe),
...(0, util_1.range)(0x3400, 0x4db5),
...(0, util_1.range)(0x4e00, 0x9fa5),
...(0, util_1.range)(0xa000, 0xa48c),
...(0, util_1.range)(0xac00, 0xd7a3),
...(0, util_1.range)(0xd800, 0xfa2d),
...(0, util_1.range)(0xfa30, 0xfa6a),
...(0, util_1.range)(0xfb00, 0xfb06),
...(0, util_1.range)(0xfb13, 0xfb17),
...(0, util_1.range)(0xff21, 0xff3a),
...(0, util_1.range)(0xff41, 0xff5a),
...(0, util_1.range)(0xff66, 0xffbe),
...(0, util_1.range)(0xffc2, 0xffc7),
...(0, util_1.range)(0xffca, 0xffcf),
...(0, util_1.range)(0xffd2, 0xffd7),
...(0, util_1.range)(0xffda, 0xffdc),
...(0, util_1.range)(0x10300, 0x1031e),
...(0, util_1.range)(0x10320, 0x10323),
...(0, util_1.range)(0x10330, 0x1034a),
...(0, util_1.range)(0x10400, 0x10425),
...(0, util_1.range)(0x10428, 0x1044d),
...(0, util_1.range)(0x1d000, 0x1d0f5),
...(0, util_1.range)(0x1d100, 0x1d126),
...(0, util_1.range)(0x1d12a, 0x1d166),
...(0, util_1.range)(0x1d16a, 0x1d172),
...(0, util_1.range)(0x1d183, 0x1d184),
...(0, util_1.range)(0x1d18c, 0x1d1a9),
...(0, util_1.range)(0x1d1ae, 0x1d1dd),
...(0, util_1.range)(0x1d400, 0x1d454),
...(0, util_1.range)(0x1d456, 0x1d49c),
...(0, util_1.range)(0x1d49e, 0x1d49f),
0x1d4a2,
...(0, util_1.range)(0x1d4a5, 0x1d4a6),
...(0, util_1.range)(0x1d4a9, 0x1d4ac),
...(0, util_1.range)(0x1d4ae, 0x1d4b9),
0x1d4bb,
...(0, util_1.range)(0x1d4bd, 0x1d4c0),
...(0, util_1.range)(0x1d4c2, 0x1d4c3),
...(0, util_1.range)(0x1d4c5, 0x1d505),
...(0, util_1.range)(0x1d507, 0x1d50a),
...(0, util_1.range)(0x1d50d, 0x1d514),
...(0, util_1.range)(0x1d516, 0x1d51c),
...(0, util_1.range)(0x1d51e, 0x1d539),
...(0, util_1.range)(0x1d53b, 0x1d53e),
...(0, util_1.range)(0x1d540, 0x1d544),
0x1d546,
...(0, util_1.range)(0x1d54a, 0x1d550),
...(0, util_1.range)(0x1d552, 0x1d6a3),
...(0, util_1.range)(0x1d6a8, 0x1d7c9),
...(0, util_1.range)(0x20000, 0x2a6d6),
...(0, util_1.range)(0x2f800, 0x2fa1d),
...(0, util_1.range)(0xf0000, 0xffffd),
...(0, util_1.range)(0x100000, 0x10fffd),
]);
//# sourceMappingURL=code-points-src.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=generate-code-points.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"generate-code-points.d.ts","sourceRoot":"","sources":["../src/generate-code-points.ts"],"names":[],"mappings":""}

View File

@ -0,0 +1,69 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const zlib_1 = require("zlib");
const sparse_bitfield_1 = __importDefault(require("sparse-bitfield"));
const codePoints = __importStar(require("./code-points-src"));
const fs_1 = require("fs");
if (!process.env.GENERATE_CODE_POINTS) {
process.exitCode = 0;
process.exit();
}
const unassigned_code_points = (0, sparse_bitfield_1.default)();
const commonly_mapped_to_nothing = (0, sparse_bitfield_1.default)();
const non_ascii_space_characters = (0, sparse_bitfield_1.default)();
const prohibited_characters = (0, sparse_bitfield_1.default)();
const bidirectional_r_al = (0, sparse_bitfield_1.default)();
const bidirectional_l = (0, sparse_bitfield_1.default)();
function traverse(bits, src) {
for (const code of src.keys()) {
bits.set(code, true);
}
const buffer = bits.toBuffer();
return Buffer.concat([createSize(buffer), buffer]);
}
function createSize(buffer) {
const buf = Buffer.alloc(4);
buf.writeUInt32BE(buffer.length);
return buf;
}
const memory = [];
memory.push(traverse(unassigned_code_points, codePoints.unassigned_code_points), traverse(commonly_mapped_to_nothing, codePoints.commonly_mapped_to_nothing), traverse(non_ascii_space_characters, codePoints.non_ASCII_space_characters), traverse(prohibited_characters, codePoints.prohibited_characters), traverse(bidirectional_r_al, codePoints.bidirectional_r_al), traverse(bidirectional_l, codePoints.bidirectional_l));
const fsStream = (0, fs_1.createWriteStream)(process.argv[2]);
fsStream.write(`import { gunzipSync } from 'zlib';
export default gunzipSync(
Buffer.from(
'${(0, zlib_1.gzipSync)(Buffer.concat(memory), { level: 9 }).toString('base64')}',
'base64'
)
);
`);
const fsStreamUncompressedData = (0, fs_1.createWriteStream)(process.argv[3]);
fsStreamUncompressedData.write(`const data = Buffer.from('${Buffer.concat(memory).toString('base64')}', 'base64');\nexport default data;\n`);
//# sourceMappingURL=generate-code-points.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"generate-code-points.js","sourceRoot":"","sources":["../src/generate-code-points.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAgC;AAChC,sEAAuC;AACvC,8DAAgD;AAChD,2BAAuC;AAEvC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE;IAErC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,EAAE,CAAC;CAChB;AAED,MAAM,sBAAsB,GAAG,IAAA,yBAAQ,GAAE,CAAC;AAC1C,MAAM,0BAA0B,GAAG,IAAA,yBAAQ,GAAE,CAAC;AAC9C,MAAM,0BAA0B,GAAG,IAAA,yBAAQ,GAAE,CAAC;AAC9C,MAAM,qBAAqB,GAAG,IAAA,yBAAQ,GAAE,CAAC;AACzC,MAAM,kBAAkB,GAAG,IAAA,yBAAQ,GAAE,CAAC;AACtC,MAAM,eAAe,GAAG,IAAA,yBAAQ,GAAE,CAAC;AAMnC,SAAS,QAAQ,CAAC,IAA+B,EAAE,GAAgB;IACjE,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;QAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACtB;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC/B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,UAAU,CAAC,MAAc;IAChC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5B,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAEjC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,MAAM,GAAa,EAAE,CAAC;AAE5B,MAAM,CAAC,IAAI,CACT,QAAQ,CAAC,sBAAsB,EAAE,UAAU,CAAC,sBAAsB,CAAC,EACnE,QAAQ,CAAC,0BAA0B,EAAE,UAAU,CAAC,0BAA0B,CAAC,EAC3E,QAAQ,CAAC,0BAA0B,EAAE,UAAU,CAAC,0BAA0B,CAAC,EAC3E,QAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAC,EACjE,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,CAAC,EAC3D,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC,CACtD,CAAC;AAEF,MAAM,QAAQ,GAAG,IAAA,sBAAiB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,QAAQ,CAAC,KAAK,CACZ;;;;OAIK,IAAA,eAAQ,EAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;;;;CAItE,CACA,CAAC;AAEF,MAAM,wBAAwB,GAAG,IAAA,sBAAiB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE,wBAAwB,CAAC,KAAK,CAC5B,6BAA6B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CACzD,QAAQ,CACT,uCAAuC,CACzC,CAAC"}

View File

@ -0,0 +1,11 @@
import type { createMemoryCodePoints } from './memory-code-points';
declare function saslprep({ unassigned_code_points, commonly_mapped_to_nothing, non_ASCII_space_characters, prohibited_characters, bidirectional_r_al, bidirectional_l, }: ReturnType<typeof createMemoryCodePoints>, input: string, opts?: {
allowUnassigned?: boolean;
}): string;
declare namespace saslprep {
export var saslprep: typeof import(".");
var _a: typeof import(".");
export { _a as default };
}
export = saslprep;
//# sourceMappingURL=index.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAsCnE,iBAAS,QAAQ,CACf,EACE,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAChB,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAC5C,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAO,GACvC,MAAM,CAqGR;kBAhHQ,QAAQ;;;;;AAoHjB,SAAS,QAAQ,CAAC"}

View File

@ -0,0 +1,65 @@
"use strict";
const getCodePoint = (character) => character.codePointAt(0);
const first = (x) => x[0];
const last = (x) => x[x.length - 1];
function toCodePoints(input) {
const codepoints = [];
const size = input.length;
for (let i = 0; i < size; i += 1) {
const before = input.charCodeAt(i);
if (before >= 0xd800 && before <= 0xdbff && size > i + 1) {
const next = input.charCodeAt(i + 1);
if (next >= 0xdc00 && next <= 0xdfff) {
codepoints.push((before - 0xd800) * 0x400 + next - 0xdc00 + 0x10000);
i += 1;
continue;
}
}
codepoints.push(before);
}
return codepoints;
}
function saslprep({ unassigned_code_points, commonly_mapped_to_nothing, non_ASCII_space_characters, prohibited_characters, bidirectional_r_al, bidirectional_l, }, input, opts = {}) {
const mapping2space = non_ASCII_space_characters;
const mapping2nothing = commonly_mapped_to_nothing;
if (typeof input !== 'string') {
throw new TypeError('Expected string.');
}
if (input.length === 0) {
return '';
}
const mapped_input = toCodePoints(input)
.map((character) => (mapping2space.get(character) ? 0x20 : character))
.filter((character) => !mapping2nothing.get(character));
const normalized_input = String.fromCodePoint
.apply(null, mapped_input)
.normalize('NFKC');
const normalized_map = toCodePoints(normalized_input);
const hasProhibited = normalized_map.some((character) => prohibited_characters.get(character));
if (hasProhibited) {
throw new Error('Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3');
}
if (opts.allowUnassigned !== true) {
const hasUnassigned = normalized_map.some((character) => unassigned_code_points.get(character));
if (hasUnassigned) {
throw new Error('Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5');
}
}
const hasBidiRAL = normalized_map.some((character) => bidirectional_r_al.get(character));
const hasBidiL = normalized_map.some((character) => bidirectional_l.get(character));
if (hasBidiRAL && hasBidiL) {
throw new Error('String must not contain RandALCat and LCat at the same time,' +
' see https://tools.ietf.org/html/rfc3454#section-6');
}
const isFirstBidiRAL = bidirectional_r_al.get(getCodePoint(first(normalized_input)));
const isLastBidiRAL = bidirectional_r_al.get(getCodePoint(last(normalized_input)));
if (hasBidiRAL && !(isFirstBidiRAL && isLastBidiRAL)) {
throw new Error('Bidirectional RandALCat character must be the first and the last' +
' character of the string, see https://tools.ietf.org/html/rfc3454#section-6');
}
return normalized_input;
}
saslprep.saslprep = saslprep;
saslprep.default = saslprep;
module.exports = saslprep;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAGA,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACrE,MAAM,KAAK,GAAG,CAA2B,CAAI,EAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,MAAM,IAAI,GAAG,CAA2B,CAAI,EAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAO5E,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,UAAU,GAAG,EAAE,CAAC;IACtB,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;IAE1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAEnC,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;YACxD,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAErC,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE;gBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;gBACrE,CAAC,IAAI,CAAC,CAAC;gBACP,SAAS;aACV;SACF;QAED,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACzB;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAKD,SAAS,QAAQ,CACf,EACE,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAC2B,EAC5C,KAAa,EACb,OAAsC,EAAE;IAQxC,MAAM,aAAa,GAAG,0BAA0B,CAAC;IAMjD,MAAM,eAAe,GAAG,0BAA0B,CAAC;IAEnD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAC;KACzC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,EAAE,CAAC;KACX;IAGD,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC;SAErC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;SAErE,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IAG1D,MAAM,gBAAgB,GAAG,MAAM,CAAC,aAAa;SAC1C,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC;SACzB,SAAS,CAAC,MAAM,CAAC,CAAC;IAErB,MAAM,cAAc,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAGtD,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACtD,qBAAqB,CAAC,GAAG,CAAC,SAAS,CAAC,CACrC,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAC;KACH;IAGD,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,EAAE;QACjC,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACtD,sBAAsB,CAAC,GAAG,CAAC,SAAS,CAAC,CACtC,CAAC;QAEF,IAAI,aAAa,EAAE;YACjB,MAAM,IAAI,KAAK,CACb,4EAA4E,CAC7E,CAAC;SACH;KACF;IAID,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACnD,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,CAClC,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACjD,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAC/B,CAAC;IAIF,IAAI,UAAU,IAAI,QAAQ,EAAE;QAC1B,MAAM,IAAI,KAAK,CACb,8DAA8D;YAC5D,oDAAoD,CACvD,CAAC;KACH;IAQD,MAAM,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAC3C,YAAY,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAE,CACvC,CAAC;IACF,MAAM,aAAa,GAAG,kBAAkB,CAAC,GAAG,CAC1C,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAE,CACtC,CAAC;IAEF,IAAI,UAAU,IAAI,CAAC,CAAC,cAAc,IAAI,aAAa,CAAC,EAAE;QACpD,MAAM,IAAI,KAAK,CACb,kEAAkE;YAChE,6EAA6E,CAChF,CAAC;KACH;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7B,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5B,iBAAS,QAAQ,CAAC"}

View File

@ -0,0 +1,11 @@
/// <reference types="node" />
import bitfield from 'sparse-bitfield';
export declare function createMemoryCodePoints(data: Buffer): {
unassigned_code_points: bitfield.BitFieldInstance;
commonly_mapped_to_nothing: bitfield.BitFieldInstance;
non_ASCII_space_characters: bitfield.BitFieldInstance;
prohibited_characters: bitfield.BitFieldInstance;
bidirectional_r_al: bitfield.BitFieldInstance;
bidirectional_l: bitfield.BitFieldInstance;
};
//# sourceMappingURL=memory-code-points.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"memory-code-points.d.ts","sourceRoot":"","sources":["../src/memory-code-points.ts"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM;;;;;;;EA+BlD"}

View File

@ -0,0 +1,33 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMemoryCodePoints = void 0;
const sparse_bitfield_1 = __importDefault(require("sparse-bitfield"));
function createMemoryCodePoints(data) {
let offset = 0;
function read() {
const size = data.readUInt32BE(offset);
offset += 4;
const codepoints = data.slice(offset, offset + size);
offset += size;
return (0, sparse_bitfield_1.default)({ buffer: codepoints });
}
const unassigned_code_points = read();
const commonly_mapped_to_nothing = read();
const non_ASCII_space_characters = read();
const prohibited_characters = read();
const bidirectional_r_al = read();
const bidirectional_l = read();
return {
unassigned_code_points,
commonly_mapped_to_nothing,
non_ASCII_space_characters,
prohibited_characters,
bidirectional_r_al,
bidirectional_l,
};
}
exports.createMemoryCodePoints = createMemoryCodePoints;
//# sourceMappingURL=memory-code-points.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"memory-code-points.js","sourceRoot":"","sources":["../src/memory-code-points.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuC;AAEvC,SAAgB,sBAAsB,CAAC,IAAY;IACjD,IAAI,MAAM,GAAG,CAAC,CAAC;IAKf,SAAS,IAAI;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,CAAC;QAEZ,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;QACrD,MAAM,IAAI,IAAI,CAAC;QAEf,OAAO,IAAA,yBAAQ,EAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,sBAAsB,GAAG,IAAI,EAAE,CAAC;IACtC,MAAM,0BAA0B,GAAG,IAAI,EAAE,CAAC;IAC1C,MAAM,0BAA0B,GAAG,IAAI,EAAE,CAAC;IAC1C,MAAM,qBAAqB,GAAG,IAAI,EAAE,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAI,EAAE,CAAC;IAE/B,OAAO;QACL,sBAAsB;QACtB,0BAA0B;QAC1B,0BAA0B;QAC1B,qBAAqB;QACrB,kBAAkB;QAClB,eAAe;KAChB,CAAC;AACJ,CAAC;AA/BD,wDA+BC"}

View File

@ -0,0 +1,10 @@
declare function saslprep(input: string, opts?: {
allowUnassigned?: boolean;
}): string;
declare namespace saslprep {
export var saslprep: typeof import("./node");
var _a: typeof import("./node");
export { _a as default };
}
export = saslprep;
//# sourceMappingURL=node.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAMA,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAE7E;kBAFQ,QAAQ;;;;;AAOjB,SAAS,QAAQ,CAAC"}

View File

@ -0,0 +1,15 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const index_1 = __importDefault(require("./index"));
const memory_code_points_1 = require("./memory-code-points");
const code_points_data_1 = __importDefault(require("./code-points-data"));
const codePoints = (0, memory_code_points_1.createMemoryCodePoints)(code_points_data_1.default);
function saslprep(input, opts) {
return (0, index_1.default)(codePoints, input, opts);
}
saslprep.saslprep = saslprep;
saslprep.default = saslprep;
module.exports = saslprep;
//# sourceMappingURL=node.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":";;;;AAAA,oDAAgC;AAChC,6DAA8D;AAC9D,0EAAsC;AAEtC,MAAM,UAAU,GAAG,IAAA,2CAAsB,EAAC,0BAAI,CAAC,CAAC;AAEhD,SAAS,QAAQ,CAAC,KAAa,EAAE,IAAoC;IACnE,OAAO,IAAA,eAAS,EAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7B,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;AAE5B,iBAAS,QAAQ,CAAC"}

View File

@ -0,0 +1,2 @@
export declare function range(from: number, to: number): number[];
//# sourceMappingURL=util.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAGA,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAQxD"}

View File

@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.range = void 0;
function range(from, to) {
const list = new Array(to - from + 1);
for (let i = 0; i < list.length; i += 1) {
list[i] = from + i;
}
return list;
}
exports.range = range;
//# sourceMappingURL=util.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,KAAK,CAAC,IAAY,EAAE,EAAU;IAE5C,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACvC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;KACpB;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AARD,sBAQC"}

View File

@ -0,0 +1,87 @@
{
"name": "@mongodb-js/saslprep",
"description": "SASLprep: Stringprep Profile for User Names and Passwords, rfc4013",
"keywords": [
"sasl",
"saslprep",
"stringprep",
"rfc4013",
"4013"
],
"author": "Dmitry Tsvettsikh <me@reklatsmasters.com>",
"publishConfig": {
"access": "public"
},
"main": "dist/node.js",
"bugs": {
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
"email": "compass@mongodb.com"
},
"homepage": "https://github.com/mongodb-js/devtools-shared/tree/main/packages/saslprep",
"version": "1.1.5",
"repository": {
"type": "git",
"url": "https://github.com/mongodb-js/devtools-shared.git"
},
"files": [
"dist"
],
"license": "MIT",
"exports": {
"browser": {
"types": "./dist/browser.d.ts",
"default": "./dist/browser.js"
},
"import": {
"types": "./dist/node.d.ts",
"default": "./dist/.esm-wrapper.mjs"
},
"require": {
"types": "./dist/node.d.ts",
"default": "./dist/node.js"
}
},
"types": "./dist/node.d.ts",
"scripts": {
"gen-code-points": "ts-node src/generate-code-points.ts src/code-points-data.ts src/code-points-data-browser.ts",
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile",
"compile": "npm run gen-code-points && tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
"typecheck": "tsc --noEmit",
"eslint": "eslint",
"prettier": "prettier",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"test": "mocha",
"test-cov": "nyc -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
"test-watch": "npm run test -- --watch",
"test-ci": "npm run test-cov",
"reformat": "npm run prettier -- --write ."
},
"dependencies": {
"sparse-bitfield": "^3.0.3"
},
"devDependencies": {
"@mongodb-js/eslint-config-devtools": "0.9.10",
"@mongodb-js/mocha-config-devtools": "^1.0.3",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-devtools": "^1.0.1",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.35",
"@types/sinon-chai": "^3.2.5",
"@types/sparse-bitfield": "^3.0.1",
"chai": "^4.3.6",
"depcheck": "^1.4.1",
"eslint": "^7.25.0",
"gen-esm-wrapper": "^1.1.0",
"mocha": "^8.4.0",
"nyc": "^15.1.0",
"prettier": "^2.3.2",
"sinon": "^9.2.3",
"typescript": "^5.0.4"
},
"gitHead": "b6736f06dcac6a3891093586a554beec598997b0"
}

View File

@ -0,0 +1,29 @@
# saslprep
_Note: This is a fork of the original [`saslprep`](https://www.npmjs.com/package/saslprep) npm package
and provides equivalent functionality._
Stringprep Profile for User Names and Passwords, [rfc4013](https://tools.ietf.org/html/rfc4013)
### Usage
```js
const saslprep = require('@mongodb-js/saslprep');
saslprep('password\u00AD'); // password
saslprep('password\u0007'); // Error: prohibited character
```
### API
##### `saslprep(input: String, opts: Options): String`
Normalize user name or password.
##### `Options.allowUnassigned: bool`
A special behavior for unassigned code points, see https://tools.ietf.org/html/rfc4013#section-2.5. Disabled by default.
## License
MIT, 2017-2019 (c) Dmitriy Tsvettsikh

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

View File

@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/webidl-conversions`
# Summary
This package contains type definitions for webidl-conversions (https://github.com/jsdom/webidl-conversions#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender).

View File

@ -0,0 +1,91 @@
declare namespace WebIDLConversions {
interface Globals {
[key: string]: unknown;
Number: (value?: unknown) => number;
String: (value?: unknown) => string;
TypeError: new(message?: string) => TypeError;
}
interface Options {
context?: string | undefined;
globals?: Globals | undefined;
}
interface IntegerOptions extends Options {
enforceRange?: boolean | undefined;
clamp?: boolean | undefined;
}
interface StringOptions extends Options {
treatNullAsEmptyString?: boolean | undefined;
}
interface BufferSourceOptions extends Options {
allowShared?: boolean | undefined;
}
type IntegerConversion = (V: unknown, opts?: IntegerOptions) => number;
type StringConversion = (V: unknown, opts?: StringOptions) => string;
type NumberConversion = (V: unknown, opts?: Options) => number;
}
declare const WebIDLConversions: {
any<V>(V: V, opts?: WebIDLConversions.Options): V;
undefined(V?: unknown, opts?: WebIDLConversions.Options): void;
boolean(V: unknown, opts?: WebIDLConversions.Options): boolean;
byte(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
octet(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
short(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
["unsigned short"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
long(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
["unsigned long"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
["long long"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
["unsigned long long"](V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
double(V: unknown, opts?: WebIDLConversions.Options): number;
["unrestricted double"](V: unknown, opts?: WebIDLConversions.Options): number;
float(V: unknown, opts?: WebIDLConversions.Options): number;
["unrestricted float"](V: unknown, opts?: WebIDLConversions.Options): number;
DOMString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
ByteString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
USVString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
object<V>(V: V, opts?: WebIDLConversions.Options): V extends object ? V : V & object;
ArrayBuffer(
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions & { allowShared?: false | undefined },
): ArrayBuffer;
ArrayBuffer(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): ArrayBufferLike;
DataView(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): DataView;
Int8Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int8Array;
Int16Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int16Array;
Int32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int32Array;
Uint8Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint8Array;
Uint16Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint16Array;
Uint32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint32Array;
Uint8ClampedArray(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint8ClampedArray;
Float32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Float32Array;
Float64Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Float64Array;
ArrayBufferView(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): ArrayBufferView;
BufferSource(
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions & { allowShared?: false | undefined },
): ArrayBuffer | ArrayBufferView;
BufferSource(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): ArrayBufferLike | ArrayBufferView;
DOMTimeStamp(V: unknown, opts?: WebIDLConversions.Options): number;
};
// This can't use ES6 style exports, as those can't have spaces in export names.
export = WebIDLConversions;

View File

@ -0,0 +1,30 @@
{
"name": "@types/webidl-conversions",
"version": "7.0.3",
"description": "TypeScript definitions for webidl-conversions",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions",
"license": "MIT",
"contributors": [
{
"name": "ExE Boss",
"githubUsername": "ExE-Boss",
"url": "https://github.com/ExE-Boss"
},
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/webidl-conversions"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "ff1514e10869784e8b7cca9c4099a4213d3f14b48c198b1bf116300df94bf608",
"typeScriptVersion": "4.5"
}

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

View File

@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/whatwg-url`
# Summary
This package contains type definitions for whatwg-url (https://github.com/jsdom/whatwg-url#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url.
### Additional Details
* Last updated: Tue, 09 Jan 2024 19:06:33 GMT
* Dependencies: [@types/webidl-conversions](https://npmjs.com/package/@types/webidl-conversions)
# Credits
These definitions were written by [Alexander Marks](https://github.com/aomarks), [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender).

View File

@ -0,0 +1,169 @@
/// <reference lib="es2020"/>
/** https://url.spec.whatwg.org/#url-representation */
export interface URLRecord {
scheme: string;
username: string;
password: string;
host: string | number | IPv6Address | null;
port: number | null;
path: string | string[];
query: string | null;
fragment: string | null;
}
/** https://url.spec.whatwg.org/#concept-ipv6 */
export type IPv6Address = [number, number, number, number, number, number, number, number];
/** https://url.spec.whatwg.org/#url-class */
export class URL {
constructor(url: string, base?: string | URL);
get href(): string;
set href(V: string);
get origin(): string;
get protocol(): string;
set protocol(V: string);
get username(): string;
set username(V: string);
get password(): string;
set password(V: string);
get host(): string;
set host(V: string);
get hostname(): string;
set hostname(V: string);
get port(): string;
set port(V: string);
get pathname(): string;
set pathname(V: string);
get search(): string;
set search(V: string);
get searchParams(): URLSearchParams;
get hash(): string;
set hash(V: string);
toJSON(): string;
readonly [Symbol.toStringTag]: "URL";
}
/** https://url.spec.whatwg.org/#interface-urlsearchparams */
export class URLSearchParams {
constructor(
init?:
| ReadonlyArray<readonly [name: string, value: string]>
| Iterable<readonly [name: string, value: string]>
| { readonly [name: string]: string }
| string,
);
append(name: string, value: string): void;
delete(name: string): void;
get(name: string): string | null;
getAll(name: string): string[];
has(name: string): boolean;
set(name: string, value: string): void;
sort(): void;
keys(): IterableIterator<string>;
values(): IterableIterator<string>;
entries(): IterableIterator<[name: string, value: string]>;
forEach<THIS_ARG = void>(
callback: (this: THIS_ARG, value: string, name: string, searchParams: this) => void,
thisArg?: THIS_ARG,
): void;
readonly [Symbol.toStringTag]: "URLSearchParams";
[Symbol.iterator](): IterableIterator<[name: string, value: string]>;
}
/** https://url.spec.whatwg.org/#concept-url-parser */
export function parseURL(input: string, options?: { readonly baseURL?: URLRecord | undefined }): URLRecord | null;
/** https://url.spec.whatwg.org/#concept-basic-url-parser */
export function basicURLParse(
input: string,
options?: {
baseURL?: URLRecord | undefined;
url?: URLRecord | undefined;
stateOverride?: StateOverride | undefined;
},
): URLRecord | null;
/** https://url.spec.whatwg.org/#scheme-start-state */
export type StateOverride =
| "scheme start"
| "scheme"
| "no scheme"
| "special relative or authority"
| "path or authority"
| "relative"
| "relative slash"
| "special authority slashes"
| "special authority ignore slashes"
| "authority"
| "host"
| "hostname"
| "port"
| "file"
| "file slash"
| "file host"
| "path start"
| "path"
| "opaque path"
| "query"
| "fragment";
/** https://url.spec.whatwg.org/#concept-url-serializer */
export function serializeURL(urlRecord: URLRecord, excludeFragment?: boolean): string;
/** https://url.spec.whatwg.org/#concept-host-serializer */
export function serializeHost(host: string | number | IPv6Address): string;
/** https://url.spec.whatwg.org/#url-path-serializer */
export function serializePath(urlRecord: URLRecord): string;
/** https://url.spec.whatwg.org/#serialize-an-integer */
export function serializeInteger(number: number): string;
/** https://html.spec.whatwg.org#ascii-serialisation-of-an-origin */
export function serializeURLOrigin(urlRecord: URLRecord): string;
/** https://url.spec.whatwg.org/#set-the-username */
export function setTheUsername(urlRecord: URLRecord, username: string): void;
/** https://url.spec.whatwg.org/#set-the-password */
export function setThePassword(urlRecord: URLRecord, password: string): void;
/** https://url.spec.whatwg.org/#url-opaque-path */
export function hasAnOpaquePath(urlRecord: URLRecord): boolean;
/** https://url.spec.whatwg.org/#cannot-have-a-username-password-port */
export function cannotHaveAUsernamePasswordPort(urlRecord: URLRecord): boolean;
/** https://url.spec.whatwg.org/#percent-decode */
export function percentDecodeBytes(buffer: TypedArray): Uint8Array;
/** https://url.spec.whatwg.org/#percent-decode-string */
export function percentDecodeString(string: string): Uint8Array;
export type TypedArray =
| Uint8Array
| Uint8ClampedArray
| Uint16Array
| Uint32Array
| Int8Array
| Int16Array
| Int32Array
| Float32Array
| Float64Array;

View File

@ -0,0 +1,22 @@
import { Globals } from "webidl-conversions";
import { implementation as URLSearchParamsImpl } from "./URLSearchParams-impl";
declare class URLImpl {
constructor(globalObject: Globals, constructorArgs: readonly [url: string, base?: string]);
href: string;
readonly origin: string;
protocol: string;
username: string;
password: string;
host: string;
hostname: string;
port: string;
pathname: string;
search: string;
readonly searchParams: URLSearchParamsImpl;
hash: string;
toJSON(): string;
}
export { URLImpl as implementation };

View File

@ -0,0 +1,66 @@
import { URL } from "../index";
import { implementation as URLImpl } from "./URL-impl";
/**
* Checks whether `obj` is a `URL` object with an implementation
* provided by this package.
*/
export function is(obj: unknown): obj is URL;
/**
* Checks whether `obj` is a `URLImpl` WebIDL2JS implementation object
* provided by this package.
*/
export function isImpl(obj: unknown): obj is URLImpl;
/**
* Converts the `URL` wrapper into a `URLImpl` object.
*
* @throws {TypeError} If `obj` is not a `URL` wrapper instance provided by this package.
*/
export function convert(globalObject: object, obj: unknown, { context }?: { context: string }): URLImpl;
/**
* Creates a new `URL` instance.
*
* @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
* registry or a `URL` constructor provided by this package
* in the WebIDL2JS constructor registry.
*/
export function create(globalObject: object, constructorArgs: readonly [url: string, base?: string]): URL;
/**
* Calls `create()` and returns the internal `URLImpl`.
*
* @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
* registry or a `URL` constructor provided by this package
* in the WebIDL2JS constructor registry.
*/
export function createImpl(globalObject: object, constructorArgs: readonly [url: string, base?: string]): URLImpl;
/**
* Initializes the `URL` instance, called by `create()`.
*
* Useful when manually sub-classing a non-constructable wrapper object.
*/
export function setup<T extends URL>(
obj: T,
globalObject: object,
constructorArgs: readonly [url: string, base?: string],
): T;
/**
* Creates a new `URL` object without runing the constructor steps.
*
* Useful when implementing specifications that initialize objects
* in different ways than their constructors do.
*/
declare function _new(globalObject: object, newTarget?: new(url: string, base?: string) => URL): URLImpl;
export { _new as new };
/**
* Installs the `URL` constructor onto the `globalObject`.
*
* @throws {Error} If the target `globalObject` doesn't have an `Error` constructor.
*/
export function install(globalObject: object, globalNames: readonly string[]): void;

View File

@ -0,0 +1,20 @@
declare class URLSearchParamsImpl {
constructor(
globalObject: object,
constructorArgs: readonly [
init?: ReadonlyArray<readonly [name: string, value: string]> | { readonly [name: string]: string } | string,
],
privateData: { readonly doNotStripQMark?: boolean | undefined },
);
append(name: string, value: string): void;
delete(name: string): void;
get(name: string): string | null;
getAll(name: string): string[];
has(name: string): boolean;
set(name: string, value: string): void;
sort(): void;
[Symbol.iterator](): IterableIterator<[name: string, value: string]>;
}
export { URLSearchParamsImpl as implementation };

View File

@ -0,0 +1,92 @@
import { URLSearchParams } from "../index";
import { implementation as URLSearchParamsImpl } from "./URLSearchParams-impl";
/**
* Checks whether `obj` is a `URLSearchParams` object with an implementation
* provided by this package.
*/
export function is(obj: unknown): obj is URLSearchParams;
/**
* Checks whether `obj` is a `URLSearchParamsImpl` WebIDL2JS implementation object
* provided by this package.
*/
export function isImpl(obj: unknown): obj is URLSearchParamsImpl;
/**
* Converts the `URLSearchParams` wrapper into a `URLSearchParamsImpl` object.
*
* @throws {TypeError} If `obj` is not a `URLSearchParams` wrapper instance provided by this package.
*/
export function convert(globalObject: object, obj: unknown, { context }?: { context: string }): URLSearchParamsImpl;
export function createDefaultIterator<TIteratorKind extends "key" | "value" | "key+value">(
globalObject: object,
target: URLSearchParamsImpl,
kind: TIteratorKind,
): IterableIterator<TIteratorKind extends "key" | "value" ? string : [name: string, value: string]>;
/**
* Creates a new `URLSearchParams` instance.
*
* @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
* registry or a `URLSearchParams` constructor provided by this package
* in the WebIDL2JS constructor registry.
*/
export function create(
globalObject: object,
constructorArgs?: readonly [
init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
],
privateData?: { doNotStripQMark?: boolean | undefined },
): URLSearchParams;
/**
* Calls `create()` and returns the internal `URLSearchParamsImpl`.
*
* @throws {Error} If the `globalObject` doesn't have a WebIDL2JS constructor
* registry or a `URLSearchParams` constructor provided by this package
* in the WebIDL2JS constructor registry.
*/
export function createImpl(
globalObject: object,
constructorArgs?: readonly [
init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
],
privateData?: { doNotStripQMark?: boolean | undefined },
): URLSearchParamsImpl;
/**
* Initializes the `URLSearchParams` instance, called by `create()`.
*
* Useful when manually sub-classing a non-constructable wrapper object.
*/
export function setup<T extends URLSearchParams>(
obj: T,
globalObject: object,
constructorArgs?: readonly [
init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
],
privateData?: { doNotStripQMark?: boolean | undefined },
): T;
/**
* Creates a new `URLSearchParams` object without runing the constructor steps.
*
* Useful when implementing specifications that initialize objects
* in different ways than their constructors do.
*/
declare function _new(
globalObject: object,
newTarget?: new(
init: ReadonlyArray<[name: string, value: string]> | { readonly [name: string]: string } | string,
) => URLSearchParams,
): URLSearchParamsImpl;
export { _new as new };
/**
* Installs the `URLSearchParams` constructor onto the `globalObject`.
*
* @throws {Error} If the target `globalObject` doesn't have an `Error` constructor.
*/
export function install(globalObject: object, globalNames: readonly string[]): void;

View File

@ -0,0 +1,37 @@
{
"name": "@types/whatwg-url",
"version": "11.0.4",
"description": "TypeScript definitions for whatwg-url",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url",
"license": "MIT",
"contributors": [
{
"name": "Alexander Marks",
"githubUsername": "aomarks",
"url": "https://github.com/aomarks"
},
{
"name": "ExE Boss",
"githubUsername": "ExE-Boss",
"url": "https://github.com/ExE-Boss"
},
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/whatwg-url"
},
"scripts": {},
"dependencies": {
"@types/webidl-conversions": "*"
},
"typesPublisherContentHash": "3efa2ac3da0eef7a1b38bc379a0936a1d6a3f437ff481a88b01f2aa6ba5dae2e",
"typeScriptVersion": "4.6"
}

View File

@ -0,0 +1,4 @@
import * as URL from "./lib/URL";
import * as URLSearchParams from "./lib/URLSearchParams";
export { URL, URLSearchParams };

201
nvim/.config/nvim/node_modules/bson/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

253
nvim/.config/nvim/node_modules/bson/README.md generated vendored Normal file
View File

@ -0,0 +1,253 @@
# BSON parser
BSON is short for "Binary JSON," and is the binary-encoded serialization of JSON-like documents.
You can learn more about it in [the specification](http://bsonspec.org).
### Table of Contents
- [Usage](#usage)
- [Bugs/Feature Requests](#bugs--feature-requests)
- [Installation](#installation)
- [Documentation](#documentation)
- [FAQ](#faq)
## Bugs / Feature Requests
Think you've found a bug? Want to see a new feature in `bson`? Please open a case in our issue management tool, JIRA:
1. Create an account and login: [jira.mongodb.org](https://jira.mongodb.org)
2. Navigate to the NODE project: [jira.mongodb.org/browse/NODE](https://jira.mongodb.org/browse/NODE)
3. Click **Create Issue** - Please provide as much information as possible about the issue and how to reproduce it.
Bug reports in JIRA for the NODE driver project are **public**.
## Usage
To build a new version perform the following operations:
```
npm install
npm run build
```
### Node.js or Bundling Usage
When using a bundler or Node.js you can import bson using the package name:
```js
import { BSON, EJSON, ObjectId } from 'bson';
// or:
// const { BSON, EJSON, ObjectId } = require('bson');
const bytes = BSON.serialize({ _id: new ObjectId() });
console.log(bytes);
const doc = BSON.deserialize(bytes);
console.log(EJSON.stringify(doc));
// {"_id":{"$oid":"..."}}
```
### Browser Usage
If you are working directly in the browser without a bundler please use the `.mjs` bundle like so:
```html
<script type="module">
import { BSON, EJSON, ObjectId } from './lib/bson.mjs';
const bytes = BSON.serialize({ _id: new ObjectId() });
console.log(bytes);
const doc = BSON.deserialize(bytes);
console.log(EJSON.stringify(doc));
// {"_id":{"$oid":"..."}}
</script>
```
## Installation
```sh
npm install bson
```
### MongoDB Node.js Driver Version Compatibility
Only the following version combinations with the [MongoDB Node.js Driver](https://github.com/mongodb/node-mongodb-native) are considered stable.
| | `bson@1.x` | `bson@4.x` | `bson@5.x` | `bson@6.x` |
| ------------- | ---------- | ---------- | ---------- | ---------- |
| `mongodb@6.x` | N/A | N/A | N/A | ✓ |
| `mongodb@5.x` | N/A | N/A | ✓ | N/A |
| `mongodb@4.x` | N/A | ✓ | N/A | N/A |
| `mongodb@3.x` | ✓ | N/A | N/A | N/A |
## Documentation
### BSON
[API documentation](https://mongodb.github.io/node-mongodb-native/Next/modules/BSON.html)
<a name="EJSON"></a>
### EJSON
- [EJSON](#EJSON)
- [.parse(text, [options])](#EJSON.parse)
- [.stringify(value, [replacer], [space], [options])](#EJSON.stringify)
- [.serialize(bson, [options])](#EJSON.serialize)
- [.deserialize(ejson, [options])](#EJSON.deserialize)
<a name="EJSON.parse"></a>
#### _EJSON_.parse(text, [options])
| Param | Type | Default | Description |
| ----------------- | -------------------- | ----------------- | ---------------------------------------------------------------------------------- |
| text | <code>string</code> | | |
| [options] | <code>object</code> | | Optional settings |
| [options.relaxed] | <code>boolean</code> | <code>true</code> | Attempt to return native JS types where possible, rather than BSON types (if true) |
Parse an Extended JSON string, constructing the JavaScript value or object described by that
string.
**Example**
```js
const { EJSON } = require('bson');
const text = '{ "int32": { "$numberInt": "10" } }';
// prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } }
console.log(EJSON.parse(text, { relaxed: false }));
// prints { int32: 10 }
console.log(EJSON.parse(text));
```
<a name="EJSON.stringify"></a>
#### _EJSON_.stringify(value, [replacer], [space], [options])
| Param | Type | Default | Description |
| ----------------- | ------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| value | <code>object</code> | | The value to convert to extended JSON |
| [replacer] | <code>function</code> \| <code>array</code> | | A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string |
| [space] | <code>string</code> \| <code>number</code> | | A String or Number object that's used to insert white space into the output JSON string for readability purposes. |
| [options] | <code>object</code> | | Optional settings |
| [options.relaxed] | <code>boolean</code> | <code>true</code> | Enabled Extended JSON's `relaxed` mode |
| [options.legacy] | <code>boolean</code> | <code>true</code> | Output in Extended JSON v1 |
Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer
function is specified or optionally including only the specified properties if a replacer array
is specified.
**Example**
```js
const { EJSON } = require('bson');
const Int32 = require('mongodb').Int32;
const doc = { int32: new Int32(10) };
// prints '{"int32":{"$numberInt":"10"}}'
console.log(EJSON.stringify(doc, { relaxed: false }));
// prints '{"int32":10}'
console.log(EJSON.stringify(doc));
```
<a name="EJSON.serialize"></a>
#### _EJSON_.serialize(bson, [options])
| Param | Type | Description |
| --------- | ------------------- | ---------------------------------------------------- |
| bson | <code>object</code> | The object to serialize |
| [options] | <code>object</code> | Optional settings passed to the `stringify` function |
Serializes an object to an Extended JSON string, and reparse it as a JavaScript object.
<a name="EJSON.deserialize"></a>
#### _EJSON_.deserialize(ejson, [options])
| Param | Type | Description |
| --------- | ------------------- | -------------------------------------------- |
| ejson | <code>object</code> | The Extended JSON object to deserialize |
| [options] | <code>object</code> | Optional settings passed to the parse method |
Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types
## Error Handling
It is our recommendation to use `BSONError.isBSONError()` checks on errors and to avoid relying on parsing `error.message` and `error.name` strings in your code. We guarantee `BSONError.isBSONError()` checks will pass according to semver guidelines, but errors may be sub-classed or their messages may change at any time, even patch releases, as we see fit to increase the helpfulness of the errors.
Any new errors we add to the driver will directly extend an existing error class and no existing error will be moved to a different parent class outside of a major release.
This means `BSONError.isBSONError()` will always be able to accurately capture the errors that our BSON library throws.
Hypothetical example: A collection in our Db has an issue with UTF-8 data:
```ts
let documentCount = 0;
const cursor = collection.find({}, { utf8Validation: true });
try {
for await (const doc of cursor) documentCount += 1;
} catch (error) {
if (BSONError.isBSONError(error)) {
console.log(`Found the troublemaker UTF-8!: ${documentCount} ${error.message}`);
return documentCount;
}
throw error;
}
```
## React Native
BSON vendors the required polyfills for `TextEncoder`, `TextDecoder`, `atob`, `btoa` imported from React Native and therefore doesn't expect users to polyfill these. One additional polyfill, `crypto.getRandomValues` is recommended and can be installed with the following command:
```sh
npm install --save react-native-get-random-values
```
The following snippet should be placed at the top of the entrypoint (by default this is the root `index.js` file) for React Native projects using the BSON library. These lines must be placed for any code that imports `BSON`.
```typescript
// Required Polyfills For ReactNative
import 'react-native-get-random-values';
```
Finally, import the `BSON` library like so:
```typescript
import { BSON, EJSON } from 'bson';
```
This will cause React Native to import the `node_modules/bson/lib/bson.rn.cjs` bundle (see the `"react-native"` setting we have in the `"exports"` section of our [package.json](./package.json).)
### Technical Note about React Native module import
The `"exports"` definition in our `package.json` will result in BSON's CommonJS bundle being imported in a React Native project instead of the ES module bundle. Importing the CommonJS bundle is necessary because BSON's ES module bundle of BSON uses top-level await, which is not supported syntax in [React Native's runtime hermes](https://hermesengine.dev/).
## FAQ
#### Why does `undefined` get converted to `null`?
The `undefined` BSON type has been [deprecated for many years](http://bsonspec.org/spec.html), so this library has dropped support for it. Use the `ignoreUndefined` option (for example, from the [driver](http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html#connect) ) to instead remove `undefined` keys.
#### How do I add custom serialization logic?
This library looks for `toBSON()` functions on every path, and calls the `toBSON()` function to get the value to serialize.
```javascript
const BSON = require('bson');
class CustomSerialize {
toBSON() {
return 42;
}
}
const obj = { answer: new CustomSerialize() };
// "{ answer: 42 }"
console.log(BSON.deserialize(BSON.serialize(obj)));
```

1390
nvim/.config/nvim/node_modules/bson/bson.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

19
nvim/.config/nvim/node_modules/bson/etc/prepare.js generated vendored Executable file
View File

@ -0,0 +1,19 @@
#! /usr/bin/env node
var cp = require('child_process');
var fs = require('fs');
var nodeMajorVersion = +process.version.match(/^v(\d+)\.\d+/)[1];
if (fs.existsSync('src') && nodeMajorVersion >= 10) {
cp.spawnSync('npm', ['run', 'build'], { stdio: 'inherit', shell: true });
} else {
if (!fs.existsSync('lib')) {
console.warn('BSON: No compiled javascript present, the library is not installed correctly.');
if (nodeMajorVersion < 10) {
console.warn(
'This library can only be compiled in nodejs version 10 or later, currently running: ' +
nodeMajorVersion
);
}
}
}

4342
nvim/.config/nvim/node_modules/bson/lib/bson.bundle.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

4337
nvim/.config/nvim/node_modules/bson/lib/bson.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
nvim/.config/nvim/node_modules/bson/lib/bson.cjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More