1
0
Fork 0

admin AdminPermissionSeeder

main
panliang 2024-07-07 16:57:56 +08:00
parent a00a126cda
commit 14fd752ca1
269 changed files with 14176 additions and 152 deletions

View File

@ -0,0 +1,10 @@
<?php
namespace App\Admin\Controllers;
use Slowlyo\OwlAdmin\Controllers\AuthController as AdminAuthController;
class AuthController extends AdminAuthController
{
}

View File

@ -0,0 +1,51 @@
<?php
namespace App\Admin\Controllers;
use Slowlyo\OwlAdmin\Admin;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Resources\Json\JsonResource;
use Slowlyo\OwlAdmin\Controllers\AdminController;
class HomeController extends AdminController
{
public function index(): JsonResponse|JsonResource
{
$page = $this->basePage()->body($this->frameworkInfo());
return $this->response()->success($page);
}
public function frameworkInfo()
{
$link = function ($label, $link) {
return amis()->Action()
->level('link')
->className('text-lg font-semibold')
->label($label)
->blank(true)
->actionType('url')
->link($link);
};
return amis()->Card()->className('h-96')->body(
amis()->Wrapper()->className('h-full')->body([
amis()->Flex()
->className('h-full')
->direction('column')
->justify('center')
->alignItems('center')
->items([
amis()->Image()->src(url(Admin::config('admin.logo'))),
amis()->Wrapper()->className('text-3xl mt-9 font-bold')->body(Admin::config('admin.name')),
amis()->Flex()->className('w-full mt-5')->justify('center')->items([
$link('GitHub', 'https://github.com/slowlyo/owl-admin'),
$link('Official website', 'https://owladmin.com'),
$link('Documentation', 'https://doc.owladmin.com'),
$link('Demo', 'http://demo.owladmin.com'),
]),
]),
])
);
}
}

View File

@ -0,0 +1,56 @@
<?php
namespace App\Admin\Controllers;
use Illuminate\Http\Request;
use Slowlyo\OwlAdmin\Renderers\Tab;
use Slowlyo\OwlAdmin\Renderers\Tabs;
use Slowlyo\OwlAdmin\Renderers\Alert;
use Slowlyo\OwlAdmin\Renderers\InputKV;
use Slowlyo\OwlAdmin\Renderers\TextControl;
use Slowlyo\OwlAdmin\Controllers\AdminController;
class SettingController extends AdminController
{
public function index()
{
$page = $this->basePage()->body([
Alert::make()->showIcon(true)->body("此处内容仅供演示, 设置项无实际意义,实际开发中请根据实际情况进行修改。"),
$this->form(),
]);
return $this->response()->success($page);
}
public function form()
{
return $this->baseForm(false)
->redirect('')
->api($this->getStorePath())
->data(settings()->all())
->body(
Tabs::make()->tabs([
Tab::make()->title('基本设置')->body([
TextControl::make()->label('网站名称')->name('site_name'),
InputKV::make()->label('附加配置')->name('addition_config'),
]),
Tab::make()->title('上传设置')->body([
TextControl::make()->label('上传域名')->name('upload_domain'),
TextControl::make()->label('上传路径')->name('upload_path'),
]),
])
);
}
public function store(Request $request)
{
$data = $request->only([
'site_name',
'addition_config',
'upload_domain',
'upload_path',
]);
return settings()->adminSetMany($data);
}
}

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1,15 @@
<?php
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
Route::get('/admin', fn() => \Slowlyo\OwlAdmin\Admin::view());
Route::group([
'domain' => config('admin.route.domain'),
'prefix' => config('admin.route.prefix'),
'middleware' => config('admin.route.middleware'),
], function (Router $router) {
$router->resource('dashboard', \App\Admin\Controllers\HomeController::class);
$router->resource('system/settings', \App\Admin\Controllers\SettingController::class);
});

View File

@ -7,6 +7,7 @@ use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)

View File

