init
This commit is contained in:
commit
42ef2f9674
468 files changed
+645161
No files matched your search
+12
@@ -0,0 +1,12 @@
|
||||
export * from './menu/submenu';
|
||||
export * from './menu/menuItem';
|
||||
export * from './menu/menu';
|
||||
export * from './menu/checkMenuItem';
|
||||
export * from './menu/iconMenuItem';
|
||||
export * from './menu/predefinedMenuItem';
|
||||
/**
|
||||
* Menu types and utilities.
|
||||
*
|
||||
* This package is also accessible with `window.__TAURI__.menu` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
|
||||
* @module
|
||||
*/
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
var x=String;
|
||||
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
|
||||
module.exports=create();
|
||||
module.exports.createColors = create;
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
import { itemFromKind } from './submenu.js';
|
||||
import { Position } from '../dpi.js';
|
||||
import { invoke } from '../core.js';
|
||||
import { MenuItemBase, newMenu } from './base.js';
|
||||
|
||||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
/** A type that is either a menu bar on the window
|
||||
* on Windows and Linux or as a global menu in the menubar on macOS.
|
||||
*
|
||||
* #### Platform-specific:
|
||||
*
|
||||
* - **macOS**: if using {@linkcode Menu} for the global menubar, it can only contain {@linkcode Submenu}s.
|
||||
*/
|
||||
class Menu extends MenuItemBase {
|
||||
/** @ignore */
|
||||
constructor(rid, id) {
|
||||
super(rid, id, 'Menu');
|
||||
}
|
||||
/** Create a new menu. */
|
||||
static async new(opts) {
|
||||
return newMenu('Menu', opts).then(([rid, id]) => new Menu(rid, id));
|
||||
}
|
||||
/** Create a default menu. */
|
||||
static async default() {
|
||||
return invoke('plugin:menu|create_default').then(([rid, id]) => new Menu(rid, id));
|
||||
}
|
||||
/**
|
||||
* Add a menu item to the end of this menu.
|
||||
*
|
||||
* #### Platform-specific:
|
||||
*
|
||||
* - **macOS:** Only {@linkcode Submenu}s can be added to a {@linkcode Menu}.
|
||||
*/
|
||||
async append(items) {
|
||||
return invoke('plugin:menu|append', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
items: (Array.isArray(items) ? items : [items]).map((i) => 'rid' in i ? [i.rid, i.kind] : i)
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Add a menu item to the beginning of this menu.
|
||||
*
|
||||
* #### Platform-specific:
|
||||
*
|
||||
* - **macOS:** Only {@linkcode Submenu}s can be added to a {@linkcode Menu}.
|
||||
*/
|
||||
async prepend(items) {
|
||||
return invoke('plugin:menu|prepend', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
items: (Array.isArray(items) ? items : [items]).map((i) => 'rid' in i ? [i.rid, i.kind] : i)
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Add a menu item to the specified position in this menu.
|
||||
*
|
||||
* #### Platform-specific:
|
||||
*
|
||||
* - **macOS:** Only {@linkcode Submenu}s can be added to a {@linkcode Menu}.
|
||||
*/
|
||||
async insert(items, position) {
|
||||
return invoke('plugin:menu|insert', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
items: (Array.isArray(items) ? items : [items]).map((i) => 'rid' in i ? [i.rid, i.kind] : i),
|
||||
position
|
||||
});
|
||||
}
|
||||
/** Remove a menu item from this menu. */
|
||||
async remove(item) {
|
||||
return invoke('plugin:menu|remove', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
item: [item.rid, item.kind]
|
||||
});
|
||||
}
|
||||
/** Remove a menu item from this menu at the specified position. */
|
||||
async removeAt(position) {
|
||||
return invoke('plugin:menu|remove_at', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
position
|
||||
}).then(itemFromKind);
|
||||
}
|
||||
/** Returns a list of menu items that has been added to this menu. */
|
||||
async items() {
|
||||
return invoke('plugin:menu|items', {
|
||||
rid: this.rid,
|
||||
kind: this.kind
|
||||
}).then((i) => i.map(itemFromKind));
|
||||
}
|
||||
/** Retrieves the menu item matching the given identifier. */
|
||||
async get(id) {
|
||||
return invoke('plugin:menu|get', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
id
|
||||
}).then((r) => (r ? itemFromKind(r) : null));
|
||||
}
|
||||
/**
|
||||
* Popup this menu as a context menu on the specified window.
|
||||
*
|
||||
* @param at If a position is provided, it is relative to the window's top-left corner.
|
||||
* If there isn't one provided, the menu will pop up at the current location of the mouse.
|
||||
*/
|
||||
async popup(at, window) {
|
||||
var _a;
|
||||
return invoke('plugin:menu|popup', {
|
||||
rid: this.rid,
|
||||
kind: this.kind,
|
||||
window: (_a = window === null || window === void 0 ? void 0 : window.label) !== null && _a !== void 0 ? _a : null,
|
||||
at: at instanceof Position ? at : at ? new Position(at) : null
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Sets the app-wide menu and returns the previous one.
|
||||
*
|
||||
* If a window was not created with an explicit menu or had one set explicitly,
|
||||
* this menu will be assigned to it.
|
||||
*/
|
||||
async setAsAppMenu() {
|
||||
return invoke('plugin:menu|set_as_app_menu', {
|
||||
rid: this.rid
|
||||
}).then((r) => (r ? new Menu(r[0], r[1]) : null));
|
||||
}
|
||||
/**
|
||||
* Sets the window menu and returns the previous one.
|
||||
*
|
||||
* #### Platform-specific:
|
||||
*
|
||||
* - **macOS:** Unsupported. The menu on macOS is app-wide and not specific to one
|
||||
* window, if you need to set it, use {@linkcode Menu.setAsAppMenu} instead.
|
||||
*/
|
||||
async setAsWindowMenu(window) {
|
||||
var _a;
|
||||
return invoke('plugin:menu|set_as_window_menu', {
|
||||
rid: this.rid,
|
||||
window: (_a = window === null || window === void 0 ? void 0 : window.label) !== null && _a !== void 0 ? _a : null
|
||||
}).then((r) => (r ? new Menu(r[0], r[1]) : null));
|
||||
}
|
||||
}
|
||||
|
||||
export { Menu };
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "tinyglobby",
|
||||
"version": "0.2.17",
|
||||
"description": "A fast and minimal alternative to globby and fast-glob",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.cts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"author": "Superchupu",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"glob",
|
||||
"patterns",
|
||||
"tiny",
|
||||
"fast"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/SuperchupuDev/tinyglobby.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/SuperchupuDev/tinyglobby/issues"
|
||||
},
|
||||
"homepage": "https://superchupu.dev/tinyglobby",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
},
|
||||
"dependencies": {
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.4.16",
|
||||
"@types/node": "^25.9.1",
|
||||
"@types/picomatch": "^4.0.3",
|
||||
"fast-glob": "^3.3.3",
|
||||
"fs-fixture": "^2.14.0",
|
||||
"glob": "^13.0.6",
|
||||
"tinybench": "^6.0.2",
|
||||
"tsdown": "^0.22.1",
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "node benchmark/bench.ts",
|
||||
"bench:setup": "node benchmark/setup.ts",
|
||||
"build": "tsdown",
|
||||
"check": "biome check",
|
||||
"check:fix": "biome check --write --unsafe",
|
||||
"format": "biome format --write",
|
||||
"lint": "biome lint",
|
||||
"test": "node --test \"test/**/*.ts\"",
|
||||
"test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"",
|
||||
"test:only": "node --test --test-only \"test/**/*.ts\"",
|
||||
"typecheck": "tsc --noEmit"
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
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
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
interface ObjectConstructor {
|
||||
/**
|
||||
* Groups members of an iterable according to the return value of the passed callback.
|
||||
* @param items An iterable.
|
||||
* @param keySelector A callback which will be invoked for each item in items.
|
||||
*/
|
||||
groupBy<K extends PropertyKey, T>(
|
||||
items: Iterable<T>,
|
||||
keySelector: (item: T, index: number) => K,
|
||||
): Partial<Record<K, T[]>>;
|
||||
}
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"name": "vite",
|
||||
"version": "7.3.6",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"author": "Evan You",
|
||||
"description": "Native-ESM powered web dev build tool",
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"keywords": [
|
||||
"frontend",
|
||||
"framework",
|
||||
"hmr",
|
||||
"dev-server",
|
||||
"build-tool",
|
||||
"vite"
|
||||
],
|
||||
"main": "./dist/node/index.js",
|
||||
"types": "./dist/node/index.d.ts",
|
||||
"exports": {
|
||||
".": "./dist/node/index.js",
|
||||
"./client": {
|
||||
"types": "./client.d.ts"
|
||||
},
|
||||
"./module-runner": "./dist/node/module-runner.js",
|
||||
"./dist/client/*": "./dist/client/*",
|
||||
"./types/*": {
|
||||
"types": "./types/*"
|
||||
},
|
||||
"./types/internal/*": null,
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"module-runner": [
|
||||
"dist/node/module-runner.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"imports": {
|
||||
"#module-sync-enabled": {
|
||||
"module-sync": "./misc/true.js",
|
||||
"default": "./misc/false.js"
|
||||
},
|
||||
"#types/*": "./types/*.d.ts",
|
||||
"#dep-types/*": "./src/types/*.d.ts"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"dist",
|
||||
"misc/**/*.js",
|
||||
"client.d.ts",
|
||||
"types"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vitejs/vite.git",
|
||||
"directory": "packages/vite"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vitejs/vite/issues"
|
||||
},
|
||||
"homepage": "https://vite.dev",
|
||||
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
||||
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.27.0 || ^0.28.0",
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.3",
|
||||
"postcss": "^8.5.6",
|
||||
"rollup": "^4.43.0",
|
||||
"tinyglobby": "^0.2.15"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/parser": "^7.28.5",
|
||||
"@jridgewell/remapping": "^2.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.31",
|
||||
"@oxc-project/types": "0.95.0",
|
||||
"@polka/compression": "^1.0.0-next.25",
|
||||
"@rolldown/pluginutils": "^1.0.0-beta.52",
|
||||
"@rollup/plugin-alias": "^5.1.1",
|
||||
"@rollup/plugin-commonjs": "^29.0.0",
|
||||
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
||||
"@rollup/pluginutils": "^5.3.0",
|
||||
"@types/escape-html": "^1.0.4",
|
||||
"@types/pnpapi": "^0.0.5",
|
||||
"artichokie": "^0.4.2",
|
||||
"baseline-browser-mapping": "^2.8.32",
|
||||
"cac": "^6.7.14",
|
||||
"chokidar": "^3.6.0",
|
||||
"connect": "^3.7.0",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"cross-spawn": "^7.0.6",
|
||||
"obug": "^1.0.2",
|
||||
"dotenv": "^17.2.3",
|
||||
"dotenv-expand": "^12.0.3",
|
||||
"es-module-lexer": "^1.7.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"estree-walker": "^3.0.3",
|
||||
"etag": "^1.8.1",
|
||||
"host-validation-middleware": "^0.1.2",
|
||||
"http-proxy-3": "^1.22.0",
|
||||
"launch-editor-middleware": "^2.14.1",
|
||||
"lightningcss": "^1.30.2",
|
||||
"magic-string": "^0.30.21",
|
||||
"mlly": "^1.8.0",
|
||||
"mrmime": "^2.0.1",
|
||||
"nanoid": "^5.1.6",
|
||||
"open": "^10.2.0",
|
||||
"parse5": "^8.0.0",
|
||||
"pathe": "^2.0.3",
|
||||
"periscopic": "^4.0.2",
|
||||
"picocolors": "^1.1.1",
|
||||
"postcss-import": "^16.1.1",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"postcss-modules": "^6.0.1",
|
||||
"premove": "^4.0.0",
|
||||
"resolve.exports": "^2.0.3",
|
||||
"rolldown": "^1.0.0-beta.52",
|
||||
"rolldown-plugin-dts": "^0.18.1",
|
||||
"rollup-plugin-license": "^3.6.0",
|
||||
"sass": "^1.94.2",
|
||||
"sass-embedded": "^1.93.3",
|
||||
"sirv": "^3.0.2",
|
||||
"strip-literal": "^3.1.0",
|
||||
"terser": "^5.44.1",
|
||||
"tsconfck": "^3.1.6",
|
||||
"ufo": "^1.6.1",
|
||||
"ws": "^8.18.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "^20.19.0 || >=22.12.0",
|
||||
"jiti": ">=1.21.0",
|
||||
"less": "^4.0.0",
|
||||
"lightningcss": "^1.21.0",
|
||||
"sass": "^1.70.0",
|
||||
"sass-embedded": "^1.70.0",
|
||||
"stylus": ">=0.54.8",
|
||||
"sugarss": "^5.0.0",
|
||||
"terser": "^5.16.0",
|
||||
"tsx": "^4.8.1",
|
||||
"yaml": "^2.4.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/node": {
|
||||
"optional": true
|
||||
},
|
||||
"jiti": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"sass-embedded": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
"sugarss": {
|
||||
"optional": true
|
||||
},
|
||||
"lightningcss": {
|
||||
"optional": true
|
||||
},
|
||||
"terser": {
|
||||
"optional": true
|
||||
},
|
||||
"tsx": {
|
||||
"optional": true
|
||||
},
|
||||
"yaml": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "premove dist && pnpm build-bundle -w",
|
||||
"build": "premove dist && pnpm build-bundle && pnpm build-types",
|
||||
"build-bundle": "rolldown --config rolldown.config.ts",
|
||||
"build-types": "pnpm build-types-roll && pnpm build-types-check",
|
||||
"build-types-roll": "rolldown --config rolldown.dts.config.ts",
|
||||
"build-types-check": "tsc --project tsconfig.check.json",
|
||||
"typecheck": "tsc && tsc -p src/node && tsc -p src/module-runner && tsc -p src/shared && tsc -p src/node/__tests_dts__",
|
||||
"lint": "eslint --cache --ext .ts src/**",
|
||||
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\"",
|
||||
"generate-target": "tsx scripts/generateTarget.ts"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user