dsh-workbench-tasks 5.5.0 → 5.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +590 -2643
- package/lib/index.js +3 -26
- package/package.json +6 -11
- package/lib/infra/data.js +0 -368
- package/lib/publisher/catalog.js +0 -100
- package/lib/publisher/command.js +0 -82
package/lib/client.js
CHANGED
|
@@ -4895,2203 +4895,6 @@ var require_stats = __commonJS({
|
|
|
4895
4895
|
}
|
|
4896
4896
|
});
|
|
4897
4897
|
|
|
4898
|
-
// packages/addons/lib/data-copy.cjs
|
|
4899
|
-
var require_data_copy = __commonJS({
|
|
4900
|
-
"packages/addons/lib/data-copy.cjs"(exports2, module2) {
|
|
4901
|
-
"use strict";
|
|
4902
|
-
var COPY = {
|
|
4903
|
-
zh: {
|
|
4904
|
-
title: "\u6570\u636E",
|
|
4905
|
-
subtitle: "\u53EA\u8BFB\u6D4F\u89C8\u672C\u63D2\u4EF6\u8D1F\u8D23\u7684\u8868\uFF1B\u7CFB\u7EDF\u5217\u4E0E\u5DF2\u5220\u9664\u884C\u9ED8\u8BA4\u9690\u85CF",
|
|
4906
|
-
tables: "\u8868",
|
|
4907
|
-
rows: "\u884C",
|
|
4908
|
-
deleted: "\u5DF2\u5220\u9664",
|
|
4909
|
-
rowCount: "\u5171 {n} \u884C",
|
|
4910
|
-
deletedCount: "\u5176\u4E2D {n} \u884C\u5DF2\u5220\u9664",
|
|
4911
|
-
search: "\u641C\u7D22\u6240\u6709\u6587\u672C\u5217\u2026",
|
|
4912
|
-
pageSize: "\u6BCF\u9875",
|
|
4913
|
-
includeDeleted: "\u542B\u5DF2\u5220\u9664",
|
|
4914
|
-
showSystem: "\u7CFB\u7EDF\u5217",
|
|
4915
|
-
refresh: "\u5237\u65B0",
|
|
4916
|
-
loading: "\u8F7D\u5165\u4E2D\u2026",
|
|
4917
|
-
empty: "\u8FD9\u5F20\u8868\u8FD8\u6CA1\u6709\u6570\u636E",
|
|
4918
|
-
emptyTable: "\u6CA1\u6709\u53EF\u5C55\u793A\u7684\u8868",
|
|
4919
|
-
loadFail: "\u6570\u636E\u670D\u52A1\u4E0D\u53EF\u7528\uFF08\u63D2\u4EF6\u7248\u672C\u8FC7\u65E7\uFF1F\uFF09",
|
|
4920
|
-
retry: "\u91CD\u8BD5",
|
|
4921
|
-
queryFail: "\u67E5\u8BE2\u5931\u8D25\uFF1A",
|
|
4922
|
-
noRows: "\u6CA1\u6709\u5339\u914D\u7684\u884C",
|
|
4923
|
-
prev: "\u4E0A\u4E00\u9875",
|
|
4924
|
-
next: "\u4E0B\u4E00\u9875",
|
|
4925
|
-
pageInfo: "\u7B2C {page} / {pages} \u9875",
|
|
4926
|
-
jump: "\u8DF3\u8F6C",
|
|
4927
|
-
total: "\u5171 {n} \u884C",
|
|
4928
|
-
copied: "\u5DF2\u590D\u5236",
|
|
4929
|
-
copy: "\u590D\u5236",
|
|
4930
|
-
close: "\u5173\u95ED",
|
|
4931
|
-
drawerTitle: "{column} \xB7 \u7B2C {row} \u884C",
|
|
4932
|
-
nullText: "NULL",
|
|
4933
|
-
emptyText: "\u7A7A",
|
|
4934
|
-
yes: "\u662F",
|
|
4935
|
-
no: "\u5426",
|
|
4936
|
-
json: "JSON",
|
|
4937
|
-
queryTime: "{n} ms",
|
|
4938
|
-
sortAsc: "\u5347\u5E8F",
|
|
4939
|
-
sortDesc: "\u964D\u5E8F",
|
|
4940
|
-
filterCol: "\u7B5B\u9009\u2026",
|
|
4941
|
-
filterClear: "\u6E05\u9664\u7B5B\u9009",
|
|
4942
|
-
index: "\u8868\u7D22\u5F15",
|
|
4943
|
-
indexSub: "\u5F53\u524D\u9009\u4E2D\u8868\u7684\u7D22\u5F15\uFF08\u53EA\u8BFB\uFF09\uFF1B\u884C\u6570\u4E3A\u6240\u5C5E\u8868\u603B\u884C\u6570\uFF0C\u4E0D\u662F\u7D22\u5F15\u6761\u76EE\u6570",
|
|
4944
|
-
idxName: "\u7D22\u5F15\u540D",
|
|
4945
|
-
idxColumns: "\u5217",
|
|
4946
|
-
idxType: "\u7C7B\u578B",
|
|
4947
|
-
idxSource: "\u6765\u6E90",
|
|
4948
|
-
idxUnique: "\u552F\u4E00",
|
|
4949
|
-
idxNormal: "\u666E\u901A",
|
|
4950
|
-
idxAuto: "\u81EA\u52A8",
|
|
4951
|
-
idxCreated: "\u663E\u5F0F\u521B\u5EFA",
|
|
4952
|
-
idxCount: "\u5171 {n} \u4E2A\u7D22\u5F15",
|
|
4953
|
-
idxNoExtra: "\u8BE5\u8868\u9664\u4E3B\u952E\u5916\u6CA1\u6709\u989D\u5916\u7D22\u5F15",
|
|
4954
|
-
idxRowsHelp: "\u6240\u5C5E\u8868\u603B\u884C\u6570\uFF08\u542B\u5DF2\u5220\u9664\u884C\uFF09\uFF0C\u4E0D\u662F\u7D22\u5F15\u6761\u76EE\u6570",
|
|
4955
|
-
idxTable: "\u8868",
|
|
4956
|
-
idxRows: "\u884C\u6570",
|
|
4957
|
-
idxCols: "\u5217\u6570",
|
|
4958
|
-
idxKey: "\u4E3B\u952E",
|
|
4959
|
-
idxIndexes: "\u7D22\u5F15",
|
|
4960
|
-
idxLastWrite: "\u6700\u8FD1\u5199\u5165",
|
|
4961
|
-
idxNone: "\u65E0",
|
|
4962
|
-
idxEmpty: "\u5F53\u524D\u8868\u6CA1\u6709\u53EF\u7528\u7684\u7D22\u5F15\u7EDF\u8BA1",
|
|
4963
|
-
idxTables: "\u8868",
|
|
4964
|
-
idxAt: "\u7EDF\u8BA1\u65F6\u95F4"
|
|
4965
|
-
},
|
|
4966
|
-
en: {
|
|
4967
|
-
title: "Data",
|
|
4968
|
-
subtitle: "Read-only view of this plugin's tables; system and deleted rows are hidden by default",
|
|
4969
|
-
tables: "Tables",
|
|
4970
|
-
rows: "rows",
|
|
4971
|
-
deleted: "deleted",
|
|
4972
|
-
rowCount: "{n} rows",
|
|
4973
|
-
deletedCount: "{n} deleted",
|
|
4974
|
-
search: "Search all text columns\u2026",
|
|
4975
|
-
pageSize: "Rows",
|
|
4976
|
-
includeDeleted: "Deleted",
|
|
4977
|
-
showSystem: "System",
|
|
4978
|
-
refresh: "Refresh",
|
|
4979
|
-
loading: "Loading\u2026",
|
|
4980
|
-
empty: "This table has no rows yet",
|
|
4981
|
-
emptyTable: "No tables to show",
|
|
4982
|
-
loadFail: "Data service unavailable (plugin too old?)",
|
|
4983
|
-
retry: "Retry",
|
|
4984
|
-
queryFail: "Query failed: ",
|
|
4985
|
-
noRows: "No matching rows",
|
|
4986
|
-
prev: "Previous",
|
|
4987
|
-
next: "Next",
|
|
4988
|
-
pageInfo: "Page {page} / {pages}",
|
|
4989
|
-
jump: "Jump",
|
|
4990
|
-
total: "{n} rows",
|
|
4991
|
-
copied: "Copied",
|
|
4992
|
-
copy: "Copy",
|
|
4993
|
-
close: "Close",
|
|
4994
|
-
drawerTitle: "{column} \xB7 row {row}",
|
|
4995
|
-
nullText: "NULL",
|
|
4996
|
-
emptyText: "empty",
|
|
4997
|
-
yes: "Yes",
|
|
4998
|
-
no: "No",
|
|
4999
|
-
json: "JSON",
|
|
5000
|
-
queryTime: "{n} ms",
|
|
5001
|
-
sortAsc: "ascending",
|
|
5002
|
-
sortDesc: "descending",
|
|
5003
|
-
filterCol: "Filter\u2026",
|
|
5004
|
-
filterClear: "Clear filter",
|
|
5005
|
-
index: "Table index",
|
|
5006
|
-
indexSub: "Indexes of the selected table (read-only); rows are the table total, not index entries",
|
|
5007
|
-
idxName: "Index name",
|
|
5008
|
-
idxColumns: "Columns",
|
|
5009
|
-
idxType: "Type",
|
|
5010
|
-
idxSource: "Source",
|
|
5011
|
-
idxUnique: "Unique",
|
|
5012
|
-
idxNormal: "Normal",
|
|
5013
|
-
idxAuto: "Automatic",
|
|
5014
|
-
idxCreated: "Explicit",
|
|
5015
|
-
idxCount: "{n} indexes",
|
|
5016
|
-
idxNoExtra: "This table has no indexes other than its primary key",
|
|
5017
|
-
idxRowsHelp: "Total table rows (including deleted rows), not index entries",
|
|
5018
|
-
idxTable: "Table",
|
|
5019
|
-
idxRows: "Rows",
|
|
5020
|
-
idxCols: "Cols",
|
|
5021
|
-
idxKey: "Primary key",
|
|
5022
|
-
idxIndexes: "Indexes",
|
|
5023
|
-
idxLastWrite: "Last write",
|
|
5024
|
-
idxNone: "\u2014",
|
|
5025
|
-
idxEmpty: "No index statistics available for this table",
|
|
5026
|
-
idxTables: "Tables",
|
|
5027
|
-
idxAt: "Generated"
|
|
5028
|
-
}
|
|
5029
|
-
};
|
|
5030
|
-
module2.exports = COPY;
|
|
5031
|
-
}
|
|
5032
|
-
});
|
|
5033
|
-
|
|
5034
|
-
// packages/addons/lib/visual-tokens.cjs
|
|
5035
|
-
var require_visual_tokens = __commonJS({
|
|
5036
|
-
"packages/addons/lib/visual-tokens.cjs"(exports2, module2) {
|
|
5037
|
-
module2.exports = `
|
|
5038
|
-
:where(.wbt-root,.wbi-root,.wbi-cfg,.wbt-data,.wbs-data,.wbg-data,.wbi-data,.wb-desc){--wb-radius-sm:8px;--wb-radius-card:12px;--wb-space-sm:8px;--wb-space-md:14px;--wb-border:var(--dsw-alias-border-l2,color-mix(in oklab,currentColor 16%,transparent));--wb-description-bg:color-mix(in oklab,var(--dsw-alias-brand-primary,#5b7fd6) 7%,transparent);--wb-description-line:color-mix(in oklab,var(--dsw-alias-brand-primary,#5b7fd6) 34%,transparent);--wb-motion:140ms;--wb-btn-bg:transparent;--wb-btn-hover-bg:color-mix(in oklab,currentColor 6%,transparent);--wb-btn-active-bg:color-mix(in oklab,currentColor 11%,transparent);--wb-btn-primary-bg:var(--dsw-alias-brand-primary,#2563eb);--wb-btn-primary-fg:var(--dsw-alias-label-primary-inverted,#fff);--wb-btn-danger-fg:var(--dsw-alias-state-error-primary,#b91c1c);--wb-btn-size-sm:32px;--wb-btn-focus:2px solid var(--dsw-alias-brand-primary,#2563eb);--wb-btn-focus-offset:2px}
|
|
5039
|
-
.wb-desc{background:var(--wb-description-bg);border-left-color:var(--wb-description-line);border-radius:0 var(--wb-radius-sm) var(--wb-radius-sm) 0}
|
|
5040
|
-
`;
|
|
5041
|
-
}
|
|
5042
|
-
});
|
|
5043
|
-
|
|
5044
|
-
// packages/addons/lib/data-style.cjs
|
|
5045
|
-
var require_data_style = __commonJS({
|
|
5046
|
-
"packages/addons/lib/data-style.cjs"(exports2, module2) {
|
|
5047
|
-
"use strict";
|
|
5048
|
-
module2.exports = function(DOMAIN, PREFIX) {
|
|
5049
|
-
var P = PREFIX + "-data";
|
|
5050
|
-
var CSS = [
|
|
5051
|
-
require_visual_tokens(),
|
|
5052
|
-
"." + P + "-search:has(.wbi-svg) input{padding-left:30px}." + P + "-search>.wbi-svg{position:absolute;left:10px;top:50%;transform:translateY(-50%)}",
|
|
5053
|
-
"." + P + "-btn{transition:background var(--wb-motion),border-color var(--wb-motion)}",
|
|
5054
|
-
"@media(max-width:480px){." + P + "-head>." + P + "-btn:has(.wbi-svg){width:32px;height:32px;padding:0;justify-content:center}." + P + "-head>." + P + "-btn:has(.wbi-svg) ." + P + "-btnlabel{display:none}}",
|
|
5055
|
-
"." + P + "{--cfg-line:var(--wb-border);--cfg-surface:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));--cfg-muted:var(--dsw-alias-label-secondary,color-mix(in oklab,currentColor 62%,transparent));--cfg-faint:var(--dsw-alias-label-tertiary,color-mix(in oklab,currentColor 42%,transparent));--cfg-hover:var(--dsw-alias-interactive-bg-hover,color-mix(in oklab,currentColor 5%,transparent));display:grid;grid-template-columns:216px minmax(0,1fr);gap:16px;width:100%;min-width:0;color:inherit;font-size:13px;align-items:start}",
|
|
5056
|
-
"." + P + "-side{position:sticky;top:12px;display:flex;flex-direction:column;gap:3px;border:1px solid var(--cfg-line);border-radius:var(--wb-radius-card);background:var(--cfg-surface);padding:8px;box-shadow:0 1px 2px color-mix(in oklab,currentColor 3%,transparent)}",
|
|
5057
|
-
"." + P + "-sidetitle{display:flex;align-items:center;justify-content:space-between;padding:6px 10px 8px;font-size:11px;font-weight:660;letter-spacing:.6px;text-transform:uppercase;color:var(--cfg-faint)}",
|
|
5058
|
-
"." + P + "-stab{display:flex;flex-direction:column;gap:3px;align-items:stretch;border:1px solid transparent;background:transparent;border-radius:9px;padding:8px 10px;font:inherit;color:inherit;text-align:left;cursor:pointer;position:relative;transition:background .12s ease,border-color .12s ease}",
|
|
5059
|
-
"." + P + "-stab:hover{background:var(--cfg-hover)}",
|
|
5060
|
-
"." + P + "-stab:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,currentColor);outline-offset:2px}",
|
|
5061
|
-
"." + P + "-stab.on{background:color-mix(in oklab,currentColor 6%,transparent);border-color:var(--cfg-line)}",
|
|
5062
|
-
"." + P + "-stab.on::before{content:'';position:absolute;left:-1px;top:9px;bottom:9px;width:2px;border-radius:2px;background:var(--dsw-alias-brand-primary,currentColor)}",
|
|
5063
|
-
"." + P + "-stabname{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;line-height:1.4;min-width:0}",
|
|
5064
|
-
"." + P + "-stabname span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
5065
|
-
"." + P + "-sidetable{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;color:var(--cfg-muted);margin-top:3px;letter-spacing:.2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
5066
|
-
"." + P + "-sidecount{margin-left:auto;font-size:10.5px;font-variant-numeric:tabular-nums;color:var(--cfg-muted);background:color-mix(in oklab,currentColor 8%,transparent);border-radius:999px;padding:1px 7px;flex:none}",
|
|
5067
|
-
"." + P + "-main{display:flex;flex-direction:column;gap:10px;min-width:0;border:1px solid var(--cfg-line);border-radius:var(--wb-radius-card);background:var(--cfg-surface);padding:14px 16px 12px;box-shadow:0 1px 2px color-mix(in oklab,currentColor 3%,transparent)}",
|
|
5068
|
-
"." + P + "-head{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}",
|
|
5069
|
-
"." + P + "-headmain{min-width:0;flex:1}",
|
|
5070
|
-
"." + P + "-head h2{margin:0;font-size:16px;font-weight:660;letter-spacing:.1px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
5071
|
-
"." + P + "-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;font-weight:500;color:var(--cfg-muted);background:color-mix(in oklab,currentColor 6%,transparent);border-radius:6px;padding:2px 6px}",
|
|
5072
|
-
"." + P + "-sub{font-size:11.5px;color:var(--cfg-muted);line-height:1.55;margin-top:4px}",
|
|
5073
|
-
"." + P + "-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:2px 0 4px}",
|
|
5074
|
-
"." + P + "-search{position:relative;flex:1;min-width:180px;max-width:340px}",
|
|
5075
|
-
"." + P + "-search input{width:100%;border:1px solid var(--cfg-line);background:var(--dsw-alias-bg-base,transparent);color:inherit;border-radius:9px;padding:8px 11px;font:inherit;font-size:12.5px;outline:none;transition:border-color .15s ease,box-shadow .15s ease}",
|
|
5076
|
-
"." + P + "-search input:hover{border-color:color-mix(in oklab,currentColor 28%,var(--cfg-line))}",
|
|
5077
|
-
"." + P + "-search input:focus{border-color:var(--dsw-alias-brand-primary,currentColor);box-shadow:0 0 0 3px color-mix(in oklab,var(--dsw-alias-brand-primary,currentColor) 14%,transparent)}",
|
|
5078
|
-
"." + P + "-select{border:1px solid var(--cfg-line);background:var(--dsw-alias-bg-base,transparent);color:inherit;border-radius:9px;padding:7px 10px;font:inherit;font-size:12px;outline:none}",
|
|
5079
|
-
"." + P + "-select:focus{border-color:var(--dsw-alias-brand-primary,currentColor);box-shadow:0 0 0 3px color-mix(in oklab,var(--dsw-alias-brand-primary,currentColor) 14%,transparent)}",
|
|
5080
|
-
"." + P + "-btn{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--cfg-line);background:transparent;color:var(--cfg-muted);border-radius:8px;padding:6px 10px;font:inherit;font-size:11.5px;cursor:pointer;white-space:nowrap;transition:background .12s ease,color .12s ease}",
|
|
5081
|
-
"." + P + "-btn:hover{background:var(--cfg-hover);color:var(--dsw-alias-label-primary,inherit)}",
|
|
5082
|
-
"." + P + "-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,currentColor);outline-offset:2px}",
|
|
5083
|
-
"." + P + "-btn:disabled{opacity:.45;cursor:not-allowed}",
|
|
5084
|
-
"." + P + "-btn[aria-busy='true']{opacity:.6}",
|
|
5085
|
-
"." + P + "-tablewrap{overflow:auto;max-height:calc(100vh - 300px);border:1px solid var(--cfg-line);border-radius:11px;background:var(--dsw-alias-bg-base,transparent)}",
|
|
5086
|
-
"." + P + "-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12.5px}",
|
|
5087
|
-
"." + P + "-table th{position:sticky;top:0;z-index:2;background:var(--cfg-surface);border-bottom:1px solid var(--cfg-line);padding:0;text-align:left;font-weight:600;white-space:nowrap}",
|
|
5088
|
-
"." + P + "-thbtn{display:flex;align-items:baseline;gap:6px;width:100%;border:0;background:transparent;color:inherit;font:inherit;font-size:11.5px;font-weight:660;letter-spacing:.2px;padding:9px 12px;cursor:pointer;text-align:left;white-space:nowrap}",
|
|
5089
|
-
"." + P + "-thbtn:hover{background:var(--cfg-hover)}",
|
|
5090
|
-
"." + P + "-thbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,currentColor);outline-offset:-2px}",
|
|
5091
|
-
"." + P + "-coltype{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9.5px;font-weight:500;color:var(--cfg-faint);letter-spacing:.3px}",
|
|
5092
|
-
"." + P + "-sortmark{color:var(--dsw-alias-brand-primary,currentColor);font-size:10px}",
|
|
5093
|
-
"." + P + "-rownum{position:sticky;left:0;z-index:1;background:var(--cfg-surface);color:var(--cfg-faint);text-align:right;font-variant-numeric:tabular-nums;font-size:10.5px;padding:0 8px;width:1%;white-space:nowrap;border-right:1px solid color-mix(in oklab,currentColor 7%,transparent)}",
|
|
5094
|
-
"." + P + "-table thead ." + P + "-rownum{z-index:3}",
|
|
5095
|
-
"." + P + "-cell{padding:7px 12px;border-bottom:1px solid color-mix(in oklab,currentColor 6%,transparent);max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;vertical-align:top}",
|
|
5096
|
-
"." + P + "-table tbody tr:hover ." + P + "-cell{background:var(--cfg-hover)}",
|
|
5097
|
-
"." + P + "-table tbody tr:nth-child(even) ." + P + "-cell,." + P + "-table tbody tr:nth-child(even) ." + P + "-rownum{background:color-mix(in oklab,currentColor 2.5%,transparent)}",
|
|
5098
|
-
"." + P + "-cell.num{text-align:right;font-variant-numeric:tabular-nums}",
|
|
5099
|
-
"." + P + "-cell.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px}",
|
|
5100
|
-
"." + P + "-cell.null{color:var(--cfg-faint);font-style:italic}",
|
|
5101
|
-
"." + P + "-cell.json .v{color:var(--dsw-alias-brand-primary,inherit)}",
|
|
5102
|
-
"." + P + "-tr.deleted ." + P + "-cell,." + P + "-tr.deleted ." + P + "-rownum{opacity:.55}",
|
|
5103
|
-
"." + P + "-tr.deleted ." + P + "-cell .v{text-decoration:line-through;text-decoration-color:color-mix(in oklab,currentColor 35%,transparent)}",
|
|
5104
|
-
"." + P + "-delbadge{display:inline-block;margin-left:6px;font-size:9.5px;line-height:1.5;padding:0 5px;border-radius:999px;background:color-mix(in oklab,var(--dsw-alias-state-error-primary,currentColor) 14%,transparent);color:var(--dsw-alias-state-error-primary,inherit);vertical-align:middle}",
|
|
5105
|
-
"." + P + "-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:2px;font-size:11.5px;color:var(--cfg-muted)}",
|
|
5106
|
-
"." + P + "-grow{flex:1}",
|
|
5107
|
-
"." + P + "-pageinfo{font-variant-numeric:tabular-nums}",
|
|
5108
|
-
"." + P + "-jump .wbctl-num-input{width:56px;padding:4px 7px;font-size:11.5px;text-align:right}",
|
|
5109
|
-
"." + P + "-jump .wbctl-num-hint{display:none}",
|
|
5110
|
-
"." + P + "-empty{border:1px dashed var(--cfg-line);border-radius:11px;padding:44px 16px;text-align:center;font-size:12.5px;color:var(--cfg-muted)}",
|
|
5111
|
-
"." + P + "-err{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid color-mix(in oklab,var(--dsw-alias-state-error-primary,currentColor) 32%,var(--cfg-line));border-radius:10px;padding:9px 12px;color:var(--dsw-alias-state-error-primary,inherit);font-size:12px;line-height:1.5}",
|
|
5112
|
-
"." + P + "-skwrap{display:flex;flex-direction:column;gap:1px;padding:2px}",
|
|
5113
|
-
"." + P + "-sk{height:26px;border-radius:4px;background:var(--dsw-alias-bg-skeleton,color-mix(in oklab,currentColor 6%,transparent));animation:" + PREFIX + "-data-pulse 1.4s ease-in-out infinite}",
|
|
5114
|
-
"@keyframes " + PREFIX + "-data-pulse{0%,100%{opacity:.6}50%{opacity:1}}",
|
|
5115
|
-
"." + P + "-toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);z-index:40;background:var(--dsw-alias-bg-layer-1,var(--cfg-surface));border:1px solid var(--cfg-line);border-radius:999px;padding:7px 14px;font-size:12px;color:var(--dsw-alias-label-primary,inherit);box-shadow:0 6px 24px color-mix(in oklab,currentColor 18%,transparent)}",
|
|
5116
|
-
"." + P + "-mask{position:fixed;inset:0;z-index:30;background:color-mix(in oklab,currentColor 26%,transparent)}",
|
|
5117
|
-
"." + P + "-drawer{position:fixed;top:0;right:0;bottom:0;z-index:31;width:min(520px,92vw);display:flex;flex-direction:column;gap:12px;background:var(--dsw-alias-bg-layer-1,var(--cfg-surface));border-left:1px solid var(--cfg-line);box-shadow:-8px 0 28px color-mix(in oklab,currentColor 16%,transparent);padding:18px 20px}",
|
|
5118
|
-
"." + P + "-drawer h3{margin:0;font-size:14px;font-weight:660;display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
5119
|
-
"." + P + "-drawer pre{margin:0;flex:1;overflow:auto;border:1px solid var(--cfg-line);border-radius:10px;background:var(--dsw-alias-bg-base,transparent);padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.65;white-space:pre-wrap;word-break:break-word}",
|
|
5120
|
-
"." + P + "-drawerfoot{display:flex;gap:8px;justify-content:flex-end}",
|
|
5121
|
-
"." + P + "-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}",
|
|
5122
|
-
"@media (max-width:900px){." + P + "{grid-template-columns:minmax(0,1fr)}." + P + "-side{position:static;flex-direction:row;flex-wrap:wrap;gap:6px;padding:6px}." + P + "-sidetitle{display:none}." + P + "-stab{padding:6px 10px;flex:none}." + P + "-sidecount{display:none}." + P + "-tablewrap{max-height:calc(100vh - 260px)}}",
|
|
5123
|
-
"@media (prefers-reduced-motion:reduce){." + P + " *,." + P + "-track,." + P + "-track::after,." + P + "-sk,." + P + "-drawer{transition:none;animation:none}}",
|
|
5124
|
-
"." + P + "-idxsub{font-size:11.5px;color:var(--cfg-muted);line-height:1.55}",
|
|
5125
|
-
"." + P + "-idxsum{display:flex;gap:16px;flex-wrap:wrap;font-size:11.5px;color:var(--cfg-muted)}",
|
|
5126
|
-
"." + P + "-idxsum b{font-weight:660;color:var(--dsw-alias-label-primary,inherit);font-variant-numeric:tabular-nums}",
|
|
5127
|
-
"." + P + "-idxtable{width:100%;table-layout:fixed}." + P + "-idxtable ." + P + "-cell{white-space:normal;overflow-wrap:anywhere;max-width:none}." + P + "-idxtable th:first-child{width:30%}." + P + "-idxtable th:nth-child(2){width:28%}",
|
|
5128
|
-
"." + P + "-idxtags{display:flex;flex-wrap:wrap;gap:4px;max-width:280px}",
|
|
5129
|
-
"." + P + "-idxchip{display:inline-block;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;line-height:1.6;border-radius:999px;padding:0 7px;background:color-mix(in oklab,currentColor 7%,transparent);color:var(--cfg-muted);white-space:nowrap}",
|
|
5130
|
-
"." + P + "-idxchip.u{background:color-mix(in oklab,var(--dsw-alias-brand-primary,currentColor) 15%,transparent);color:var(--dsw-alias-brand-primary,inherit)}",
|
|
5131
|
-
"." + P + "-idxnone{color:var(--cfg-faint)}",
|
|
5132
|
-
"." + P + "-frow th{padding:0 8px 6px;border-bottom:1px solid var(--cfg-line)}",
|
|
5133
|
-
"." + P + "-fcell{position:relative;display:block;min-width:96px}",
|
|
5134
|
-
"." + P + "-finput{width:100%;box-sizing:border-box;border:1px solid transparent;border-radius:6px;background:color-mix(in oklab,currentColor 4%,transparent);color:inherit;font:inherit;font-size:11.5px;padding:3px 18px 3px 6px;min-width:0}",
|
|
5135
|
-
"." + P + "-finput:hover{background:color-mix(in oklab,currentColor 7%,transparent)}",
|
|
5136
|
-
"." + P + "-finput:focus{outline:none;border-color:var(--dsw-alias-brand-primary,currentColor);background:var(--cfg-surface)}",
|
|
5137
|
-
"." + P + "-fclear{position:absolute;right:2px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--cfg-muted);cursor:pointer;font-size:13px;line-height:1;padding:2px 4px;border-radius:4px}",
|
|
5138
|
-
"." + P + "-fclear:hover{color:inherit;background:var(--cfg-hover)}",
|
|
5139
|
-
"." + P + "-emptycell{padding:22px 12px;text-align:center;color:var(--cfg-muted)}",
|
|
5140
|
-
"." + P + " *{box-sizing:border-box}",
|
|
5141
|
-
"." + P + "-tabs{display:flex;gap:6px;border-bottom:1px solid var(--cfg-line);padding-bottom:9px}",
|
|
5142
|
-
"." + P + "-tabs [aria-selected=true]{background:var(--cfg-hover);color:inherit;font-weight:660}",
|
|
5143
|
-
"." + P + "-images{display:flex;gap:5px;align-items:center}",
|
|
5144
|
-
"." + P + "-images img{width:36px;height:36px;object-fit:cover;border-radius:5px}",
|
|
5145
|
-
"." + P + "-gallery{display:flex;flex-direction:column;gap:12px;overflow:auto;flex:1}",
|
|
5146
|
-
"." + P + "-gallery img{width:100%;height:auto;object-fit:contain;border-radius:8px}"
|
|
5147
|
-
].concat(require_switch().styles).concat(require_number_field().styles).join("\n");
|
|
5148
|
-
if (DOMAIN === "storage") {
|
|
5149
|
-
var buttons = "." + P + " :is(button)";
|
|
5150
|
-
CSS += buttons + "{border:none;background:var(--wb-btn-bg);min-height:var(--wb-btn-size-sm);min-width:var(--wb-btn-size-sm)}" + buttons + ":enabled:hover{background:var(--wb-btn-hover-bg)}" + buttons + ":enabled:active{background:var(--wb-btn-active-bg)}" + buttons + ":disabled{background:var(--wb-btn-bg);color:var(--cfg-muted)}" + buttons + ":focus-visible{outline:var(--wb-btn-focus);outline-offset:var(--wb-btn-focus-offset)}." + P + "-fcell:has(button) input{padding-right:34px}";
|
|
5151
|
-
}
|
|
5152
|
-
function injectCss() {
|
|
5153
|
-
if (typeof document === "undefined") return;
|
|
5154
|
-
var old = document.getElementById("wb-addon-" + DOMAIN + "-data-css");
|
|
5155
|
-
if (old) {
|
|
5156
|
-
old.textContent = CSS;
|
|
5157
|
-
return;
|
|
5158
|
-
}
|
|
5159
|
-
var style = document.createElement("style");
|
|
5160
|
-
style.id = "wb-addon-" + DOMAIN + "-data-css";
|
|
5161
|
-
style.setAttribute("data-wb-addon", "wb-addon-" + DOMAIN);
|
|
5162
|
-
style.textContent = CSS;
|
|
5163
|
-
document.head.appendChild(style);
|
|
5164
|
-
}
|
|
5165
|
-
return injectCss;
|
|
5166
|
-
};
|
|
5167
|
-
}
|
|
5168
|
-
});
|
|
5169
|
-
|
|
5170
|
-
// packages/addons/lib/data-view.cjs
|
|
5171
|
-
var require_data_view = __commonJS({
|
|
5172
|
-
"packages/addons/lib/data-view.cjs"(exports2, module2) {
|
|
5173
|
-
"use strict";
|
|
5174
|
-
var React = require("react");
|
|
5175
|
-
var NF = require_number_field();
|
|
5176
|
-
var h = React.createElement;
|
|
5177
|
-
var COPY = require_data_copy();
|
|
5178
|
-
var SW = require_switch();
|
|
5179
|
-
module2.exports = function createDataView(options) {
|
|
5180
|
-
var DOMAIN = options.domain;
|
|
5181
|
-
function icon(name) {
|
|
5182
|
-
return options.Icon ? h(options.Icon, { name }) : null;
|
|
5183
|
-
}
|
|
5184
|
-
var P = options.prefix + "-data";
|
|
5185
|
-
var configView = { useConfig: options.useConfig };
|
|
5186
|
-
var columnHooks = options.columns || {};
|
|
5187
|
-
var injectCss = require_data_style()(DOMAIN, options.prefix);
|
|
5188
|
-
var CFG_FALLBACK = {
|
|
5189
|
-
"data.pageSize": 50,
|
|
5190
|
-
"data.showSystemColumns": false,
|
|
5191
|
-
"data.includeDeleted": false
|
|
5192
|
-
};
|
|
5193
|
-
var PAGE_SIZES = [10, 25, 50, 100, 200];
|
|
5194
|
-
function unwrap(r) {
|
|
5195
|
-
return r && r.result !== void 0 ? r.result : r;
|
|
5196
|
-
}
|
|
5197
|
-
function fmt(template, vars) {
|
|
5198
|
-
return String(template).replace(/\{(\w+)\}/g, function(m, key) {
|
|
5199
|
-
return vars[key] === void 0 ? m : String(vars[key]);
|
|
5200
|
-
});
|
|
5201
|
-
}
|
|
5202
|
-
function pad2(n) {
|
|
5203
|
-
return n < 10 ? "0" + n : String(n);
|
|
5204
|
-
}
|
|
5205
|
-
function timeText(ms) {
|
|
5206
|
-
var d = new Date(Number(ms));
|
|
5207
|
-
if (!Number.isFinite(d.getTime())) return String(ms);
|
|
5208
|
-
return d.getFullYear() + "-" + pad2(d.getMonth() + 1) + "-" + pad2(d.getDate()) + " " + pad2(d.getHours()) + ":" + pad2(d.getMinutes());
|
|
5209
|
-
}
|
|
5210
|
-
function looksJson(value) {
|
|
5211
|
-
var text = String(value).trim();
|
|
5212
|
-
if (!text || text[0] !== "{" && text[0] !== "[") return false;
|
|
5213
|
-
try {
|
|
5214
|
-
JSON.parse(text);
|
|
5215
|
-
return true;
|
|
5216
|
-
} catch (e) {
|
|
5217
|
-
return false;
|
|
5218
|
-
}
|
|
5219
|
-
}
|
|
5220
|
-
function rawText(value, col) {
|
|
5221
|
-
if (value === null || value === void 0) return "";
|
|
5222
|
-
return String(value);
|
|
5223
|
-
}
|
|
5224
|
-
function DataView(props) {
|
|
5225
|
-
var api = props.api;
|
|
5226
|
-
var lang = props.lang === "en" ? "en" : "zh";
|
|
5227
|
-
var t = Object.assign({}, COPY[lang], { indexSub: fmt(COPY[lang].indexSub, { tables: options.tables.join(" / "), domain: DOMAIN }) });
|
|
5228
|
-
var cfgWrap = configView.useConfig(api, CFG_FALLBACK);
|
|
5229
|
-
var cfg = cfgWrap.values;
|
|
5230
|
-
var tablesS = React.useState(null);
|
|
5231
|
-
var tables = tablesS[0], setTables = tablesS[1];
|
|
5232
|
-
var activeS = React.useState("");
|
|
5233
|
-
var active = activeS[0], setActive = activeS[1];
|
|
5234
|
-
var dataS = React.useState(null);
|
|
5235
|
-
var data = dataS[0], setData = dataS[1];
|
|
5236
|
-
var loadingS = React.useState(false);
|
|
5237
|
-
var loadingRows = loadingS[0], setLoadingRows = loadingS[1];
|
|
5238
|
-
var loadingTablesS = React.useState(true);
|
|
5239
|
-
var loadingTables = loadingTablesS[0], setLoadingTables = loadingTablesS[1];
|
|
5240
|
-
var errorS = React.useState("");
|
|
5241
|
-
var error = errorS[0], setError = errorS[1];
|
|
5242
|
-
var pageS = React.useState(1);
|
|
5243
|
-
var page = pageS[0], setPage = pageS[1];
|
|
5244
|
-
var sizeS = React.useState(0);
|
|
5245
|
-
var pageSize = sizeS[0], setPageSize = sizeS[1];
|
|
5246
|
-
var sortS = React.useState("");
|
|
5247
|
-
var sort = sortS[0], setSort = sortS[1];
|
|
5248
|
-
var orderS = React.useState("desc");
|
|
5249
|
-
var order = orderS[0], setOrder = orderS[1];
|
|
5250
|
-
var searchDraftS = React.useState("");
|
|
5251
|
-
var searchDraft = searchDraftS[0], setSearchDraft = searchDraftS[1];
|
|
5252
|
-
var searchS = React.useState("");
|
|
5253
|
-
var search = searchS[0], setSearch = searchS[1];
|
|
5254
|
-
var filterDraftS = React.useState({});
|
|
5255
|
-
var filterDraft = filterDraftS[0], setFilterDraft = filterDraftS[1];
|
|
5256
|
-
var filtersS = React.useState({});
|
|
5257
|
-
var filters = filtersS[0], setFilters = filtersS[1];
|
|
5258
|
-
var includeDeletedS = React.useState(null);
|
|
5259
|
-
var includeDeletedRaw = includeDeletedS[0], setIncludeDeleted = includeDeletedS[1];
|
|
5260
|
-
var showSystemS = React.useState(null);
|
|
5261
|
-
var showSystemRaw = showSystemS[0], setShowSystem = showSystemS[1];
|
|
5262
|
-
var drawerS = React.useState(null);
|
|
5263
|
-
var drawer = drawerS[0], setDrawer = drawerS[1];
|
|
5264
|
-
var toastS = React.useState("");
|
|
5265
|
-
var toast = toastS[0], setToast = toastS[1];
|
|
5266
|
-
var filtersKey = JSON.stringify(filters);
|
|
5267
|
-
var reqRef = React.useRef(0);
|
|
5268
|
-
var toastTimer = React.useRef(null);
|
|
5269
|
-
var refreshS = React.useState(0);
|
|
5270
|
-
function refresh() {
|
|
5271
|
-
loadTables();
|
|
5272
|
-
refreshS[1](function(n) {
|
|
5273
|
-
return n + 1;
|
|
5274
|
-
});
|
|
5275
|
-
}
|
|
5276
|
-
var indexReqRef = React.useRef(0);
|
|
5277
|
-
var indexS = React.useState(null);
|
|
5278
|
-
var index = indexS[0], setIndex = indexS[1];
|
|
5279
|
-
var indexBusyS = React.useState(false);
|
|
5280
|
-
var indexBusy = indexBusyS[0], setIndexBusy = indexBusyS[1];
|
|
5281
|
-
var cfgSize = Number(cfg["data.pageSize"]) || 50;
|
|
5282
|
-
var size = pageSize || (PAGE_SIZES.indexOf(cfgSize) >= 0 ? cfgSize : 50);
|
|
5283
|
-
var includeDeleted = includeDeletedRaw === null ? cfg["data.includeDeleted"] === true : includeDeletedRaw;
|
|
5284
|
-
var showSystem = showSystemRaw === null ? cfg["data.showSystemColumns"] === true : showSystemRaw;
|
|
5285
|
-
function say(text) {
|
|
5286
|
-
setToast(text);
|
|
5287
|
-
if (toastTimer.current) clearTimeout(toastTimer.current);
|
|
5288
|
-
toastTimer.current = setTimeout(function() {
|
|
5289
|
-
setToast("");
|
|
5290
|
-
}, 1600);
|
|
5291
|
-
}
|
|
5292
|
-
function loadTables() {
|
|
5293
|
-
setLoadingTables(true);
|
|
5294
|
-
Promise.resolve((options.tablesLoader || function(a) {
|
|
5295
|
-
return a.call(DOMAIN + ".dataTables");
|
|
5296
|
-
})(api)).then(function(r) {
|
|
5297
|
-
if (r && r.ok === false) throw new Error(r && r.error || t.loadFail);
|
|
5298
|
-
var body = unwrap(r);
|
|
5299
|
-
if (!body || !Array.isArray(body.tables)) throw new Error(t.loadFail);
|
|
5300
|
-
setTables(body.tables);
|
|
5301
|
-
setError("");
|
|
5302
|
-
if (!active && body.tables.length) setActive(body.tables[0].name);
|
|
5303
|
-
}).catch(function(e) {
|
|
5304
|
-
setError(String(e && e.message || e) || t.loadFail);
|
|
5305
|
-
}).then(function() {
|
|
5306
|
-
setLoadingTables(false);
|
|
5307
|
-
});
|
|
5308
|
-
}
|
|
5309
|
-
React.useEffect(function() {
|
|
5310
|
-
injectCss();
|
|
5311
|
-
loadTables();
|
|
5312
|
-
return function() {
|
|
5313
|
-
indexReqRef.current++;
|
|
5314
|
-
if (toastTimer.current) clearTimeout(toastTimer.current);
|
|
5315
|
-
};
|
|
5316
|
-
}, []);
|
|
5317
|
-
function selectTable(name) {
|
|
5318
|
-
if (name === active) return;
|
|
5319
|
-
reqRef.current++;
|
|
5320
|
-
setActive(name);
|
|
5321
|
-
setData(null);
|
|
5322
|
-
setDrawer(null);
|
|
5323
|
-
setError("");
|
|
5324
|
-
setLoadingRows(true);
|
|
5325
|
-
setPage(1);
|
|
5326
|
-
setSort("");
|
|
5327
|
-
setOrder("desc");
|
|
5328
|
-
setSearch("");
|
|
5329
|
-
setSearchDraft("");
|
|
5330
|
-
setFilterDraft({});
|
|
5331
|
-
setFilters({});
|
|
5332
|
-
}
|
|
5333
|
-
React.useEffect(function() {
|
|
5334
|
-
if (searchDraft === search) return void 0;
|
|
5335
|
-
var timer = setTimeout(function() {
|
|
5336
|
-
setSearch(searchDraft);
|
|
5337
|
-
setPage(1);
|
|
5338
|
-
}, 280);
|
|
5339
|
-
return function() {
|
|
5340
|
-
clearTimeout(timer);
|
|
5341
|
-
};
|
|
5342
|
-
}, [searchDraft]);
|
|
5343
|
-
React.useEffect(function() {
|
|
5344
|
-
if (JSON.stringify(filterDraft) === JSON.stringify(filters)) return void 0;
|
|
5345
|
-
var timer = setTimeout(function() {
|
|
5346
|
-
setFilters(filterDraft);
|
|
5347
|
-
setPage(1);
|
|
5348
|
-
}, 280);
|
|
5349
|
-
return function() {
|
|
5350
|
-
clearTimeout(timer);
|
|
5351
|
-
};
|
|
5352
|
-
}, [filterDraft]);
|
|
5353
|
-
React.useEffect(function() {
|
|
5354
|
-
if (!active || !cfgWrap.ready || index) return void 0;
|
|
5355
|
-
var req = ++reqRef.current;
|
|
5356
|
-
setLoadingRows(true);
|
|
5357
|
-
var args = { table: active, page, pageSize: size, order, includeDeleted };
|
|
5358
|
-
if (sort) args.sort = sort;
|
|
5359
|
-
if (search) args.search = search;
|
|
5360
|
-
if (Object.keys(filters).length) args.filters = filters;
|
|
5361
|
-
Promise.resolve((options.query || function(a, q) {
|
|
5362
|
-
return a.call(DOMAIN + ".dataQuery", q);
|
|
5363
|
-
})(api, args)).then(function(r) {
|
|
5364
|
-
if (req !== reqRef.current) return;
|
|
5365
|
-
if (r && r.ok === false) throw new Error(r && r.error || t.queryFail);
|
|
5366
|
-
var body = unwrap(r);
|
|
5367
|
-
if (!body) throw new Error(t.queryFail);
|
|
5368
|
-
setData(body);
|
|
5369
|
-
setError("");
|
|
5370
|
-
if (body.page !== page) setPage(body.page);
|
|
5371
|
-
}).catch(function(e) {
|
|
5372
|
-
if (req !== reqRef.current) return;
|
|
5373
|
-
setError(String(e && e.message || e) || t.queryFail);
|
|
5374
|
-
}).then(function() {
|
|
5375
|
-
if (req === reqRef.current) setLoadingRows(false);
|
|
5376
|
-
});
|
|
5377
|
-
return function() {
|
|
5378
|
-
reqRef.current++;
|
|
5379
|
-
};
|
|
5380
|
-
}, [active, page, size, sort, order, search, includeDeleted, cfgWrap.ready, filtersKey, refreshS[0], !!index]);
|
|
5381
|
-
React.useEffect(function() {
|
|
5382
|
-
if (!drawer) return void 0;
|
|
5383
|
-
function onKey(e) {
|
|
5384
|
-
if (e.key === "Escape") setDrawer(null);
|
|
5385
|
-
}
|
|
5386
|
-
document.addEventListener("keydown", onKey);
|
|
5387
|
-
return function() {
|
|
5388
|
-
document.removeEventListener("keydown", onKey);
|
|
5389
|
-
};
|
|
5390
|
-
}, [drawer]);
|
|
5391
|
-
var current = null;
|
|
5392
|
-
if (tables) {
|
|
5393
|
-
for (var i = 0; i < tables.length; i++) if (tables[i].name === active) current = tables[i];
|
|
5394
|
-
}
|
|
5395
|
-
function leaveIndex() {
|
|
5396
|
-
indexReqRef.current++;
|
|
5397
|
-
setIndex(null);
|
|
5398
|
-
setIndexBusy(false);
|
|
5399
|
-
setError("");
|
|
5400
|
-
}
|
|
5401
|
-
function loadIndex() {
|
|
5402
|
-
reqRef.current++;
|
|
5403
|
-
setError("");
|
|
5404
|
-
var req = ++indexReqRef.current;
|
|
5405
|
-
setIndex([]);
|
|
5406
|
-
setIndexBusy(true);
|
|
5407
|
-
Promise.resolve(api.call(DOMAIN + ".dataTables", { stats: true })).then(function(r) {
|
|
5408
|
-
if (req !== indexReqRef.current) return;
|
|
5409
|
-
if (r && r.ok === false) throw new Error(r.error || t.loadFail);
|
|
5410
|
-
var payload = unwrap(r) || {};
|
|
5411
|
-
var rows = (payload.tables || []).map(function(tb) {
|
|
5412
|
-
return { table: tb, stats: tb.stats || null };
|
|
5413
|
-
});
|
|
5414
|
-
setIndex(rows);
|
|
5415
|
-
setError("");
|
|
5416
|
-
setIndexBusy(false);
|
|
5417
|
-
}).catch(function(e) {
|
|
5418
|
-
if (req !== indexReqRef.current) return;
|
|
5419
|
-
setError(String(e.message || e));
|
|
5420
|
-
setIndex([]);
|
|
5421
|
-
setIndexBusy(false);
|
|
5422
|
-
});
|
|
5423
|
-
}
|
|
5424
|
-
function renderIndex() {
|
|
5425
|
-
var row = (index || []).filter(function(r) {
|
|
5426
|
-
return r.table.name === active;
|
|
5427
|
-
})[0];
|
|
5428
|
-
var tb = row ? row.table : current;
|
|
5429
|
-
var st = row && row.stats;
|
|
5430
|
-
var indexes = st ? st.indexes || [] : [];
|
|
5431
|
-
var hasExtra = indexes.some(function(ix) {
|
|
5432
|
-
return ix.origin !== "pk";
|
|
5433
|
-
});
|
|
5434
|
-
var count = st && st.rows !== void 0 ? st.rows : tb && tb.count;
|
|
5435
|
-
return h(
|
|
5436
|
-
"div",
|
|
5437
|
-
{ className: P + "-idx" },
|
|
5438
|
-
h(
|
|
5439
|
-
"div",
|
|
5440
|
-
{ className: P + "-head" },
|
|
5441
|
-
h(
|
|
5442
|
-
"div",
|
|
5443
|
-
{ className: P + "-headmain" },
|
|
5444
|
-
h("h2", null, icon("database"), tableLabel(tb), h("span", { className: P + "-code" }, active)),
|
|
5445
|
-
h("div", { className: P + "-idxsub" }, t.indexSub)
|
|
5446
|
-
),
|
|
5447
|
-
h("button", {
|
|
5448
|
-
type: "button",
|
|
5449
|
-
className: P + "-btn",
|
|
5450
|
-
"aria-label": t.refresh,
|
|
5451
|
-
title: t.refresh,
|
|
5452
|
-
"aria-busy": indexBusy ? "true" : "false",
|
|
5453
|
-
onClick: function() {
|
|
5454
|
-
loadIndex();
|
|
5455
|
-
}
|
|
5456
|
-
}, icon("refresh"), h("span", { className: P + "-btnlabel" }, t.refresh))
|
|
5457
|
-
),
|
|
5458
|
-
st ? h(
|
|
5459
|
-
"div",
|
|
5460
|
-
{ className: P + "-idxsum" },
|
|
5461
|
-
h("span", null, t.idxRows, " ", h("b", null, String(count))),
|
|
5462
|
-
h("span", null, t.idxCols, " ", h("b", null, String(st.columnCount === void 0 ? (tb.columns || []).length : st.columnCount))),
|
|
5463
|
-
h("span", null, fmt(t.idxCount, { n: indexes.length }))
|
|
5464
|
-
) : null,
|
|
5465
|
-
indexBusy ? options.Skeleton ? h(options.Skeleton, { lang, label: t.loading }) : h("div", { className: P + "-empty", role: "status", "aria-busy": "true" }, t.loading) : !st ? h("div", { className: P + "-empty" }, t.idxEmpty) : !hasExtra ? h("div", { className: P + "-empty" }, t.idxNoExtra) : h(
|
|
5466
|
-
"div",
|
|
5467
|
-
{ className: P + "-tablewrap" },
|
|
5468
|
-
h(
|
|
5469
|
-
"table",
|
|
5470
|
-
{ className: P + "-table " + P + "-idxtable" },
|
|
5471
|
-
h("thead", null, h(
|
|
5472
|
-
"tr",
|
|
5473
|
-
null,
|
|
5474
|
-
[t.idxName, t.idxColumns, t.idxType, t.idxSource, t.idxRows].map(function(label) {
|
|
5475
|
-
return h("th", { scope: "col", key: label }, h("span", { className: P + "-thbtn" }, label));
|
|
5476
|
-
})
|
|
5477
|
-
)),
|
|
5478
|
-
h("tbody", null, indexes.map(function(ix) {
|
|
5479
|
-
return h(
|
|
5480
|
-
"tr",
|
|
5481
|
-
{ className: P + "-tr", key: ix.name },
|
|
5482
|
-
h("td", { className: P + "-cell mono" }, ix.name),
|
|
5483
|
-
h("td", { className: P + "-cell mono" }, (ix.columns || []).join(", ") || t.idxNone),
|
|
5484
|
-
h("td", { className: P + "-cell" }, ix.origin === "pk" ? t.idxKey : ix.unique ? t.idxUnique : t.idxNormal),
|
|
5485
|
-
h("td", { className: P + "-cell" }, /^sqlite_autoindex_/.test(ix.name) ? t.idxAuto : t.idxCreated),
|
|
5486
|
-
h("td", { className: P + "-cell num", title: t.idxRowsHelp }, String(count))
|
|
5487
|
-
);
|
|
5488
|
-
}))
|
|
5489
|
-
)
|
|
5490
|
-
)
|
|
5491
|
-
);
|
|
5492
|
-
}
|
|
5493
|
-
function tableLabel(tb) {
|
|
5494
|
-
if (!tb || !tb.label) return "";
|
|
5495
|
-
return lang === "en" ? tb.label.en || tb.label.zh : tb.label.zh || tb.label.en;
|
|
5496
|
-
}
|
|
5497
|
-
function colLabel(col) {
|
|
5498
|
-
if (!col.label) return col.name;
|
|
5499
|
-
return lang === "en" ? col.label.en || col.label.zh : col.label.zh || col.label.en;
|
|
5500
|
-
}
|
|
5501
|
-
function visibleColumns() {
|
|
5502
|
-
var cols = data && data.columns ? data.columns.map(function(col) {
|
|
5503
|
-
var hook = columnHooks[col.name];
|
|
5504
|
-
return hook && hook.kind ? Object.assign({}, col, { kind: hook.kind, type: hook.type || col.type }) : col;
|
|
5505
|
-
}) : [];
|
|
5506
|
-
return cols.filter(function(c) {
|
|
5507
|
-
return showSystem || !c.system;
|
|
5508
|
-
});
|
|
5509
|
-
}
|
|
5510
|
-
function toggleSort(name) {
|
|
5511
|
-
if (sort !== name) {
|
|
5512
|
-
setSort(name);
|
|
5513
|
-
setOrder("desc");
|
|
5514
|
-
return;
|
|
5515
|
-
}
|
|
5516
|
-
if (order === "desc") {
|
|
5517
|
-
setOrder("asc");
|
|
5518
|
-
return;
|
|
5519
|
-
}
|
|
5520
|
-
setSort("");
|
|
5521
|
-
setOrder("desc");
|
|
5522
|
-
}
|
|
5523
|
-
function ariaSort(name) {
|
|
5524
|
-
if (sort !== name) return "none";
|
|
5525
|
-
return order === "asc" ? "ascending" : "descending";
|
|
5526
|
-
}
|
|
5527
|
-
function copyCell(value) {
|
|
5528
|
-
var text = value === null || value === void 0 ? "" : String(value);
|
|
5529
|
-
try {
|
|
5530
|
-
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text);
|
|
5531
|
-
else {
|
|
5532
|
-
var ta = document.createElement("textarea");
|
|
5533
|
-
ta.value = text;
|
|
5534
|
-
ta.style.position = "fixed";
|
|
5535
|
-
ta.style.opacity = "0";
|
|
5536
|
-
document.body.appendChild(ta);
|
|
5537
|
-
ta.select();
|
|
5538
|
-
document.execCommand("copy");
|
|
5539
|
-
document.body.removeChild(ta);
|
|
5540
|
-
}
|
|
5541
|
-
say(t.copied);
|
|
5542
|
-
} catch (e) {
|
|
5543
|
-
}
|
|
5544
|
-
}
|
|
5545
|
-
function cellText(col, value) {
|
|
5546
|
-
if (value === null || value === void 0) return null;
|
|
5547
|
-
if (col.kind === "bool") return value ? t.yes : t.no;
|
|
5548
|
-
if (col.kind === "timestamp") return timeText(value);
|
|
5549
|
-
return String(value);
|
|
5550
|
-
}
|
|
5551
|
-
function cellClass(col, value) {
|
|
5552
|
-
var cls = P + "-cell";
|
|
5553
|
-
if (value === null || value === void 0) return cls + " null";
|
|
5554
|
-
if (col.kind === "number") return cls + " num";
|
|
5555
|
-
if (col.kind === "id" || col.kind === "path") return cls + " mono";
|
|
5556
|
-
if (col.kind === "text" && looksJson(value)) return cls + " json";
|
|
5557
|
-
return cls;
|
|
5558
|
-
}
|
|
5559
|
-
function cellTitle(col, value) {
|
|
5560
|
-
if (value === null || value === void 0) return t.nullText;
|
|
5561
|
-
if (col.kind === "timestamp") return String(value);
|
|
5562
|
-
if (col.kind === "bool") return value ? "1" : "0";
|
|
5563
|
-
return String(value);
|
|
5564
|
-
}
|
|
5565
|
-
function renderCell(row, col) {
|
|
5566
|
-
var value = row[col.name];
|
|
5567
|
-
var hook = columnHooks[col.name];
|
|
5568
|
-
function openDetail() {
|
|
5569
|
-
setDrawer({ column: colLabel(col), name: col.name, row: (data.page - 1) * data.pageSize + row.__i + 1, value });
|
|
5570
|
-
}
|
|
5571
|
-
var text = cellText(col, value);
|
|
5572
|
-
var content;
|
|
5573
|
-
if (text === null) content = h("span", { className: "v" }, t.nullText);
|
|
5574
|
-
else if (text === "") content = h("span", { className: "v" }, '""');
|
|
5575
|
-
else content = h("span", { className: "v" }, text);
|
|
5576
|
-
if (hook && hook.render) content = hook.render({ value, row, col, lang, prefix: P, openDetail });
|
|
5577
|
-
return h("td", {
|
|
5578
|
-
key: col.name,
|
|
5579
|
-
className: cellClass(col, value),
|
|
5580
|
-
title: cellTitle(col, value),
|
|
5581
|
-
onClick: function() {
|
|
5582
|
-
copyCell(value);
|
|
5583
|
-
},
|
|
5584
|
-
onDoubleClick: openDetail
|
|
5585
|
-
}, content);
|
|
5586
|
-
}
|
|
5587
|
-
function activeFilterCount() {
|
|
5588
|
-
var n = 0;
|
|
5589
|
-
for (var k in filters) if (Object.prototype.hasOwnProperty.call(filters, k)) n++;
|
|
5590
|
-
return n;
|
|
5591
|
-
}
|
|
5592
|
-
function filterCell(col) {
|
|
5593
|
-
var val = filterDraft[col.name] === void 0 ? "" : filterDraft[col.name];
|
|
5594
|
-
return h(
|
|
5595
|
-
"th",
|
|
5596
|
-
{ key: col.name, scope: "col", className: P + "-fth" },
|
|
5597
|
-
h(
|
|
5598
|
-
"span",
|
|
5599
|
-
{ className: P + "-fcell" },
|
|
5600
|
-
h("input", {
|
|
5601
|
-
className: P + "-finput",
|
|
5602
|
-
type: "search",
|
|
5603
|
-
value: val,
|
|
5604
|
-
placeholder: t.filterCol,
|
|
5605
|
-
"aria-label": t.filterCol + " " + colLabel(col),
|
|
5606
|
-
title: colLabel(col) + " \xB7 " + t.filterCol,
|
|
5607
|
-
onChange: function(e) {
|
|
5608
|
-
var v = e.target.value;
|
|
5609
|
-
setFilterDraft(function(prev) {
|
|
5610
|
-
var next = Object.assign({}, prev);
|
|
5611
|
-
if (v) next[col.name] = v;
|
|
5612
|
-
else delete next[col.name];
|
|
5613
|
-
return next;
|
|
5614
|
-
});
|
|
5615
|
-
}
|
|
5616
|
-
}),
|
|
5617
|
-
val ? h("button", {
|
|
5618
|
-
type: "button",
|
|
5619
|
-
className: P + "-fclear",
|
|
5620
|
-
title: t.filterClear,
|
|
5621
|
-
"aria-label": t.filterClear + " " + colLabel(col),
|
|
5622
|
-
onClick: function() {
|
|
5623
|
-
setFilterDraft(function(prev) {
|
|
5624
|
-
var next = Object.assign({}, prev);
|
|
5625
|
-
delete next[col.name];
|
|
5626
|
-
return next;
|
|
5627
|
-
});
|
|
5628
|
-
}
|
|
5629
|
-
}, "\xD7") : null
|
|
5630
|
-
)
|
|
5631
|
-
);
|
|
5632
|
-
}
|
|
5633
|
-
function renderRows() {
|
|
5634
|
-
if (loadingRows && !data && options.Skeleton) return h(options.Skeleton, { lang, label: t.loading });
|
|
5635
|
-
if (loadingRows && !data) {
|
|
5636
|
-
return h(
|
|
5637
|
-
"div",
|
|
5638
|
-
{ className: P + "-skwrap", "aria-busy": "true" },
|
|
5639
|
-
h("span", { className: P + "-sr" }, t.loading),
|
|
5640
|
-
[0, 1, 2, 3, 4, 5, 6, 7].map(function(i2) {
|
|
5641
|
-
return h("div", { key: i2, className: P + "-sk" });
|
|
5642
|
-
})
|
|
5643
|
-
);
|
|
5644
|
-
}
|
|
5645
|
-
if (error) {
|
|
5646
|
-
return h(
|
|
5647
|
-
"div",
|
|
5648
|
-
{ className: P + "-err", role: "alert" },
|
|
5649
|
-
h("span", null, t.queryFail + error),
|
|
5650
|
-
h("button", { type: "button", className: P + "-btn", onClick: refresh }, t.retry)
|
|
5651
|
-
);
|
|
5652
|
-
}
|
|
5653
|
-
if (!data) return h("div", { className: P + "-empty" }, t.empty);
|
|
5654
|
-
var cols = visibleColumns();
|
|
5655
|
-
var rows = data.rows || [];
|
|
5656
|
-
var narrowing = !!search || activeFilterCount() > 0;
|
|
5657
|
-
return h(
|
|
5658
|
-
"div",
|
|
5659
|
-
{ className: P + "-tablewrap" },
|
|
5660
|
-
h(
|
|
5661
|
-
"table",
|
|
5662
|
-
{ className: P + "-table" },
|
|
5663
|
-
h(
|
|
5664
|
-
"thead",
|
|
5665
|
-
null,
|
|
5666
|
-
h(
|
|
5667
|
-
"tr",
|
|
5668
|
-
null,
|
|
5669
|
-
h("th", { className: P + "-rownum", scope: "col" }, "#"),
|
|
5670
|
-
cols.map(function(col) {
|
|
5671
|
-
return h(
|
|
5672
|
-
"th",
|
|
5673
|
-
{ key: col.name, scope: "col", "aria-sort": ariaSort(col.name) },
|
|
5674
|
-
h(
|
|
5675
|
-
"button",
|
|
5676
|
-
{
|
|
5677
|
-
type: "button",
|
|
5678
|
-
className: P + "-thbtn",
|
|
5679
|
-
title: colLabel(col) + " \xB7 " + col.type,
|
|
5680
|
-
onClick: function() {
|
|
5681
|
-
toggleSort(col.name);
|
|
5682
|
-
}
|
|
5683
|
-
},
|
|
5684
|
-
h("span", null, colLabel(col)),
|
|
5685
|
-
h("span", { className: P + "-coltype" }, String(col.type || "").toLowerCase()),
|
|
5686
|
-
sort === col.name ? h("span", { className: P + "-sortmark", "aria-hidden": "true" }, order === "asc" ? "\u25B2" : "\u25BC") : null
|
|
5687
|
-
)
|
|
5688
|
-
);
|
|
5689
|
-
})
|
|
5690
|
-
),
|
|
5691
|
-
h(
|
|
5692
|
-
"tr",
|
|
5693
|
-
{ className: P + "-frow" },
|
|
5694
|
-
h("th", { className: P + "-rownum", scope: "col" }, ""),
|
|
5695
|
-
cols.map(filterCell)
|
|
5696
|
-
)
|
|
5697
|
-
),
|
|
5698
|
-
h("tbody", null, rows.length ? rows.map(function(row, idx) {
|
|
5699
|
-
row.__i = idx;
|
|
5700
|
-
var deleted = row.deleted_at !== null && row.deleted_at !== void 0;
|
|
5701
|
-
return h(
|
|
5702
|
-
"tr",
|
|
5703
|
-
{ key: row.id || idx, className: P + "-tr" + (deleted ? " deleted" : "") },
|
|
5704
|
-
h("td", { className: P + "-rownum" }, (data.page - 1) * data.pageSize + idx + 1),
|
|
5705
|
-
cols.map(function(col) {
|
|
5706
|
-
var cell = renderCell(row, col);
|
|
5707
|
-
if (deleted && col.name === "id") {
|
|
5708
|
-
return React.cloneElement(cell, { key: col.name }, cell.props.children, h("span", { className: P + "-delbadge" }, t.deleted));
|
|
5709
|
-
}
|
|
5710
|
-
return cell;
|
|
5711
|
-
})
|
|
5712
|
-
);
|
|
5713
|
-
}) : h("tr", null, h("td", { className: P + "-emptycell", colSpan: cols.length + 1 }, narrowing ? t.noRows : t.empty)))
|
|
5714
|
-
)
|
|
5715
|
-
);
|
|
5716
|
-
}
|
|
5717
|
-
function renderFoot() {
|
|
5718
|
-
var pages = data ? data.pages : 1;
|
|
5719
|
-
var total = data ? data.total : 0;
|
|
5720
|
-
return h(
|
|
5721
|
-
"div",
|
|
5722
|
-
{ className: P + "-foot" },
|
|
5723
|
-
h("span", null, fmt(t.total, { n: total })),
|
|
5724
|
-
h("span", { className: P + "-grow" }),
|
|
5725
|
-
h("button", { type: "button", className: P + "-btn", disabled: !data || page <= 1, onClick: function() {
|
|
5726
|
-
setPage(Math.max(1, page - 1));
|
|
5727
|
-
} }, "\u2039 " + t.prev),
|
|
5728
|
-
h("span", { className: P + "-pageinfo" }, fmt(t.pageInfo, { page: data ? data.page : 1, pages })),
|
|
5729
|
-
h("button", { type: "button", className: P + "-btn", disabled: !data || page >= pages, onClick: function() {
|
|
5730
|
-
setPage(Math.min(pages, page + 1));
|
|
5731
|
-
} }, t.next + " \u203A"),
|
|
5732
|
-
h(NF.NumberField, {
|
|
5733
|
-
h,
|
|
5734
|
-
lang,
|
|
5735
|
-
className: P + "-jump",
|
|
5736
|
-
value: page,
|
|
5737
|
-
min: 1,
|
|
5738
|
-
max: pages,
|
|
5739
|
-
integer: true,
|
|
5740
|
-
ariaLabel: t.jump,
|
|
5741
|
-
hint: false,
|
|
5742
|
-
onCommit: function(next) {
|
|
5743
|
-
if (next !== null) setPage(next);
|
|
5744
|
-
}
|
|
5745
|
-
}),
|
|
5746
|
-
data && data.queryMs !== void 0 ? h("span", null, fmt(t.queryTime, { n: data.queryMs })) : null
|
|
5747
|
-
);
|
|
5748
|
-
}
|
|
5749
|
-
if (!tables && loadingTables && options.Skeleton) return h(options.Skeleton, { lang, label: t.loading });
|
|
5750
|
-
if (!tables && loadingTables) {
|
|
5751
|
-
return h("div", { className: P + "-skwrap", "aria-busy": "true" }, h("span", { className: P + "-sr" }, t.loading), [0, 1, 2, 3].map(function(i2) {
|
|
5752
|
-
return h("div", { key: i2, className: P + "-sk" });
|
|
5753
|
-
}));
|
|
5754
|
-
}
|
|
5755
|
-
if (!tables) {
|
|
5756
|
-
return h("div", { className: P + "-err", role: "alert" }, h("span", null, t.loadFail), h("button", { type: "button", className: P + "-btn", onClick: loadTables }, t.retry));
|
|
5757
|
-
}
|
|
5758
|
-
if (!tables.length) return h("div", { className: P + "-empty" }, t.emptyTable);
|
|
5759
|
-
return h(
|
|
5760
|
-
"div",
|
|
5761
|
-
{ className: P },
|
|
5762
|
-
h(
|
|
5763
|
-
"div",
|
|
5764
|
-
{ className: P + "-side" },
|
|
5765
|
-
h("div", { className: P + "-sidetitle" }, h("span", null, icon("table"), t.tables), h("span", null, String(tables.length))),
|
|
5766
|
-
tables.map(function(tb) {
|
|
5767
|
-
return h(
|
|
5768
|
-
"button",
|
|
5769
|
-
{
|
|
5770
|
-
key: tb.name,
|
|
5771
|
-
type: "button",
|
|
5772
|
-
className: P + "-stab" + (tb.name === active ? " on" : ""),
|
|
5773
|
-
"aria-pressed": tb.name === active,
|
|
5774
|
-
onClick: function() {
|
|
5775
|
-
selectTable(tb.name);
|
|
5776
|
-
}
|
|
5777
|
-
},
|
|
5778
|
-
h(
|
|
5779
|
-
"span",
|
|
5780
|
-
{ className: P + "-stabname" },
|
|
5781
|
-
h("span", null, tableLabel(tb)),
|
|
5782
|
-
h("span", { className: P + "-sidecount" }, tb.count === void 0 || tb.count === null ? "" : String(tb.count))
|
|
5783
|
-
),
|
|
5784
|
-
h("span", { className: P + "-sidetable" }, tb.name)
|
|
5785
|
-
);
|
|
5786
|
-
})
|
|
5787
|
-
),
|
|
5788
|
-
h(
|
|
5789
|
-
"div",
|
|
5790
|
-
{ className: P + "-main" },
|
|
5791
|
-
h(
|
|
5792
|
-
"div",
|
|
5793
|
-
{ className: P + "-tabs", role: "tablist", "aria-label": t.title },
|
|
5794
|
-
h("button", { type: "button", role: "tab", className: P + "-btn", "aria-selected": !index, onClick: leaveIndex }, icon("list"), lang === "en" ? "Row data" : "\u884C\u6570\u636E"),
|
|
5795
|
-
h("button", { type: "button", role: "tab", className: P + "-btn", "aria-selected": !!index, onClick: loadIndex }, icon("database"), t.index)
|
|
5796
|
-
),
|
|
5797
|
-
index && error ? h("div", { className: P + "-err", role: "alert" }, error) : null,
|
|
5798
|
-
index ? renderIndex() : [
|
|
5799
|
-
h(
|
|
5800
|
-
"div",
|
|
5801
|
-
{ className: P + "-head" },
|
|
5802
|
-
h(
|
|
5803
|
-
"div",
|
|
5804
|
-
{ className: P + "-headmain" },
|
|
5805
|
-
h("h2", null, icon("database"), tableLabel(current), h("span", { className: P + "-code" }, active)),
|
|
5806
|
-
h(
|
|
5807
|
-
"div",
|
|
5808
|
-
{ className: P + "-sub" },
|
|
5809
|
-
current && data && data.total !== void 0 ? fmt(t.rowCount, { n: data.total }) : "",
|
|
5810
|
-
current && current.deletedCount ? " \xB7 " + fmt(t.deletedCount, { n: current.deletedCount }) : "",
|
|
5811
|
-
" \xB7 " + t.subtitle
|
|
5812
|
-
)
|
|
5813
|
-
),
|
|
5814
|
-
h("button", {
|
|
5815
|
-
type: "button",
|
|
5816
|
-
className: P + "-btn",
|
|
5817
|
-
"aria-label": t.refresh,
|
|
5818
|
-
title: t.refresh,
|
|
5819
|
-
"aria-busy": loadingRows ? "true" : "false",
|
|
5820
|
-
onClick: refresh
|
|
5821
|
-
}, icon("refresh"), h("span", { className: P + "-btnlabel" }, t.refresh))
|
|
5822
|
-
),
|
|
5823
|
-
h(
|
|
5824
|
-
"div",
|
|
5825
|
-
{ className: P + "-toolbar" },
|
|
5826
|
-
h(
|
|
5827
|
-
"div",
|
|
5828
|
-
{ className: P + "-search" },
|
|
5829
|
-
icon("search"),
|
|
5830
|
-
h("input", {
|
|
5831
|
-
type: "search",
|
|
5832
|
-
value: searchDraft,
|
|
5833
|
-
placeholder: t.search,
|
|
5834
|
-
"aria-label": t.search,
|
|
5835
|
-
onChange: function(e) {
|
|
5836
|
-
setSearchDraft(e.target.value);
|
|
5837
|
-
}
|
|
5838
|
-
})
|
|
5839
|
-
),
|
|
5840
|
-
h(SW.Switch, {
|
|
5841
|
-
h,
|
|
5842
|
-
checked: includeDeleted,
|
|
5843
|
-
label: t.includeDeleted,
|
|
5844
|
-
onChange: function(next) {
|
|
5845
|
-
setIncludeDeleted(next);
|
|
5846
|
-
setPage(1);
|
|
5847
|
-
}
|
|
5848
|
-
}),
|
|
5849
|
-
h(SW.Switch, {
|
|
5850
|
-
h,
|
|
5851
|
-
checked: showSystem,
|
|
5852
|
-
label: t.showSystem,
|
|
5853
|
-
onChange: function(next) {
|
|
5854
|
-
setShowSystem(next);
|
|
5855
|
-
}
|
|
5856
|
-
}),
|
|
5857
|
-
h("span", { className: P + "-grow" }),
|
|
5858
|
-
h(
|
|
5859
|
-
"label",
|
|
5860
|
-
{ style: { display: "inline-flex", alignItems: "center", gap: "6px", fontSize: "11.5px", color: "var(--cfg-muted)" } },
|
|
5861
|
-
h("span", null, t.pageSize),
|
|
5862
|
-
h("select", {
|
|
5863
|
-
className: P + "-select",
|
|
5864
|
-
value: size,
|
|
5865
|
-
onChange: function(e) {
|
|
5866
|
-
setPageSize(Number(e.target.value));
|
|
5867
|
-
setPage(1);
|
|
5868
|
-
}
|
|
5869
|
-
}, PAGE_SIZES.map(function(n) {
|
|
5870
|
-
return h("option", { key: n, value: n }, String(n));
|
|
5871
|
-
}))
|
|
5872
|
-
)
|
|
5873
|
-
),
|
|
5874
|
-
renderRows(),
|
|
5875
|
-
renderFoot()
|
|
5876
|
-
]
|
|
5877
|
-
),
|
|
5878
|
-
drawer ? h(
|
|
5879
|
-
"div",
|
|
5880
|
-
null,
|
|
5881
|
-
h("div", { className: P + "-mask", onClick: function() {
|
|
5882
|
-
setDrawer(null);
|
|
5883
|
-
} }),
|
|
5884
|
-
h(
|
|
5885
|
-
"aside",
|
|
5886
|
-
{ className: P + "-drawer", role: "dialog", "aria-modal": "true", "aria-label": drawer.column },
|
|
5887
|
-
h("h3", null, fmt(t.drawerTitle, { column: drawer.column, row: drawer.row }), h("span", { className: P + "-code" }, drawer.name)),
|
|
5888
|
-
columnHooks[drawer.name] && columnHooks[drawer.name].detail ? columnHooks[drawer.name].detail({ value: drawer.value, lang, prefix: P }) : h("pre", null, drawerText(drawer.value)),
|
|
5889
|
-
h(
|
|
5890
|
-
"div",
|
|
5891
|
-
{ className: P + "-drawerfoot" },
|
|
5892
|
-
h("button", { type: "button", className: P + "-btn", onClick: function() {
|
|
5893
|
-
copyCell(drawer.value);
|
|
5894
|
-
} }, t.copy),
|
|
5895
|
-
h("button", { type: "button", className: P + "-btn", onClick: function() {
|
|
5896
|
-
setDrawer(null);
|
|
5897
|
-
} }, t.close)
|
|
5898
|
-
)
|
|
5899
|
-
)
|
|
5900
|
-
) : null,
|
|
5901
|
-
toast ? h("div", { className: P + "-toast", role: "status" }, toast) : null
|
|
5902
|
-
);
|
|
5903
|
-
}
|
|
5904
|
-
function drawerText(value) {
|
|
5905
|
-
if (value === null || value === void 0) return "NULL";
|
|
5906
|
-
if (typeof value === "string" && looksJson(value)) {
|
|
5907
|
-
try {
|
|
5908
|
-
return JSON.stringify(JSON.parse(value), null, 2);
|
|
5909
|
-
} catch (e) {
|
|
5910
|
-
return value;
|
|
5911
|
-
}
|
|
5912
|
-
}
|
|
5913
|
-
if (typeof value === "object") {
|
|
5914
|
-
try {
|
|
5915
|
-
return JSON.stringify(value, null, 2);
|
|
5916
|
-
} catch (e) {
|
|
5917
|
-
return String(value);
|
|
5918
|
-
}
|
|
5919
|
-
}
|
|
5920
|
-
return String(value);
|
|
5921
|
-
}
|
|
5922
|
-
return { DataView, DOMAIN };
|
|
5923
|
-
};
|
|
5924
|
-
}
|
|
5925
|
-
});
|
|
5926
|
-
|
|
5927
|
-
// packages/addons/tasks/client/views/data.cjs
|
|
5928
|
-
var require_data = __commonJS({
|
|
5929
|
-
"packages/addons/tasks/client/views/data.cjs"(exports2, module2) {
|
|
5930
|
-
"use strict";
|
|
5931
|
-
module2.exports = require_data_view()({
|
|
5932
|
-
domain: "tasks",
|
|
5933
|
-
prefix: "wbt",
|
|
5934
|
-
tables: ["task", "task_node"],
|
|
5935
|
-
useConfig: require_config().useConfig
|
|
5936
|
-
});
|
|
5937
|
-
}
|
|
5938
|
-
});
|
|
5939
|
-
|
|
5940
|
-
// packages/addons/lib/highlight.cjs
|
|
5941
|
-
var require_highlight = __commonJS({
|
|
5942
|
-
"packages/addons/lib/highlight.cjs"(exports2, module2) {
|
|
5943
|
-
"use strict";
|
|
5944
|
-
module2.exports = function(React) {
|
|
5945
|
-
var h = React.createElement;
|
|
5946
|
-
function sourceOf(keyword) {
|
|
5947
|
-
var pattern = keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5948
|
-
return pattern.replace(/[a-zA-Z]/g, function(letter) {
|
|
5949
|
-
return "[" + letter.toLowerCase() + letter.toUpperCase() + "]";
|
|
5950
|
-
});
|
|
5951
|
-
}
|
|
5952
|
-
return function createHighlight(prefix) {
|
|
5953
|
-
var className = String(prefix || "wb") + "-hit";
|
|
5954
|
-
function hit(rawText, rawKeyword) {
|
|
5955
|
-
var text = rawText == null ? "" : String(rawText);
|
|
5956
|
-
var keyword = rawKeyword == null ? "" : String(rawKeyword);
|
|
5957
|
-
if (!keyword) return text;
|
|
5958
|
-
var matcher, match, end = 0, parts = [];
|
|
5959
|
-
try {
|
|
5960
|
-
matcher = new RegExp(sourceOf(keyword), "g");
|
|
5961
|
-
} catch (error) {
|
|
5962
|
-
return text;
|
|
5963
|
-
}
|
|
5964
|
-
while (match = matcher.exec(text)) {
|
|
5965
|
-
if (match.index > end) parts.push(text.slice(end, match.index));
|
|
5966
|
-
parts.push(h("mark", { className, key: match.index }, match[0]));
|
|
5967
|
-
end = match.index + match[0].length;
|
|
5968
|
-
if (!match[0]) matcher.lastIndex += 1;
|
|
5969
|
-
}
|
|
5970
|
-
if (!parts.length) return text;
|
|
5971
|
-
if (end < text.length) parts.push(text.slice(end));
|
|
5972
|
-
return parts;
|
|
5973
|
-
}
|
|
5974
|
-
function Highlight(props) {
|
|
5975
|
-
return hit(props.text, props.keyword);
|
|
5976
|
-
}
|
|
5977
|
-
Highlight.hit = hit;
|
|
5978
|
-
return Highlight;
|
|
5979
|
-
};
|
|
5980
|
-
};
|
|
5981
|
-
}
|
|
5982
|
-
});
|
|
5983
|
-
|
|
5984
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
5985
|
-
var toKebabCase;
|
|
5986
|
-
var init_toKebabCase = __esm({
|
|
5987
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs"() {
|
|
5988
|
-
toKebabCase = (string) => string?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5989
|
-
}
|
|
5990
|
-
});
|
|
5991
|
-
|
|
5992
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
5993
|
-
function toLucideIconData(iconName, iconNode, aliases = []) {
|
|
5994
|
-
if (iconNode == null) {
|
|
5995
|
-
throw new Error("[lucide]: iconNode is required when icon name is used");
|
|
5996
|
-
}
|
|
5997
|
-
return {
|
|
5998
|
-
name: toKebabCase(iconName),
|
|
5999
|
-
size: 24,
|
|
6000
|
-
node: iconNode,
|
|
6001
|
-
...aliases.length > 0 ? { aliases } : {}
|
|
6002
|
-
};
|
|
6003
|
-
}
|
|
6004
|
-
var init_toLucideIconData = __esm({
|
|
6005
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs"() {
|
|
6006
|
-
init_toKebabCase();
|
|
6007
|
-
}
|
|
6008
|
-
});
|
|
6009
|
-
|
|
6010
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
6011
|
-
var toCamelCase;
|
|
6012
|
-
var init_toCamelCase = __esm({
|
|
6013
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs"() {
|
|
6014
|
-
toCamelCase = (string) => {
|
|
6015
|
-
let out = "";
|
|
6016
|
-
let upperNext = false;
|
|
6017
|
-
for (const ch of string) {
|
|
6018
|
-
if (ch === "-" || ch === "_" || ch <= " ") {
|
|
6019
|
-
upperNext = out.length > 0;
|
|
6020
|
-
continue;
|
|
6021
|
-
}
|
|
6022
|
-
if (out.length === 0) {
|
|
6023
|
-
out += ch.toLowerCase();
|
|
6024
|
-
} else {
|
|
6025
|
-
out += upperNext ? ch.toUpperCase() : ch;
|
|
6026
|
-
}
|
|
6027
|
-
upperNext = false;
|
|
6028
|
-
}
|
|
6029
|
-
return out;
|
|
6030
|
-
};
|
|
6031
|
-
}
|
|
6032
|
-
});
|
|
6033
|
-
|
|
6034
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
|
|
6035
|
-
var toPascalCase;
|
|
6036
|
-
var init_toPascalCase = __esm({
|
|
6037
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs"() {
|
|
6038
|
-
init_toCamelCase();
|
|
6039
|
-
toPascalCase = (string) => {
|
|
6040
|
-
const camelCase = toCamelCase(string);
|
|
6041
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
6042
|
-
};
|
|
6043
|
-
}
|
|
6044
|
-
});
|
|
6045
|
-
|
|
6046
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
6047
|
-
var mergeClasses;
|
|
6048
|
-
var init_mergeClasses = __esm({
|
|
6049
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs"() {
|
|
6050
|
-
mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
6051
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
6052
|
-
}).join(" ").trim();
|
|
6053
|
-
}
|
|
6054
|
-
});
|
|
6055
|
-
|
|
6056
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs
|
|
6057
|
-
var defaultAttributes;
|
|
6058
|
-
var init_defaultAttributes = __esm({
|
|
6059
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs"() {
|
|
6060
|
-
defaultAttributes = {
|
|
6061
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6062
|
-
width: 24,
|
|
6063
|
-
height: 24,
|
|
6064
|
-
viewBox: "0 0 24 24",
|
|
6065
|
-
fill: "none",
|
|
6066
|
-
stroke: "currentColor",
|
|
6067
|
-
"stroke-width": 2,
|
|
6068
|
-
"stroke-linecap": "round",
|
|
6069
|
-
"stroke-linejoin": "round"
|
|
6070
|
-
};
|
|
6071
|
-
}
|
|
6072
|
-
});
|
|
6073
|
-
|
|
6074
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
6075
|
-
function isDefined(value) {
|
|
6076
|
-
return value !== null && value !== void 0;
|
|
6077
|
-
}
|
|
6078
|
-
function buildLucideIconNode(icon, params = {}) {
|
|
6079
|
-
const attributeNames = params.attributeNames ?? {};
|
|
6080
|
-
const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;
|
|
6081
|
-
const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes["width"];
|
|
6082
|
-
const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes["height"];
|
|
6083
|
-
const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === "string" && alias.trim() !== "").map((alias) => `lucide-${alias}`) ?? [];
|
|
6084
|
-
const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];
|
|
6085
|
-
const classNamesFromClassName = params.className?.split(" ").filter(Boolean) ?? [];
|
|
6086
|
-
const className = params.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses("lucide", ...iconClassNames, ...classNamesFromClassName);
|
|
6087
|
-
const calculatedStrokeWidth = params.absoluteStrokeWidth ? Number(params.strokeWidth ?? defaultAttributes["stroke-width"]) * Number(icon.size ?? icon.width ?? defaultAttributes["width"]) / Number(params.size ?? params.width ?? defaultAttributes["width"]) : params.strokeWidth ?? defaultAttributes["stroke-width"];
|
|
6088
|
-
const attributes = {
|
|
6089
|
-
...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {
|
|
6090
|
-
attrs[getAttributeName(attrName)] = value;
|
|
6091
|
-
return attrs;
|
|
6092
|
-
}, {}),
|
|
6093
|
-
..."color" in params && params.color && {
|
|
6094
|
-
[getAttributeName("stroke")]: params.color
|
|
6095
|
-
},
|
|
6096
|
-
..."size" in params && isDefined(params.size) && {
|
|
6097
|
-
[getAttributeName("width")]: params.size,
|
|
6098
|
-
[getAttributeName("height")]: params.size
|
|
6099
|
-
},
|
|
6100
|
-
..."width" in params && isDefined(params.width) && {
|
|
6101
|
-
[getAttributeName("width")]: params.width
|
|
6102
|
-
},
|
|
6103
|
-
..."height" in params && isDefined(params.height) && {
|
|
6104
|
-
[getAttributeName("height")]: params.height
|
|
6105
|
-
},
|
|
6106
|
-
[getAttributeName("stroke-width")]: calculatedStrokeWidth,
|
|
6107
|
-
...className && {
|
|
6108
|
-
[getAttributeName("class")]: className
|
|
6109
|
-
},
|
|
6110
|
-
[getAttributeName("viewBox")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
|
|
6111
|
-
...params.hasA11yProp === false ? {
|
|
6112
|
-
[getAttributeName("aria-hidden")]: "true"
|
|
6113
|
-
} : {},
|
|
6114
|
-
..."attributes" in params && params.attributes
|
|
6115
|
-
};
|
|
6116
|
-
return [
|
|
6117
|
-
"svg",
|
|
6118
|
-
attributes,
|
|
6119
|
-
icon.node.map((child) => {
|
|
6120
|
-
const [name, attrs, children] = child;
|
|
6121
|
-
const nextAttrs = params.nonScalingStroke ? { [getAttributeName("vector-effect")]: "non-scaling-stroke", ...attrs } : attrs;
|
|
6122
|
-
return children ? [name, nextAttrs, children] : [name, nextAttrs];
|
|
6123
|
-
})
|
|
6124
|
-
];
|
|
6125
|
-
}
|
|
6126
|
-
var init_buildLucideIconNode = __esm({
|
|
6127
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs"() {
|
|
6128
|
-
init_defaultAttributes();
|
|
6129
|
-
init_mergeClasses();
|
|
6130
|
-
}
|
|
6131
|
-
});
|
|
6132
|
-
|
|
6133
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
6134
|
-
function buildLucideIconForReact(icon, params = {}) {
|
|
6135
|
-
return buildLucideIconNode(icon, {
|
|
6136
|
-
...params,
|
|
6137
|
-
attributeNames: {
|
|
6138
|
-
...params.attributeNames,
|
|
6139
|
-
class: "className",
|
|
6140
|
-
"stroke-width": "strokeWidth",
|
|
6141
|
-
"stroke-linecap": "strokeLinecap",
|
|
6142
|
-
"stroke-linejoin": "strokeLinejoin",
|
|
6143
|
-
"vector-effect": "vectorEffect"
|
|
6144
|
-
}
|
|
6145
|
-
});
|
|
6146
|
-
}
|
|
6147
|
-
var init_buildLucideIconForReact = __esm({
|
|
6148
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs"() {
|
|
6149
|
-
init_buildLucideIconNode();
|
|
6150
|
-
}
|
|
6151
|
-
});
|
|
6152
|
-
|
|
6153
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
6154
|
-
var hasA11yProp;
|
|
6155
|
-
var init_hasA11yProp = __esm({
|
|
6156
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs"() {
|
|
6157
|
-
hasA11yProp = (props) => {
|
|
6158
|
-
for (const prop in props) {
|
|
6159
|
-
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
6160
|
-
return true;
|
|
6161
|
-
}
|
|
6162
|
-
}
|
|
6163
|
-
return false;
|
|
6164
|
-
};
|
|
6165
|
-
}
|
|
6166
|
-
});
|
|
6167
|
-
|
|
6168
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/context.mjs
|
|
6169
|
-
var import_react, LucideContext, useLucideContext;
|
|
6170
|
-
var init_context = __esm({
|
|
6171
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/context.mjs"() {
|
|
6172
|
-
"use strict";
|
|
6173
|
-
"use client";
|
|
6174
|
-
import_react = require("react");
|
|
6175
|
-
LucideContext = (0, import_react.createContext)({});
|
|
6176
|
-
useLucideContext = () => (0, import_react.useContext)(LucideContext);
|
|
6177
|
-
}
|
|
6178
|
-
});
|
|
6179
|
-
|
|
6180
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/Icon.mjs
|
|
6181
|
-
var import_react2, Icon;
|
|
6182
|
-
var init_Icon = __esm({
|
|
6183
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/Icon.mjs"() {
|
|
6184
|
-
"use strict";
|
|
6185
|
-
"use client";
|
|
6186
|
-
import_react2 = require("react");
|
|
6187
|
-
init_mergeClasses();
|
|
6188
|
-
init_buildLucideIconForReact();
|
|
6189
|
-
init_hasA11yProp();
|
|
6190
|
-
init_context();
|
|
6191
|
-
Icon = (0, import_react2.forwardRef)(
|
|
6192
|
-
({
|
|
6193
|
-
color,
|
|
6194
|
-
size,
|
|
6195
|
-
width,
|
|
6196
|
-
height,
|
|
6197
|
-
strokeWidth,
|
|
6198
|
-
absoluteStrokeWidth,
|
|
6199
|
-
nonScalingStroke,
|
|
6200
|
-
className = "",
|
|
6201
|
-
children,
|
|
6202
|
-
iconNode = [],
|
|
6203
|
-
icon = {
|
|
6204
|
-
node: iconNode,
|
|
6205
|
-
aliases: [],
|
|
6206
|
-
size: 24
|
|
6207
|
-
},
|
|
6208
|
-
...rest
|
|
6209
|
-
}, ref) => {
|
|
6210
|
-
const {
|
|
6211
|
-
size: contextSize = 24,
|
|
6212
|
-
strokeWidth: contextStrokeWidth = 2,
|
|
6213
|
-
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
6214
|
-
nonScalingStroke: contextNonScalingStroke = false,
|
|
6215
|
-
color: contextColor = "currentColor",
|
|
6216
|
-
className: contextClass = ""
|
|
6217
|
-
} = useLucideContext() ?? {};
|
|
6218
|
-
const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);
|
|
6219
|
-
const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {
|
|
6220
|
-
color: color ?? contextColor,
|
|
6221
|
-
width: width ?? size ?? contextSize,
|
|
6222
|
-
height: height ?? size ?? contextSize,
|
|
6223
|
-
strokeWidth: strokeWidth ?? contextStrokeWidth,
|
|
6224
|
-
absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,
|
|
6225
|
-
nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,
|
|
6226
|
-
className: mergeClasses(contextClass, className),
|
|
6227
|
-
hasA11yProp: hasAccessibleProp,
|
|
6228
|
-
attributes: rest
|
|
6229
|
-
});
|
|
6230
|
-
return (0, import_react2.createElement)(
|
|
6231
|
-
name,
|
|
6232
|
-
{
|
|
6233
|
-
ref,
|
|
6234
|
-
...svgAttributes
|
|
6235
|
-
},
|
|
6236
|
-
[
|
|
6237
|
-
...builtIconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
|
6238
|
-
...Array.isArray(children) ? children : [children]
|
|
6239
|
-
]
|
|
6240
|
-
);
|
|
6241
|
-
}
|
|
6242
|
-
);
|
|
6243
|
-
}
|
|
6244
|
-
});
|
|
6245
|
-
|
|
6246
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
6247
|
-
function createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {
|
|
6248
|
-
const iconData = typeof iconDataOrName === "string" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;
|
|
6249
|
-
const Component = (0, import_react3.forwardRef)(
|
|
6250
|
-
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
|
|
6251
|
-
ref,
|
|
6252
|
-
icon: iconData,
|
|
6253
|
-
className,
|
|
6254
|
-
...props
|
|
6255
|
-
})
|
|
6256
|
-
);
|
|
6257
|
-
if (iconData.name) {
|
|
6258
|
-
Component.displayName = toPascalCase(iconData.name);
|
|
6259
|
-
}
|
|
6260
|
-
return Component;
|
|
6261
|
-
}
|
|
6262
|
-
var import_react3;
|
|
6263
|
-
var init_createLucideIcon = __esm({
|
|
6264
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/createLucideIcon.mjs"() {
|
|
6265
|
-
import_react3 = require("react");
|
|
6266
|
-
init_toLucideIconData();
|
|
6267
|
-
init_toPascalCase();
|
|
6268
|
-
init_Icon();
|
|
6269
|
-
}
|
|
6270
|
-
});
|
|
6271
|
-
|
|
6272
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs
|
|
6273
|
-
var chevron_right_exports = {};
|
|
6274
|
-
__export(chevron_right_exports, {
|
|
6275
|
-
__iconData: () => __iconData,
|
|
6276
|
-
default: () => ChevronRight
|
|
6277
|
-
});
|
|
6278
|
-
var __iconData, ChevronRight;
|
|
6279
|
-
var init_chevron_right = __esm({
|
|
6280
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs"() {
|
|
6281
|
-
init_createLucideIcon();
|
|
6282
|
-
__iconData = {
|
|
6283
|
-
name: "chevron-right",
|
|
6284
|
-
size: 24,
|
|
6285
|
-
node: [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]]
|
|
6286
|
-
};
|
|
6287
|
-
__iconData.node;
|
|
6288
|
-
ChevronRight = createLucideIcon(__iconData);
|
|
6289
|
-
}
|
|
6290
|
-
});
|
|
6291
|
-
|
|
6292
|
-
// packages/addons/lib/disclosure-styles.cjs
|
|
6293
|
-
var require_disclosure_styles = __commonJS({
|
|
6294
|
-
"packages/addons/lib/disclosure-styles.cjs"(exports2, module2) {
|
|
6295
|
-
"use strict";
|
|
6296
|
-
module2.exports = [
|
|
6297
|
-
".wb-disc{min-width:0;border:0;padding:0;margin:0}",
|
|
6298
|
-
// 原生 details/summary 保留键盘与无障碍语义,这里只接管观感:去掉默认三角并铺满整行。
|
|
6299
|
-
".wb-disc>summary{display:flex;align-items:center;gap:6px;cursor:pointer;font-size:12.5px;font-weight:600;line-height:1.6;color:inherit;user-select:none;list-style:none;padding:2px 8px 2px 2px;margin:-2px -8px -2px -2px;border-radius:7px}",
|
|
6300
|
-
".wb-disc>summary::-webkit-details-marker{display:none}",
|
|
6301
|
-
'.wb-disc>summary::marker{content:""}',
|
|
6302
|
-
".wb-disc>summary:hover{background:color-mix(in oklab,currentColor 6%,transparent)}",
|
|
6303
|
-
".wb-disc>summary:focus-visible{outline:2px solid var(--wb-accent,var(--dsw-alias-brand-primary,Highlight));outline-offset:2px}",
|
|
6304
|
-
".wb-disc-chev{flex:0 0 auto;width:14px;height:14px;transition:transform 160ms ease}",
|
|
6305
|
-
".wb-disc[open]>summary .wb-disc-chev{transform:rotate(90deg)}",
|
|
6306
|
-
".wb-disc-title{min-width:0;overflow-wrap:anywhere}",
|
|
6307
|
-
".wb-disc-meta{font-weight:400;font-size:12px;color:var(--wb-muted,var(--dsw-alias-label-tertiary,GrayText))}",
|
|
6308
|
-
".wb-disc-body{margin-top:8px;min-width:0;animation:wb-disc-in 160ms ease}",
|
|
6309
|
-
"@keyframes wb-disc-in{from{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:none}}",
|
|
6310
|
-
"@media(prefers-reduced-motion:reduce){.wb-disc-chev{transition:none}.wb-disc-body{animation:none}}"
|
|
6311
|
-
].join("\n");
|
|
6312
|
-
}
|
|
6313
|
-
});
|
|
6314
|
-
|
|
6315
|
-
// packages/addons/lib/disclosure.cjs
|
|
6316
|
-
var require_disclosure = __commonJS({
|
|
6317
|
-
"packages/addons/lib/disclosure.cjs"(exports2, module2) {
|
|
6318
|
-
"use strict";
|
|
6319
|
-
var ChevronRight2 = (init_chevron_right(), __toCommonJS(chevron_right_exports)).default;
|
|
6320
|
-
function createDisclosure(React) {
|
|
6321
|
-
var h = React.createElement;
|
|
6322
|
-
function Disclosure(props) {
|
|
6323
|
-
var attrs = Object.assign({ className: ("wb-disc " + (props.className || "")).trim() }, props.attrs || {});
|
|
6324
|
-
if (props.open !== void 0) attrs.open = !!props.open;
|
|
6325
|
-
else if (props.defaultOpen !== void 0) attrs.open = !!props.defaultOpen;
|
|
6326
|
-
if (props.onToggle) attrs.onToggle = props.onToggle;
|
|
6327
|
-
return h(
|
|
6328
|
-
"details",
|
|
6329
|
-
attrs,
|
|
6330
|
-
h(
|
|
6331
|
-
"summary",
|
|
6332
|
-
null,
|
|
6333
|
-
h(ChevronRight2, { className: "wb-disc-chev", "aria-hidden": true, focusable: false }),
|
|
6334
|
-
h("span", { className: "wb-disc-title" }, props.title),
|
|
6335
|
-
props.meta != null && props.meta !== "" ? h("span", { className: "wb-disc-meta" }, props.meta) : null
|
|
6336
|
-
),
|
|
6337
|
-
h("div", { className: "wb-disc-body" }, props.children)
|
|
6338
|
-
);
|
|
6339
|
-
}
|
|
6340
|
-
return { Disclosure, css: require_disclosure_styles() };
|
|
6341
|
-
}
|
|
6342
|
-
module2.exports = { createDisclosure, css: require_disclosure_styles() };
|
|
6343
|
-
}
|
|
6344
|
-
});
|
|
6345
|
-
|
|
6346
|
-
// packages/addons/lib/action-schema-style.cjs
|
|
6347
|
-
var require_action_schema_style = __commonJS({
|
|
6348
|
-
"packages/addons/lib/action-schema-style.cjs"(exports2, module2) {
|
|
6349
|
-
"use strict";
|
|
6350
|
-
module2.exports = function(PREFIX, DOMAIN) {
|
|
6351
|
-
var P = PREFIX + "-as";
|
|
6352
|
-
var hairline = "1px solid color-mix(in oklab,currentColor 8%,transparent)";
|
|
6353
|
-
var CSS = [
|
|
6354
|
-
"." + P + "{display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;font-size:13px;color:inherit}",
|
|
6355
|
-
"." + P + "-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
6356
|
-
"." + P + "-title{font-size:15px;font-weight:660;margin:0}",
|
|
6357
|
-
"." + P + "-badge{display:inline-flex;align-items:center;gap:4px;max-width:100%;border:1px solid var(--wb-border,#e3e5e9);border-radius:999px;padding:1px 8px;font-size:11px;color:var(--dsw-alias-label-secondary,currentColor);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}",
|
|
6358
|
-
"." + P + "-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px}",
|
|
6359
|
-
"." + P + "-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
6360
|
-
"." + P + "-search{position:relative;flex:1 1 220px;min-width:0;display:flex;align-items:center}",
|
|
6361
|
-
"." + P + "-search input{width:100%;border:1px solid var(--wb-border,#e3e5e9);border-radius:8px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));color:inherit;font:inherit;padding:6px 10px 6px 30px}",
|
|
6362
|
-
"." + P + "-search input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}",
|
|
6363
|
-
"." + P + "-search .wbi-svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--dsw-alias-label-tertiary,inherit)}",
|
|
6364
|
-
"." + P + " select{border:1px solid var(--wb-border,#e3e5e9);border-radius:8px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));color:inherit;font:inherit;padding:6px 8px;max-width:100%}",
|
|
6365
|
-
"." + P + " select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}",
|
|
6366
|
-
"." + P + "-list{display:flex;flex-direction:column;gap:8px}",
|
|
6367
|
-
"." + P + "-card{border:1px solid var(--wb-border,#e3e5e9);border-radius:10px;padding:10px 12px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));display:flex;flex-direction:column;gap:8px;min-width:0}",
|
|
6368
|
-
"." + P + "-cardhead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}",
|
|
6369
|
-
"." + P + "-cardmeta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;min-height:24px}",
|
|
6370
|
-
"." + P + "-cardhead code{font-weight:640;overflow-wrap:anywhere;min-width:0}",
|
|
6371
|
-
"." + P + "-hintline{margin:0;color:var(--dsw-alias-label-tertiary,inherit);font-size:11.5px;line-height:1.5}",
|
|
6372
|
-
"." + P + "-origins{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;min-width:0}",
|
|
6373
|
-
"." + P + "-origins-label{font-size:11px;color:var(--wb-muted);white-space:nowrap}",
|
|
6374
|
-
"." + P + "-origin{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:var(--wb-muted);cursor:pointer;user-select:none}",
|
|
6375
|
-
// 该 action 本身不支持的来源:整项置灰、不可点,示意「不是没开,是开不了」。
|
|
6376
|
-
"." + P + "-origin-off{opacity:.55;cursor:not-allowed}",
|
|
6377
|
-
"." + P + "-origin input[type=checkbox]{width:13px;height:13px;margin:0;accent-color:var(--wb-accent);cursor:inherit}",
|
|
6378
|
-
"." + P + "-origin input[type=checkbox]:focus-visible{outline:2px solid var(--wb-accent);outline-offset:2px}",
|
|
6379
|
-
"." + P + "-locked{border-color:var(--wb-warn,#b7791f);color:var(--wb-warn,#b7791f)}",
|
|
6380
|
-
"." + P + "-desc{margin:0;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55;font-size:12.5px;overflow-wrap:anywhere}",
|
|
6381
|
-
// 搜索命中:用品牌色透明度叠加而不是写死浅色,深浅主题都可读;继承文字颜色、不覆盖 ::selection。
|
|
6382
|
-
"." + P + " mark." + P + "-hit{background:color-mix(in oklab,var(--dsw-alias-brand-primary,#4f6ef7) 22%,transparent);color:inherit;border-radius:2px;padding:0;font:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}",
|
|
6383
|
-
"." + P + "-table{width:100%;border-collapse:collapse;font-size:12px;table-layout:auto}",
|
|
6384
|
-
"." + P + "-table th{text-align:left;font-weight:620;font-size:11px;letter-spacing:.4px;text-transform:uppercase;color:var(--dsw-alias-label-tertiary,inherit);padding:4px 8px 4px 0;white-space:nowrap}",
|
|
6385
|
-
"." + P + "-table td{padding:4px 8px 4px 0;vertical-align:top;border-top:" + hairline + ";line-height:1.5;overflow-wrap:anywhere}",
|
|
6386
|
-
"." + P + "-req{color:var(--dsw-alias-state-error-primary,#d9534f);font-weight:620}",
|
|
6387
|
-
"." + P + "-opt{color:var(--dsw-alias-label-tertiary,inherit)}",
|
|
6388
|
-
"." + P + "-none{color:var(--dsw-alias-label-tertiary,inherit);font-size:12px}",
|
|
6389
|
-
"." + P + "-example{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0}",
|
|
6390
|
-
"." + P + "-examplehead{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}",
|
|
6391
|
-
"." + P + "-pre{margin:0;padding:8px 10px;border-radius:8px;background:var(--dsw-alias-bg-skeleton,#f2f3f5);color:inherit;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;line-height:1.5;overflow:auto;max-height:280px;white-space:pre-wrap;word-break:break-word}",
|
|
6392
|
-
"." + P + "-copy{border:1px solid var(--wb-border,#e3e5e9);border-radius:7px;background:transparent;color:inherit;font:inherit;font-size:11.5px;padding:2px 8px;cursor:pointer}",
|
|
6393
|
-
"." + P + "-copy:hover{background:var(--dsw-alias-interactive-bg-hover,color-mix(in oklab,currentColor 5%,transparent))}",
|
|
6394
|
-
"." + P + "-copy:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:2px}",
|
|
6395
|
-
// 折叠头观感已收口到共享控件 disclosure-styles.cjs(.wb-disc),这里不再重复定义 details>summary。
|
|
6396
|
-
"." + P + "-params{min-width:0}",
|
|
6397
|
-
"." + P + "-empty{padding:24px;text-align:center;border:1px dashed var(--wb-border,#e3e5e9);border-radius:10px;color:var(--dsw-alias-label-tertiary,inherit)}",
|
|
6398
|
-
"." + P + "-error{padding:12px;border:1px solid var(--dsw-alias-state-error-primary,#d9534f);border-radius:10px;color:var(--dsw-alias-state-error-primary,#d9534f);display:flex;gap:10px;align-items:center;flex-wrap:wrap;overflow-wrap:anywhere}",
|
|
6399
|
-
"." + P + "-toast{position:sticky;bottom:8px;align-self:flex-start;border-radius:999px;padding:3px 10px;background:var(--dsw-alias-bg-skeleton,#f2f3f5);font-size:11.5px;max-width:100%}",
|
|
6400
|
-
// 窄屏:五列参数表压成一列会丢失列名、且 table 布局按最小内容宽度撑破容器,
|
|
6401
|
-
// 这里整体改成块级网格:每行 = 名称 / 类型 / 必填 + 约束行 + 说明行,行间用细线分隔。
|
|
6402
|
-
"@media(max-width:760px){." + P + "-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:end}." + P + "-search{grid-column:1/-1}." + P + "-toolbar>label{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0}." + P + "-toolbar select{width:100%;min-width:0}." + P + "-cardhead{grid-template-columns:minmax(0,1fr);row-gap:6px}." + P + "-origins{justify-content:flex-start}." + P + "-table{display:block}." + P + "-table thead{display:none}." + P + "-table tbody{display:block}." + P + '-table tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"name type need" "extra extra extra" "desc desc desc";column-gap:8px;padding:9px 0;border-top:' + hairline + "}." + P + "-table tr:first-child{border-top:0;padding-top:2px}." + P + "-table tr:last-child{padding-bottom:2px}." + P + "-table td{display:block;border:0;padding:0;min-width:0}." + P + "-table td:empty{display:none}." + P + "-pname{grid-area:name;font-weight:640}." + P + "-ptype{grid-area:type;justify-self:start;align-self:center;color:var(--dsw-alias-label-tertiary,inherit)}." + P + "-pneed{grid-area:need;justify-self:end;align-self:center;font-size:11px;line-height:1.6;white-space:nowrap}." + P + "-pextra{grid-area:extra;margin-top:3px;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55}." + P + "-pdesc{grid-area:desc;margin-top:3px;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55}}",
|
|
6403
|
-
// 中等宽度(521–760px)三个筛选项正好排成一行,避免第三项独占一行显得参差。
|
|
6404
|
-
"@media(min-width:521px) and (max-width:760px){." + P + "-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}}",
|
|
6405
|
-
"@media(max-width:420px){." + P + "-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}." + P + "-card{padding:10px}." + P + "-table tr{padding:8px 0}}"
|
|
6406
|
-
].join("\n") + "\n" + require_disclosure_styles();
|
|
6407
|
-
return function injectCss() {
|
|
6408
|
-
if (typeof document === "undefined") return;
|
|
6409
|
-
var id = "wb-addon-" + DOMAIN + "-actions-css";
|
|
6410
|
-
var old = document.getElementById(id);
|
|
6411
|
-
if (old) {
|
|
6412
|
-
old.textContent = CSS;
|
|
6413
|
-
return;
|
|
6414
|
-
}
|
|
6415
|
-
var style = document.createElement("style");
|
|
6416
|
-
style.id = id;
|
|
6417
|
-
style.setAttribute("data-wb-addon", "wb-addon-" + DOMAIN);
|
|
6418
|
-
style.textContent = CSS;
|
|
6419
|
-
document.head.appendChild(style);
|
|
6420
|
-
};
|
|
6421
|
-
};
|
|
6422
|
-
}
|
|
6423
|
-
});
|
|
6424
|
-
|
|
6425
|
-
// packages/addons/lib/action-schema-view.cjs
|
|
6426
|
-
var require_action_schema_view = __commonJS({
|
|
6427
|
-
"packages/addons/lib/action-schema-view.cjs"(exports2, module2) {
|
|
6428
|
-
"use strict";
|
|
6429
|
-
var React = require("react");
|
|
6430
|
-
var createHighlight = require_highlight()(React);
|
|
6431
|
-
var Disclosure = require_disclosure().createDisclosure(React).Disclosure;
|
|
6432
|
-
var h = React.createElement;
|
|
6433
|
-
var COPY = {
|
|
6434
|
-
zh: {
|
|
6435
|
-
title: "Action",
|
|
6436
|
-
hint: "\u8FD0\u884C\u65F6\u6CE8\u518C \xB7 \u53EA\u8BFB",
|
|
6437
|
-
switchHint: "\u5141\u8BB8\u6765\u6E90\u843D\u672C\u673A\u3001\u5373\u6539\u5373\u751F\u6548\uFF1A\u52FE\u4E0A\u7684\u6765\u6E90\u624D\u80FD\u8C03\u7528\u8BE5 action\uFF0C\u5176\u4F59\u4F1A\u88AB ACTION_ORIGIN_DENIED \u62E6\u4E0B\u3002",
|
|
6438
|
-
hostHint: "\u5BBF\u4E3B action \u7684\u5141\u8BB8\u6765\u6E90\uFF1B\u6807\u300C\u6765\u6E90\u56FA\u5B9A\u300D\u7684\u4E0D\u53EF\u4FEE\u6539\u3002",
|
|
6439
|
-
originsLabel: "\u5141\u8BB8\u6765\u6E90",
|
|
6440
|
-
originUi: "\u754C\u9762",
|
|
6441
|
-
originPlugin: "\u63D2\u4EF6",
|
|
6442
|
-
originAgent: "agent",
|
|
6443
|
-
originSync: "\u540C\u6B65",
|
|
6444
|
-
originsSaving: "\u4FDD\u5B58\u4E2D\u2026",
|
|
6445
|
-
originsToast: "\u5DF2\u66F4\u65B0\u5141\u8BB8\u6765\u6E90",
|
|
6446
|
-
originsFail: "\u66F4\u65B0\u5141\u8BB8\u6765\u6E90\u5931\u8D25",
|
|
6447
|
-
originsEmpty: "\u81F3\u5C11\u8981\u4FDD\u7559\u4E00\u4E2A\u6765\u6E90",
|
|
6448
|
-
originsUnsupported: "\u8BE5 action \u672C\u8EAB\u4E0D\u652F\u6301\u8FD9\u4E2A\u6765\u6E90",
|
|
6449
|
-
originsPinned: "\u6765\u6E90\u56FA\u5B9A",
|
|
6450
|
-
originsPinnedHint: "\u8BE5 action \u7684\u5141\u8BB8\u6765\u6E90\u88AB\u56FA\u5B9A\uFF08\u5B89\u5168\u7EA6\u675F\uFF09\uFF0C\u4E0D\u80FD\u4FEE\u6539",
|
|
6451
|
-
domain: "\u57DF",
|
|
6452
|
-
versionLabel: "\u7248\u672C",
|
|
6453
|
-
shell: "\u5BBF\u4E3B",
|
|
6454
|
-
count: function(shown, total) {
|
|
6455
|
-
return shown + " / " + total + " \u4E2A action";
|
|
6456
|
-
},
|
|
6457
|
-
search: "\u641C\u7D22\u540D\u79F0\u3001\u63CF\u8FF0\u3001\u53C2\u6570\uFF08\u547D\u4E2D\u5904\u9AD8\u4EAE\uFF09",
|
|
6458
|
-
filterReq: "\u5FC5\u586B\u7B5B\u9009",
|
|
6459
|
-
all: "\u5168\u90E8",
|
|
6460
|
-
onlyRequired: "\u542B\u5FC5\u586B\u9879",
|
|
6461
|
-
onlyOptional: "\u65E0\u5FC5\u586B\u9879",
|
|
6462
|
-
filterType: "\u53C2\u6570\u7C7B\u578B",
|
|
6463
|
-
allTypes: "\u5168\u90E8\u7C7B\u578B",
|
|
6464
|
-
filterOrigin: "\u5141\u8BB8\u6765\u6E90",
|
|
6465
|
-
allOrigins: "\u5168\u90E8\u6765\u6E90",
|
|
6466
|
-
colName: "\u53C2\u6570",
|
|
6467
|
-
colType: "\u7C7B\u578B",
|
|
6468
|
-
colReq: "\u5FC5\u586B",
|
|
6469
|
-
colExtra: "\u9ED8\u8BA4 / \u679A\u4E3E / \u7EA6\u675F",
|
|
6470
|
-
colDesc: "\u8BF4\u660E",
|
|
6471
|
-
required: "\u5FC5\u586B",
|
|
6472
|
-
optional: "\u53EF\u9009",
|
|
6473
|
-
noParams: "\u65E0\u53C2\u6570",
|
|
6474
|
-
paramCount: function(n) {
|
|
6475
|
-
return n + " \u4E2A\u53C2\u6570";
|
|
6476
|
-
},
|
|
6477
|
-
params: "\u53C2\u6570",
|
|
6478
|
-
requiredCount: function(n) {
|
|
6479
|
-
return "\u5FC5\u586B " + n;
|
|
6480
|
-
},
|
|
6481
|
-
examples: "\u793A\u4F8B",
|
|
6482
|
-
noExamples: "\u65E0\u793A\u4F8B",
|
|
6483
|
-
copy: "\u590D\u5236",
|
|
6484
|
-
copied: "\u5DF2\u590D\u5236",
|
|
6485
|
-
raw: "\u539F\u59CB JSON Schema",
|
|
6486
|
-
loading: "\u8F7D\u5165\u4E2D\u2026",
|
|
6487
|
-
loadFail: "\u8BFB\u53D6 action schema \u5931\u8D25",
|
|
6488
|
-
retry: "\u91CD\u8BD5",
|
|
6489
|
-
empty: "\u6CA1\u6709\u5339\u914D\u7684 action",
|
|
6490
|
-
emptyRegistry: "\u8BE5\u57DF\u6CA1\u6709\u6CE8\u518C action",
|
|
6491
|
-
envelope: "\u9ED8\u8BA4",
|
|
6492
|
-
enumLabel: "\u679A\u4E3E",
|
|
6493
|
-
range: "\u8303\u56F4",
|
|
6494
|
-
length: "\u957F\u5EA6",
|
|
6495
|
-
pattern: "\u6B63\u5219",
|
|
6496
|
-
format: "\u683C\u5F0F",
|
|
6497
|
-
items: "\u5143\u7D20\u6570"
|
|
6498
|
-
},
|
|
6499
|
-
en: {
|
|
6500
|
-
title: "Actions",
|
|
6501
|
-
hint: "runtime registry \xB7 read-only",
|
|
6502
|
-
switchHint: "Allowed origins are stored locally and apply immediately: only checked origins may call the action; others get ACTION_ORIGIN_DENIED.",
|
|
6503
|
-
hostHint: "Allowed origins for host actions; items marked pinned cannot be changed.",
|
|
6504
|
-
originsLabel: "Origins",
|
|
6505
|
-
originUi: "UI",
|
|
6506
|
-
originPlugin: "Plugin",
|
|
6507
|
-
originAgent: "Agent",
|
|
6508
|
-
originSync: "Sync",
|
|
6509
|
-
originsSaving: "Saving\u2026",
|
|
6510
|
-
originsToast: "Allowed origins updated",
|
|
6511
|
-
originsFail: "Failed to update allowed origins",
|
|
6512
|
-
originsEmpty: "Keep at least one origin",
|
|
6513
|
-
originsUnsupported: "This action does not support this origin",
|
|
6514
|
-
originsPinned: "Pinned",
|
|
6515
|
-
originsPinnedHint: "Allowed origins are pinned for this action (security constraint) and cannot be changed",
|
|
6516
|
-
originsDefaultOn: "Allowed by default",
|
|
6517
|
-
originsDefaultOff: "Off by default, can be enabled",
|
|
6518
|
-
domain: "Domain",
|
|
6519
|
-
versionLabel: "Version",
|
|
6520
|
-
shell: "Host",
|
|
6521
|
-
count: function(shown, total) {
|
|
6522
|
-
return shown + " / " + total + " actions";
|
|
6523
|
-
},
|
|
6524
|
-
search: "Search name, description, params (matches highlighted)",
|
|
6525
|
-
filterReq: "Required",
|
|
6526
|
-
all: "All",
|
|
6527
|
-
onlyRequired: "Has required",
|
|
6528
|
-
onlyOptional: "No required",
|
|
6529
|
-
filterType: "Param type",
|
|
6530
|
-
allTypes: "All types",
|
|
6531
|
-
filterOrigin: "Origins",
|
|
6532
|
-
allOrigins: "All origins",
|
|
6533
|
-
colName: "Param",
|
|
6534
|
-
colType: "Type",
|
|
6535
|
-
colReq: "Required",
|
|
6536
|
-
colExtra: "Default / enum / constraints",
|
|
6537
|
-
colDesc: "Description",
|
|
6538
|
-
required: "required",
|
|
6539
|
-
optional: "optional",
|
|
6540
|
-
noParams: "No parameters",
|
|
6541
|
-
paramCount: function(n) {
|
|
6542
|
-
return n + " params";
|
|
6543
|
-
},
|
|
6544
|
-
params: "Parameters",
|
|
6545
|
-
requiredCount: function(n) {
|
|
6546
|
-
return n + " required";
|
|
6547
|
-
},
|
|
6548
|
-
examples: "Examples",
|
|
6549
|
-
noExamples: "No examples",
|
|
6550
|
-
copy: "Copy",
|
|
6551
|
-
copied: "Copied",
|
|
6552
|
-
raw: "Raw JSON Schema",
|
|
6553
|
-
loading: "Loading\u2026",
|
|
6554
|
-
loadFail: "Failed to read action schema",
|
|
6555
|
-
retry: "Retry",
|
|
6556
|
-
empty: "No matching action",
|
|
6557
|
-
emptyRegistry: "This domain has no registered action",
|
|
6558
|
-
envelope: "Default",
|
|
6559
|
-
enumLabel: "Enum",
|
|
6560
|
-
range: "Range",
|
|
6561
|
-
length: "Length",
|
|
6562
|
-
pattern: "Pattern",
|
|
6563
|
-
format: "Format",
|
|
6564
|
-
items: "Items"
|
|
6565
|
-
}
|
|
6566
|
-
};
|
|
6567
|
-
function typeLabel(schema) {
|
|
6568
|
-
if (!schema || typeof schema !== "object") return "";
|
|
6569
|
-
if (Array.isArray(schema.type)) return schema.type.join(" | ");
|
|
6570
|
-
if (typeof schema.type === "string") {
|
|
6571
|
-
if (schema.type === "array" && schema.items) {
|
|
6572
|
-
var inner = typeLabel(schema.items);
|
|
6573
|
-
return inner ? inner + "[]" : "array";
|
|
6574
|
-
}
|
|
6575
|
-
return schema.type;
|
|
6576
|
-
}
|
|
6577
|
-
if (Array.isArray(schema.oneOf)) return schema.oneOf.map(typeLabel).filter(Boolean).join(" | ");
|
|
6578
|
-
if (Array.isArray(schema.anyOf)) return schema.anyOf.map(typeLabel).filter(Boolean).join(" | ");
|
|
6579
|
-
return "";
|
|
6580
|
-
}
|
|
6581
|
-
function typeNames(schema) {
|
|
6582
|
-
var label = typeLabel(schema);
|
|
6583
|
-
if (!label) return [];
|
|
6584
|
-
return label.split("|").map(function(x) {
|
|
6585
|
-
return x.trim().replace(/\[\]$/, "");
|
|
6586
|
-
}).filter(Boolean);
|
|
6587
|
-
}
|
|
6588
|
-
function scalar(value) {
|
|
6589
|
-
if (typeof value === "string") return JSON.stringify(value);
|
|
6590
|
-
return String(value);
|
|
6591
|
-
}
|
|
6592
|
-
function extraText(schema, t) {
|
|
6593
|
-
if (!schema || typeof schema !== "object") return "";
|
|
6594
|
-
var parts = [];
|
|
6595
|
-
if (Object.prototype.hasOwnProperty.call(schema, "default")) {
|
|
6596
|
-
parts.push(t.envelope + " " + scalar(schema.default));
|
|
6597
|
-
}
|
|
6598
|
-
if (Array.isArray(schema.enum)) {
|
|
6599
|
-
parts.push(t.enumLabel + " " + schema.enum.map(scalar).join(" / "));
|
|
6600
|
-
}
|
|
6601
|
-
if (typeof schema.minimum === "number" || typeof schema.maximum === "number") {
|
|
6602
|
-
var lo = typeof schema.minimum === "number" ? schema.minimum : null;
|
|
6603
|
-
var hi = typeof schema.maximum === "number" ? schema.maximum : null;
|
|
6604
|
-
if (lo !== null && hi !== null) parts.push(t.range + " \u2265" + lo + " \u4E14 \u2264" + hi);
|
|
6605
|
-
else if (lo !== null) parts.push(t.range + " \u2265" + lo);
|
|
6606
|
-
else parts.push(t.range + " \u2264" + hi);
|
|
6607
|
-
}
|
|
6608
|
-
if (typeof schema.minLength === "number" || typeof schema.maxLength === "number") {
|
|
6609
|
-
parts.push(t.length + " " + (schema.minLength ?? 0) + "\u2013" + (schema.maxLength ?? "\u221E"));
|
|
6610
|
-
}
|
|
6611
|
-
if (typeof schema.minItems === "number" || typeof schema.maxItems === "number") {
|
|
6612
|
-
parts.push(t.items + " " + (schema.minItems ?? 0) + "\u2013" + (schema.maxItems ?? "\u221E"));
|
|
6613
|
-
}
|
|
6614
|
-
if (typeof schema.pattern === "string") parts.push(t.pattern + " " + schema.pattern);
|
|
6615
|
-
if (typeof schema.format === "string") parts.push(t.format + " " + schema.format);
|
|
6616
|
-
return parts.join(" \xB7 ");
|
|
6617
|
-
}
|
|
6618
|
-
function paramRows(action) {
|
|
6619
|
-
var input = action && action.input && typeof action.input === "object" ? action.input : {};
|
|
6620
|
-
var props = input.properties && typeof input.properties === "object" ? input.properties : {};
|
|
6621
|
-
var required = Array.isArray(input.required) ? input.required : [];
|
|
6622
|
-
return Object.keys(props).map(function(key) {
|
|
6623
|
-
var schema = props[key] && typeof props[key] === "object" ? props[key] : {};
|
|
6624
|
-
return {
|
|
6625
|
-
name: key,
|
|
6626
|
-
schema,
|
|
6627
|
-
type: typeLabel(schema),
|
|
6628
|
-
types: typeNames(schema),
|
|
6629
|
-
required: required.indexOf(key) >= 0,
|
|
6630
|
-
description: typeof schema.description === "string" ? schema.description : ""
|
|
6631
|
-
};
|
|
6632
|
-
});
|
|
6633
|
-
}
|
|
6634
|
-
module2.exports = function createActionSchemaView(options) {
|
|
6635
|
-
var raw = String(options.domain || "");
|
|
6636
|
-
var SOURCE = options.source === "actions.list" ? "actions.list" : "actionSchema";
|
|
6637
|
-
var DOMAIN = SOURCE === "actions.list" ? raw : raw.indexOf("wb-addon-") === 0 ? raw : "wb-addon-" + raw;
|
|
6638
|
-
var LIST_DOMAIN = options.listDomain ? String(options.listDomain) : DOMAIN;
|
|
6639
|
-
var prefix = options.prefix;
|
|
6640
|
-
var P = prefix + "-as";
|
|
6641
|
-
var Icon2 = options.Icon || null;
|
|
6642
|
-
var injectCss = require_action_schema_style()(prefix, DOMAIN);
|
|
6643
|
-
var Highlight = createHighlight(P);
|
|
6644
|
-
function icon(name, size) {
|
|
6645
|
-
return Icon2 ? h(Icon2, { name, size: size || 14 }) : null;
|
|
6646
|
-
}
|
|
6647
|
-
function plainCopy(text) {
|
|
6648
|
-
if (typeof document === "undefined") return;
|
|
6649
|
-
var area = document.createElement("textarea");
|
|
6650
|
-
area.value = text;
|
|
6651
|
-
area.setAttribute("readonly", "readonly");
|
|
6652
|
-
area.style.position = "fixed";
|
|
6653
|
-
area.style.opacity = "0";
|
|
6654
|
-
document.body.appendChild(area);
|
|
6655
|
-
area.select();
|
|
6656
|
-
try {
|
|
6657
|
-
document.execCommand("copy");
|
|
6658
|
-
} catch (e) {
|
|
6659
|
-
}
|
|
6660
|
-
document.body.removeChild(area);
|
|
6661
|
-
}
|
|
6662
|
-
function ActionSchemaView(props) {
|
|
6663
|
-
var lang = props.lang === "en" ? "en" : "zh";
|
|
6664
|
-
var t = COPY[lang];
|
|
6665
|
-
var api = props.api;
|
|
6666
|
-
var snapState = React.useState(null);
|
|
6667
|
-
var snap = snapState[0], setSnap = snapState[1];
|
|
6668
|
-
var errState = React.useState("");
|
|
6669
|
-
var err = errState[0], setErr = errState[1];
|
|
6670
|
-
var loadingState = React.useState(true);
|
|
6671
|
-
var loading = loadingState[0], setLoading = loadingState[1];
|
|
6672
|
-
var reloadState = React.useState(0);
|
|
6673
|
-
var reload = reloadState[0], setReload = reloadState[1];
|
|
6674
|
-
var queryState = React.useState("");
|
|
6675
|
-
var query = queryState[0], setQuery = queryState[1];
|
|
6676
|
-
var reqState = React.useState("all");
|
|
6677
|
-
var reqMode = reqState[0], setReqMode = reqState[1];
|
|
6678
|
-
var typeState = React.useState("");
|
|
6679
|
-
var typePick = typeState[0], setTypePick = typeState[1];
|
|
6680
|
-
var originFilterState = React.useState("");
|
|
6681
|
-
var originPick = originFilterState[0], setOriginPick = originFilterState[1];
|
|
6682
|
-
var toastState = React.useState("");
|
|
6683
|
-
var toast = toastState[0], setToast = toastState[1];
|
|
6684
|
-
var savingState = React.useState("");
|
|
6685
|
-
var saving = savingState[0], setSaving = savingState[1];
|
|
6686
|
-
var foldsState = React.useState({});
|
|
6687
|
-
var folds = foldsState[0], setFolds = foldsState[1];
|
|
6688
|
-
React.useEffect(function() {
|
|
6689
|
-
injectCss();
|
|
6690
|
-
}, []);
|
|
6691
|
-
React.useEffect(function() {
|
|
6692
|
-
var alive = true;
|
|
6693
|
-
setLoading(true);
|
|
6694
|
-
setErr("");
|
|
6695
|
-
var pending;
|
|
6696
|
-
var actionName = SOURCE === "actions.list" ? "actions.list" : DOMAIN.replace(/^wb-addon-/, "") + ".actionSchema";
|
|
6697
|
-
var callArgs = SOURCE === "actions.list" ? { detail: true, domain: LIST_DOMAIN } : void 0;
|
|
6698
|
-
if (api && typeof api.call === "function") {
|
|
6699
|
-
pending = Promise.resolve(api.call(actionName, callArgs)).then(function(r) {
|
|
6700
|
-
if (r && r.ok === false) return r;
|
|
6701
|
-
return r && r.result || r;
|
|
6702
|
-
});
|
|
6703
|
-
} else {
|
|
6704
|
-
pending = Promise.reject(new Error("no call api"));
|
|
6705
|
-
}
|
|
6706
|
-
Promise.resolve(pending).then(function(r) {
|
|
6707
|
-
if (!alive) return;
|
|
6708
|
-
if (!r || r.ok === false) {
|
|
6709
|
-
setSnap(null);
|
|
6710
|
-
setErr(String(r && (r.error || r.text) || t.loadFail));
|
|
6711
|
-
} else {
|
|
6712
|
-
setSnap(r);
|
|
6713
|
-
}
|
|
6714
|
-
setLoading(false);
|
|
6715
|
-
}, function(e) {
|
|
6716
|
-
if (!alive) return;
|
|
6717
|
-
setSnap(null);
|
|
6718
|
-
setErr(String(e && e.message || e || t.loadFail));
|
|
6719
|
-
setLoading(false);
|
|
6720
|
-
});
|
|
6721
|
-
return function() {
|
|
6722
|
-
alive = false;
|
|
6723
|
-
};
|
|
6724
|
-
}, [reload]);
|
|
6725
|
-
function copy(text) {
|
|
6726
|
-
var done = function() {
|
|
6727
|
-
setToast(t.copied);
|
|
6728
|
-
};
|
|
6729
|
-
if (typeof navigator !== "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText === "function") {
|
|
6730
|
-
navigator.clipboard.writeText(text).then(done, function() {
|
|
6731
|
-
plainCopy(text);
|
|
6732
|
-
done();
|
|
6733
|
-
});
|
|
6734
|
-
return;
|
|
6735
|
-
}
|
|
6736
|
-
plainCopy(text);
|
|
6737
|
-
done();
|
|
6738
|
-
}
|
|
6739
|
-
var ORIGINS = ["ui", "plugin", "agent", "sync"];
|
|
6740
|
-
var originText = { ui: t.originUi, plugin: t.originPlugin, agent: t.originAgent, sync: t.originSync };
|
|
6741
|
-
function setOrigins(action, origin) {
|
|
6742
|
-
var name = action.name;
|
|
6743
|
-
var current = Array.isArray(action.origins) ? action.origins.slice() : [];
|
|
6744
|
-
var index = current.indexOf(origin);
|
|
6745
|
-
var next = index >= 0 ? current.filter(function(o) {
|
|
6746
|
-
return o !== origin;
|
|
6747
|
-
}) : current.concat([origin]);
|
|
6748
|
-
if (next.length === 0) {
|
|
6749
|
-
setToast(t.originsEmpty);
|
|
6750
|
-
return;
|
|
6751
|
-
}
|
|
6752
|
-
next = ORIGINS.filter(function(o) {
|
|
6753
|
-
return next.indexOf(o) >= 0;
|
|
6754
|
-
});
|
|
6755
|
-
setSaving(name);
|
|
6756
|
-
setToast("");
|
|
6757
|
-
var fail = function(e) {
|
|
6758
|
-
setSaving("");
|
|
6759
|
-
setToast(t.originsFail + "\uFF1A" + String(e && e.message || e || ""));
|
|
6760
|
-
};
|
|
6761
|
-
var done = function(r) {
|
|
6762
|
-
setSaving("");
|
|
6763
|
-
var payload = r && typeof r === "object" && Object.prototype.hasOwnProperty.call(r, "result") ? r.result : r;
|
|
6764
|
-
if (r && r.ok === false) {
|
|
6765
|
-
setToast(t.originsFail + "\uFF1A" + String(r.error || r.text || ""));
|
|
6766
|
-
return;
|
|
6767
|
-
}
|
|
6768
|
-
var value = payload && Array.isArray(payload.origins) ? payload.origins : next;
|
|
6769
|
-
var source = payload && typeof payload.source === "string" ? payload.source : action.originsSource;
|
|
6770
|
-
setSnap(function(prev) {
|
|
6771
|
-
if (!prev || !Array.isArray(prev.actions)) return prev;
|
|
6772
|
-
return Object.assign({}, prev, {
|
|
6773
|
-
actions: prev.actions.map(function(a) {
|
|
6774
|
-
if (!a || a.name !== name) return a;
|
|
6775
|
-
return Object.assign({}, a, { origins: value, originsSource: source });
|
|
6776
|
-
})
|
|
6777
|
-
});
|
|
6778
|
-
});
|
|
6779
|
-
setToast(t.originsToast);
|
|
6780
|
-
};
|
|
6781
|
-
if (!api || typeof api.call !== "function") {
|
|
6782
|
-
fail(new Error("no call api"));
|
|
6783
|
-
return;
|
|
6784
|
-
}
|
|
6785
|
-
Promise.resolve(api.call("actions.setActionOrigins", { action: name, origins: next })).then(done, fail);
|
|
6786
|
-
}
|
|
6787
|
-
function paramsOpen(action) {
|
|
6788
|
-
if (Object.prototype.hasOwnProperty.call(folds, action.name)) return folds[action.name] === true;
|
|
6789
|
-
return Boolean(String(query || "").trim()) || reqMode !== "all" || Boolean(typePick);
|
|
6790
|
-
}
|
|
6791
|
-
function resetFolds() {
|
|
6792
|
-
setFolds(function(prev) {
|
|
6793
|
-
return Object.keys(prev).length ? {} : prev;
|
|
6794
|
-
});
|
|
6795
|
-
}
|
|
6796
|
-
var all = snap && Array.isArray(snap.actions) ? snap.actions.filter(function(a) {
|
|
6797
|
-
return a && a.domain === DOMAIN;
|
|
6798
|
-
}) : [];
|
|
6799
|
-
var info = snap && Array.isArray(snap.domains) ? snap.domains.filter(function(d) {
|
|
6800
|
-
return d && d.id === DOMAIN;
|
|
6801
|
-
})[0] || null : null;
|
|
6802
|
-
var typeOptions = [];
|
|
6803
|
-
all.forEach(function(a) {
|
|
6804
|
-
paramRows(a).forEach(function(row) {
|
|
6805
|
-
row.types.forEach(function(name) {
|
|
6806
|
-
if (typeOptions.indexOf(name) < 0) typeOptions.push(name);
|
|
6807
|
-
});
|
|
6808
|
-
});
|
|
6809
|
-
});
|
|
6810
|
-
typeOptions.sort();
|
|
6811
|
-
var kw = String(query || "").trim();
|
|
6812
|
-
var q = kw.toLowerCase();
|
|
6813
|
-
var visible = all.filter(function(a) {
|
|
6814
|
-
var rows = paramRows(a);
|
|
6815
|
-
if (q) {
|
|
6816
|
-
var hay = [a.name || "", a.description || ""].concat(rows.map(function(row) {
|
|
6817
|
-
return row.name + " " + row.type + " " + row.description;
|
|
6818
|
-
})).join(" ").toLowerCase();
|
|
6819
|
-
if (hay.indexOf(q) < 0) return false;
|
|
6820
|
-
}
|
|
6821
|
-
var hasRequired = rows.some(function(row) {
|
|
6822
|
-
return row.required;
|
|
6823
|
-
});
|
|
6824
|
-
if (reqMode === "required" && !hasRequired) return false;
|
|
6825
|
-
if (reqMode === "optional" && hasRequired) return false;
|
|
6826
|
-
if (typePick && !rows.some(function(row) {
|
|
6827
|
-
return row.types.indexOf(typePick) >= 0;
|
|
6828
|
-
})) return false;
|
|
6829
|
-
if (originPick && (!Array.isArray(a.origins) || a.origins.indexOf(originPick) < 0)) return false;
|
|
6830
|
-
return true;
|
|
6831
|
-
});
|
|
6832
|
-
function paramRow(row) {
|
|
6833
|
-
var extra = extraText(row.schema, t);
|
|
6834
|
-
return h(
|
|
6835
|
-
"tr",
|
|
6836
|
-
{ key: row.name },
|
|
6837
|
-
h("td", { className: P + "-mono " + P + "-pname" }, Highlight.hit(row.name, kw)),
|
|
6838
|
-
h("td", { className: P + "-mono " + P + "-ptype" }, Highlight.hit(row.type, kw)),
|
|
6839
|
-
h(
|
|
6840
|
-
"td",
|
|
6841
|
-
{ className: row.required ? P + "-req " + P + "-pneed" : P + "-opt " + P + "-pneed" },
|
|
6842
|
-
row.required ? t.required : t.optional
|
|
6843
|
-
),
|
|
6844
|
-
// extra(默认 / 枚举 / 约束)不在过滤 haystack 里,因此也不高亮,保持「显示即命中」口径。
|
|
6845
|
-
h("td", { className: P + "-mono " + P + "-pextra" }, extra),
|
|
6846
|
-
h("td", { className: P + "-pdesc" }, Highlight.hit(row.description, kw))
|
|
6847
|
-
);
|
|
6848
|
-
}
|
|
6849
|
-
function originsChips(action) {
|
|
6850
|
-
if (!Array.isArray(action.origins)) return null;
|
|
6851
|
-
if (action.originsSource === "invalid") {
|
|
6852
|
-
return h("span", { className: P + "-badge " + P + "-locked", title: t.originsPinnedHint, "data-origins-invalid": action.name }, t.originsPinned);
|
|
6853
|
-
}
|
|
6854
|
-
var busy = saving === action.name;
|
|
6855
|
-
var pinned = action.name === "actions.setActionOrigins";
|
|
6856
|
-
var supported = Array.isArray(action.originsDeclared) ? action.originsDeclared : action.origins;
|
|
6857
|
-
return h(
|
|
6858
|
-
"div",
|
|
6859
|
-
{ className: P + "-origins", "data-origins-row": action.name },
|
|
6860
|
-
h("span", { className: P + "-origins-label" }, t.originsLabel),
|
|
6861
|
-
ORIGINS.map(function(origin) {
|
|
6862
|
-
var on = action.origins.indexOf(origin) >= 0;
|
|
6863
|
-
var allowed = supported.indexOf(origin) >= 0;
|
|
6864
|
-
var preset = Array.isArray(action.originsDefault) ? action.originsDefault : supported;
|
|
6865
|
-
var byDefault = preset.indexOf(origin) >= 0;
|
|
6866
|
-
return h(
|
|
6867
|
-
"label",
|
|
6868
|
-
{
|
|
6869
|
-
key: origin,
|
|
6870
|
-
className: P + "-origin" + (allowed ? "" : " " + P + "-origin-off"),
|
|
6871
|
-
title: pinned ? t.originsPinnedHint : !allowed ? t.originsUnsupported : originText[origin] + " \xB7 " + action.name + " \xB7 " + (byDefault ? t.originsDefaultOn : t.originsDefaultOff)
|
|
6872
|
-
},
|
|
6873
|
-
h("input", {
|
|
6874
|
-
type: "checkbox",
|
|
6875
|
-
checked: on,
|
|
6876
|
-
disabled: busy || pinned || !allowed,
|
|
6877
|
-
"data-origin": origin,
|
|
6878
|
-
"data-origin-row": action.name,
|
|
6879
|
-
"data-origin-supported": allowed ? "1" : "0",
|
|
6880
|
-
onChange: function() {
|
|
6881
|
-
setOrigins(action, origin);
|
|
6882
|
-
}
|
|
6883
|
-
}),
|
|
6884
|
-
h("span", null, originText[origin])
|
|
6885
|
-
);
|
|
6886
|
-
}),
|
|
6887
|
-
busy ? h("span", { className: P + "-origins-label" }, t.originsSaving) : null
|
|
6888
|
-
);
|
|
6889
|
-
}
|
|
6890
|
-
function card(action) {
|
|
6891
|
-
var rows = paramRows(action);
|
|
6892
|
-
var required = rows.filter(function(row) {
|
|
6893
|
-
return row.required;
|
|
6894
|
-
}).length;
|
|
6895
|
-
var open = paramsOpen(action);
|
|
6896
|
-
var examples = Array.isArray(action.examples) ? action.examples : [];
|
|
6897
|
-
return h(
|
|
6898
|
-
"div",
|
|
6899
|
-
{ className: P + "-card", key: action.name },
|
|
6900
|
-
h(
|
|
6901
|
-
"div",
|
|
6902
|
-
{ className: P + "-cardhead" },
|
|
6903
|
-
h(
|
|
6904
|
-
"div",
|
|
6905
|
-
{ className: P + "-cardmeta" },
|
|
6906
|
-
h("code", { className: P + "-mono" }, Highlight.hit(action.name, kw)),
|
|
6907
|
-
h("span", { className: P + "-badge" }, rows.length ? t.paramCount(rows.length) : t.noParams),
|
|
6908
|
-
rows.some(function(row) {
|
|
6909
|
-
return row.required;
|
|
6910
|
-
}) ? h("span", { className: P + "-badge " + P + "-req" }, t.required) : null
|
|
6911
|
-
),
|
|
6912
|
-
originsChips(action)
|
|
6913
|
-
),
|
|
6914
|
-
action.description ? h("p", { className: P + "-desc" }, Highlight.hit(action.description, kw)) : null,
|
|
6915
|
-
rows.length ? h(
|
|
6916
|
-
Disclosure,
|
|
6917
|
-
{
|
|
6918
|
-
className: P + "-params",
|
|
6919
|
-
title: t.params,
|
|
6920
|
-
meta: required ? t.requiredCount(required) : "",
|
|
6921
|
-
attrs: { "data-params-fold": action.name },
|
|
6922
|
-
open,
|
|
6923
|
-
// 原生 details 自带键盘与无障碍语义,这里只记下用户的开合;
|
|
6924
|
-
// 筛选变化引起的程序性开合也会触发 toggle,记下的值与当次默认一致,随后由 resetFolds 清掉。
|
|
6925
|
-
onToggle: function(e) {
|
|
6926
|
-
var next = !!(e && e.currentTarget && e.currentTarget.open);
|
|
6927
|
-
setFolds(function(prev) {
|
|
6928
|
-
if (prev[action.name] === next) return prev;
|
|
6929
|
-
var out = Object.assign({}, prev);
|
|
6930
|
-
out[action.name] = next;
|
|
6931
|
-
return out;
|
|
6932
|
-
});
|
|
6933
|
-
}
|
|
6934
|
-
},
|
|
6935
|
-
h(
|
|
6936
|
-
"table",
|
|
6937
|
-
{ className: P + "-table" },
|
|
6938
|
-
h("thead", null, h(
|
|
6939
|
-
"tr",
|
|
6940
|
-
null,
|
|
6941
|
-
h("th", null, t.colName),
|
|
6942
|
-
h("th", null, t.colType),
|
|
6943
|
-
h("th", null, t.colReq),
|
|
6944
|
-
h("th", null, t.colExtra),
|
|
6945
|
-
h("th", null, t.colDesc)
|
|
6946
|
-
)),
|
|
6947
|
-
h("tbody", null, rows.map(paramRow))
|
|
6948
|
-
)
|
|
6949
|
-
) : h("div", { className: P + "-none" }, t.noParams),
|
|
6950
|
-
h(
|
|
6951
|
-
"div",
|
|
6952
|
-
{ className: P + "-example" },
|
|
6953
|
-
h(
|
|
6954
|
-
"div",
|
|
6955
|
-
{ className: P + "-examplehead" },
|
|
6956
|
-
h("span", { className: P + "-none" }, t.examples),
|
|
6957
|
-
examples.length ? h("button", {
|
|
6958
|
-
type: "button",
|
|
6959
|
-
className: P + "-copy",
|
|
6960
|
-
"data-copy-example": action.name,
|
|
6961
|
-
onClick: function() {
|
|
6962
|
-
copy(JSON.stringify(examples.length === 1 ? examples[0] : examples, null, 2));
|
|
6963
|
-
}
|
|
6964
|
-
}, t.copy) : null
|
|
6965
|
-
),
|
|
6966
|
-
examples.length ? examples.map(function(example, index) {
|
|
6967
|
-
return h("pre", { className: P + "-pre", key: index }, JSON.stringify(example, null, 2));
|
|
6968
|
-
}) : h("div", { className: P + "-none" }, t.noExamples)
|
|
6969
|
-
),
|
|
6970
|
-
h(
|
|
6971
|
-
Disclosure,
|
|
6972
|
-
{ title: t.raw },
|
|
6973
|
-
h("pre", { className: P + "-pre" }, JSON.stringify(action.input || {}, null, 2))
|
|
6974
|
-
)
|
|
6975
|
-
);
|
|
6976
|
-
}
|
|
6977
|
-
var body;
|
|
6978
|
-
if (loading) {
|
|
6979
|
-
body = h("div", { className: P + "-empty", role: "status" }, t.loading);
|
|
6980
|
-
} else if (err) {
|
|
6981
|
-
body = h(
|
|
6982
|
-
"div",
|
|
6983
|
-
{ className: P + "-error", role: "alert" },
|
|
6984
|
-
h("span", null, t.loadFail + "\uFF1A" + err),
|
|
6985
|
-
h("button", { type: "button", className: P + "-copy", onClick: function() {
|
|
6986
|
-
setReload(reload + 1);
|
|
6987
|
-
} }, t.retry)
|
|
6988
|
-
);
|
|
6989
|
-
} else if (!all.length) {
|
|
6990
|
-
body = h("div", { className: P + "-empty" }, t.emptyRegistry);
|
|
6991
|
-
} else if (!visible.length) {
|
|
6992
|
-
body = h("div", { className: P + "-empty" }, t.empty);
|
|
6993
|
-
} else {
|
|
6994
|
-
body = h("div", { className: P + "-list" }, visible.map(card));
|
|
6995
|
-
}
|
|
6996
|
-
return h(
|
|
6997
|
-
"div",
|
|
6998
|
-
{ className: P },
|
|
6999
|
-
h(
|
|
7000
|
-
"div",
|
|
7001
|
-
{ className: P + "-head" },
|
|
7002
|
-
h("h3", { className: P + "-title" }, t.title),
|
|
7003
|
-
h("span", { className: P + "-badge" }, t.domain + " " + DOMAIN),
|
|
7004
|
-
info && info.version ? h("span", { className: P + "-badge" }, t.versionLabel + " v" + info.version) : null,
|
|
7005
|
-
snap && snap.shellVersion ? h("span", { className: P + "-badge" }, t.shell + " v" + snap.shellVersion) : null,
|
|
7006
|
-
h("span", { className: P + "-badge" }, t.count(visible.length, all.length)),
|
|
7007
|
-
h("span", { className: P + "-none" }, t.hint)
|
|
7008
|
-
),
|
|
7009
|
-
h("p", { className: P + "-hintline" }, SOURCE === "actions.list" ? t.hostHint : t.switchHint),
|
|
7010
|
-
snap ? h(
|
|
7011
|
-
"div",
|
|
7012
|
-
{ className: P + "-toolbar" },
|
|
7013
|
-
h(
|
|
7014
|
-
"label",
|
|
7015
|
-
{ className: P + "-search" },
|
|
7016
|
-
icon("search", 14),
|
|
7017
|
-
h("input", {
|
|
7018
|
-
type: "search",
|
|
7019
|
-
value: query,
|
|
7020
|
-
placeholder: t.search,
|
|
7021
|
-
"aria-label": t.search,
|
|
7022
|
-
onChange: function(e) {
|
|
7023
|
-
setQuery(e.target.value);
|
|
7024
|
-
resetFolds();
|
|
7025
|
-
}
|
|
7026
|
-
})
|
|
7027
|
-
),
|
|
7028
|
-
h(
|
|
7029
|
-
"label",
|
|
7030
|
-
{ className: P + "-none" },
|
|
7031
|
-
t.filterReq + " ",
|
|
7032
|
-
h(
|
|
7033
|
-
"select",
|
|
7034
|
-
{ value: reqMode, "aria-label": t.filterReq, onChange: function(e) {
|
|
7035
|
-
setReqMode(e.target.value);
|
|
7036
|
-
resetFolds();
|
|
7037
|
-
} },
|
|
7038
|
-
h("option", { value: "all" }, t.all),
|
|
7039
|
-
h("option", { value: "required" }, t.onlyRequired),
|
|
7040
|
-
h("option", { value: "optional" }, t.onlyOptional)
|
|
7041
|
-
)
|
|
7042
|
-
),
|
|
7043
|
-
h(
|
|
7044
|
-
"label",
|
|
7045
|
-
{ className: P + "-none" },
|
|
7046
|
-
t.filterType + " ",
|
|
7047
|
-
h(
|
|
7048
|
-
"select",
|
|
7049
|
-
{ value: typePick, "aria-label": t.filterType, onChange: function(e) {
|
|
7050
|
-
setTypePick(e.target.value);
|
|
7051
|
-
resetFolds();
|
|
7052
|
-
} },
|
|
7053
|
-
h("option", { value: "" }, t.allTypes),
|
|
7054
|
-
typeOptions.map(function(name) {
|
|
7055
|
-
return h("option", { value: name, key: name }, name);
|
|
7056
|
-
})
|
|
7057
|
-
)
|
|
7058
|
-
),
|
|
7059
|
-
h(
|
|
7060
|
-
"label",
|
|
7061
|
-
{ className: P + "-none" },
|
|
7062
|
-
t.filterOrigin + " ",
|
|
7063
|
-
h(
|
|
7064
|
-
"select",
|
|
7065
|
-
{ value: originPick, "aria-label": t.filterOrigin, "data-origin-filter": "", onChange: function(e) {
|
|
7066
|
-
setOriginPick(e.target.value);
|
|
7067
|
-
} },
|
|
7068
|
-
h("option", { value: "" }, t.allOrigins),
|
|
7069
|
-
ORIGINS.map(function(origin) {
|
|
7070
|
-
return h("option", { value: origin, key: origin }, originText[origin]);
|
|
7071
|
-
})
|
|
7072
|
-
)
|
|
7073
|
-
)
|
|
7074
|
-
) : null,
|
|
7075
|
-
body,
|
|
7076
|
-
toast ? h("div", { className: P + "-toast", role: "status" }, toast) : null
|
|
7077
|
-
);
|
|
7078
|
-
}
|
|
7079
|
-
return { ActionSchemaView, DOMAIN, typeLabel, paramRows };
|
|
7080
|
-
};
|
|
7081
|
-
}
|
|
7082
|
-
});
|
|
7083
|
-
|
|
7084
|
-
// packages/addons/tasks/client/views/actions.cjs
|
|
7085
|
-
var require_actions = __commonJS({
|
|
7086
|
-
"packages/addons/tasks/client/views/actions.cjs"(exports2, module2) {
|
|
7087
|
-
"use strict";
|
|
7088
|
-
module2.exports = require_action_schema_view()({
|
|
7089
|
-
domain: "tasks",
|
|
7090
|
-
prefix: "wbt"
|
|
7091
|
-
});
|
|
7092
|
-
}
|
|
7093
|
-
});
|
|
7094
|
-
|
|
7095
4898
|
// packages/addons/lib/body-copy.cjs
|
|
7096
4899
|
var require_body_copy = __commonJS({
|
|
7097
4900
|
"packages/addons/lib/body-copy.cjs"(exports2, module2) {
|
|
@@ -7494,77 +5297,365 @@ var require_copy = __commonJS({
|
|
|
7494
5297
|
}
|
|
7495
5298
|
});
|
|
7496
5299
|
|
|
7497
|
-
// packages/addons/lib/icon-label.cjs
|
|
7498
|
-
var require_icon_label = __commonJS({
|
|
7499
|
-
"packages/addons/lib/icon-label.cjs"(exports2, module2) {
|
|
5300
|
+
// packages/addons/lib/icon-label.cjs
|
|
5301
|
+
var require_icon_label = __commonJS({
|
|
5302
|
+
"packages/addons/lib/icon-label.cjs"(exports2, module2) {
|
|
5303
|
+
"use strict";
|
|
5304
|
+
var VISUALLY_HIDDEN = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap";
|
|
5305
|
+
module2.exports = function iconLabel(h, Icon2, text, options) {
|
|
5306
|
+
var opts = options || {};
|
|
5307
|
+
var cls = "wb-icon-label" + (opts.short ? " wb-icon-label-short" : "") + (Icon2 ? "" : " wb-icon-label-fallback");
|
|
5308
|
+
return h(
|
|
5309
|
+
"span",
|
|
5310
|
+
{ className: cls, title: typeof text === "string" ? text : void 0 },
|
|
5311
|
+
Icon2 ? h(Icon2, { size: 14, strokeWidth: 2, "aria-hidden": true, focusable: false }) : null,
|
|
5312
|
+
h("span", { className: "wb-icon-label-text" }, text)
|
|
5313
|
+
);
|
|
5314
|
+
};
|
|
5315
|
+
module2.exports.styles = ".wb-icon-label{display:inline-flex;align-items:center;gap:5px;max-width:100%;vertical-align:middle;text-align:start}.wb-icon-label>svg{flex:none}.wb-icon-label>span{min-width:0;overflow-wrap:anywhere}button .wb-icon-label:not(.wb-icon-label-fallback) .wb-icon-label-text{" + VISUALLY_HIDDEN + "}button .wb-icon-label.wb-icon-label-short .wb-icon-label-text{position:static;width:auto;height:auto;margin:0;overflow:visible;clip-path:none;white-space:normal}";
|
|
5316
|
+
}
|
|
5317
|
+
});
|
|
5318
|
+
|
|
5319
|
+
// packages/addons/lib/icons.cjs
|
|
5320
|
+
var require_icons = __commonJS({
|
|
5321
|
+
"packages/addons/lib/icons.cjs"(exports2, module2) {
|
|
5322
|
+
"use strict";
|
|
5323
|
+
var h = require("react").createElement;
|
|
5324
|
+
function create(prefix, glyphs, options) {
|
|
5325
|
+
var opts = options || {};
|
|
5326
|
+
var ICONS = Object.assign({}, glyphs);
|
|
5327
|
+
function Icon2(props) {
|
|
5328
|
+
var C = ICONS[props.name] || (opts.fallback ? ICONS[opts.fallback] : null);
|
|
5329
|
+
if (!C) return null;
|
|
5330
|
+
var size = typeof opts.sizeOf === "function" ? opts.sizeOf(props) : props.size || 14;
|
|
5331
|
+
var cls = prefix + "-svg" + (opts.classNameAppend && props.className ? " " + props.className : "");
|
|
5332
|
+
var attrs = {
|
|
5333
|
+
size,
|
|
5334
|
+
strokeWidth: props.strokeWidth || 2,
|
|
5335
|
+
"aria-hidden": "true",
|
|
5336
|
+
className: cls
|
|
5337
|
+
};
|
|
5338
|
+
if (opts.focusable) attrs.focusable = false;
|
|
5339
|
+
return h(C, attrs);
|
|
5340
|
+
}
|
|
5341
|
+
var set = { ICONS, Icon: Icon2 };
|
|
5342
|
+
set.label = function(name, text, options2) {
|
|
5343
|
+
return require_icon_label()(h, function NamedIcon(props) {
|
|
5344
|
+
return h(Icon2, Object.assign({ name }, props));
|
|
5345
|
+
}, text, options2);
|
|
5346
|
+
};
|
|
5347
|
+
if (opts.tabIcon) {
|
|
5348
|
+
set.tabIcon = function(name) {
|
|
5349
|
+
return function TabIcon() {
|
|
5350
|
+
return h(Icon2, { name, size: 14 });
|
|
5351
|
+
};
|
|
5352
|
+
};
|
|
5353
|
+
}
|
|
5354
|
+
return set;
|
|
5355
|
+
}
|
|
5356
|
+
module2.exports = { create };
|
|
5357
|
+
}
|
|
5358
|
+
});
|
|
5359
|
+
|
|
5360
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
5361
|
+
var toKebabCase;
|
|
5362
|
+
var init_toKebabCase = __esm({
|
|
5363
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs"() {
|
|
5364
|
+
toKebabCase = (string) => string?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5365
|
+
}
|
|
5366
|
+
});
|
|
5367
|
+
|
|
5368
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
5369
|
+
function toLucideIconData(iconName, iconNode, aliases = []) {
|
|
5370
|
+
if (iconNode == null) {
|
|
5371
|
+
throw new Error("[lucide]: iconNode is required when icon name is used");
|
|
5372
|
+
}
|
|
5373
|
+
return {
|
|
5374
|
+
name: toKebabCase(iconName),
|
|
5375
|
+
size: 24,
|
|
5376
|
+
node: iconNode,
|
|
5377
|
+
...aliases.length > 0 ? { aliases } : {}
|
|
5378
|
+
};
|
|
5379
|
+
}
|
|
5380
|
+
var init_toLucideIconData = __esm({
|
|
5381
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs"() {
|
|
5382
|
+
init_toKebabCase();
|
|
5383
|
+
}
|
|
5384
|
+
});
|
|
5385
|
+
|
|
5386
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
5387
|
+
var toCamelCase;
|
|
5388
|
+
var init_toCamelCase = __esm({
|
|
5389
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs"() {
|
|
5390
|
+
toCamelCase = (string) => {
|
|
5391
|
+
let out = "";
|
|
5392
|
+
let upperNext = false;
|
|
5393
|
+
for (const ch of string) {
|
|
5394
|
+
if (ch === "-" || ch === "_" || ch <= " ") {
|
|
5395
|
+
upperNext = out.length > 0;
|
|
5396
|
+
continue;
|
|
5397
|
+
}
|
|
5398
|
+
if (out.length === 0) {
|
|
5399
|
+
out += ch.toLowerCase();
|
|
5400
|
+
} else {
|
|
5401
|
+
out += upperNext ? ch.toUpperCase() : ch;
|
|
5402
|
+
}
|
|
5403
|
+
upperNext = false;
|
|
5404
|
+
}
|
|
5405
|
+
return out;
|
|
5406
|
+
};
|
|
5407
|
+
}
|
|
5408
|
+
});
|
|
5409
|
+
|
|
5410
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
|
|
5411
|
+
var toPascalCase;
|
|
5412
|
+
var init_toPascalCase = __esm({
|
|
5413
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs"() {
|
|
5414
|
+
init_toCamelCase();
|
|
5415
|
+
toPascalCase = (string) => {
|
|
5416
|
+
const camelCase = toCamelCase(string);
|
|
5417
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
5418
|
+
};
|
|
5419
|
+
}
|
|
5420
|
+
});
|
|
5421
|
+
|
|
5422
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
5423
|
+
var mergeClasses;
|
|
5424
|
+
var init_mergeClasses = __esm({
|
|
5425
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs"() {
|
|
5426
|
+
mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
5427
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
5428
|
+
}).join(" ").trim();
|
|
5429
|
+
}
|
|
5430
|
+
});
|
|
5431
|
+
|
|
5432
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs
|
|
5433
|
+
var defaultAttributes;
|
|
5434
|
+
var init_defaultAttributes = __esm({
|
|
5435
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs"() {
|
|
5436
|
+
defaultAttributes = {
|
|
5437
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5438
|
+
width: 24,
|
|
5439
|
+
height: 24,
|
|
5440
|
+
viewBox: "0 0 24 24",
|
|
5441
|
+
fill: "none",
|
|
5442
|
+
stroke: "currentColor",
|
|
5443
|
+
"stroke-width": 2,
|
|
5444
|
+
"stroke-linecap": "round",
|
|
5445
|
+
"stroke-linejoin": "round"
|
|
5446
|
+
};
|
|
5447
|
+
}
|
|
5448
|
+
});
|
|
5449
|
+
|
|
5450
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
5451
|
+
function isDefined(value) {
|
|
5452
|
+
return value !== null && value !== void 0;
|
|
5453
|
+
}
|
|
5454
|
+
function buildLucideIconNode(icon, params = {}) {
|
|
5455
|
+
const attributeNames = params.attributeNames ?? {};
|
|
5456
|
+
const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;
|
|
5457
|
+
const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes["width"];
|
|
5458
|
+
const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes["height"];
|
|
5459
|
+
const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === "string" && alias.trim() !== "").map((alias) => `lucide-${alias}`) ?? [];
|
|
5460
|
+
const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];
|
|
5461
|
+
const classNamesFromClassName = params.className?.split(" ").filter(Boolean) ?? [];
|
|
5462
|
+
const className = params.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses("lucide", ...iconClassNames, ...classNamesFromClassName);
|
|
5463
|
+
const calculatedStrokeWidth = params.absoluteStrokeWidth ? Number(params.strokeWidth ?? defaultAttributes["stroke-width"]) * Number(icon.size ?? icon.width ?? defaultAttributes["width"]) / Number(params.size ?? params.width ?? defaultAttributes["width"]) : params.strokeWidth ?? defaultAttributes["stroke-width"];
|
|
5464
|
+
const attributes = {
|
|
5465
|
+
...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {
|
|
5466
|
+
attrs[getAttributeName(attrName)] = value;
|
|
5467
|
+
return attrs;
|
|
5468
|
+
}, {}),
|
|
5469
|
+
..."color" in params && params.color && {
|
|
5470
|
+
[getAttributeName("stroke")]: params.color
|
|
5471
|
+
},
|
|
5472
|
+
..."size" in params && isDefined(params.size) && {
|
|
5473
|
+
[getAttributeName("width")]: params.size,
|
|
5474
|
+
[getAttributeName("height")]: params.size
|
|
5475
|
+
},
|
|
5476
|
+
..."width" in params && isDefined(params.width) && {
|
|
5477
|
+
[getAttributeName("width")]: params.width
|
|
5478
|
+
},
|
|
5479
|
+
..."height" in params && isDefined(params.height) && {
|
|
5480
|
+
[getAttributeName("height")]: params.height
|
|
5481
|
+
},
|
|
5482
|
+
[getAttributeName("stroke-width")]: calculatedStrokeWidth,
|
|
5483
|
+
...className && {
|
|
5484
|
+
[getAttributeName("class")]: className
|
|
5485
|
+
},
|
|
5486
|
+
[getAttributeName("viewBox")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
|
|
5487
|
+
...params.hasA11yProp === false ? {
|
|
5488
|
+
[getAttributeName("aria-hidden")]: "true"
|
|
5489
|
+
} : {},
|
|
5490
|
+
..."attributes" in params && params.attributes
|
|
5491
|
+
};
|
|
5492
|
+
return [
|
|
5493
|
+
"svg",
|
|
5494
|
+
attributes,
|
|
5495
|
+
icon.node.map((child) => {
|
|
5496
|
+
const [name, attrs, children] = child;
|
|
5497
|
+
const nextAttrs = params.nonScalingStroke ? { [getAttributeName("vector-effect")]: "non-scaling-stroke", ...attrs } : attrs;
|
|
5498
|
+
return children ? [name, nextAttrs, children] : [name, nextAttrs];
|
|
5499
|
+
})
|
|
5500
|
+
];
|
|
5501
|
+
}
|
|
5502
|
+
var init_buildLucideIconNode = __esm({
|
|
5503
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs"() {
|
|
5504
|
+
init_defaultAttributes();
|
|
5505
|
+
init_mergeClasses();
|
|
5506
|
+
}
|
|
5507
|
+
});
|
|
5508
|
+
|
|
5509
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
5510
|
+
function buildLucideIconForReact(icon, params = {}) {
|
|
5511
|
+
return buildLucideIconNode(icon, {
|
|
5512
|
+
...params,
|
|
5513
|
+
attributeNames: {
|
|
5514
|
+
...params.attributeNames,
|
|
5515
|
+
class: "className",
|
|
5516
|
+
"stroke-width": "strokeWidth",
|
|
5517
|
+
"stroke-linecap": "strokeLinecap",
|
|
5518
|
+
"stroke-linejoin": "strokeLinejoin",
|
|
5519
|
+
"vector-effect": "vectorEffect"
|
|
5520
|
+
}
|
|
5521
|
+
});
|
|
5522
|
+
}
|
|
5523
|
+
var init_buildLucideIconForReact = __esm({
|
|
5524
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs"() {
|
|
5525
|
+
init_buildLucideIconNode();
|
|
5526
|
+
}
|
|
5527
|
+
});
|
|
5528
|
+
|
|
5529
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
5530
|
+
var hasA11yProp;
|
|
5531
|
+
var init_hasA11yProp = __esm({
|
|
5532
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs"() {
|
|
5533
|
+
hasA11yProp = (props) => {
|
|
5534
|
+
for (const prop in props) {
|
|
5535
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
5536
|
+
return true;
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
return false;
|
|
5540
|
+
};
|
|
5541
|
+
}
|
|
5542
|
+
});
|
|
5543
|
+
|
|
5544
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/context.mjs
|
|
5545
|
+
var import_react, LucideContext, useLucideContext;
|
|
5546
|
+
var init_context = __esm({
|
|
5547
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/context.mjs"() {
|
|
5548
|
+
"use strict";
|
|
5549
|
+
"use client";
|
|
5550
|
+
import_react = require("react");
|
|
5551
|
+
LucideContext = (0, import_react.createContext)({});
|
|
5552
|
+
useLucideContext = () => (0, import_react.useContext)(LucideContext);
|
|
5553
|
+
}
|
|
5554
|
+
});
|
|
5555
|
+
|
|
5556
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/Icon.mjs
|
|
5557
|
+
var import_react2, Icon;
|
|
5558
|
+
var init_Icon = __esm({
|
|
5559
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/Icon.mjs"() {
|
|
7500
5560
|
"use strict";
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
5561
|
+
"use client";
|
|
5562
|
+
import_react2 = require("react");
|
|
5563
|
+
init_mergeClasses();
|
|
5564
|
+
init_buildLucideIconForReact();
|
|
5565
|
+
init_hasA11yProp();
|
|
5566
|
+
init_context();
|
|
5567
|
+
Icon = (0, import_react2.forwardRef)(
|
|
5568
|
+
({
|
|
5569
|
+
color,
|
|
5570
|
+
size,
|
|
5571
|
+
width,
|
|
5572
|
+
height,
|
|
5573
|
+
strokeWidth,
|
|
5574
|
+
absoluteStrokeWidth,
|
|
5575
|
+
nonScalingStroke,
|
|
5576
|
+
className = "",
|
|
5577
|
+
children,
|
|
5578
|
+
iconNode = [],
|
|
5579
|
+
icon = {
|
|
5580
|
+
node: iconNode,
|
|
5581
|
+
aliases: [],
|
|
5582
|
+
size: 24
|
|
5583
|
+
},
|
|
5584
|
+
...rest
|
|
5585
|
+
}, ref) => {
|
|
5586
|
+
const {
|
|
5587
|
+
size: contextSize = 24,
|
|
5588
|
+
strokeWidth: contextStrokeWidth = 2,
|
|
5589
|
+
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
5590
|
+
nonScalingStroke: contextNonScalingStroke = false,
|
|
5591
|
+
color: contextColor = "currentColor",
|
|
5592
|
+
className: contextClass = ""
|
|
5593
|
+
} = useLucideContext() ?? {};
|
|
5594
|
+
const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);
|
|
5595
|
+
const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {
|
|
5596
|
+
color: color ?? contextColor,
|
|
5597
|
+
width: width ?? size ?? contextSize,
|
|
5598
|
+
height: height ?? size ?? contextSize,
|
|
5599
|
+
strokeWidth: strokeWidth ?? contextStrokeWidth,
|
|
5600
|
+
absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,
|
|
5601
|
+
nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,
|
|
5602
|
+
className: mergeClasses(contextClass, className),
|
|
5603
|
+
hasA11yProp: hasAccessibleProp,
|
|
5604
|
+
attributes: rest
|
|
5605
|
+
});
|
|
5606
|
+
return (0, import_react2.createElement)(
|
|
5607
|
+
name,
|
|
5608
|
+
{
|
|
5609
|
+
ref,
|
|
5610
|
+
...svgAttributes
|
|
5611
|
+
},
|
|
5612
|
+
[
|
|
5613
|
+
...builtIconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
|
5614
|
+
...Array.isArray(children) ? children : [children]
|
|
5615
|
+
]
|
|
5616
|
+
);
|
|
5617
|
+
}
|
|
5618
|
+
);
|
|
7513
5619
|
}
|
|
7514
5620
|
});
|
|
7515
5621
|
|
|
7516
|
-
//
|
|
7517
|
-
|
|
7518
|
-
"
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
set.label = function(name, text, options2) {
|
|
7540
|
-
return require_icon_label()(h, function NamedIcon(props) {
|
|
7541
|
-
return h(Icon2, Object.assign({ name }, props));
|
|
7542
|
-
}, text, options2);
|
|
7543
|
-
};
|
|
7544
|
-
if (opts.tabIcon) {
|
|
7545
|
-
set.tabIcon = function(name) {
|
|
7546
|
-
return function TabIcon() {
|
|
7547
|
-
return h(Icon2, { name, size: 14 });
|
|
7548
|
-
};
|
|
7549
|
-
};
|
|
7550
|
-
}
|
|
7551
|
-
return set;
|
|
7552
|
-
}
|
|
7553
|
-
module2.exports = { create };
|
|
5622
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
5623
|
+
function createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {
|
|
5624
|
+
const iconData = typeof iconDataOrName === "string" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;
|
|
5625
|
+
const Component = (0, import_react3.forwardRef)(
|
|
5626
|
+
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
|
|
5627
|
+
ref,
|
|
5628
|
+
icon: iconData,
|
|
5629
|
+
className,
|
|
5630
|
+
...props
|
|
5631
|
+
})
|
|
5632
|
+
);
|
|
5633
|
+
if (iconData.name) {
|
|
5634
|
+
Component.displayName = toPascalCase(iconData.name);
|
|
5635
|
+
}
|
|
5636
|
+
return Component;
|
|
5637
|
+
}
|
|
5638
|
+
var import_react3;
|
|
5639
|
+
var init_createLucideIcon = __esm({
|
|
5640
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/createLucideIcon.mjs"() {
|
|
5641
|
+
import_react3 = require("react");
|
|
5642
|
+
init_toLucideIconData();
|
|
5643
|
+
init_toPascalCase();
|
|
5644
|
+
init_Icon();
|
|
7554
5645
|
}
|
|
7555
5646
|
});
|
|
7556
5647
|
|
|
7557
5648
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs
|
|
7558
5649
|
var sliders_horizontal_exports = {};
|
|
7559
5650
|
__export(sliders_horizontal_exports, {
|
|
7560
|
-
__iconData: () =>
|
|
5651
|
+
__iconData: () => __iconData,
|
|
7561
5652
|
default: () => SlidersHorizontal
|
|
7562
5653
|
});
|
|
7563
|
-
var
|
|
5654
|
+
var __iconData, SlidersHorizontal;
|
|
7564
5655
|
var init_sliders_horizontal = __esm({
|
|
7565
5656
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs"() {
|
|
7566
5657
|
init_createLucideIcon();
|
|
7567
|
-
|
|
5658
|
+
__iconData = {
|
|
7568
5659
|
name: "sliders-horizontal",
|
|
7569
5660
|
size: 24,
|
|
7570
5661
|
node: [
|
|
@@ -7579,22 +5670,22 @@ var init_sliders_horizontal = __esm({
|
|
|
7579
5670
|
["path", { d: "M8 12H3", key: "a7s4jb" }]
|
|
7580
5671
|
]
|
|
7581
5672
|
};
|
|
7582
|
-
|
|
7583
|
-
SlidersHorizontal = createLucideIcon(
|
|
5673
|
+
__iconData.node;
|
|
5674
|
+
SlidersHorizontal = createLucideIcon(__iconData);
|
|
7584
5675
|
}
|
|
7585
5676
|
});
|
|
7586
5677
|
|
|
7587
5678
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chart-column.mjs
|
|
7588
5679
|
var chart_column_exports = {};
|
|
7589
5680
|
__export(chart_column_exports, {
|
|
7590
|
-
__iconData: () =>
|
|
5681
|
+
__iconData: () => __iconData2,
|
|
7591
5682
|
default: () => ChartColumn
|
|
7592
5683
|
});
|
|
7593
|
-
var
|
|
5684
|
+
var __iconData2, ChartColumn;
|
|
7594
5685
|
var init_chart_column = __esm({
|
|
7595
5686
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chart-column.mjs"() {
|
|
7596
5687
|
init_createLucideIcon();
|
|
7597
|
-
|
|
5688
|
+
__iconData2 = {
|
|
7598
5689
|
name: "chart-column",
|
|
7599
5690
|
size: 24,
|
|
7600
5691
|
node: [
|
|
@@ -7605,22 +5696,22 @@ var init_chart_column = __esm({
|
|
|
7605
5696
|
],
|
|
7606
5697
|
aliases: ["bar-chart-3"]
|
|
7607
5698
|
};
|
|
7608
|
-
|
|
7609
|
-
ChartColumn = createLucideIcon(
|
|
5699
|
+
__iconData2.node;
|
|
5700
|
+
ChartColumn = createLucideIcon(__iconData2);
|
|
7610
5701
|
}
|
|
7611
5702
|
});
|
|
7612
5703
|
|
|
7613
5704
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/settings.mjs
|
|
7614
5705
|
var settings_exports = {};
|
|
7615
5706
|
__export(settings_exports, {
|
|
7616
|
-
__iconData: () =>
|
|
5707
|
+
__iconData: () => __iconData3,
|
|
7617
5708
|
default: () => Settings
|
|
7618
5709
|
});
|
|
7619
|
-
var
|
|
5710
|
+
var __iconData3, Settings;
|
|
7620
5711
|
var init_settings = __esm({
|
|
7621
5712
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/settings.mjs"() {
|
|
7622
5713
|
init_createLucideIcon();
|
|
7623
|
-
|
|
5714
|
+
__iconData3 = {
|
|
7624
5715
|
name: "settings",
|
|
7625
5716
|
size: 24,
|
|
7626
5717
|
node: [
|
|
@@ -7634,22 +5725,22 @@ var init_settings = __esm({
|
|
|
7634
5725
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
7635
5726
|
]
|
|
7636
5727
|
};
|
|
7637
|
-
|
|
7638
|
-
Settings = createLucideIcon(
|
|
5728
|
+
__iconData3.node;
|
|
5729
|
+
Settings = createLucideIcon(__iconData3);
|
|
7639
5730
|
}
|
|
7640
5731
|
});
|
|
7641
5732
|
|
|
7642
5733
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/database.mjs
|
|
7643
5734
|
var database_exports = {};
|
|
7644
5735
|
__export(database_exports, {
|
|
7645
|
-
__iconData: () =>
|
|
5736
|
+
__iconData: () => __iconData4,
|
|
7646
5737
|
default: () => Database
|
|
7647
5738
|
});
|
|
7648
|
-
var
|
|
5739
|
+
var __iconData4, Database;
|
|
7649
5740
|
var init_database = __esm({
|
|
7650
5741
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/database.mjs"() {
|
|
7651
5742
|
init_createLucideIcon();
|
|
7652
|
-
|
|
5743
|
+
__iconData4 = {
|
|
7653
5744
|
name: "database",
|
|
7654
5745
|
size: 24,
|
|
7655
5746
|
node: [
|
|
@@ -7658,22 +5749,22 @@ var init_database = __esm({
|
|
|
7658
5749
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
7659
5750
|
]
|
|
7660
5751
|
};
|
|
7661
|
-
|
|
7662
|
-
Database = createLucideIcon(
|
|
5752
|
+
__iconData4.node;
|
|
5753
|
+
Database = createLucideIcon(__iconData4);
|
|
7663
5754
|
}
|
|
7664
5755
|
});
|
|
7665
5756
|
|
|
7666
5757
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/calendar-days.mjs
|
|
7667
5758
|
var calendar_days_exports = {};
|
|
7668
5759
|
__export(calendar_days_exports, {
|
|
7669
|
-
__iconData: () =>
|
|
5760
|
+
__iconData: () => __iconData5,
|
|
7670
5761
|
default: () => CalendarDays
|
|
7671
5762
|
});
|
|
7672
|
-
var
|
|
5763
|
+
var __iconData5, CalendarDays;
|
|
7673
5764
|
var init_calendar_days = __esm({
|
|
7674
5765
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/calendar-days.mjs"() {
|
|
7675
5766
|
init_createLucideIcon();
|
|
7676
|
-
|
|
5767
|
+
__iconData5 = {
|
|
7677
5768
|
name: "calendar-days",
|
|
7678
5769
|
size: 24,
|
|
7679
5770
|
node: [
|
|
@@ -7689,22 +5780,22 @@ var init_calendar_days = __esm({
|
|
|
7689
5780
|
["path", { d: "M16 17h.01", key: "ql8jdd" }]
|
|
7690
5781
|
]
|
|
7691
5782
|
};
|
|
7692
|
-
|
|
7693
|
-
CalendarDays = createLucideIcon(
|
|
5783
|
+
__iconData5.node;
|
|
5784
|
+
CalendarDays = createLucideIcon(__iconData5);
|
|
7694
5785
|
}
|
|
7695
5786
|
});
|
|
7696
5787
|
|
|
7697
5788
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-xml.mjs
|
|
7698
5789
|
var code_xml_exports = {};
|
|
7699
5790
|
__export(code_xml_exports, {
|
|
7700
|
-
__iconData: () =>
|
|
5791
|
+
__iconData: () => __iconData6,
|
|
7701
5792
|
default: () => CodeXml
|
|
7702
5793
|
});
|
|
7703
|
-
var
|
|
5794
|
+
var __iconData6, CodeXml;
|
|
7704
5795
|
var init_code_xml = __esm({
|
|
7705
5796
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-xml.mjs"() {
|
|
7706
5797
|
init_createLucideIcon();
|
|
7707
|
-
|
|
5798
|
+
__iconData6 = {
|
|
7708
5799
|
name: "code-xml",
|
|
7709
5800
|
size: 24,
|
|
7710
5801
|
node: [
|
|
@@ -7714,22 +5805,22 @@ var init_code_xml = __esm({
|
|
|
7714
5805
|
],
|
|
7715
5806
|
aliases: ["code-2"]
|
|
7716
5807
|
};
|
|
7717
|
-
|
|
7718
|
-
CodeXml = createLucideIcon(
|
|
5808
|
+
__iconData6.node;
|
|
5809
|
+
CodeXml = createLucideIcon(__iconData6);
|
|
7719
5810
|
}
|
|
7720
5811
|
});
|
|
7721
5812
|
|
|
7722
5813
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/terminal.mjs
|
|
7723
5814
|
var terminal_exports = {};
|
|
7724
5815
|
__export(terminal_exports, {
|
|
7725
|
-
__iconData: () =>
|
|
5816
|
+
__iconData: () => __iconData7,
|
|
7726
5817
|
default: () => Terminal
|
|
7727
5818
|
});
|
|
7728
|
-
var
|
|
5819
|
+
var __iconData7, Terminal;
|
|
7729
5820
|
var init_terminal = __esm({
|
|
7730
5821
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/terminal.mjs"() {
|
|
7731
5822
|
init_createLucideIcon();
|
|
7732
|
-
|
|
5823
|
+
__iconData7 = {
|
|
7733
5824
|
name: "terminal",
|
|
7734
5825
|
size: 24,
|
|
7735
5826
|
node: [
|
|
@@ -7737,22 +5828,22 @@ var init_terminal = __esm({
|
|
|
7737
5828
|
["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
|
|
7738
5829
|
]
|
|
7739
5830
|
};
|
|
7740
|
-
|
|
7741
|
-
Terminal = createLucideIcon(
|
|
5831
|
+
__iconData7.node;
|
|
5832
|
+
Terminal = createLucideIcon(__iconData7);
|
|
7742
5833
|
}
|
|
7743
5834
|
});
|
|
7744
5835
|
|
|
7745
5836
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/pilcrow.mjs
|
|
7746
5837
|
var pilcrow_exports = {};
|
|
7747
5838
|
__export(pilcrow_exports, {
|
|
7748
|
-
__iconData: () =>
|
|
5839
|
+
__iconData: () => __iconData8,
|
|
7749
5840
|
default: () => Pilcrow
|
|
7750
5841
|
});
|
|
7751
|
-
var
|
|
5842
|
+
var __iconData8, Pilcrow;
|
|
7752
5843
|
var init_pilcrow = __esm({
|
|
7753
5844
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/pilcrow.mjs"() {
|
|
7754
5845
|
init_createLucideIcon();
|
|
7755
|
-
|
|
5846
|
+
__iconData8 = {
|
|
7756
5847
|
name: "pilcrow",
|
|
7757
5848
|
size: 24,
|
|
7758
5849
|
node: [
|
|
@@ -7761,22 +5852,22 @@ var init_pilcrow = __esm({
|
|
|
7761
5852
|
["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
|
|
7762
5853
|
]
|
|
7763
5854
|
};
|
|
7764
|
-
|
|
7765
|
-
Pilcrow = createLucideIcon(
|
|
5855
|
+
__iconData8.node;
|
|
5856
|
+
Pilcrow = createLucideIcon(__iconData8);
|
|
7766
5857
|
}
|
|
7767
5858
|
});
|
|
7768
5859
|
|
|
7769
5860
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.mjs
|
|
7770
5861
|
var plus_exports = {};
|
|
7771
5862
|
__export(plus_exports, {
|
|
7772
|
-
__iconData: () =>
|
|
5863
|
+
__iconData: () => __iconData9,
|
|
7773
5864
|
default: () => Plus
|
|
7774
5865
|
});
|
|
7775
|
-
var
|
|
5866
|
+
var __iconData9, Plus;
|
|
7776
5867
|
var init_plus = __esm({
|
|
7777
5868
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.mjs"() {
|
|
7778
5869
|
init_createLucideIcon();
|
|
7779
|
-
|
|
5870
|
+
__iconData9 = {
|
|
7780
5871
|
name: "plus",
|
|
7781
5872
|
size: 24,
|
|
7782
5873
|
node: [
|
|
@@ -7784,82 +5875,82 @@ var init_plus = __esm({
|
|
|
7784
5875
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
7785
5876
|
]
|
|
7786
5877
|
};
|
|
7787
|
-
|
|
7788
|
-
Plus = createLucideIcon(
|
|
5878
|
+
__iconData9.node;
|
|
5879
|
+
Plus = createLucideIcon(__iconData9);
|
|
7789
5880
|
}
|
|
7790
5881
|
});
|
|
7791
5882
|
|
|
7792
5883
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/minus.mjs
|
|
7793
5884
|
var minus_exports = {};
|
|
7794
5885
|
__export(minus_exports, {
|
|
7795
|
-
__iconData: () =>
|
|
5886
|
+
__iconData: () => __iconData10,
|
|
7796
5887
|
default: () => Minus
|
|
7797
5888
|
});
|
|
7798
|
-
var
|
|
5889
|
+
var __iconData10, Minus;
|
|
7799
5890
|
var init_minus = __esm({
|
|
7800
5891
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/minus.mjs"() {
|
|
7801
5892
|
init_createLucideIcon();
|
|
7802
|
-
|
|
5893
|
+
__iconData10 = {
|
|
7803
5894
|
name: "minus",
|
|
7804
5895
|
size: 24,
|
|
7805
5896
|
node: [["path", { d: "M5 12h14", key: "1ays0h" }]]
|
|
7806
5897
|
};
|
|
7807
|
-
|
|
7808
|
-
Minus = createLucideIcon(
|
|
5898
|
+
__iconData10.node;
|
|
5899
|
+
Minus = createLucideIcon(__iconData10);
|
|
7809
5900
|
}
|
|
7810
5901
|
});
|
|
7811
5902
|
|
|
7812
5903
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/check.mjs
|
|
7813
5904
|
var check_exports = {};
|
|
7814
5905
|
__export(check_exports, {
|
|
7815
|
-
__iconData: () =>
|
|
5906
|
+
__iconData: () => __iconData11,
|
|
7816
5907
|
default: () => Check
|
|
7817
5908
|
});
|
|
7818
|
-
var
|
|
5909
|
+
var __iconData11, Check;
|
|
7819
5910
|
var init_check = __esm({
|
|
7820
5911
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/check.mjs"() {
|
|
7821
5912
|
init_createLucideIcon();
|
|
7822
|
-
|
|
5913
|
+
__iconData11 = {
|
|
7823
5914
|
name: "check",
|
|
7824
5915
|
size: 24,
|
|
7825
5916
|
node: [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]
|
|
7826
5917
|
};
|
|
7827
|
-
|
|
7828
|
-
Check = createLucideIcon(
|
|
5918
|
+
__iconData11.node;
|
|
5919
|
+
Check = createLucideIcon(__iconData11);
|
|
7829
5920
|
}
|
|
7830
5921
|
});
|
|
7831
5922
|
|
|
7832
5923
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square.mjs
|
|
7833
5924
|
var square_exports = {};
|
|
7834
5925
|
__export(square_exports, {
|
|
7835
|
-
__iconData: () =>
|
|
5926
|
+
__iconData: () => __iconData12,
|
|
7836
5927
|
default: () => Square
|
|
7837
5928
|
});
|
|
7838
|
-
var
|
|
5929
|
+
var __iconData12, Square;
|
|
7839
5930
|
var init_square = __esm({
|
|
7840
5931
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square.mjs"() {
|
|
7841
5932
|
init_createLucideIcon();
|
|
7842
|
-
|
|
5933
|
+
__iconData12 = {
|
|
7843
5934
|
name: "square",
|
|
7844
5935
|
size: 24,
|
|
7845
5936
|
node: [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]]
|
|
7846
5937
|
};
|
|
7847
|
-
|
|
7848
|
-
Square = createLucideIcon(
|
|
5938
|
+
__iconData12.node;
|
|
5939
|
+
Square = createLucideIcon(__iconData12);
|
|
7849
5940
|
}
|
|
7850
5941
|
});
|
|
7851
5942
|
|
|
7852
5943
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/rotate-ccw.mjs
|
|
7853
5944
|
var rotate_ccw_exports = {};
|
|
7854
5945
|
__export(rotate_ccw_exports, {
|
|
7855
|
-
__iconData: () =>
|
|
5946
|
+
__iconData: () => __iconData13,
|
|
7856
5947
|
default: () => RotateCcw
|
|
7857
5948
|
});
|
|
7858
|
-
var
|
|
5949
|
+
var __iconData13, RotateCcw;
|
|
7859
5950
|
var init_rotate_ccw = __esm({
|
|
7860
5951
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/rotate-ccw.mjs"() {
|
|
7861
5952
|
init_createLucideIcon();
|
|
7862
|
-
|
|
5953
|
+
__iconData13 = {
|
|
7863
5954
|
name: "rotate-ccw",
|
|
7864
5955
|
size: 24,
|
|
7865
5956
|
node: [
|
|
@@ -7867,22 +5958,22 @@ var init_rotate_ccw = __esm({
|
|
|
7867
5958
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
7868
5959
|
]
|
|
7869
5960
|
};
|
|
7870
|
-
|
|
7871
|
-
RotateCcw = createLucideIcon(
|
|
5961
|
+
__iconData13.node;
|
|
5962
|
+
RotateCcw = createLucideIcon(__iconData13);
|
|
7872
5963
|
}
|
|
7873
5964
|
});
|
|
7874
5965
|
|
|
7875
5966
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-tree.mjs
|
|
7876
5967
|
var list_tree_exports = {};
|
|
7877
5968
|
__export(list_tree_exports, {
|
|
7878
|
-
__iconData: () =>
|
|
5969
|
+
__iconData: () => __iconData14,
|
|
7879
5970
|
default: () => ListTree
|
|
7880
5971
|
});
|
|
7881
|
-
var
|
|
5972
|
+
var __iconData14, ListTree;
|
|
7882
5973
|
var init_list_tree = __esm({
|
|
7883
5974
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-tree.mjs"() {
|
|
7884
5975
|
init_createLucideIcon();
|
|
7885
|
-
|
|
5976
|
+
__iconData14 = {
|
|
7886
5977
|
name: "list-tree",
|
|
7887
5978
|
size: 24,
|
|
7888
5979
|
node: [
|
|
@@ -7893,22 +5984,22 @@ var init_list_tree = __esm({
|
|
|
7893
5984
|
["path", { d: "M3 5v12a2 2 0 0 0 2 2h3", key: "x1gjn2" }]
|
|
7894
5985
|
]
|
|
7895
5986
|
};
|
|
7896
|
-
|
|
7897
|
-
ListTree = createLucideIcon(
|
|
5987
|
+
__iconData14.node;
|
|
5988
|
+
ListTree = createLucideIcon(__iconData14);
|
|
7898
5989
|
}
|
|
7899
5990
|
});
|
|
7900
5991
|
|
|
7901
5992
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder-tree.mjs
|
|
7902
5993
|
var folder_tree_exports = {};
|
|
7903
5994
|
__export(folder_tree_exports, {
|
|
7904
|
-
__iconData: () =>
|
|
5995
|
+
__iconData: () => __iconData15,
|
|
7905
5996
|
default: () => FolderTree
|
|
7906
5997
|
});
|
|
7907
|
-
var
|
|
5998
|
+
var __iconData15, FolderTree;
|
|
7908
5999
|
var init_folder_tree = __esm({
|
|
7909
6000
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/folder-tree.mjs"() {
|
|
7910
6001
|
init_createLucideIcon();
|
|
7911
|
-
|
|
6002
|
+
__iconData15 = {
|
|
7912
6003
|
name: "folder-tree",
|
|
7913
6004
|
size: 24,
|
|
7914
6005
|
node: [
|
|
@@ -7930,22 +6021,22 @@ var init_folder_tree = __esm({
|
|
|
7930
6021
|
["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
|
|
7931
6022
|
]
|
|
7932
6023
|
};
|
|
7933
|
-
|
|
7934
|
-
FolderTree = createLucideIcon(
|
|
6024
|
+
__iconData15.node;
|
|
6025
|
+
FolderTree = createLucideIcon(__iconData15);
|
|
7935
6026
|
}
|
|
7936
6027
|
});
|
|
7937
6028
|
|
|
7938
6029
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/search.mjs
|
|
7939
6030
|
var search_exports = {};
|
|
7940
6031
|
__export(search_exports, {
|
|
7941
|
-
__iconData: () =>
|
|
6032
|
+
__iconData: () => __iconData16,
|
|
7942
6033
|
default: () => Search
|
|
7943
6034
|
});
|
|
7944
|
-
var
|
|
6035
|
+
var __iconData16, Search;
|
|
7945
6036
|
var init_search = __esm({
|
|
7946
6037
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/search.mjs"() {
|
|
7947
6038
|
init_createLucideIcon();
|
|
7948
|
-
|
|
6039
|
+
__iconData16 = {
|
|
7949
6040
|
name: "search",
|
|
7950
6041
|
size: 24,
|
|
7951
6042
|
node: [
|
|
@@ -7953,22 +6044,22 @@ var init_search = __esm({
|
|
|
7953
6044
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
7954
6045
|
]
|
|
7955
6046
|
};
|
|
7956
|
-
|
|
7957
|
-
Search = createLucideIcon(
|
|
6047
|
+
__iconData16.node;
|
|
6048
|
+
Search = createLucideIcon(__iconData16);
|
|
7958
6049
|
}
|
|
7959
6050
|
});
|
|
7960
6051
|
|
|
7961
6052
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/layout-grid.mjs
|
|
7962
6053
|
var layout_grid_exports = {};
|
|
7963
6054
|
__export(layout_grid_exports, {
|
|
7964
|
-
__iconData: () =>
|
|
6055
|
+
__iconData: () => __iconData17,
|
|
7965
6056
|
default: () => LayoutGrid
|
|
7966
6057
|
});
|
|
7967
|
-
var
|
|
6058
|
+
var __iconData17, LayoutGrid;
|
|
7968
6059
|
var init_layout_grid = __esm({
|
|
7969
6060
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/layout-grid.mjs"() {
|
|
7970
6061
|
init_createLucideIcon();
|
|
7971
|
-
|
|
6062
|
+
__iconData17 = {
|
|
7972
6063
|
name: "layout-grid",
|
|
7973
6064
|
size: 24,
|
|
7974
6065
|
node: [
|
|
@@ -7978,22 +6069,22 @@ var init_layout_grid = __esm({
|
|
|
7978
6069
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
|
|
7979
6070
|
]
|
|
7980
6071
|
};
|
|
7981
|
-
|
|
7982
|
-
LayoutGrid = createLucideIcon(
|
|
6072
|
+
__iconData17.node;
|
|
6073
|
+
LayoutGrid = createLucideIcon(__iconData17);
|
|
7983
6074
|
}
|
|
7984
6075
|
});
|
|
7985
6076
|
|
|
7986
6077
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list.mjs
|
|
7987
6078
|
var list_exports = {};
|
|
7988
6079
|
__export(list_exports, {
|
|
7989
|
-
__iconData: () =>
|
|
6080
|
+
__iconData: () => __iconData18,
|
|
7990
6081
|
default: () => List
|
|
7991
6082
|
});
|
|
7992
|
-
var
|
|
6083
|
+
var __iconData18, List;
|
|
7993
6084
|
var init_list = __esm({
|
|
7994
6085
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list.mjs"() {
|
|
7995
6086
|
init_createLucideIcon();
|
|
7996
|
-
|
|
6087
|
+
__iconData18 = {
|
|
7997
6088
|
name: "list",
|
|
7998
6089
|
size: 24,
|
|
7999
6090
|
node: [
|
|
@@ -8005,22 +6096,22 @@ var init_list = __esm({
|
|
|
8005
6096
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
8006
6097
|
]
|
|
8007
6098
|
};
|
|
8008
|
-
|
|
8009
|
-
List = createLucideIcon(
|
|
6099
|
+
__iconData18.node;
|
|
6100
|
+
List = createLucideIcon(__iconData18);
|
|
8010
6101
|
}
|
|
8011
6102
|
});
|
|
8012
6103
|
|
|
8013
6104
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-checks.mjs
|
|
8014
6105
|
var list_checks_exports = {};
|
|
8015
6106
|
__export(list_checks_exports, {
|
|
8016
|
-
__iconData: () =>
|
|
6107
|
+
__iconData: () => __iconData19,
|
|
8017
6108
|
default: () => ListChecks
|
|
8018
6109
|
});
|
|
8019
|
-
var
|
|
6110
|
+
var __iconData19, ListChecks;
|
|
8020
6111
|
var init_list_checks = __esm({
|
|
8021
6112
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-checks.mjs"() {
|
|
8022
6113
|
init_createLucideIcon();
|
|
8023
|
-
|
|
6114
|
+
__iconData19 = {
|
|
8024
6115
|
name: "list-checks",
|
|
8025
6116
|
size: 24,
|
|
8026
6117
|
node: [
|
|
@@ -8031,22 +6122,22 @@ var init_list_checks = __esm({
|
|
|
8031
6122
|
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }]
|
|
8032
6123
|
]
|
|
8033
6124
|
};
|
|
8034
|
-
|
|
8035
|
-
ListChecks = createLucideIcon(
|
|
6125
|
+
__iconData19.node;
|
|
6126
|
+
ListChecks = createLucideIcon(__iconData19);
|
|
8036
6127
|
}
|
|
8037
6128
|
});
|
|
8038
6129
|
|
|
8039
6130
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-check-big.mjs
|
|
8040
6131
|
var square_check_big_exports = {};
|
|
8041
6132
|
__export(square_check_big_exports, {
|
|
8042
|
-
__iconData: () =>
|
|
6133
|
+
__iconData: () => __iconData20,
|
|
8043
6134
|
default: () => SquareCheckBig
|
|
8044
6135
|
});
|
|
8045
|
-
var
|
|
6136
|
+
var __iconData20, SquareCheckBig;
|
|
8046
6137
|
var init_square_check_big = __esm({
|
|
8047
6138
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-check-big.mjs"() {
|
|
8048
6139
|
init_createLucideIcon();
|
|
8049
|
-
|
|
6140
|
+
__iconData20 = {
|
|
8050
6141
|
name: "square-check-big",
|
|
8051
6142
|
size: 24,
|
|
8052
6143
|
node: [
|
|
@@ -8058,28 +6149,48 @@ var init_square_check_big = __esm({
|
|
|
8058
6149
|
],
|
|
8059
6150
|
aliases: ["check-square"]
|
|
8060
6151
|
};
|
|
8061
|
-
|
|
8062
|
-
SquareCheckBig = createLucideIcon(
|
|
6152
|
+
__iconData20.node;
|
|
6153
|
+
SquareCheckBig = createLucideIcon(__iconData20);
|
|
8063
6154
|
}
|
|
8064
6155
|
});
|
|
8065
6156
|
|
|
8066
6157
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs
|
|
8067
6158
|
var chevron_left_exports = {};
|
|
8068
6159
|
__export(chevron_left_exports, {
|
|
8069
|
-
__iconData: () =>
|
|
6160
|
+
__iconData: () => __iconData21,
|
|
8070
6161
|
default: () => ChevronLeft
|
|
8071
6162
|
});
|
|
8072
|
-
var
|
|
6163
|
+
var __iconData21, ChevronLeft;
|
|
8073
6164
|
var init_chevron_left = __esm({
|
|
8074
6165
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs"() {
|
|
8075
6166
|
init_createLucideIcon();
|
|
8076
|
-
|
|
6167
|
+
__iconData21 = {
|
|
8077
6168
|
name: "chevron-left",
|
|
8078
6169
|
size: 24,
|
|
8079
6170
|
node: [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]]
|
|
8080
6171
|
};
|
|
6172
|
+
__iconData21.node;
|
|
6173
|
+
ChevronLeft = createLucideIcon(__iconData21);
|
|
6174
|
+
}
|
|
6175
|
+
});
|
|
6176
|
+
|
|
6177
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs
|
|
6178
|
+
var chevron_right_exports = {};
|
|
6179
|
+
__export(chevron_right_exports, {
|
|
6180
|
+
__iconData: () => __iconData22,
|
|
6181
|
+
default: () => ChevronRight
|
|
6182
|
+
});
|
|
6183
|
+
var __iconData22, ChevronRight;
|
|
6184
|
+
var init_chevron_right = __esm({
|
|
6185
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs"() {
|
|
6186
|
+
init_createLucideIcon();
|
|
6187
|
+
__iconData22 = {
|
|
6188
|
+
name: "chevron-right",
|
|
6189
|
+
size: 24,
|
|
6190
|
+
node: [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]]
|
|
6191
|
+
};
|
|
8081
6192
|
__iconData22.node;
|
|
8082
|
-
|
|
6193
|
+
ChevronRight = createLucideIcon(__iconData22);
|
|
8083
6194
|
}
|
|
8084
6195
|
});
|
|
8085
6196
|
|
|
@@ -9005,262 +7116,6 @@ var require_workspace_view = __commonJS({
|
|
|
9005
7116
|
}
|
|
9006
7117
|
});
|
|
9007
7118
|
|
|
9008
|
-
// packages/addons/tasks/client/views/commands.cjs
|
|
9009
|
-
var require_commands = __commonJS({
|
|
9010
|
-
"packages/addons/tasks/client/views/commands.cjs"(exports2, module2) {
|
|
9011
|
-
"use strict";
|
|
9012
|
-
module2.exports = function(deps) {
|
|
9013
|
-
var React = deps.React, h = React.createElement;
|
|
9014
|
-
var Disclosure = deps.Disclosure;
|
|
9015
|
-
var Icon2 = deps.Icon, Body = deps.Body, BodyMode = deps.BodyMode;
|
|
9016
|
-
var bodyCopy = deps.bodyCopy || { zh: {}, en: {} };
|
|
9017
|
-
var BODY_DEFAULT = { "ui.bodyMode": "markdown" };
|
|
9018
|
-
var useConfig = deps.useConfig || function() {
|
|
9019
|
-
return { ready: true, values: BODY_DEFAULT };
|
|
9020
|
-
};
|
|
9021
|
-
var COPY = {
|
|
9022
|
-
zh: {
|
|
9023
|
-
title: "\u547D\u4EE4",
|
|
9024
|
-
hint: "\u53EA\u8BFB \xB7 \u6570\u636E\u6765\u81EA tasks.commands",
|
|
9025
|
-
loading: "\u6B63\u5728\u8BFB\u53D6\u547D\u4EE4\u76EE\u5F55\u2026",
|
|
9026
|
-
empty: "\u672C\u63D2\u4EF6\u8FD8\u6CA1\u6709\u6CE8\u518C\u659C\u6760\u547D\u4EE4\u3002",
|
|
9027
|
-
retry: "\u91CD\u8BD5",
|
|
9028
|
-
error: "\u547D\u4EE4\u76EE\u5F55\u52A0\u8F7D\u5931\u8D25",
|
|
9029
|
-
count: function(n) {
|
|
9030
|
-
return n + " \u6761\u547D\u4EE4";
|
|
9031
|
-
},
|
|
9032
|
-
usage: "\u7528\u6CD5",
|
|
9033
|
-
input: "\u8F93\u5165",
|
|
9034
|
-
examples: "\u793A\u4F8B",
|
|
9035
|
-
limit: "\u4E0A\u9650",
|
|
9036
|
-
attachments: "\u652F\u6301\u9644\u4EF6",
|
|
9037
|
-
noAttachments: "\u4E0D\u652F\u6301\u9644\u4EF6",
|
|
9038
|
-
notes: "\u8BF4\u660E",
|
|
9039
|
-
copy: "\u590D\u5236",
|
|
9040
|
-
copied: "\u5DF2\u590D\u5236",
|
|
9041
|
-
chars: function(n) {
|
|
9042
|
-
return "\u6700\u591A " + n + " \u5B57\u7B26";
|
|
9043
|
-
},
|
|
9044
|
-
template: "\u63D0\u793A\u8BCD\u6A21\u677F",
|
|
9045
|
-
templateHint: "\u53EA\u8BFB \xB7 \u9ED8\u8BA4\u6298\u53E0\uFF0C\u5C55\u5F00\u53EF\u770B\u5168\u6587\uFF1B{\u9700\u6C42\u63CF\u8FF0} \u6362\u6210\u4F60\u7684\u539F\u8BDD\uFF0C<sessionId> \u4E3A\u5F53\u524D\u4F1A\u8BDD id",
|
|
9046
|
-
copyTemplate: "\u590D\u5236\u6A21\u677F",
|
|
9047
|
-
bodyModeToggle: bodyCopy.zh.bodyModeToggle || "{field} \xB7 \u5F53\u524D\uFF1A{current}\uFF1B\u5207\u6362\u4E3A{target}",
|
|
9048
|
-
markdown: bodyCopy.zh.markdown || "Markdown \u6E32\u67D3",
|
|
9049
|
-
plainText: bodyCopy.zh.plainText || "\u7EAF\u6587\u672C"
|
|
9050
|
-
},
|
|
9051
|
-
en: {
|
|
9052
|
-
title: "Commands",
|
|
9053
|
-
hint: "Read-only \xB7 from tasks.commands",
|
|
9054
|
-
loading: "Loading command catalog\u2026",
|
|
9055
|
-
empty: "No slash commands registered yet.",
|
|
9056
|
-
retry: "Retry",
|
|
9057
|
-
error: "Failed to load command catalog",
|
|
9058
|
-
count: function(n) {
|
|
9059
|
-
return n + (n === 1 ? " command" : " commands");
|
|
9060
|
-
},
|
|
9061
|
-
usage: "Usage",
|
|
9062
|
-
input: "Input",
|
|
9063
|
-
examples: "Examples",
|
|
9064
|
-
limit: "Limit",
|
|
9065
|
-
attachments: "Attachments allowed",
|
|
9066
|
-
noAttachments: "No attachments",
|
|
9067
|
-
notes: "Notes",
|
|
9068
|
-
copy: "Copy",
|
|
9069
|
-
copied: "Copied",
|
|
9070
|
-
chars: function(n) {
|
|
9071
|
-
return "up to " + n + " characters";
|
|
9072
|
-
},
|
|
9073
|
-
template: "Prompt template",
|
|
9074
|
-
templateHint: "Read-only \xB7 collapsed by default; {requirement} is replaced by your words and <sessionId> by the current session id",
|
|
9075
|
-
copyTemplate: "Copy template",
|
|
9076
|
-
bodyModeToggle: bodyCopy.en.bodyModeToggle || "{field} \xB7 Current: {current}; switch to {target}",
|
|
9077
|
-
markdown: bodyCopy.en.markdown || "Rendered Markdown",
|
|
9078
|
-
plainText: bodyCopy.en.plainText || "Plain text"
|
|
9079
|
-
}
|
|
9080
|
-
};
|
|
9081
|
-
var CSS = String(deps.bodyStyles || "") + [
|
|
9082
|
-
".wbt-cmd{display:flex;flex-direction:column;gap:10px;min-height:0}",
|
|
9083
|
-
".wbt-cmd-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}",
|
|
9084
|
-
".wbt-cmd-hint,.wbt-cmd-count{color:var(--dsw-alias-label-secondary,inherit);font-size:12px}",
|
|
9085
|
-
".wbt-cmd-list{display:flex;flex-direction:column;gap:10px;overflow:auto;min-height:0}",
|
|
9086
|
-
".wbt-cmd-card{border:1px solid var(--wb-border);border-radius:var(--wb-radius-sm);padding:10px 12px;display:flex;flex-direction:column;gap:6px}",
|
|
9087
|
-
".wbt-cmd-name{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
|
|
9088
|
-
".wbt-cmd-name code{font-size:13px}",
|
|
9089
|
-
".wbt-cmd-title{font-weight:600}",
|
|
9090
|
-
".wbt-cmd-badge{border:1px solid var(--wb-border);border-radius:999px;padding:0 8px;font-size:11px;color:var(--dsw-alias-label-secondary,inherit)}",
|
|
9091
|
-
".wbt-cmd-summary,.wbt-cmd-notes{margin:0;line-height:1.55;font-size:12.5px;color:var(--dsw-alias-label-secondary,inherit)}",
|
|
9092
|
-
".wbt-cmd-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}",
|
|
9093
|
-
".wbt-cmd-label{font-size:11.5px;color:var(--dsw-alias-label-secondary,inherit);flex:none}",
|
|
9094
|
-
".wbt-cmd-row code{min-width:0;overflow-wrap:anywhere;background:var(--dsw-alias-bg-layer-1,color-mix(in oklab,currentColor 4%,transparent));padding:2px 6px;border-radius:4px}",
|
|
9095
|
-
".wbt-cmd-examples{margin:0;padding-left:18px;font-size:12.5px;display:flex;flex-direction:column;gap:4px}",
|
|
9096
|
-
".wbt-cmd-examples li{overflow-wrap:anywhere}",
|
|
9097
|
-
".wbt-cmd-empty,.wbt-cmd-error{padding:12px;border:1px dashed var(--wb-border);border-radius:var(--wb-radius-sm);font-size:12.5px}",
|
|
9098
|
-
".wbt-cmd-error{border-style:solid;color:var(--dsw-alias-status-danger,inherit)}",
|
|
9099
|
-
// 折叠头由共享控件 disclosure-styles.cjs 提供,这里只保留面板外框与展开后的纵向排布。
|
|
9100
|
-
".wbt-cmd-template{border-top:1px dashed var(--wb-border);padding-top:8px}",
|
|
9101
|
-
".wbt-cmd-template>.wb-disc-body{display:flex;flex-direction:column;gap:8px}",
|
|
9102
|
-
".wbt-cmd-template-head{padding-left:0;margin:0}",
|
|
9103
|
-
".wbt-cmd-bar{display:inline-flex;align-items:center;gap:6px}",
|
|
9104
|
-
".wbt-cmd-body{max-height:340px;overflow:auto;background:var(--dsw-alias-bg-layer-1,color-mix(in oklab,currentColor 4%,transparent));border-radius:var(--wb-radius-sm);padding:10px}",
|
|
9105
|
-
".wbt-cmd-body .wb-markdown,.wbt-cmd-body .wb-body-text{font-size:11.5px;line-height:1.55}"
|
|
9106
|
-
].join("");
|
|
9107
|
-
function result(r) {
|
|
9108
|
-
if (!r || !r.ok) throw new Error(r && r.error || "Request failed");
|
|
9109
|
-
return r.result || {};
|
|
9110
|
-
}
|
|
9111
|
-
function CopyButton(p) {
|
|
9112
|
-
var s = React.useState(false), done = s[0], setDone = s[1];
|
|
9113
|
-
return h("button", {
|
|
9114
|
-
className: "wbt-btn",
|
|
9115
|
-
type: "button",
|
|
9116
|
-
title: p.t.copy,
|
|
9117
|
-
onClick: function() {
|
|
9118
|
-
var clip = typeof navigator !== "undefined" && navigator.clipboard;
|
|
9119
|
-
var write = clip && typeof clip.writeText === "function" ? clip.writeText(p.text) : Promise.reject(new Error("no clipboard"));
|
|
9120
|
-
write.then(function() {
|
|
9121
|
-
setDone(true);
|
|
9122
|
-
if (typeof p.onCopied === "function") p.onCopied(p.text);
|
|
9123
|
-
if (typeof setTimeout === "function") setTimeout(function() {
|
|
9124
|
-
setDone(false);
|
|
9125
|
-
}, 1200);
|
|
9126
|
-
}).catch(function() {
|
|
9127
|
-
setDone(false);
|
|
9128
|
-
});
|
|
9129
|
-
}
|
|
9130
|
-
}, done ? p.t.copied : p.t.copy);
|
|
9131
|
-
}
|
|
9132
|
-
function TemplateBlock(props) {
|
|
9133
|
-
var c = props.command, t = props.t;
|
|
9134
|
-
var text = typeof c.template === "string" ? c.template : "";
|
|
9135
|
-
var s = React.useState(props.mode === "text" ? "text" : "markdown"), mode = s[0], setMode = s[1];
|
|
9136
|
-
if (!text.trim()) return null;
|
|
9137
|
-
return h(
|
|
9138
|
-
Disclosure,
|
|
9139
|
-
{ className: "wbt-cmd-template", title: t.template },
|
|
9140
|
-
h("span", { className: "wbt-cmd-hint" }, t.templateHint),
|
|
9141
|
-
h(
|
|
9142
|
-
"div",
|
|
9143
|
-
{ className: "wb-body-heading wbt-cmd-template-head" },
|
|
9144
|
-
h("span", { className: "wb-body-label" }, t.template),
|
|
9145
|
-
h(
|
|
9146
|
-
"span",
|
|
9147
|
-
{ className: "wbt-cmd-bar" },
|
|
9148
|
-
h(BodyMode, { label: t.template, mode, onChange: setMode, t, Icon: Icon2 }),
|
|
9149
|
-
h(CopyButton, { t, text, onCopied: props.onCopied })
|
|
9150
|
-
)
|
|
9151
|
-
),
|
|
9152
|
-
h("div", { className: "wbt-cmd-body" }, h(Body, { text, mode }))
|
|
9153
|
-
);
|
|
9154
|
-
}
|
|
9155
|
-
function CommandCard(props) {
|
|
9156
|
-
var c = props.command, t = props.t;
|
|
9157
|
-
var limit = c.limit && c.limit.max ? t.chars(c.limit.max) : "";
|
|
9158
|
-
return h(
|
|
9159
|
-
"article",
|
|
9160
|
-
{ className: "wbt-cmd-card" },
|
|
9161
|
-
h(
|
|
9162
|
-
"div",
|
|
9163
|
-
{ className: "wbt-cmd-name" },
|
|
9164
|
-
h("code", null, "/" + c.name),
|
|
9165
|
-
h("span", { className: "wbt-cmd-title" }, c.title.zh && t === COPY.zh ? c.title.zh : c.title.en || c.title.zh),
|
|
9166
|
-
h("span", { className: "wbt-cmd-badge" }, c.attachments ? t.attachments : t.noAttachments)
|
|
9167
|
-
),
|
|
9168
|
-
h("p", { className: "wbt-cmd-summary" }, t === COPY.zh ? c.summary.zh : c.summary.en),
|
|
9169
|
-
h(
|
|
9170
|
-
"div",
|
|
9171
|
-
{ className: "wbt-cmd-row" },
|
|
9172
|
-
h("span", { className: "wbt-cmd-label" }, t.usage),
|
|
9173
|
-
h("code", null, t === COPY.zh ? c.usage.zh : c.usage.en),
|
|
9174
|
-
h(CopyButton, { t, text: t === COPY.zh ? c.usage.zh : c.usage.en, onCopied: props.onCopied })
|
|
9175
|
-
),
|
|
9176
|
-
h(
|
|
9177
|
-
"div",
|
|
9178
|
-
{ className: "wbt-cmd-row" },
|
|
9179
|
-
h("span", { className: "wbt-cmd-label" }, t.input),
|
|
9180
|
-
h("code", null, t === COPY.zh ? c.inputHint.zh : c.inputHint.en)
|
|
9181
|
-
),
|
|
9182
|
-
c.examples && c.examples.length ? h(
|
|
9183
|
-
"div",
|
|
9184
|
-
{ className: "wbt-cmd-row", style: { alignItems: "flex-start" } },
|
|
9185
|
-
h("span", { className: "wbt-cmd-label" }, t.examples),
|
|
9186
|
-
h("ul", { className: "wbt-cmd-examples" }, c.examples.map(function(text, i) {
|
|
9187
|
-
return h(
|
|
9188
|
-
"li",
|
|
9189
|
-
{ key: i },
|
|
9190
|
-
h("code", null, text),
|
|
9191
|
-
" ",
|
|
9192
|
-
h(CopyButton, { t, text, onCopied: props.onCopied })
|
|
9193
|
-
);
|
|
9194
|
-
}))
|
|
9195
|
-
) : null,
|
|
9196
|
-
limit ? h("div", { className: "wbt-cmd-row" }, h("span", { className: "wbt-cmd-label" }, t.limit), h("span", null, limit)) : null,
|
|
9197
|
-
c.notes && (t === COPY.zh ? c.notes.zh : c.notes.en) ? h("p", { className: "wbt-cmd-notes" }, t === COPY.zh ? c.notes.zh : c.notes.en) : null,
|
|
9198
|
-
h(TemplateBlock, { command: c, t, mode: props.bodyMode, onCopied: props.onCopied })
|
|
9199
|
-
);
|
|
9200
|
-
}
|
|
9201
|
-
function CommandsView(props) {
|
|
9202
|
-
var lang = props.lang === "en" ? "en" : "zh", t = COPY[lang];
|
|
9203
|
-
var api = props.api;
|
|
9204
|
-
var cfg = useConfig(api, BODY_DEFAULT);
|
|
9205
|
-
var bodyMode = cfg.values && cfg.values["ui.bodyMode"] === "text" ? "text" : "markdown";
|
|
9206
|
-
var dataS = React.useState(null), data = dataS[0], setData = dataS[1];
|
|
9207
|
-
var busyS = React.useState(true), busy = busyS[0], setBusy = busyS[1];
|
|
9208
|
-
var errorS = React.useState(""), error = errorS[0], setError = errorS[1];
|
|
9209
|
-
var refreshS = React.useState(0), refresh = refreshS[0], setRefresh = refreshS[1];
|
|
9210
|
-
var toastS = React.useState(""), toast = toastS[0], setToast = toastS[1];
|
|
9211
|
-
React.useEffect(function() {
|
|
9212
|
-
var cancelled = false;
|
|
9213
|
-
setBusy(true);
|
|
9214
|
-
setError("");
|
|
9215
|
-
api.call("tasks.commands", {}).then(result).then(function(r) {
|
|
9216
|
-
if (cancelled) return;
|
|
9217
|
-
setData(Array.isArray(r.commands) ? r.commands : []);
|
|
9218
|
-
setBusy(false);
|
|
9219
|
-
}).catch(function(e) {
|
|
9220
|
-
if (cancelled) return;
|
|
9221
|
-
setBusy(false);
|
|
9222
|
-
setError(String(e && e.message || e));
|
|
9223
|
-
});
|
|
9224
|
-
return function() {
|
|
9225
|
-
cancelled = true;
|
|
9226
|
-
};
|
|
9227
|
-
}, [api, refresh]);
|
|
9228
|
-
var commands = data || [];
|
|
9229
|
-
var ready = !busy && cfg.ready;
|
|
9230
|
-
return h(
|
|
9231
|
-
"div",
|
|
9232
|
-
{ className: "wbt-root wbt-cmd" },
|
|
9233
|
-
h("style", null, CSS),
|
|
9234
|
-
h(
|
|
9235
|
-
"div",
|
|
9236
|
-
{ className: "wbt-cmd-head" },
|
|
9237
|
-
h("strong", null, t.title),
|
|
9238
|
-
h("span", { className: "wbt-cmd-hint" }, t.hint),
|
|
9239
|
-
ready && !error ? h("span", { className: "wbt-cmd-count" }, t.count(commands.length)) : null
|
|
9240
|
-
),
|
|
9241
|
-
!ready && !error ? h("div", { className: "wbt-cmd-empty" }, t.loading) : null,
|
|
9242
|
-
error ? h(
|
|
9243
|
-
"div",
|
|
9244
|
-
{ className: "wbt-cmd-error" },
|
|
9245
|
-
t.error + "\uFF1A" + error,
|
|
9246
|
-
h("button", { className: "wbt-btn", type: "button", onClick: function() {
|
|
9247
|
-
setRefresh(refresh + 1);
|
|
9248
|
-
} }, t.retry)
|
|
9249
|
-
) : null,
|
|
9250
|
-
ready && !error && !commands.length ? h("div", { className: "wbt-cmd-empty" }, t.empty) : null,
|
|
9251
|
-
ready && !error && commands.length ? h("div", { className: "wbt-cmd-list" }, commands.map(function(c) {
|
|
9252
|
-
return h(CommandCard, { key: c.name, command: c, t, bodyMode, onCopied: function(text) {
|
|
9253
|
-
setToast(text);
|
|
9254
|
-
} });
|
|
9255
|
-
})) : null,
|
|
9256
|
-
toast ? h("span", { className: "wbt-cmd-hint", "aria-live": "polite" }, t.copied) : null
|
|
9257
|
-
);
|
|
9258
|
-
}
|
|
9259
|
-
return { CommandsView, CSS };
|
|
9260
|
-
};
|
|
9261
|
-
}
|
|
9262
|
-
});
|
|
9263
|
-
|
|
9264
7119
|
// packages/addons/lib/markdown.cjs
|
|
9265
7120
|
var require_markdown = __commonJS({
|
|
9266
7121
|
"packages/addons/lib/markdown.cjs"(exports2, module2) {
|
|
@@ -9416,10 +7271,14 @@ var require_body_toggle = __commonJS({
|
|
|
9416
7271
|
}
|
|
9417
7272
|
});
|
|
9418
7273
|
|
|
9419
|
-
//
|
|
9420
|
-
var
|
|
9421
|
-
|
|
9422
|
-
|
|
7274
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-2.mjs
|
|
7275
|
+
var code_2_exports = {};
|
|
7276
|
+
__export(code_2_exports, {
|
|
7277
|
+
default: () => CodeXml
|
|
7278
|
+
});
|
|
7279
|
+
var init_code_2 = __esm({
|
|
7280
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-2.mjs"() {
|
|
7281
|
+
init_code_xml();
|
|
9423
7282
|
}
|
|
9424
7283
|
});
|
|
9425
7284
|
|
|
@@ -9453,17 +7312,6 @@ var require_body_styles = __commonJS({
|
|
|
9453
7312
|
}
|
|
9454
7313
|
});
|
|
9455
7314
|
|
|
9456
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-2.mjs
|
|
9457
|
-
var code_2_exports = {};
|
|
9458
|
-
__export(code_2_exports, {
|
|
9459
|
-
default: () => CodeXml
|
|
9460
|
-
});
|
|
9461
|
-
var init_code_2 = __esm({
|
|
9462
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-2.mjs"() {
|
|
9463
|
-
init_code_xml();
|
|
9464
|
-
}
|
|
9465
|
-
});
|
|
9466
|
-
|
|
9467
7315
|
// packages/addons/lib/body-id.cjs
|
|
9468
7316
|
var require_body_id = __commonJS({
|
|
9469
7317
|
"packages/addons/lib/body-id.cjs"(exports2, module2) {
|
|
@@ -9556,6 +7404,16 @@ var require_description = __commonJS({
|
|
|
9556
7404
|
}
|
|
9557
7405
|
});
|
|
9558
7406
|
|
|
7407
|
+
// packages/addons/lib/visual-tokens.cjs
|
|
7408
|
+
var require_visual_tokens = __commonJS({
|
|
7409
|
+
"packages/addons/lib/visual-tokens.cjs"(exports2, module2) {
|
|
7410
|
+
module2.exports = `
|
|
7411
|
+
:where(.wbt-root,.wbi-root,.wbi-cfg,.wbt-data,.wbs-data,.wbg-data,.wbi-data,.wb-desc){--wb-radius-sm:8px;--wb-radius-card:12px;--wb-space-sm:8px;--wb-space-md:14px;--wb-border:var(--dsw-alias-border-l2,color-mix(in oklab,currentColor 16%,transparent));--wb-description-bg:color-mix(in oklab,var(--dsw-alias-brand-primary,#5b7fd6) 7%,transparent);--wb-description-line:color-mix(in oklab,var(--dsw-alias-brand-primary,#5b7fd6) 34%,transparent);--wb-motion:140ms;--wb-btn-bg:transparent;--wb-btn-hover-bg:color-mix(in oklab,currentColor 6%,transparent);--wb-btn-active-bg:color-mix(in oklab,currentColor 11%,transparent);--wb-btn-primary-bg:var(--dsw-alias-brand-primary,#2563eb);--wb-btn-primary-fg:var(--dsw-alias-label-primary-inverted,#fff);--wb-btn-danger-fg:var(--dsw-alias-state-error-primary,#b91c1c);--wb-btn-size-sm:32px;--wb-btn-focus:2px solid var(--dsw-alias-brand-primary,#2563eb);--wb-btn-focus-offset:2px}
|
|
7412
|
+
.wb-desc{background:var(--wb-description-bg);border-left-color:var(--wb-description-line);border-radius:0 var(--wb-radius-sm) var(--wb-radius-sm) 0}
|
|
7413
|
+
`;
|
|
7414
|
+
}
|
|
7415
|
+
});
|
|
7416
|
+
|
|
9559
7417
|
// packages/addons/lib/filter-checklist-styles.cjs
|
|
9560
7418
|
var require_filter_checklist_styles = __commonJS({
|
|
9561
7419
|
"packages/addons/lib/filter-checklist-styles.cjs"(exports2, module2) {
|
|
@@ -9890,6 +7748,29 @@ var require_staged_dialog = __commonJS({
|
|
|
9890
7748
|
}
|
|
9891
7749
|
});
|
|
9892
7750
|
|
|
7751
|
+
// packages/addons/lib/disclosure-styles.cjs
|
|
7752
|
+
var require_disclosure_styles = __commonJS({
|
|
7753
|
+
"packages/addons/lib/disclosure-styles.cjs"(exports2, module2) {
|
|
7754
|
+
"use strict";
|
|
7755
|
+
module2.exports = [
|
|
7756
|
+
".wb-disc{min-width:0;border:0;padding:0;margin:0}",
|
|
7757
|
+
// 原生 details/summary 保留键盘与无障碍语义,这里只接管观感:去掉默认三角并铺满整行。
|
|
7758
|
+
".wb-disc>summary{display:flex;align-items:center;gap:6px;cursor:pointer;font-size:12.5px;font-weight:600;line-height:1.6;color:inherit;user-select:none;list-style:none;padding:2px 8px 2px 2px;margin:-2px -8px -2px -2px;border-radius:7px}",
|
|
7759
|
+
".wb-disc>summary::-webkit-details-marker{display:none}",
|
|
7760
|
+
'.wb-disc>summary::marker{content:""}',
|
|
7761
|
+
".wb-disc>summary:hover{background:color-mix(in oklab,currentColor 6%,transparent)}",
|
|
7762
|
+
".wb-disc>summary:focus-visible{outline:2px solid var(--wb-accent,var(--dsw-alias-brand-primary,Highlight));outline-offset:2px}",
|
|
7763
|
+
".wb-disc-chev{flex:0 0 auto;width:14px;height:14px;transition:transform 160ms ease}",
|
|
7764
|
+
".wb-disc[open]>summary .wb-disc-chev{transform:rotate(90deg)}",
|
|
7765
|
+
".wb-disc-title{min-width:0;overflow-wrap:anywhere}",
|
|
7766
|
+
".wb-disc-meta{font-weight:400;font-size:12px;color:var(--wb-muted,var(--dsw-alias-label-tertiary,GrayText))}",
|
|
7767
|
+
".wb-disc-body{margin-top:8px;min-width:0;animation:wb-disc-in 160ms ease}",
|
|
7768
|
+
"@keyframes wb-disc-in{from{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:none}}",
|
|
7769
|
+
"@media(prefers-reduced-motion:reduce){.wb-disc-chev{transition:none}.wb-disc-body{animation:none}}"
|
|
7770
|
+
].join("\n");
|
|
7771
|
+
}
|
|
7772
|
+
});
|
|
7773
|
+
|
|
9893
7774
|
// packages/addons/tasks/client/ui/styles.cjs
|
|
9894
7775
|
var require_styles = __commonJS({
|
|
9895
7776
|
"packages/addons/tasks/client/ui/styles.cjs"(exports2, module2) {
|
|
@@ -10245,6 +8126,50 @@ var require_inject_css = __commonJS({
|
|
|
10245
8126
|
}
|
|
10246
8127
|
});
|
|
10247
8128
|
|
|
8129
|
+
// packages/addons/lib/highlight.cjs
|
|
8130
|
+
var require_highlight = __commonJS({
|
|
8131
|
+
"packages/addons/lib/highlight.cjs"(exports2, module2) {
|
|
8132
|
+
"use strict";
|
|
8133
|
+
module2.exports = function(React) {
|
|
8134
|
+
var h = React.createElement;
|
|
8135
|
+
function sourceOf(keyword) {
|
|
8136
|
+
var pattern = keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
8137
|
+
return pattern.replace(/[a-zA-Z]/g, function(letter) {
|
|
8138
|
+
return "[" + letter.toLowerCase() + letter.toUpperCase() + "]";
|
|
8139
|
+
});
|
|
8140
|
+
}
|
|
8141
|
+
return function createHighlight(prefix) {
|
|
8142
|
+
var className = String(prefix || "wb") + "-hit";
|
|
8143
|
+
function hit(rawText, rawKeyword) {
|
|
8144
|
+
var text = rawText == null ? "" : String(rawText);
|
|
8145
|
+
var keyword = rawKeyword == null ? "" : String(rawKeyword);
|
|
8146
|
+
if (!keyword) return text;
|
|
8147
|
+
var matcher, match, end = 0, parts = [];
|
|
8148
|
+
try {
|
|
8149
|
+
matcher = new RegExp(sourceOf(keyword), "g");
|
|
8150
|
+
} catch (error) {
|
|
8151
|
+
return text;
|
|
8152
|
+
}
|
|
8153
|
+
while (match = matcher.exec(text)) {
|
|
8154
|
+
if (match.index > end) parts.push(text.slice(end, match.index));
|
|
8155
|
+
parts.push(h("mark", { className, key: match.index }, match[0]));
|
|
8156
|
+
end = match.index + match[0].length;
|
|
8157
|
+
if (!match[0]) matcher.lastIndex += 1;
|
|
8158
|
+
}
|
|
8159
|
+
if (!parts.length) return text;
|
|
8160
|
+
if (end < text.length) parts.push(text.slice(end));
|
|
8161
|
+
return parts;
|
|
8162
|
+
}
|
|
8163
|
+
function Highlight(props) {
|
|
8164
|
+
return hit(props.text, props.keyword);
|
|
8165
|
+
}
|
|
8166
|
+
Highlight.hit = hit;
|
|
8167
|
+
return Highlight;
|
|
8168
|
+
};
|
|
8169
|
+
};
|
|
8170
|
+
}
|
|
8171
|
+
});
|
|
8172
|
+
|
|
10248
8173
|
// packages/addons/tasks/client/ui/highlight.cjs
|
|
10249
8174
|
var require_highlight2 = __commonJS({
|
|
10250
8175
|
"packages/addons/tasks/client/ui/highlight.cjs"(exports2, module2) {
|
|
@@ -10255,6 +8180,13 @@ var require_highlight2 = __commonJS({
|
|
|
10255
8180
|
}
|
|
10256
8181
|
});
|
|
10257
8182
|
|
|
8183
|
+
// packages/addons/tasks/client/ui/body-mode.cjs
|
|
8184
|
+
var require_body_mode = __commonJS({
|
|
8185
|
+
"packages/addons/tasks/client/ui/body-mode.cjs"(exports2, module2) {
|
|
8186
|
+
module2.exports = require_body_toggle();
|
|
8187
|
+
}
|
|
8188
|
+
});
|
|
8189
|
+
|
|
10258
8190
|
// packages/addons/tasks/client/item/task-item.cjs
|
|
10259
8191
|
var require_task_item = __commonJS({
|
|
10260
8192
|
"packages/addons/tasks/client/item/task-item.cjs"(exports2, module2) {
|
|
@@ -10872,6 +8804,37 @@ var require_workspace_select = __commonJS({
|
|
|
10872
8804
|
}
|
|
10873
8805
|
});
|
|
10874
8806
|
|
|
8807
|
+
// packages/addons/lib/disclosure.cjs
|
|
8808
|
+
var require_disclosure = __commonJS({
|
|
8809
|
+
"packages/addons/lib/disclosure.cjs"(exports2, module2) {
|
|
8810
|
+
"use strict";
|
|
8811
|
+
var ChevronRight2 = (init_chevron_right(), __toCommonJS(chevron_right_exports)).default;
|
|
8812
|
+
function createDisclosure(React) {
|
|
8813
|
+
var h = React.createElement;
|
|
8814
|
+
function Disclosure(props) {
|
|
8815
|
+
var attrs = Object.assign({ className: ("wb-disc " + (props.className || "")).trim() }, props.attrs || {});
|
|
8816
|
+
if (props.open !== void 0) attrs.open = !!props.open;
|
|
8817
|
+
else if (props.defaultOpen !== void 0) attrs.open = !!props.defaultOpen;
|
|
8818
|
+
if (props.onToggle) attrs.onToggle = props.onToggle;
|
|
8819
|
+
return h(
|
|
8820
|
+
"details",
|
|
8821
|
+
attrs,
|
|
8822
|
+
h(
|
|
8823
|
+
"summary",
|
|
8824
|
+
null,
|
|
8825
|
+
h(ChevronRight2, { className: "wb-disc-chev", "aria-hidden": true, focusable: false }),
|
|
8826
|
+
h("span", { className: "wb-disc-title" }, props.title),
|
|
8827
|
+
props.meta != null && props.meta !== "" ? h("span", { className: "wb-disc-meta" }, props.meta) : null
|
|
8828
|
+
),
|
|
8829
|
+
h("div", { className: "wb-disc-body" }, props.children)
|
|
8830
|
+
);
|
|
8831
|
+
}
|
|
8832
|
+
return { Disclosure, css: require_disclosure_styles() };
|
|
8833
|
+
}
|
|
8834
|
+
module2.exports = { createDisclosure, css: require_disclosure_styles() };
|
|
8835
|
+
}
|
|
8836
|
+
});
|
|
8837
|
+
|
|
10875
8838
|
// packages/addons/tasks/client/item/difficulty-field.cjs
|
|
10876
8839
|
var require_difficulty_field = __commonJS({
|
|
10877
8840
|
"packages/addons/tasks/client/item/difficulty-field.cjs"(exports2, module2) {
|
|
@@ -14771,8 +12734,6 @@ var require_timeline_view = __commonJS({
|
|
|
14771
12734
|
var WorkspaceFilter = require_workspacefilter();
|
|
14772
12735
|
var statsView = require_stats();
|
|
14773
12736
|
var configView = require_config();
|
|
14774
|
-
var dataView = require_data();
|
|
14775
|
-
var actionSchemaView = require_actions();
|
|
14776
12737
|
var COPY = require_copy();
|
|
14777
12738
|
function hostHasAddon(id) {
|
|
14778
12739
|
var list = host.addons;
|
|
@@ -14791,17 +12752,6 @@ var require_timeline_view = __commonJS({
|
|
|
14791
12752
|
var icons = require_icons2(), ICONS = icons.ICONS, Icon2 = icons.Icon;
|
|
14792
12753
|
var createOverlay = require_overlay();
|
|
14793
12754
|
var workspaceView = require_workspace_view()({ React, Icon: Icon2, createOverlay });
|
|
14794
|
-
var commandsView = require_commands()({
|
|
14795
|
-
React,
|
|
14796
|
-
Icon: Icon2,
|
|
14797
|
-
Body: require_markdown().createBody(React),
|
|
14798
|
-
BodyMode: require_body_mode()(React),
|
|
14799
|
-
bodyStyles: require_body_styles(),
|
|
14800
|
-
bodyCopy: require_body_copy(),
|
|
14801
|
-
useConfig: configView.useConfig,
|
|
14802
|
-
// 折叠面板共享控件:命令页的提示词模板与宿主其它面板保持同一观感。
|
|
14803
|
-
Disclosure: require_disclosure().createDisclosure(React).Disclosure
|
|
14804
|
-
});
|
|
14805
12755
|
function tabIcon(name) {
|
|
14806
12756
|
return function TasksTabIcon() {
|
|
14807
12757
|
return React.createElement(Icon2, { name, size: 14 });
|
|
@@ -15219,7 +13169,7 @@ var require_timeline_view = __commonJS({
|
|
|
15219
13169
|
var TimelineView = require_timeline_view()({ React, COPY, injectCss, statusInfo, configView, CFG_FALLBACK, TaskItem, EditModal, DoneModal, TimelineModal, CreateModal });
|
|
15220
13170
|
host.registerAddon({
|
|
15221
13171
|
id: "wb-addon-tasks",
|
|
15222
|
-
version: "5.5.
|
|
13172
|
+
version: "5.5.5",
|
|
15223
13173
|
icon: ICONS["list-checks"],
|
|
15224
13174
|
// 贡献声明写在 registerAddon 里:卸载任务插件时宿主按 addonId 一起撤销,
|
|
15225
13175
|
// 不会在邮件里留一个渲染即报错的孤儿按钮。
|
|
@@ -15229,10 +13179,7 @@ var require_timeline_view = __commonJS({
|
|
|
15229
13179
|
{ id: "tasks", icon: tabIcon("list"), title: { zh: "\u8BB0\u5F55", en: "Records" }, component: TasksView },
|
|
15230
13180
|
{ id: "timeline", icon: tabIcon("timeline"), title: { zh: "\u65F6\u95F4\u7EBF", en: "Timeline" }, component: TimelineView },
|
|
15231
13181
|
{ id: "workspace", icon: tabIcon("folder"), title: { zh: "\u5DE5\u4F5C\u533A", en: "Workspaces" }, component: workspaceView.WorkspaceView },
|
|
15232
|
-
{ id: "config", icon: tabIcon("settings"), title: { zh: "\u914D\u7F6E", en: "Config" }, component: configView.ConfigView }
|
|
15233
|
-
{ id: "data", icon: tabIcon("database"), title: { zh: "\u6570\u636E", en: "Data" }, component: dataView.DataView },
|
|
15234
|
-
{ id: "commands", icon: tabIcon("terminal"), title: { zh: "\u547D\u4EE4", en: "Commands" }, component: commandsView.CommandsView },
|
|
15235
|
-
{ id: "actions", icon: tabIcon("code-2"), title: { zh: "Action", en: "Actions" }, component: actionSchemaView.ActionSchemaView }
|
|
13182
|
+
{ id: "config", icon: tabIcon("settings"), title: { zh: "\u914D\u7F6E", en: "Config" }, component: configView.ConfigView }
|
|
15236
13183
|
]
|
|
15237
13184
|
});
|
|
15238
13185
|
module.exports = { name: "dsh-workbench-tasks", inject: [], apply: function() {
|