@ -7,7 +7,9 @@
"require": {
"php": "^8.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9"
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"slowlyo/owl-admin": "^3.8"
},
"require-dev": {
"fakerphp/faker": "^1.23",

204
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7e8c3c14ff33b199b4a0838993eb8423",
"content-hash": "4f54b104f554be917625df649bfec2f0",
"packages": [
{
"name": "brick/math",
@ -1314,6 +1314,75 @@
},
"time": "2024-06-17T13:58:22+00:00"
},
{
"name": "laravel/sanctum",
"version": "v4.0.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sanctum.git",
"reference": "9e6e561308cace166de9ceae4ced820309fa8e13"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sanctum/zipball/9e6e561308cace166de9ceae4ced820309fa8e13",
"reference": "9e6e561308cace166de9ceae4ced820309fa8e13",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": "*",
"illuminate/console": "^11.0",
"illuminate/contracts": "^11.0",
"illuminate/database": "^11.0",
"illuminate/support": "^11.0",
"php": "^8.2"
},
"require-dev": {
"mockery/mockery": "^1.6",
"orchestra/testbench": "^9.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Laravel\\Sanctum\\SanctumServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Laravel\\Sanctum\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.",
"keywords": [
"auth",
"laravel",
"sanctum"
],
"support": {
"issues": "https://github.com/laravel/sanctum/issues",
"source": "https://github.com/laravel/sanctum"
},
"time": "2024-03-12T14:07:05+00:00"
},
{
"name": "laravel/serializable-closure",
"version": "v1.3.3",
@ -3108,6 +3177,139 @@
],
"time": "2024-04-27T21:32:50+00:00"
},
{
"name": "slowlyo/laravel-support",
"version": "v0.0.3",
"source": {
"type": "git",
"url": "https://github.com/slowlyo/laravel-support.git",
"reference": "4b05f1e3d3b3881fab961d9c85022cebf9f05df9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slowlyo/laravel-support/zipball/4b05f1e3d3b3881fab961d9c85022cebf9f05df9",
"reference": "4b05f1e3d3b3881fab961d9c85022cebf9f05df9",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-bcmath": "*",
"ext-json": "*",
"laravel/framework": ">=8",
"php": ">=7.4.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Slowlyo\\Support\\SupportServiceProvider"
]
}
},
"autoload": {
"files": [
"./src/functions.php"
],
"psr-4": {
"Slowlyo\\Support\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Slowlyo",
"email": "slowlyo_email@qq.com"
}
],
"description": "php/laravel部分代码封装",
"support": {
"issues": "https://github.com/slowlyo/laravel-support/issues",
"source": "https://github.com/slowlyo/laravel-support/tree/v0.0.3"
},
"time": "2024-06-15T07:32:39+00:00"
},
{
"name": "slowlyo/owl-admin",
"version": "v3.8.0",
"source": {
"type": "git",
"url": "https://github.com/slowlyo/owl-admin.git",
"reference": "002a00fe5d27a9eb5b13bc8f827bd199fcfeae61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slowlyo/owl-admin/zipball/002a00fe5d27a9eb5b13bc8f827bd199fcfeae61",
"reference": "002a00fe5d27a9eb5b13bc8f827bd199fcfeae61",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-gd": "*",
"ext-zip": "*",
"illuminate/support": ">=9",
"php": ">=8.0",
"slowlyo/laravel-support": "*"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Slowlyo\\OwlAdmin\\AdminServiceProvider"
],
"aliases": {
"OwlAdmin": "Slowlyo\\OwlAdmin\\Facades\\OwlAdmin"
}
}
},
"autoload": {
"files": [
"src/Support/helpers.php"
],
"psr-4": {
"Slowlyo\\OwlAdmin\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "slowlyo",
"email": "slowlyo_email@qq.com",
"homepage": "https://github.com/slowlyo"
}
],
"description": "基于 laravel、amis 开发的后台框架~",
"homepage": "https://github.com/slowlyo/owl-admin",
"keywords": [
"admin",
"amis",
"laravel",
"owl-admin"
],
"support": {
"email": "slowlyo_email@qq.com",
"forum": "https://github.com/orgs/owl-admin/discussions",
"issues": "https://github.com/Slowlyo/owl-admin/issues",
"source": "https://github.com/slowlyo/owl-admin/tree/v3.8.0",
"wiki": "https://doc.owladmin.com/"
},
"time": "2024-06-09T17:39:14+00:00"
},
{
"name": "symfony/clock",
"version": "v7.1.1",

132
config/admin.php 100644
View File

@ -0,0 +1,132 @@
<?php
return [
// 应用名称
'name' => 'Owl Admin',
// 应用 logo
'logo' => '/admin-assets/logo.png',
// 默认头像
'default_avatar' => '/admin-assets/default-avatar.png',
// 应用安装目录
'directory' => app_path('Admin'),
// 引导文件
'bootstrap' => app_path('Admin/bootstrap.php'),
// 应用路由
'route' => [
'prefix' => 'admin-api',
'domain' => null,
'namespace' => 'App\\Admin\\Controllers',
'middleware' => ['admin'],
// 不包含额外路由, 配置后, 不会追加新增/详情/编辑页面路由
'without_extra_routes' => [
'/dashboard',
],
],
'auth' => [
// 是否开启验证码
'login_captcha' => env('ADMIN_LOGIN_CAPTCHA', true),
// 是否开启认证
'enable' => true,
// 是否开启鉴权
'permission' => true,
// token 有效期 (分钟), 为空则不会过期
'token_expiration' => null,
'guard' => 'admin',
'guards' => [
'admin' => [
'driver' => 'sanctum',
'provider' => 'admin',
],
],
'providers' => [
'admin' => [
'driver' => 'eloquent',
'model' => \Slowlyo\OwlAdmin\Models\AdminUser::class,
],
],
'except' => [
],
],
'upload' => [
'disk' => 'public',
// 文件上传目录
'directory' => [
'image' => 'images',
'file' => 'files',
'rich' => 'rich',
],
],
'https' => env('ADMIN_HTTPS', false),
// 是否显示 [开发者工具]
'show_development_tools' => env('ADMIN_SHOW_DEVELOPMENT_TOOLS', true),
// 是否显示 [权限] 功能中的自动生成按钮
'show_auto_generate_permission_button' => env('ADMIN_SHOW_AUTO_GENERATE_PERMISSION_BUTTON', true),
// 扩展
'extension' => [
'dir' => base_path('extensions'),
],
'layout' => [
// 浏览器标题, 功能名称使用 %title% 代替
'title' => '%title% | OwlAdmin',
'header' => [
// 是否显示 [刷新] 按钮
'refresh' => true,
// 是否显示 [暗色模式] 按钮
'dark' => true,
// 是否显示 [全屏] 按钮
'full_screen' => true,
// 是否显示 [多语言] 按钮
'locale_toggle' => false,
// 是否显示 [主题配置] 按钮
'theme_config' => true,
],
// 多语言选项
'locale_options' => [
'en' => 'English',
'zh_CN' => '简体中文',
],
/*
* keep_alive 页面缓存黑名单
*
* eg:
* 列表: /user
* 详情: /user/:id
* 编辑: /user/:id/edit
* 新增: /user/create
*/
'keep_alive_exclude' => [],
// 底部信息
'footer' => '<a href="https://github.com/slowlyo/owl-admin" target="_blank">Owl Admin</a>',
],
'database' => [
'connection' => env('DB_CONNECTION'),
],
'models' => [
'admin_user' => \Slowlyo\OwlAdmin\Models\AdminUser::class,
'admin_role' => \Slowlyo\OwlAdmin\Models\AdminRole::class,
'admin_menu' => \Slowlyo\OwlAdmin\Models\AdminMenu::class,
'admin_permission' => \Slowlyo\OwlAdmin\Models\AdminPermission::class,
],
'modules_namespace' => 'AdminModules',
'modules_dir' => base_path('admin-modules'),
'modules' => [
],
];

83
config/sanctum.php 100644
View File

@ -0,0 +1,83 @@
<?php
use Laravel\Sanctum\Sanctum;
return [
/*
|--------------------------------------------------------------------------
| Stateful Domains
|--------------------------------------------------------------------------
|
| Requests from the following domains / hosts will receive stateful API
| authentication cookies. Typically, these should include your local
| and production domains which access your API via a frontend SPA.
|
*/
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort()
))),
/*
|--------------------------------------------------------------------------
| Sanctum Guards
|--------------------------------------------------------------------------
|
| This array contains the authentication guards that will be checked when
| Sanctum is trying to authenticate a request. If none of these guards
| are able to authenticate the request, Sanctum will use the bearer
| token that's present on an incoming request for authentication.
|
*/
'guard' => ['web'],
/*
|--------------------------------------------------------------------------
| Expiration Minutes
|--------------------------------------------------------------------------
|
| This value controls the number of minutes until an issued token will be
| considered expired. This will override any values set in the token's
| "expires_at" attribute, but first-party sessions are not affected.
|
*/
'expiration' => null,
/*
|--------------------------------------------------------------------------
| Token Prefix
|--------------------------------------------------------------------------
|
| Sanctum can prefix new tokens in order to take advantage of numerous
| security scanning initiatives maintained by open source platforms
| that notify developers if they commit tokens into repositories.
|
| See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
|
*/
'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),
/*
|--------------------------------------------------------------------------
| Sanctum Middleware
|--------------------------------------------------------------------------
|
| When authenticating your first-party SPA with Sanctum you may need to
| customize some of the middleware Sanctum uses while processing the
| request. You may change the middleware listed below as required.
|
*/
'middleware' => [
'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class,
'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class,
],
];

