主要功能: - 修改RequirementModal支持12个订单班选择 - 添加OrderClassIconMap图标映射组件 - Store中添加selectedOrderClass状态管理 - WorkflowPage支持传递orderClass参数 - web_result添加URL参数切换功能 - 创建order-class-handler.js动态处理页面主题 技术改进: - 创建软链接关联订单班数据目录 - 生成wenlu.json和food.json数据结构 - 删除重复的web_result目录 - 添加测试页面test-order-class.html 影响范围: - 展会策划系统现支持12个订单班 - 结果展示页面自动适配不同订单班主题 - 用户可选择不同行业生成对应方案 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
90 lines
3.6 KiB
JavaScript
90 lines
3.6 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "default", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return normalizeTailwindDirectives;
|
|
}
|
|
});
|
|
const _log = /*#__PURE__*/ _interop_require_default(require("../util/log"));
|
|
function _interop_require_default(obj) {
|
|
return obj && obj.__esModule ? obj : {
|
|
default: obj
|
|
};
|
|
}
|
|
function normalizeTailwindDirectives(root) {
|
|
let tailwindDirectives = new Set();
|
|
let layerDirectives = new Set();
|
|
let applyDirectives = new Set();
|
|
root.walkAtRules((atRule)=>{
|
|
if (atRule.name === "apply") {
|
|
applyDirectives.add(atRule);
|
|
}
|
|
if (atRule.name === "import") {
|
|
if (atRule.params === '"tailwindcss/base"' || atRule.params === "'tailwindcss/base'") {
|
|
atRule.name = "tailwind";
|
|
atRule.params = "base";
|
|
} else if (atRule.params === '"tailwindcss/components"' || atRule.params === "'tailwindcss/components'") {
|
|
atRule.name = "tailwind";
|
|
atRule.params = "components";
|
|
} else if (atRule.params === '"tailwindcss/utilities"' || atRule.params === "'tailwindcss/utilities'") {
|
|
atRule.name = "tailwind";
|
|
atRule.params = "utilities";
|
|
} else if (atRule.params === '"tailwindcss/screens"' || atRule.params === "'tailwindcss/screens'" || atRule.params === '"tailwindcss/variants"' || atRule.params === "'tailwindcss/variants'") {
|
|
atRule.name = "tailwind";
|
|
atRule.params = "variants";
|
|
}
|
|
}
|
|
if (atRule.name === "tailwind") {
|
|
if (atRule.params === "screens") {
|
|
atRule.params = "variants";
|
|
}
|
|
tailwindDirectives.add(atRule.params);
|
|
}
|
|
if ([
|
|
"layer",
|
|
"responsive",
|
|
"variants"
|
|
].includes(atRule.name)) {
|
|
if ([
|
|
"responsive",
|
|
"variants"
|
|
].includes(atRule.name)) {
|
|
_log.default.warn(`${atRule.name}-at-rule-deprecated`, [
|
|
`The \`@${atRule.name}\` directive has been deprecated in Tailwind CSS v3.0.`,
|
|
`Use \`@layer utilities\` or \`@layer components\` instead.`,
|
|
"https://tailwindcss.com/docs/upgrade-guide#replace-variants-with-layer"
|
|
]);
|
|
}
|
|
layerDirectives.add(atRule);
|
|
}
|
|
});
|
|
if (!tailwindDirectives.has("base") || !tailwindDirectives.has("components") || !tailwindDirectives.has("utilities")) {
|
|
for (let rule of layerDirectives){
|
|
if (rule.name === "layer" && [
|
|
"base",
|
|
"components",
|
|
"utilities"
|
|
].includes(rule.params)) {
|
|
if (!tailwindDirectives.has(rule.params)) {
|
|
throw rule.error(`\`@layer ${rule.params}\` is used but no matching \`@tailwind ${rule.params}\` directive is present.`);
|
|
}
|
|
} else if (rule.name === "responsive") {
|
|
if (!tailwindDirectives.has("utilities")) {
|
|
throw rule.error("`@responsive` is used but `@tailwind utilities` is missing.");
|
|
}
|
|
} else if (rule.name === "variants") {
|
|
if (!tailwindDirectives.has("utilities")) {
|
|
throw rule.error("`@variants` is used but `@tailwind utilities` is missing.");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return {
|
|
tailwindDirectives,
|
|
applyDirectives
|
|
};
|
|
}
|