refactor(assets): vendor 资产迁入标准目录并全仓去除 zibll 标识

- assets/vendor 全量迁移: fontawesome5→assets/fontawesome5, css→assets/css,
  js→assets/js/runtime(避开 14 个同名自有文件), img 合并去重→assets/img,
  fonts→assets/fonts; 删除 assets/vendor
- libs 五个与 widgets/third-party 字节相同的库不重复入库, loader paths 改指向
- 运行时切换: _win.uri=assets 根, loader baseUrl=/js/runtime, enlighter 注入
  路径同步; PHP 7 个引用文件切换并改名 $zibll_*→$runtime_*
- 去品牌: Qinver 头注释/品牌 console.log/演示链接清除, 默认文案中性化
- 功能标识符改名: zib__→aksrt__, zib_ajax→aksrt_ajax, window.zib→
  window.aksrtLegacy, zibllblock/*→aksrtblock/*, .zib-widget→.aksrt-panel,
  .zib-slider→.aksrt-slider, zib_menu_options meta 键等
- 自有 CSS 改名: legacy-utilities/compat-vars/footer shell
- admin SPA 重建; 契约测试同步(路径/断言/文件更名)
- 例外保留: tests/visual 对照环境与 fixtures 前缀(外部 Zibll 产品引用)

验证: php -l 133 个改动文件通过; runtime 86 个 JS node --check 通过;
契约测试 68/70(2 个失败经 stash 对照确认为存量问题)
This commit is contained in:
kate522 committed 2026-08-22 16:16:30 +08:00
1 parent 4f2391fb64
commit 9375b1c30c
591 files changed
+1690 -11041

No files matched your search

@@ -37,22 +37,22 @@ const header = join([
'inc/helpers/aksrt-header-userbox.php',
]);
test('the public dependency graph is the single local Zibll stack', () => {
test('the public dependency graph is the single local runtime stack', () => {
assert.match(scripts, /wp_deregister_script\('jquery'\)/);
assert.match(scripts, /jquery\.min\.js'[\s\S]*?'1\.9\.1'/);
assert.match(scripts, /bootstrap\.min\.css'[\s\S]*?'3\.4\.1'/);
assert.match(scripts, /fontawesome5'[\s\S]*?all\.min\.css'[\s\S]*?'5\.15\.4'/);
assert.match(scripts, /main\.min\.css/);
assert.match(scripts, /loader\.js'[\s\S]*?\['jquery', 'bootstrap'\]/);
assert.match(read('assets/vendor/zibll/js/loader.js'), /tbquire\(\['main'\]\)/);
assert.match(read('assets/js/runtime/loader.js'), /tbquire\(\['main'\]\)/);
for (const file of [
'assets/vendor/zibll/js/libs/jquery.min.js',
'assets/vendor/zibll/js/libs/bootstrap.min.js',
'assets/vendor/zibll/css/bootstrap.min.css',
'assets/vendor/fontawesome5/css/all.min.css',
'assets/vendor/zibll/css/main.min.css',
'assets/vendor/zibll/js/loader.js',
'assets/vendor/zibll/js/main.min.js',
'assets/js/runtime/libs/jquery.min.js',
'assets/js/runtime/libs/bootstrap.min.js',
'assets/css/bootstrap.min.css',
'assets/fontawesome5/css/all.min.css',
'assets/css/main.min.css',
'assets/js/runtime/loader.js',
'assets/js/runtime/main.min.js',
]) assert.equal(exists(file), true, `${file} must be local`);
assert.doesNotMatch(scripts, /bootstrap5|bootstrap-5|font-awesome\.min\.css|swiper(?:\.min)?\.(?:css|js)|aksrt-mini-touch/);
@@ -65,10 +65,10 @@ test('the public dependency graph is the single local Zibll stack', () => {
});
test('payment entry points use only the AKSRT payment runtime', () => {
const loader = read('assets/vendor/zibll/js/loader.js');
const loader = read('assets/js/runtime/loader.js');
const main = join([
'assets/vendor/zibll/js/main.js',
'assets/vendor/zibll/js/main.min.js',
'assets/js/runtime/main.js',
'assets/js/runtime/main.min.js',
]);
const paymentRuntime = join([
'assets/js/pay-vip.js',
@@ -95,14 +95,12 @@ test('Font Awesome 5 is the only icon contract across every runtime path', () =>
...listFiles('templates', extensions),
...listFiles('assets/js', extensions),
...listFiles('assets/admin/src', extensions),
...listFiles('assets/vendor/zibll/js', extensions),
];
const runtime = join(runtimeFiles);
const iconCss = join([
...listFiles('assets/css', new Set(['.css'])),
...listFiles('assets/vendor/zibll', new Set(['.css'])),
]);
const fa5 = read('assets/vendor/fontawesome5/css/all.min.css');
const fa5 = read('assets/fontawesome5/css/all.min.css');
const iconTokens = new Set([...runtime.matchAll(/\bfa-[a-z0-9]+(?:-[a-z0-9]+)*\b/g)].map((match) => match[0]));
const utility = /^fa-(?:xs|sm|lg|[2-9]x|10x|fw|ul|li|border|pull-left|pull-right|spin|pulse|rotate|rotate-(?:90|180|270)|flip|flip-(?:horizontal|vertical|both)|stack|stack-1x|stack-2x|inverse|sr-only|sr-only-focusable)$/;
const custom = new Set([
@@ -114,7 +112,7 @@ test('Font Awesome 5 is the only icon contract across every runtime path', () =>
assert.doesNotMatch(runtime, /FontAwesome|font-awesome\.min\.css|Font Awesome 4|4\.7\.0/);
assert.doesNotMatch(iconCss, /FontAwesome|font-awesome\.min\.css|Font Awesome 4|4\.7\.0/);
assert.doesNotMatch(iconCss, /font:\s*normal\s+normal\s+normal\s+[^;]+Font Awesome 5 Free/);
assert.equal(exists('assets/vendor/zibll/css/font-awesome.min.css'), false);
assert.equal(exists('assets/css/font-awesome.min.css'), false);
for (const token of iconTokens) {
if (utility.test(token) || custom.has(token)) continue;
assert.ok(fa5.includes(`.${token}:before`), `${token} is not available in Font Awesome 5.15.4`);
@@ -168,14 +166,14 @@ test('guest account member VIP and publish contracts share reference header DOM'
assert.doesNotMatch(userboxCss, /--(?:main|muted|key)-|@import/);
});
test('the only menu metadata and Walker contract is Zibll', () => {
test('the only menu metadata and Walker contract is the legacy runtime', () => {
const walker = read('src/Frontend/NavWalker.php');
const menuAdmin = read('src/Admin/NavMenuOptions.php');
const decoration = read('inc/helpers/menu-decoration.php');
const source = walker + menuAdmin + decoration;
assert.match(source, /zib_menu_options/);
assert.doesNotMatch(source, /aksrt_menu_options/);
assert.match(source, /aksrt_menu_options/);
assert.doesNotMatch(source, /zib_menu_options/);
assert.match(walker, /start_lvl|start_el|end_el/);
assert.match(walker, /submenu_graphic_card/);
assert.match(walker, /submenu_multi_column_links/);
@@ -257,7 +255,7 @@ test('header slider is the only top visual path and uses global plus page_config
test('responsive contract pins the requested viewport matrix to reference breakpoints', () => {
const viewports = [375, 640, 768, 991, 1200, 1380, 1440];
const css = read('assets/vendor/zibll/css/main.min.css');
const css = read('assets/css/main.min.css');
assert.deepEqual(viewports, [375, 640, 768, 991, 1200, 1380, 1440]);
for (const breakpoint of [375, 640, 768, 991, 1200, 1380]) {
assert.ok(css.includes(String(breakpoint)), `reference rule for ${breakpoint}px missing`);