View File

@ -1,49 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@ -1,57 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');
}
};

View File

@ -0,0 +1,82 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Slowlyo\OwlAdmin\Models\{AdminMenu, AdminPermission};
use Slowlyo\OwlAdmin\Support\Cores\Database;
class AdminPermissionSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Database::make()->fillInitialData();
DB::table('admin_menus')->truncate();
DB::table('admin_permissions')->truncate();
DB::table('admin_permission_menu')->truncate();
DB::table('admin_role_permissions')->truncate();
// icon: https://icones.js.org/collection/mdi
$list = [
['name' => '首页', 'icon' => 'mdi:home', 'slug' => 'dashboard', 'url' => '/dashboard', 'is_home' => 1],
['name' => '系统管理', 'icon' => 'mdi:cog-outline', 'slug' => 'system', 'url' => '/system', 'children' => [
['name' => '管理员', 'icon' => 'mdi:account-cog-outline', 'slug' => 'admin_users', 'url' => '/system/admin_users'],
['name' => '角色', 'icon' => 'mdi:account-box-outline', 'slug' => 'roles', 'url' => '/system/admin_roles'],
['name' => '权限', 'icon' => 'mdi:key-variant', 'slug' => 'permissions', 'url' => '/system/admin_permissions'],
['name' => '菜单', 'icon' => 'mdi:menu-open', 'slug' => 'menus', 'url' => '/system/admin_menus'],
['name' => '设置', 'icon' => 'mdi:application-cog-outline', 'slug' => 'settings', 'url' => '/system/settings'],
]],
];
$this->createByTree($list);
}
protected function createByTree($list, $parent = null)
{
foreach($list as $item) {
$parent_permission_id = data_get($parent, 'permission', 0);
$parent_menu_id = data_get($parent, 'menu', 0);
$permission = $this->createPermission($item, $parent_permission_id);
$menu = $this->createMenu($item, $parent_menu_id);
$menu_has_permissions = [
['permission_id' => $permission->id, 'menu_id' => $menu->id]
];
if ($parent_menu_id) {
array_push($menu_has_permissions, ['permission_id' => $permission->id,'menu_id' => $parent_menu_id]);
}
DB::table('admin_permission_menu')->insert($menu_has_permissions);
if (isset($item['children'])) {
$this->createByTree($item['children'], ['permission' => $permission->id, 'menu' => $menu->id]);
}
}
}
protected function createMenu($item, $pid = 0)
{
return AdminMenu::create([
'parent_id' => $pid,
'custom_order' => data_get($item, 'custom_order', 0),
'title' => data_get($item, 'name'),
'icon' => data_get($item, 'icon'),
'url' => data_get($item, 'url'),
'is_home' => data_get($item, 'is_home', 0),
]);
}
protected function createPermission($item, $pid = 0)
{
$url = data_get($item, 'url');
return AdminPermission::create([
'parent_id' => $pid,
'custom_order' => data_get($item, 'custom_order', 0),
'name' => data_get($item, 'name'),
'slug' => data_get($item, 'slug'),
'http_path' => $url ? [$url] : null,
]);
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Slowlyo\OwlAdmin\Models\{AdminUser, AdminRole};
class AdminSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// 创建默认账户
AdminUser::truncate();
$user = AdminUser::create([
'username' => 'admin',
'password' => bcrypt('admin'),
'name' => 'Administrator',
]);
AdminRole::truncate();
$role = AdminRole::create([
'name' => 'Administrator',
'slug' => 'administrator',
]);
DB::table('admin_role_users')->truncate();
$user->roles()->attach($role);
}
}

View File

@ -13,11 +13,7 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
$this->call(AdminPermissionSeeder::class);
$this->call(AdminSeeder::class);
}
}

334
lang/en/admin.php 100644
View File

@ -0,0 +1,334 @@
<?php
return [
'remember_me' => 'Remember me',
'login' => 'Login',
'logout' => 'Logout',
'username' => 'Username',
'password' => 'Password',
'old_password' => 'Old Password',
'confirm_password' => 'Confirm Password',
'captcha' => 'Captcha',
'captcha_error' => 'Captcha Error',
'required' => ':attribute is required',
'login_successful' => 'Login Success',
'login_failed' => 'Username Or Password Error',
'user_setting' => 'User Settings',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'deleted_at' => 'Deleted At',
'actions' => 'Actions',
'create' => 'Create',
'edit' => 'Edit',
'show' => 'Show',
'delete' => 'Delete',
'copy' => 'Copy',
'confirm_delete' => 'Confirm Delete Selected Items?',
'back' => 'Back',
'reset' => 'Reset',
'search' => 'Search',
'list' => 'List',
'add' => 'Add',
'save' => 'Save',
'detail' => 'Detail',
'developer' => 'Developer',
'code_generator' => 'Code Generator',
'visual_editor' => 'Visual Editor',
'terminal' => 'Terminal',
'administrator' => 'Administrator',
'soft_delete' => 'Soft Delete',
'keyword' => 'Keyword',
'unknown_error' => 'Unknown Error',
'upload_file_error' => 'Upload File Error',
'parent' => 'Parent',
'order' => 'Order',
'order_desc' => 'Order Desc',
'order_asc' => 'Order Asc',
'menus' => 'Menus',
'successfully' => 'Successfully',
'failed' => 'Failed',
'successfully_message' => ':attribute Successfully',
'failed_message' => ':attribute Failed',
'action_success' => 'Action Success',
'action_failed' => 'Action Failed',
'save_success' => 'Save Success',
'save_failed' => 'Save Failed',
'yes' => 'Yes',
'no' => 'No',
'need_start_with_slash' => 'Need Start With /',
'cancel' => 'Cancel',
'please_login' => 'Please Login',
'unauthorized' => 'Unauthorized',
'user_disabled' => 'The user has been disabled',
'preview' => 'Preview',
'code_generators' => [
'remark1' => 'For more parameters, please refer to',
'remark2' => 'Database Migration',
'remark3' => 'Multiple parameters are separated by English commas',
'table_name' => 'Table Name',
'model_name' => 'Model',
'controller_name' => 'Controller',
'service_name' => 'Service',
'primary_key' => 'Primary Key',
'primary_key_description' => 'Use increments method',
'options' => 'Options',
'create_database_migration' => 'Create Database Migration File',
'create_table' => 'Create Table',
'create_model' => 'Create Model',
'create_controller' => 'Create Controller',
'create_service' => 'Create Service',
'app_title' => 'App Title',
'column_name' => 'Column Name',
'type' => 'Type',
'extra_params' => 'Extra Params',
'nullable' => 'Nullable',
'index' => 'Index',
'default_value' => 'Default Value',
'comment' => 'Comment',
'exists_table' => 'Exists Table',
'generate_code' => 'Generate Code',
'expand_more_settings' => 'More Settings',
'collapse_settings' => 'Collapse Settings',
'confirm_generate_code' => 'Confirm Generate Code?',
'preview' => 'Preview',
'base_info' => 'Base Info',
'column_info' => 'Column Info',
'route_config' => 'Route Config',
'page_config' => 'Page Config',
'gen_route_menu' => 'Generate Route And Menu',
'route' => 'Route',
'menu_name' => 'Menu Name',
'parent_menu' => 'Parent Menu',
'menu_icon' => 'Menu Icon',
'name_label_desc' => 'Name And Label Attribute Take Field Name And Comment',
'column_warning' => 'If the field name exists (no / status) will cause the form to fail to echo back!',
'add_column' => 'Add Column',
'scope' => 'Scope',
'list_component' => 'List Component',
'list_component_desc' => 'List Component, Default Is TableColumn',
'form_component' => 'Form Component',
'form_component_desc' => 'Form Component, Default Is TextControl',
'detail_component' => 'Detail Component',
'detail_component_desc' => 'Detail Component, Default Is TextControl',
'model_config' => 'Model Config',
'file_column' => 'File Column',
'file_column_multi' => 'Multi File',
'file_column_desc' => 'File Column, Automatically Add Attribute Methods In The Model',
'preview_code' => 'Preview Code',
'property' => 'Property',
'property_name' => 'Property Name',
'value' => 'Value',
'dialog_form' => 'Dialog Form',
'dialog_size' => 'Dialog Size',
'copy_record' => 'Copy Record',
'copy_record_description' => 'You can copy and share to <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a>',
'import_record' => 'Import Record',
'import_record_placeholder' => 'Please enter the imported json record',
'import_record_desc' => 'You can find some records shared by others on <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a>',
'load_config' => 'Load Config',
'load_component_config' => 'Load :c Config',
'fill' => 'Fill',
'save_current_config' => 'Save Current Config',
'input_config_name' => 'Please Input Config Name',
'same_name_tips' => 'Configurations with the same name will be overwritten',
'save_path_dir' => 'Primary application',
'save_path_select' => 'Select Directory',
'save_path_select_tips' => 'Project root directory or plugin root directory can be selected',
'save_path_label_prefix' => 'Plugins -> ',
'clear_code' => 'Clear Code',
'select_clear_record' => 'Select what you want to clear',
'select_generate_record' => 'Select the content you want to generate',
'duplicate_column' => 'Duplicate column name',
'common_field_add' => 'Add Common Field',
'common_field_add_column' => 'Add Field',
'config_name' => 'Config Name',
'field_config' => 'Field Config',
'field_name' => 'Field Name',
'list_display' => 'List Display :content',
'duplicate_filter_input_name' => 'Duplicate filter input name: :column',
'list_filter' => 'List Filter',
'filter_type' => 'Filter Type',
'filter_mode' => 'Filter Mode',
'filter_mode_fixed' => 'Fixed Query Condition',
'filter_mode_fixed_value' => 'Fixed Value',
'filter_mode_input' => 'Receive Parameter',
'filter_input_name' => 'Parameter Name',
'filter_input_label' => 'Filter Label',
'filter_component' => 'Filter Component',
],
'admin_users' => 'Admin Users',
'admin_user' => [
'avatar' => 'Avatar',
'name' => 'Name',
'roles' => 'Roles',
'search_username' => 'Search Username/Name',
'password_confirmation' => 'Password Not Match',
'old_password_required' => 'Old Password Required',
'old_password_error' => 'Old Password Error',
'username_already_exists' => 'Username Already Exists',
'cannot_delete' => 'The super administrator cannot be deleted',
],
'admin_roles' => 'Admin Roles',
'admin_role' => [
'name' => 'Name',
'slug' => 'Slug',
'permissions' => 'Permissions',
'slug_description' => 'unique identifier of a role',
'name_already_exists' => 'Role Name Already Exists',
'slug_already_exists' => 'Role Slug Already Exists',
'set_permissions' => 'Set Permissions',
'cannot_delete' => 'The super administrator cannot be deleted',
'used' => 'You cannot delete a role that is in use',
],
'admin_permissions' => 'Permissions',
'admin_permission' => [
'name' => 'Name',
'slug' => 'Slug',
'http_method' => 'Http Method',
'http_method_description' => 'if you do not select the value is ANY',
'http_path' => 'Http Path',
'auto_generate' => 'Auto Generate',
'auto_generate_confirm' => 'The permission information will be generated after the permission table and permission menu association table are truncated. Do you want to continue?',
'parent_id_not_allow' => 'Parent Id Not Allow',
'name_already_exists' => 'Permission Name Already Exists',
'slug_already_exists' => 'Permission Slug Already Exists',
],
'admin_menus' => 'Menus',
'admin_menu' => [
'parent_id' => 'Parent',
'order' => 'Order',
'title' => 'Title',
'icon' => 'Icon',
'icon_description' => 'Please refer to ',
'url' => 'Url',
'iframe_description' => 'After opening, the page will be cached and will not be reloaded when reopened',
'visible' => 'Visible',
'type' => 'Type',
'keep_alive' => 'KeepAlive',
'api' => 'Page API',
'api_description' => 'schemaApi, the api for page initialization requests, needs to be consistent with queryPath in Controller',
'route' => 'Route',
'link' => 'Link',
'iframe' => 'Iframe',
'page' => 'Page',
'class_name' => 'Class Name',
'class_name_description' => 'The CSS class name of the menu, which is typically used to customize styles',
'show' => 'Show',
'hide' => 'Hide',
'is_home' => 'Is Home',
'is_home_description' => 'In multi-tab mode, the page label is fixed on the left',
'is_full' => 'Is Full',
'is_full_description' => 'When enabled, the menu bar portion of the page is hidden',
'parent_id_not_allow' => 'The parent menu cannot be set to the current submenu',
'component' => 'Component',
'component_desc' => 'amis by default. Not a custom front-end page, please do not modify it',
'url_exists' => 'menu path duplication',
],
'extensions' => [
'name_invalid' => 'Name Invalid',
'exists' => 'This extension already exists: ',
'menu' => 'Extensions',
'page_title' => 'Extensions',
'create' => 'Create',
'install' => 'Install',
'create_extension' => 'Create Extension',
'create_tips' => 'After the directory is created, a basic extended directory structure is created under the <br><b>:dir</b><br> directory',
'local_install' => 'Local Install',
'more_extensions' => 'More Extensions',
'setting' => 'Setting',
'enable' => 'Enable',
'enable_confirm' => 'Are you sure to enable the extension?',
'disable' => 'Disable',
'disable_confirm' => 'Are you sure to disable the extension?',
'uninstall' => 'Uninstall',
'uninstall_confirm' => '
<div class="text-danger">
Confirm to uninstall the extension?<br>
Uninstallation will delete all files and databases published after the extension is enabled and cannot be retrieved!!!<br>
Backup important data before performing operations!!!<br>
<span class="text-info">Extension package files will not be deleted, please manually delete them!!!</span>
</div>
',
'filter_placeholder' => 'Search by extension name',
'form' => [
'create_extension' => 'Create Extension',
'name' => 'Name',
'namespace' => 'Namespace',
'create_description' => 'It will be created in :dir Directory to create a basic extended directory structure',
],
'card' => [
'author' => 'Author',
'version' => 'Version',
'homepage' => 'Home',
'status' => 'Status',
],
'status_map' => [
'enabled' => 'Enabled',
'disabled' => 'Disabled',
],
'validation' => [
'file' => 'Please select file',
'invalid_package' => 'Invalid extension package',
],
],
'export' => [
'title' => 'Export',
'all' => 'All',
'page' => 'Current Page',
'selected_rows' => 'Selected Rows',
'page_no_data' => 'Current page has no data',
'selected_rows_no_data' => 'No data is selected',
'please_install_laravel_excel' => 'Please install the package "rap2hpoutre/fast-excel" first',
],
'pages' => [
'menu' => 'Pages',
'title' => 'Title',
'sign' => 'Sign',
'page' => 'Page Structure',
'schema_cannot_be_empty' => 'Page Structure cannot be empty',
'sign_exists' => 'Sign already exists',
],
'relationships' => [
'menu' => 'Dynamic Relationships',
'model' => 'Model',
'title' => 'Title',
'remark' => 'Remark',
'generate_model' => 'Generate Model',
'generate' => 'Generate',
'args' => 'Args',
'type' => 'Type',
'related_model' => 'Related Model',
'through_model' => 'Through Model',
'model_exists' => 'Model already exists: ',
'rel_name_exists' => 'Relationship name already exists',
],
'apis' => [
'menu' => 'Dynamic Apis',
'title' => 'Title',
'path' => 'Path',
'template' => 'Template',
'enabled' => 'Enabled',
'args' => 'Args',
'path_exists' => 'Path already exists',
'template_format_error' => 'Template format error',
'template_exists' => 'Template already exists',
'add_template' => 'Add Template',
'add_template_tips' => 'Please note the source of the template, if you can not tell whether the template is safe or not, it is recommended not to use a template',
'paste_template' => 'Paste the template content',
'overlay' => 'Whether to overwrite the template if it already exists',
],
'api_templates' => [
'data_list' => 'Get List (Paginated)',
'data_create' => 'Create',
'data_update' => 'Update',
'data_delete' => 'Delete',
'data_detail' => 'Get Detail',
],
];

11
lang/en/menu.php 100644
View File

@ -0,0 +1,11 @@
<?php
return [
'dashboard' => 'Dashboard',
'admin_system' => 'Admin',
'admin_users' => 'Users',
'admin_roles' => 'Roles',
'admin_permission' => 'Permissions',
'admin_menu' => 'Menus',
'admin_setting' => 'Settings',
];

View File

@ -0,0 +1,334 @@
<?php
return [
'remember_me' => '记住我',
'login' => '登 录',
'logout' => '退出登录',
'username' => '用户名',
'password' => '密码',
'old_password' => '旧密码',
'confirm_password' => '确认密码',
'captcha' => '验证码',
'captcha_error' => '验证码有误',
'required' => '请填写:attribute',
'login_successful' => '登录成功',
'login_failed' => '用户名或密码错误',
'user_setting' => '个人设置',
'created_at' => '创建时间',
'updated_at' => '更新时间',
'deleted_at' => '删除时间',
'actions' => '操作',
'create' => '新增',
'edit' => '编辑',
'show' => '查看',
'delete' => '删除',
'copy' => '复制',
'confirm_delete' => '确认删除选中项?',
'back' => '返回',
'reset' => '重置',
'search' => '搜索',
'list' => '列表',
'add' => '新增',
'save' => '保存',
'detail' => '详情',
'developer' => '开发',
'code_generator' => '代码生成器',
'visual_editor' => '可视化编辑器',
'terminal' => '终端',
'administrator' => '管理员',
'soft_delete' => '软删除',
'keyword' => '关键字',
'unknown_error' => '未知错误',
'upload_file_error' => '上传文件错误',
'parent' => '父级',
'order' => '排序',
'order_desc' => '降序排序',
'order_asc' => '升序排序',
'menus' => '菜单',
'successfully' => '成功',
'failed' => '失败',
'successfully_message' => ':attribute成功',
'failed_message' => ':attribute失败',
'action_success' => '操作成功',
'action_failed' => '操作失败',
'save_success' => '保存成功',
'save_failed' => '保存失败',
'yes' => '是',
'no' => '否',
'need_start_with_slash' => '需要以 / 开头',
'cancel' => '取消',
'please_login' => '请先登录',
'unauthorized' => '无权访问',
'user_disabled' => '用户已被禁用',
'preview' => '预览',
'code_generators' => [
'remark1' => '额外参数请参考',
'remark2' => '数据库迁移',
'remark3' => '多个参数使用英文逗号分割',
'table_name' => '表名',
'model_name' => '模型',
'controller_name' => '控制器',
'service_name' => 'Service',
'primary_key' => '主键名称',
'primary_key_description' => '使用 increments 方法',
'options' => '可选项',
'create_database_migration' => '创建数据库迁移文件',
'create_table' => '创建数据表',
'create_model' => '创建模型',
'create_controller' => '创建控制器',
'create_service' => '创建Service',
'app_title' => '功能名称',
'column_name' => '字段名',
'type' => '类型',
'extra_params' => '额外参数',
'nullable' => '允许空值',
'index' => '索引',
'default_value' => '默认值',
'comment' => '注释',
'exists_table' => '已有数据表',
'generate_code' => '生成代码',
'expand_more_settings' => '更多设置',
'collapse_settings' => '收起设置',
'confirm_generate_code' => '确认生成代码?',
'preview' => '预览',
'base_info' => '基本信息',
'column_info' => '字段信息',
'route_config' => '路由配置',
'page_config' => '页面配置',
'gen_route_menu' => '生成路由&菜单',
'route' => '路由',
'menu_name' => '菜单名称',
'parent_menu' => '父级菜单',
'menu_icon' => '菜单图标',
'name_label_desc' => 'name和label属性取字段名和注释',
'column_warning' => '如果字段名存在 no、status 会导致 form 回显失败!',
'add_column' => '添加字段',
'scope' => '作用域',
'list_component' => '列表组件',
'list_component_desc' => '列表组件, 默认为 TableColumn',
'form_component' => '表单组件',
'form_component_desc' => '表单组件, 默认为 TextControl',
'detail_component' => '详情组件',
'detail_component_desc' => '详情组件, 默认为 TextControl',
'model_config' => '模型配置',
'file_column' => '文件字段',
'file_column_multi' => '多文件',
'file_column_desc' => '文件字段会自动在模型中添加 获取/修改器 方法',
'preview_code' => '预览代码',
'property' => '属性',
'property_name' => '属性名称',
'value' => '值',
'dialog_form' => '弹窗表单',
'dialog_size' => '弹窗大小',
'copy_record' => '复制记录',
'copy_record_description' => '你可以复制后分享到 <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a>',
'import_record' => '导入记录',
'import_record_placeholder' => '请输入导入的json记录',
'import_record_desc' => '你可以在 <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a> 找到一些其他人分享的记录',
'load_config' => '加载配置',
'load_component_config' => '加载 :c 配置',
'fill' => '填充',
'save_current_config' => '保存当前配置',
'input_config_name' => '请填写配置名称',
'same_name_tips' => '相同名称的配置将会被覆盖',
'save_path_dir' => '主应用',
'save_path_select' => '选择目录',
'save_path_select_tips' => '可选择项目根目录或插件根目录',
'save_path_label_prefix' => '插件 -> ',
'clear_code' => '清除代码',
'select_clear_record' => '选择要清除的内容',
'select_generate_record' => '选择要生成的内容',
'duplicate_column' => '存在同名字段',
'common_field_add' => '添加常用字段',
'common_field_add_column' => '添加字段',
'config_name' => '配置名称',
'field_config' => '字段配置',
'field_name' => '字段名',
'list_display' => '列表显示 :content',
'duplicate_filter_input_name' => ':column 存在同名筛选项',
'list_filter' => '列表筛选',
'filter_type' => '筛选类型',
'filter_mode' => '筛选模式',
'filter_mode_fixed' => '固定查询条件',
'filter_mode_fixed_value' => '固定值',
'filter_mode_input' => '接收参数',
'filter_input_name' => '参数名称',
'filter_input_label' => '筛选项 Label',
'filter_component' => '筛选组件',
],
'admin_users' => '管理员',
'admin_user' => [
'avatar' => '头像',
'name' => '姓名',
'roles' => '角色',
'search_username' => '搜索用户名/名称',
'password_confirmation' => '两次输入密码不一致',
'old_password_required' => '请输入原密码',
'old_password_error' => '原密码错误',
'username_already_exists' => '用户名已存在',
'cannot_delete' => '不可删除超级管理员',
],
'admin_roles' => '角色',
'admin_role' => [
'name' => '名称',
'slug' => '标识',
'permissions' => '权限',
'slug_description' => '角色的唯一标识, 不可重复',
'name_already_exists' => '角色名称已存在',
'slug_already_exists' => '角色标识已存在',
'set_permissions' => '设置权限',
'cannot_delete' => '不可删除超级管理员',
'used' => '不可删除正在使用的角色',
],
'admin_permissions' => '权限',
'admin_permission' => [
'name' => '名称',
'slug' => '标识',
'http_method' => '请求方式',
'http_method_description' => '不选则为ANY',
'http_path' => '路由',
'auto_generate' => '自动生成',
'auto_generate_confirm' => '权限信息会在 截断权限表&权限菜单关联表 后重新生成, 是否继续操作 ?',
'parent_id_not_allow' => '父级不允许设置为当前子权限',
'name_already_exists' => '权限名称已存在',
'slug_already_exists' => '权限标识已存在',
],
'admin_menus' => '菜单',
'admin_menu' => [
'parent_id' => '父级',
'order' => '排序',
'title' => '名称',
'icon' => '图标',
'icon_description' => '请参考',
'url' => '链接',
'visible' => '可见',
'type' => '类型',
'iframe_description' => '开启后页面将缓存,重新打开时不会重新加载',
'api' => '页面Api',
'api_description' => 'schemaApi, 页面初始化请求的api, 需要与Controller中的queryPath一致',
'keep_alive' => '缓存页面',
'route' => '路由',
'link' => '外链',
'iframe' => 'Iframe',
'page' => '页面',
'class_name' => '类名',
'class_name_description' => '菜单的CSS类名, 一般用于自定义样式',
'show' => '可见',
'hide' => '隐藏',
'is_home' => '首页',
'is_home_description' => '在多页签卡模式下,页面标签将固定在左侧',
'is_full' => '全屏',
'is_full_description' => '开启后将隐藏该页面的菜单栏部分',
'parent_id_not_allow' => '父级菜单不允许设置为当前子菜单',
'component' => '组件',
'component_desc' => '默认为 amis , 非自定义前端页面请勿修改',
'url_exists' => '菜单路径重复',
],
'extensions' => [
'name_invalid' => '无效的扩展名称',
'exists' => '该扩展已存在:',
'menu' => '扩展',
'page_title' => '扩展',
'create' => '创建',
'install' => '安装',
'create_extension' => '创建扩展',
'create_tips' => '创建成功后会在<br><b>:dir</b><br>目录下创建基础的扩展目录结构',
'local_install' => '本地安装',
'more_extensions' => '更多扩展',
'setting' => '设置',
'enable' => '启用',
'enable_confirm' => '确定要启用该扩展吗?',
'disable' => '禁用',
'disable_confirm' => '确定要禁用该扩展吗?',
'uninstall' => '卸载',
'uninstall_confirm' => '
<div class="text-danger">
确认卸载该扩展?<br>
卸载将会删除启用扩展后发布的所有文件及数据库, 且不可找回!!!<br>
如有重要数据请备份后再操作!!!<br>
<span class="text-info">扩展包文件将不会被删除, 请手动删除!!!</span>
</div>
',
'filter_placeholder' => '输入扩展名称',
'form' => [
'create_extension' => '创建扩展',
'name' => '名称',
'namespace' => '命名空间',
'create_description' => '创建成功后会在 :dir 目录下创建基础的扩展目录结构',
],
'card' => [
'author' => '作者',
'version' => '版本',
'homepage' => '主页',
'status' => '状态',
],
'status_map' => [
'enabled' => '已启用',
'disabled' => '已禁用',
],
'validation' => [
'file' => '请选择文件',
'invalid_package' => '无效的扩展包',
],
],
'export' => [
'title' => '导出',
'all' => '全部',
'page' => '本页',
'selected_rows' => '选中行',
'page_no_data' => '本页无数据',
'selected_rows_no_data' => '请选择要导出的数据',
'please_install_laravel_excel' => '请先安装 rap2hpoutre/fast-excel 扩展',
],
'pages' => [
'menu' => '页面管理',
'title' => '名称',
'sign' => '标识',
'page' => '页面结构',
'schema_cannot_be_empty' => '页面结构不可为空',
'sign_exists' => '页面标识已存在',
],
'relationships' => [
'menu' => '动态关联',
'model' => '模型',
'title' => '名称',
'remark' => '备注',
'generate_model' => '生成模型',
'generate' => '生成',
'args' => '参数',
'type' => '类型',
'related_model' => '关联模型',
'through_model' => '中间模型',
'model_exists' => '模型已存在: ',
'rel_name_exists' => '该模型下存在同名关联',
],
'apis' => [
'menu' => '动态API',
'title' => '名称',
'path' => '路径',
'template' => '模板',
'enabled' => '是否启用',
'args' => '参数',
'path_exists' => '接口路径已存在',
'template_format_error' => '模板格式错误',
'template_exists' => '模板已存在',
'add_template' => '添加模板',
'add_template_tips' => '请注意模板来源, 如果你无法辨别模板是否安全, 建议不要使用模板',
'paste_template' => '请粘贴模板内容',
'overlay' => '如果模板已存在, 是否覆盖',
],
'api_templates' => [
'data_list' => '获取列表(分页)',
'data_create' => '新增数据',
'data_update' => '更新数据',
'data_delete' => '删除数据',
'data_detail' => '获取详情',
],
];

View File

@ -0,0 +1,11 @@
<?php
return [
'dashboard' => '控制台',
'admin_system' => '系统管理',
'admin_users' => '管理员',
'admin_roles' => '角色',
'admin_permission' => '权限',
'admin_menu' => '菜单',
'admin_setting' => '设置',
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
var n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},s=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],o=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},t=[];s.forEach(function(e){t.push(e),t.push(e.toUpperCase()),t.push(o(e))});var i={defaultToken:"",tokenPostfix:".apex",keywords:t,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}};export{n as conf,i as language};

Binary file not shown.

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"#"}},t={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}};export{e as conf,t as language};

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},s={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=><!~?&|+\-*\/\^;\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)(rem(?:\s.*|))$/,["","comment"]],[/(\@?)(@keywords)(?!\w)/,[{token:"keyword"},{token:"keyword.$2"}]],[/[ \t\r\n]+/,""],[/setlocal(?!\w)/,"keyword.tag-setlocal"],[/endlocal(?!\w)/,"keyword.tag-setlocal"],[/[a-zA-Z_]\w*/,""],[/:\w*/,"metatag"],[/%[^%]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],string:[[/[^\\"'%]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/%[\w ]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/$/,"string","@popall"]]}};export{e as conf,s as language};

Binary file not shown.

View File

@ -0,0 +1,2 @@
var n=function(e){return"\\b"+e+"\\b"},t="[_a-zA-Z]",o="[_a-zA-Z0-9]",r=n(""+t+o+"*"),i=["targetScope","resource","module","param","var","output","for","in","if","existing"],a=["true","false","null"],s="[ \\t\\r\\n]",c="[0-9]+",g={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])'
`,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},l={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~?:&|+\-*/^%]+/,keywords:i,namedLiterals:a,escapes:"\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:"(|'|'')[^']",action:{token:"string"}},{regex:"'''",action:{token:"string.quote",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"[^\\\\'$]+",action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:"'",action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:s},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:"'''",action:{token:"string.quote",next:"@stringVerbatim"}},{regex:"'",action:{token:"string.quote",next:"@stringLiteral"}},{regex:c,action:{token:"number"}},{regex:r,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}}]}};export{g as conf,l as language};

View File

@ -0,0 +1 @@
import{B as b,c as B,b as T,m as E,a as S,e as z,f as x,r as L,g as N}from"./index-D0zDG80U.js";function r(t,n){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=n,this._projection=new BMap.MercatorProjection}r.prototype.type="bmap";r.prototype.dimensions=["lng","lat"];r.prototype.setZoom=function(t){this._zoom=t};r.prototype.setCenter=function(t){this._center=this._projection.lngLatToPoint(new BMap.Point(t[0],t[1]))};r.prototype.setMapOffset=function(t){this._mapOffset=t};r.prototype.getBMap=function(){return this._bmap};r.prototype.dataToPoint=function(t){var n=new BMap.Point(t[0],t[1]),e=this._bmap.pointToOverlayPixel(n),a=this._mapOffset;return[e.x-a[0],e.y-a[1]]};r.prototype.pointToData=function(t){var n=this._mapOffset;return t=this._bmap.overlayPixelToPoint({x:t[0]+n[0],y:t[1]+n[1]}),[t.lng,t.lat]};r.prototype.getViewRect=function(){var t=this._api;return new b(0,0,t.getWidth(),t.getHeight())};r.prototype.getRoamTransform=function(){return B()};r.prototype.prepareCustoms=function(){var t=this.getViewRect();return{coordSys:{type:"bmap",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:T(this.dataToPoint,this),size:T(V,this)}}};r.prototype.convertToPixel=function(t,n,e){return this.dataToPoint(e)};r.prototype.convertFromPixel=function(t,n,e){return this.pointToData(e)};function V(t,n){return n=n||[0,0],E([0,1],function(e){var a=n[e],o=t[e]/2,f=[],l=[];return f[e]=a-o,l[e]=a+o,f[1-e]=l[1-e]=n[1-e],Math.abs(this.dataToPoint(f)[e]-this.dataToPoint(l)[e])},this)}var _;r.dimensions=r.prototype.dimensions;function H(){function t(n){this._root=n}return t.prototype=new BMap.Overlay,t.prototype.initialize=function(n){return n.getPanes().labelPane.appendChild(this._root),this._root},t.prototype.draw=function(){},t}r.create=function(t,n){var e,a=n.getDom();return t.eachComponent("bmap",function(o){var f=n.getZr().painter,l=f.getViewportRoot();if(typeof BMap>"u")throw new Error("BMap api is not loaded");if(_=_||H(),e)throw new Error("Only one bmap component can exist");var i;if(!o.__bmap){var p=a.querySelector(".ec-extension-bmap");p&&(l.style.left="0px",l.style.top="0px",a.removeChild(p)),p=document.createElement("div"),p.className="ec-extension-bmap",p.style.cssText="position:absolute;width:100%;height:100%",a.appendChild(p);var s=o.get("mapOptions");s&&(s=S(s),delete s.mapType),i=o.__bmap=new BMap.Map(p,s);var d=new _(l);i.addOverlay(d),f.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}}i=o.__bmap;var m=o.get("center"),c=o.get("zoom");if(m&&c){var y=i.getCenter(),v=i.getZoom(),u=o.centerOrZoomChanged([y.lng,y.lat],v);if(u){var w=new BMap.Point(m[0],m[1]);i.centerAndZoom(w,c)}}e=new r(i,n),e.setMapOffset(o.__mapOffset||[0,0]),e.setZoom(c),e.setCenter(m),o.coordinateSystem=e}),t.eachSeries(function(o){o.get("coordinateSystem")==="bmap"&&(o.coordinateSystem=e)}),e&&[e]};function R(t,n){return t&&n&&t[0]===n[0]&&t[1]===n[1]}z({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(t,n){this.option.center=t,this.option.zoom=n},centerOrZoomChanged:function(t,n){var e=this.option;return!(R(t,e.center)&&n===e.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},mapOptions:{},roam:!1}});function Z(t){for(var n in t)if(t.hasOwnProperty(n))return!1;return!0}x({type:"bmap",render:function(t,n,e){var a=!0,o=t.getBMap(),f=e.getZr().painter.getViewportRoot(),l=t.coordinateSystem,i=function(w,D){if(!a){var O=f.parentNode.parentNode.parentNode,h=[-parseInt(O.style.left,10)||0,-parseInt(O.style.top,10)||0],g=f.style,C=h[0]+"px",P=h[1]+"px";g.left!==C&&(g.left=C),g.top!==P&&(g.top=P),l.setMapOffset(h),t.__mapOffset=h,e.dispatchAction({type:"bmapRoam",animation:{duration:0}})}};function p(){a||e.dispatchAction({type:"bmapRoam",animation:{duration:0}})}o.removeEventListener("moving",this._oldMoveHandler),o.removeEventListener("moveend",this._oldMoveHandler),o.removeEventListener("zoomend",this._oldZoomEndHandler),o.addEventListener("moving",i),o.addEventListener("moveend",i),o.addEventListener("zoomend",p),this._oldMoveHandler=i,this._oldZoomEndHandler=p;var s=t.get("roam");s&&s!=="scale"?o.enableDragging():o.disableDragging(),s&&s!=="move"?(o.enableScrollWheelZoom(),o.enableDoubleClickZoom(),o.enablePinchToZoom()):(o.disableScrollWheelZoom(),o.disableDoubleClickZoom(),o.disablePinchToZoom());var d=t.__mapStyle,m=t.get("mapStyle")||{},c=JSON.stringify(m);JSON.stringify(d)!==c&&(Z(m)||o.setMapStyle(S(m)),t.__mapStyle=JSON.parse(c));var y=t.__mapStyle2,v=t.get("mapStyleV2")||{},u=JSON.stringify(v);JSON.stringify(y)!==u&&(Z(v)||o.setMapStyleV2(S(v)),t.__mapStyle2=JSON.parse(u)),a=!1}});L("bmap",r);N({type:"bmapRoam",event:"bmapRoam",update:"updateLayout"},function(t,n){n.eachComponent("bmap",function(e){var a=e.getBMap(),o=a.getCenter();e.setCenterAndZoom([o.lng,o.lat],a.getZoom())})});var J="1.0.0";export{J as version};

Binary file not shown.

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},o={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};export{e as conf,o as language};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=><!~?&%|+\-*\/\^\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@[a-zA-Z_]\w*/,"variable.predefined"],[/[a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/###/,"comment","@comment"],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\()(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\=)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\[)(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\!)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\&)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\|)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\?)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\{)(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\;)(\s*)(@regEx)/,["","","regexp"]],[/}/,{cases:{"$S2==interpolatedstring":{token:"string",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/###/,"comment","@pop"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}};export{e as conf,r as language};

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
var e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},t={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@?[a-zA-Z_]\w*/,{cases:{"@namespaceFollows":{token:"keyword.$0",next:"@namespace"},"@keywords":{token:"keyword.$0",next:"@qualified"},"@default":{token:"identifier",next:"@qualified"}}}],{include:"@whitespace"},[/}/,{cases:{"$S2==interpolatedstring":{token:"string.quote",next:"@pop"},"$S2==litinterpstring":{token:"string.quote",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};export{e as conf,t as language};

View File

@ -0,0 +1 @@
var t={brackets:[],autoClosingPairs:[],surroundingPairs:[]},r={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/child-src/,"string.quote"],[/connect-src/,"string.quote"],[/default-src/,"string.quote"],[/font-src/,"string.quote"],[/frame-src/,"string.quote"],[/img-src/,"string.quote"],[/manifest-src/,"string.quote"],[/media-src/,"string.quote"],[/object-src/,"string.quote"],[/script-src/,"string.quote"],[/style-src/,"string.quote"],[/worker-src/,"string.quote"],[/base-uri/,"string.quote"],[/plugin-types/,"string.quote"],[/sandbox/,"string.quote"],[/disown-opener/,"string.quote"],[/form-action/,"string.quote"],[/frame-ancestors/,"string.quote"],[/report-uri/,"string.quote"],[/report-to/,"string.quote"],[/upgrade-insecure-requests/,"string.quote"],[/block-all-mixed-content/,"string.quote"],[/require-sri-for/,"string.quote"],[/reflected-xss/,"string.quote"],[/referrer/,"string.quote"],[/policy-uri/,"string.quote"],[/'self'/,"string.quote"],[/'unsafe-inline'/,"string.quote"],[/'unsafe-eval'/,"string.quote"],[/'strict-dynamic'/,"string.quote"],[/'unsafe-hashed-attributes'/,"string.quote"]]}};export{t as conf,r as language};

Binary file not shown.

View File

@ -0,0 +1,3 @@
var e={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t={defaultToken:"",tokenPostfix:".css",ws:`[
\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r
]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};export{e as conf,t as language};

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},n={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@typeKeywords":"type.identifier","@keywords":"keyword","@default":"identifier"}}],[/[A-Z_$][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/@[a-zA-Z]+/,"annotation"],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}};export{e as conf,n as language};

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
var e={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},o={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}};export{e as conf,o as language};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var e={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},o={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=><!~?:&|+\-*\\\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@types":"type","@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"delimiter"],[/[<>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};export{e as conf,o as language};

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},n={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=><!~?:&|+\-*\^%;\.,\/]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/[uU]?[yslnLI]?/,floatsuffix:/[fFmM]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[<.*>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}};export{e as conf,n as language};

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},n={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}};export{e as conf,n as language};

Binary file not shown.

View File

@ -0,0 +1 @@
var e={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},n={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}};export{e as conf,n as language};

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