@skspwork/config-doc 2.0.2 → 2.0.4
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/package.json +3 -2
- package/packages/web/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/packages/web/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/packages/web/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/packages/web/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/packages/web/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/packages/web/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/packages/web/.next/standalone/.next/server/app/api/export/route.js.nft.json +1 -1
- package/packages/web/.next/standalone/.next/server/app/index.html +1 -1
- package/packages/web/.next/standalone/.next/server/app/index.rsc +3 -3
- package/packages/web/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/packages/web/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/packages/web/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/packages/web/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/packages/web/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/packages/web/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_d09de205.js +84 -24
- package/packages/web/.next/standalone/.next/server/chunks/ssr/app_page_tsx_55b2e5ee._.js +1 -1
- package/packages/web/.next/standalone/.next/server/pages/404.html +1 -1
- package/packages/web/.next/standalone/.next/static/chunks/9726c2cde77e0916.js +1 -0
- package/packages/web/.next/standalone/.next/static/chunks/cd878566fda12635.css +3 -0
- package/packages/web/.next/standalone/hooks/useConfigManager.ts +72 -52
- package/packages/web/.next/standalone/lib/configManagerUtils.ts +84 -0
- package/packages/web/.next/standalone/lib/configParser.ts +44 -0
- package/packages/web/.next/standalone/lib/htmlGenerator.ts +73 -8
- package/packages/web/.next/standalone/lib/markdownGenerator.ts +58 -13
- package/packages/web/.next/standalone/lib/markdownTableGenerator.ts +31 -28
- package/packages/web/.next/standalone/lib/utils.ts +19 -2
- package/packages/web/.next/standalone/package-lock.json +239 -0
- package/packages/web/.next/standalone/package.json +2 -0
- package/packages/web/.next/standalone/playwright-report/index.html +1 -1
- package/packages/web/.next/static/chunks/9726c2cde77e0916.js +1 -0
- package/packages/web/.next/static/chunks/cd878566fda12635.css +3 -0
- package/packages/web/package.json +2 -0
- package/packages/web/.next/standalone/.next/static/chunks/1747faf69b71cf6d.js +0 -1
- package/packages/web/.next/standalone/.next/static/chunks/4bbca8cd642026de.css +0 -3
- package/packages/web/.next/static/chunks/1747faf69b71cf6d.js +0 -1
- package/packages/web/.next/static/chunks/4bbca8cd642026de.css +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[47482,e=>{"use strict";var t=e.i(47909),
|
|
1
|
+
module.exports=[47482,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),o=e.i(74677),l=e.i(69741),s=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),f=e.i(66012),u=e.i(70101),h=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var b=e.i(220),y=e.i(89171),v=e.i(27637),x=e.i(21127);function w(e){return e.replace(/\|/g,"\\|").replace(/\n/g,"<br>").replace(/\r/g,"")}function C(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function E(e,t){let r=t.split(/(?=\[)|:/),n=e;for(let e of r){if(null==n)return;if(e.startsWith("[")&&e.endsWith("]")){let t=parseInt(e.slice(1,-1),10);if(!Array.isArray(n))return;n=n[t]}else if(e&&"object"==typeof n&&e in n)n=n[e];else if(e)return}return n}class S{fsService;storageService;constructor(e){this.fsService=new v.FileSystemService(e),this.storageService=new x.StorageService(this.fsService)}async generateHtml(){let e=await this.fsService.loadProjectSettings();if(!e||!e.configFiles||0===e.configFiles.length)return this.generateEmptyHtml();let t=e.fields?Object.keys(e.fields):[],r=e.availableTags||[],n=[];for(let t of e.configFiles)try{let e=t.split(/[/\\]/).pop()||"config.json",r=this.storageService.getDocsFileName(t),a=await this.fsService.loadConfigFile(t),i=await this.fsService.loadConfigDocs(r);n.push({filePath:t,fileName:e,configData:a,docs:i||{configFilePath:t,lastModified:new Date().toISOString(),properties:{}}})}catch(e){console.error(`Failed to load config: ${t}`,e)}let a={projectName:e.projectName,createdAt:"",lastModified:new Date().toISOString(),configFiles:[]};return this.generateFullHtml(a,n,t,r)}generateEmptyHtml(){return`<!DOCTYPE html>
|
|
2
2
|
<html lang="ja">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
@@ -17,7 +17,7 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
17
17
|
</main>
|
|
18
18
|
</div>
|
|
19
19
|
</body>
|
|
20
|
-
</html>`}generateFullHtml(e,t){let
|
|
20
|
+
</html>`}generateFullHtml(e,t,r,n){let a=JSON.stringify(t,null,2),i=JSON.stringify(r),o=JSON.stringify(n);return`<!DOCTYPE html>
|
|
21
21
|
<html lang="ja">
|
|
22
22
|
<head>
|
|
23
23
|
<meta charset="UTF-8">
|
|
@@ -51,11 +51,26 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
53
|
<script>
|
|
54
|
-
const configs = ${
|
|
54
|
+
const configs = ${a};
|
|
55
|
+
const fieldKeys = ${i};
|
|
56
|
+
const availableTags = ${o};
|
|
55
57
|
let activeConfigIndex = 0;
|
|
56
58
|
let selectedPath = '';
|
|
57
59
|
let currentSearchQuery = '';
|
|
58
60
|
|
|
61
|
+
// タグをavailableTagsの順序でソート
|
|
62
|
+
function sortTagsByOrder(tags) {
|
|
63
|
+
if (!tags || tags.length === 0) return [];
|
|
64
|
+
return [...tags].sort((a, b) => {
|
|
65
|
+
const indexA = availableTags.indexOf(a);
|
|
66
|
+
const indexB = availableTags.indexOf(b);
|
|
67
|
+
if (indexA !== -1 && indexB !== -1) return indexA - indexB;
|
|
68
|
+
if (indexA === -1) return 1;
|
|
69
|
+
if (indexB === -1) return -1;
|
|
70
|
+
return 0;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
59
74
|
${this.getScripts()}
|
|
60
75
|
</script>
|
|
61
76
|
</body>
|
|
@@ -148,13 +163,15 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
148
163
|
}
|
|
149
164
|
|
|
150
165
|
.config-tab {
|
|
151
|
-
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
gap: 2px;
|
|
169
|
+
padding: 10px 12px;
|
|
152
170
|
background: #f9fafb;
|
|
153
171
|
border: 1px solid #e5e7eb;
|
|
154
172
|
border-radius: 4px;
|
|
155
173
|
cursor: pointer;
|
|
156
174
|
transition: all 0.2s;
|
|
157
|
-
font-size: 0.9rem;
|
|
158
175
|
}
|
|
159
176
|
|
|
160
177
|
.config-tab:hover {
|
|
@@ -167,10 +184,28 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
167
184
|
border-color: #2563eb;
|
|
168
185
|
}
|
|
169
186
|
|
|
187
|
+
.config-tab.active .config-tab-path {
|
|
188
|
+
color: rgba(255, 255, 255, 0.8);
|
|
189
|
+
}
|
|
190
|
+
|
|
170
191
|
.config-tab.hidden {
|
|
171
192
|
display: none;
|
|
172
193
|
}
|
|
173
194
|
|
|
195
|
+
.config-tab-filename {
|
|
196
|
+
font-weight: 500;
|
|
197
|
+
font-size: 0.9rem;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.config-tab-path {
|
|
201
|
+
font-size: 0.75rem;
|
|
202
|
+
color: #9ca3af;
|
|
203
|
+
overflow: hidden;
|
|
204
|
+
text-overflow: ellipsis;
|
|
205
|
+
white-space: nowrap;
|
|
206
|
+
max-width: 100%;
|
|
207
|
+
}
|
|
208
|
+
|
|
174
209
|
.tree-container {
|
|
175
210
|
padding: 10px;
|
|
176
211
|
max-height: 600px;
|
|
@@ -288,6 +323,20 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
288
323
|
border-bottom: 2px solid #e5e7eb;
|
|
289
324
|
}
|
|
290
325
|
|
|
326
|
+
.property-file {
|
|
327
|
+
font-size: 0.85rem;
|
|
328
|
+
color: #6b7280;
|
|
329
|
+
background: #f9fafb;
|
|
330
|
+
padding: 6px 10px;
|
|
331
|
+
border-radius: 4px;
|
|
332
|
+
margin-bottom: 12px;
|
|
333
|
+
font-family: 'Courier New', monospace;
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
text-overflow: ellipsis;
|
|
336
|
+
white-space: nowrap;
|
|
337
|
+
cursor: help;
|
|
338
|
+
}
|
|
339
|
+
|
|
291
340
|
.property-path {
|
|
292
341
|
background: #f3f4f6;
|
|
293
342
|
padding: 10px 15px;
|
|
@@ -506,23 +555,26 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
506
555
|
const doc = config.docs.properties && config.docs.properties[node.path];
|
|
507
556
|
|
|
508
557
|
let html = \`<h2>\${escapeHtml(node.key)}</h2>\`;
|
|
558
|
+
html += \`<div class="property-file" title="\${escapeHtml(config.filePath)}">ファイル: \${escapeHtml(config.filePath)}</div>\`;
|
|
509
559
|
html += \`<div class="property-path">パス: \${escapeHtml(node.path)}</div>\`;
|
|
510
560
|
html += \`<div class="property-value">値: \${escapeHtml(JSON.stringify(node.value, null, 2))}</div>\`;
|
|
511
561
|
|
|
512
562
|
if (doc) {
|
|
513
563
|
if (doc.tags && doc.tags.length > 0) {
|
|
564
|
+
const sortedTags = sortTagsByOrder(doc.tags);
|
|
514
565
|
html += \`<div class="doc-section">
|
|
515
566
|
<h3>タグ</h3>
|
|
516
567
|
<div class="tag-list">\`;
|
|
517
|
-
|
|
568
|
+
sortedTags.forEach(tag => {
|
|
518
569
|
html += \`<span class="tag">\${escapeHtml(tag)}</span>\`;
|
|
519
570
|
});
|
|
520
571
|
html += \`</div>
|
|
521
572
|
</div>\`;
|
|
522
573
|
}
|
|
523
574
|
|
|
524
|
-
//
|
|
525
|
-
|
|
575
|
+
// フィールドをprojectFieldsの順序で表示
|
|
576
|
+
fieldKeys.forEach(label => {
|
|
577
|
+
const value = doc.fields[label];
|
|
526
578
|
if (value) {
|
|
527
579
|
html += \`<div class="doc-section">
|
|
528
580
|
<h3>\${escapeHtml(label)}</h3>
|
|
@@ -566,7 +618,10 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
566
618
|
}
|
|
567
619
|
|
|
568
620
|
tab.className = className;
|
|
569
|
-
tab.
|
|
621
|
+
tab.innerHTML = \`
|
|
622
|
+
<div class="config-tab-filename">\${escapeHtml(config.fileName)}</div>
|
|
623
|
+
<div class="config-tab-path" title="\${escapeHtml(config.filePath)}">\${escapeHtml(config.filePath)}</div>
|
|
624
|
+
\`;
|
|
570
625
|
tab.addEventListener('click', () => {
|
|
571
626
|
activeConfigIndex = index;
|
|
572
627
|
renderConfigTabs(matchedConfigIndexes);
|
|
@@ -578,6 +633,7 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
578
633
|
});
|
|
579
634
|
tabsEl.appendChild(tab);
|
|
580
635
|
});
|
|
636
|
+
|
|
581
637
|
}
|
|
582
638
|
|
|
583
639
|
// 現在の設定を描画
|
|
@@ -716,38 +772,42 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250
|
|
|
716
772
|
renderCurrentConfig();
|
|
717
773
|
setupSearch();
|
|
718
774
|
}
|
|
719
|
-
`}}class
|
|
775
|
+
`}}class A{static flattenConfig(e,t=""){let r={};for(let n in e){let a=t?`${t}:${n}`:n,i=e[n];i&&"object"==typeof i?Array.isArray(i)?i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))?i.forEach((e,t)=>{e&&"object"==typeof e&&!Array.isArray(e)&&Object.assign(r,this.flattenConfig(e,`${a}[${t}]`))}):r[a]=i:Object.assign(r,this.flattenConfig(i,a)):r[a]=i}return r}static getAllPropertyPaths(e,t=""){let r=[];for(let n in e){let a=t?`${t}:${n}`:n,i=e[n];r.push(a),i&&"object"==typeof i&&(Array.isArray(i)?i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))&&i.forEach((e,t)=>{if(e&&"object"==typeof e&&!Array.isArray(e)){let n=`${a}[${t}]`;r.push(n),r.push(...this.getAllPropertyPaths(e,n))}}):r.push(...this.getAllPropertyPaths(i,a)))}return r}static buildTree(e,t=""){let r=[];for(let n in e){let a=t?`${t}:${n}`:n,i=e[n];if(i&&"object"==typeof i)if(Array.isArray(i))if(i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))){let e=[];i.forEach((t,r)=>{t&&"object"==typeof t&&!Array.isArray(t)&&e.push({key:`[${r}]`,fullPath:`${a}[${r}]`,value:t,children:this.buildTree(t,`${a}[${r}]`),hasDocumentation:!1,type:"object"})}),r.push({key:n,fullPath:a,value:i,children:e.length>0?e:void 0,hasDocumentation:!1,type:"array"})}else r.push({key:n,fullPath:a,value:i,hasDocumentation:!1,type:"array"});else r.push({key:n,fullPath:a,value:i,children:this.buildTree(i,a),hasDocumentation:!1,type:"object"});else r.push({key:n,fullPath:a,value:i,hasDocumentation:!1,type:typeof i})}return r}}function P(e,t){return[...e].sort((e,r)=>{let n=t.indexOf(e),a=t.indexOf(r);return -1!==n&&-1!==a?n-a:-1===n?1:-1===a?-1:0})}class ${rootPath;constructor(e){this.rootPath=e}async generateMarkdown(){let e=new v.FileSystemService(this.rootPath),t=new x.StorageService(e),r=await e.loadProjectSettings();if(!r||0===r.configFiles.length)return"# 設定ファイルドキュメント\n\nドキュメント化された設定ファイルがありません。\n";let n=r.fields?Object.keys(r.fields):[],a=r.availableTags||[],i="# 設定ファイルドキュメント\n\n";for(let o of(i+=`プロジェクト: **${r.projectName}**
|
|
720
776
|
|
|
721
777
|
最終更新: ${new Date().toLocaleString("ja-JP")}
|
|
722
778
|
|
|
723
779
|
---
|
|
724
780
|
|
|
725
|
-
`,
|
|
781
|
+
`,r.configFiles)){let r=o.split(/[/\\]/).pop()||"config.json",l=await t.loadAllDocs(o),s=await e.loadConfigFile(o);i+=`## ${r}
|
|
782
|
+
|
|
783
|
+
**ファイルパス:** \`${o}\`
|
|
784
|
+
|
|
785
|
+
`;let c=A.getAllPropertyPaths(s);if(0===c.length){i+="*プロパティがありません。*\n\n";continue}for(let e of(i+="### プロパティ一覧\n\n",c)){let t=l.properties[e],r=E(s,e);if(i+=`#### \`${e}\`
|
|
726
786
|
|
|
727
|
-
|
|
787
|
+
`,null!=r){let e=typeof r,t=Array.isArray(r),n="object"===e&&!t;t?r.length>0&&r.every(e=>"object"!=typeof e||null===e)&&(i+=`**値:** \`${JSON.stringify(r)}\`
|
|
728
788
|
|
|
729
|
-
|
|
789
|
+
`):n||(i+=`**値:** \`${String(r)}\`
|
|
730
790
|
|
|
731
|
-
|
|
791
|
+
`)}if(t){if(t.tags&&t.tags.length>0){let e=P(t.tags,a);i+=`**タグ:** ${e.map(e=>`\`${e}\``).join(", ")}
|
|
732
792
|
|
|
733
|
-
`
|
|
793
|
+
`}if(t.fields)for(let e of n){let r=t.fields[e];r&&(i+=`**${e}:**
|
|
734
794
|
|
|
735
|
-
${
|
|
795
|
+
${r}
|
|
736
796
|
|
|
737
|
-
`)}
|
|
738
|
-
*このドキュメントは
|
|
739
|
-
`}}class
|
|
797
|
+
`)}}else i+="*ドキュメントなし*\n\n";i+="---\n\n"}}return i+`
|
|
798
|
+
*このドキュメントは ConfigDoc により自動生成されました。*
|
|
799
|
+
`}}class T{rootPath;constructor(e){this.rootPath=e}async generateMarkdownTable(){let e=new v.FileSystemService(this.rootPath),t=new x.StorageService(e),r=await e.loadProjectSettings();if(!r||0===r.configFiles.length)return"# 設定ファイルドキュメント\n\nドキュメント化された設定ファイルがありません。\n";let n=r.fields?Object.keys(r.fields):[],a=r.availableTags||[],i="# 設定ファイルドキュメント\n\n";for(let o of(i+=`プロジェクト: **${r.projectName}**
|
|
740
800
|
|
|
741
801
|
最終更新: ${new Date().toLocaleString("ja-JP")}
|
|
742
802
|
|
|
743
803
|
---
|
|
744
804
|
|
|
745
|
-
`,
|
|
805
|
+
`,r.configFiles)){let r=o.split(/[/\\]/).pop()||"config.json",l=await t.loadAllDocs(o),s=await e.loadConfigFile(o);i+=`## ${r}
|
|
746
806
|
|
|
747
|
-
**ファイルパス:** \`${
|
|
807
|
+
**ファイルパス:** \`${o}\`
|
|
748
808
|
|
|
749
|
-
`;let
|
|
750
|
-
*このドキュメントは
|
|
751
|
-
`}getPropertyValue(e,t){var
|
|
809
|
+
`;let c=A.getAllPropertyPaths(s);if(0===c.length){i+="*プロパティがありません。*\n\n";continue}for(let e of(i+="| プロパティ名 | タグ | 値 |",n.forEach(e=>{i+=` ${e} |`}),i+="\n|-------------|------|-----|",n.forEach(()=>{i+="------|"}),i+="\n",c)){let t=l.properties[e],r=w(e),o=t&&t.tags&&t.tags.length>0?P(t.tags,a):[],c=o.length>0?w(o.map(e=>`\`${e}\``).join(", ")):"-",d=w(this.getPropertyValue(s,e));i+=`| ${r} | ${c} | ${d} |`,n.forEach(e=>{let r=t&&t.fields&&t.fields[e]||"-";i+=` ${w(r)} |`}),i+="\n"}i+="\n"}return i+=`
|
|
810
|
+
*このドキュメントは ConfigDoc により自動生成されました。*
|
|
811
|
+
`}getPropertyValue(e,t){var r=E(e,t);if(null==r)return"-";let n=typeof r,a=Array.isArray(r);return a?r.length>0&&r.every(e=>"object"!=typeof e||null===e)?JSON.stringify(r):"-":"object"!==n||a?String(r):"-"}}var k=e.i(10720),j=e.i(14747),D=e.i(24868);async function R(e){try{let t,r,n=(0,k.getRootPath)();try{t=await e.json()}catch{t={}}let{format:a="html"}=t,i=t.fileName?.trim()||"config-doc",o=t.outputDir?.trim()||"";if("markdown"===a){let e=new $(n);r=await e.generateMarkdown()}else if("markdown-table"===a){let e=new T(n);r=await e.generateMarkdownTable()}else{let e=new S(n);r=await e.generateHtml()}let l=`${i}.${"markdown"===a||"markdown-table"===a?"md":"html"}`,s=new v.FileSystemService(n);await s.ensureConfigDocDir();let c=o?j.default.join(n,o,l):j.default.join(n,l),d=j.default.dirname(c);return await D.default.mkdir(d,{recursive:!0}),await D.default.writeFile(c,r,"utf-8"),y.NextResponse.json({success:!0,message:`${"markdown"===a?"Markdown":"HTML"}ファイルを生成しました`,outputPath:c})}catch(e){return console.error("API Error:",e),y.NextResponse.json({success:!1,error:e instanceof Error?e.message:"Unknown error"},{status:500})}}e.s(["POST",()=>R],49588);var N=e.i(49588);let I=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/export/route",pathname:"/api/export",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/export/route.ts",nextConfigOutput:"standalone",userland:N}),{workAsyncStorage:O,workUnitAsyncStorage:H,serverHooks:F}=I;function L(){return(0,n.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:H})}async function M(e,t,n){I.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/export/route";y=y.replace(/\/index$/,"")||"/";let v=await I.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:x,params:w,nextConfig:C,parsedUrl:E,isDraftMode:S,prerenderManifest:A,routerServerContext:P,isOnDemandRevalidate:$,revalidateOnlyGenerated:T,resolvedPathname:k,clientReferenceManifest:j,serverActionsManifest:D}=v,R=(0,l.normalizeAppPath)(y),N=!!(A.dynamicRoutes[R]||A.routes[k]),O=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,E,!1):t.end("This page could not be found"),null);if(N&&!S){let e=!!A.routes[k],t=A.dynamicRoutes[R];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await O();throw new m.NoFallbackError}}let H=null;!N||I.isDev||S||(H="/index"===(H=k)?"/":H);let F=!0===I.isDev||!N,L=N&&!F;D&&j&&(0,o.setManifestsSingleton)({page:y,clientReferenceManifest:j,serverActionsManifest:D});let M=e.method||"GET",q=(0,i.getTracer)(),U=q.getActiveScopeSpan(),_={params:w,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:F,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>I.onRequestError(e,t,n,a,P)},sharedContext:{buildId:x}},z=new s.NodeNextRequest(e),B=new s.NodeNextResponse(t),J=c.NextRequestAdapter.fromNodeNextRequest(z,(0,c.signalFromNodeResponse)(t));try{let o=async e=>I.handle(J,_).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${y}`)}),l=!!(0,a.getRequestMeta)(e,"minimalMode"),s=async a=>{var i,s;let c=async({previousCacheEntry:r})=>{try{if(!l&&$&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(a);e.fetchMetrics=_.renderOpts.fetchMetrics;let s=_.renderOpts.pendingWaitUntil;s&&n.waitUntil&&(n.waitUntil(s),s=void 0);let c=_.renderOpts.collectedTags;if(!N)return await (0,f.sendResponse)(z,B,i,_.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,u.toNodeOutgoingHttpHeaders)(i.headers);c&&(t[g.NEXT_CACHE_TAGS_HEADER]=c),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==_.renderOpts.collectedRevalidate&&!(_.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&_.renderOpts.collectedRevalidate,n=void 0===_.renderOpts.collectedExpire||_.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:_.renderOpts.collectedExpire;return{value:{kind:b.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:$})},!1,P),t}},d=await I.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:$,revalidateOnlyGenerated:T,responseGenerator:c,waitUntil:n.waitUntil,isMinimalMode:l});if(!N)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==b.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(s=d.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});l||t.setHeader("x-nextjs-cache",$?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,u.fromNodeOutgoingHttpHeaders)(d.value.headers);return l&&N||m.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,f.sendResponse)(z,B,new Response(d.value.body,{headers:m,status:d.value.status||200})),null};U?await s(U):await q.withPropagatedContext(e.headers,()=>q.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${y}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},s))}catch(t){if(t instanceof m.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:$})},!1,P),N)throw t;return await (0,f.sendResponse)(z,B,new Response(null,{status:500})),null}}e.s(["handler",()=>M,"patchFetch",()=>L,"routeModule",()=>I,"serverHooks",()=>F,"workAsyncStorage",()=>O,"workUnitAsyncStorage",()=>H],47482)}];
|
|
752
812
|
|
|
753
813
|
//# sourceMappingURL=node_modules_next_dist_esm_build_templates_app-route_d09de205.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[60350,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)},e=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim();var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let g=(0,c.forwardRef)(({color:a="currentColor",size:b=24,strokeWidth:d=2,absoluteStrokeWidth:g,className:h="",children:i,iconNode:j,...k},l)=>(0,c.createElement)("svg",{ref:l,...f,width:b,height:b,stroke:a,strokeWidth:g?24*Number(d)/Number(b):d,className:e("lucide",h),...!i&&!(a=>{for(let b in a)if(b.startsWith("aria-")||"role"===b||"title"===b)return!0})(k)&&{"aria-hidden":"true"},...k},[...j.map(([a,b])=>(0,c.createElement)(a,b)),...Array.isArray(i)?i:[i]])),h=(a,b)=>{let f=(0,c.forwardRef)(({className:f,...h},i)=>(0,c.createElement)(g,{ref:i,iconNode:b,className:e(`lucide-${d(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,f),...h}));return f.displayName=d(a),f},i=h("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),j=h("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);function k({onExportClick:a}){return(0,b.jsx)("header",{className:"bg-white/80 backdrop-blur-md border-b border-gray-200 shadow-sm sticky top-0 z-50",children:(0,b.jsxs)("div",{className:"container mx-auto px-6 py-4 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("img",{src:"/logo.svg",alt:"ConfigDoc",className:"w-12 h-12 rounded-lg"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"ConfigDoc"}),(0,b.jsx)("p",{className:"text-xs text-gray-500",children:"Configuration Documentation Tool"})]})]}),(0,b.jsxs)("button",{onClick:a,className:"flex items-center gap-2 px-5 py-2.5 bg-gradient-to-r from-green-500 to-emerald-600 text-white rounded-lg hover:from-green-600 hover:to-emerald-700 shadow-md hover:shadow-lg transition-all duration-200 transform",title:"エクスポート",children:[(0,b.jsx)(j,{className:"w-5 h-5"}),(0,b.jsx)("span",{className:"font-medium",children:"エクスポート"})]})]})})}let l=h("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),m=h("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function n({loadedConfigs:a,activeConfigIndex:d,onTabClick:e,onRemoveConfig:f,onAddFileClick:g,onReorder:h}){let[i,j]=(0,c.useState)(null),[k,n]=(0,c.useState)(null),o=()=>{n(null)},p=()=>{j(null),n(null)},q=a.map(a=>a.filePath);return(0,b.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 mb-8 hover:shadow-2xl transition-shadow duration-300",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center",children:(0,b.jsx)(l,{className:"w-5 h-5 text-white"})}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"設定ファイル"})]}),(0,b.jsxs)("button",{onClick:g,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-lg hover:from-blue-600 hover:to-blue-700 shadow-md hover:shadow-lg transition-all duration-200 transform",children:[(0,b.jsx)(l,{className:"w-5 h-5"}),(0,b.jsx)("span",{className:"font-medium",children:"ファイルを追加"})]})]}),a.length>0?(0,b.jsx)("div",{className:"flex flex-wrap gap-3",children:a.map((c,g)=>(0,b.jsxs)("div",{draggable:!0,onDragStart:()=>{j(g)},onDragOver:a=>{a.preventDefault(),null!==i&&i!==g&&n(g)},onDragLeave:o,onDrop:()=>(b=>{if(null===i||i===b){j(null),n(null);return}let c=[...a],[e]=c.splice(i,1);c.splice(b,0,e);let f=d;d===i?f=b:i<d&&b>=d?f=d-1:i>d&&b<=d&&(f=d+1),h(c,f),j(null),n(null)})(g),onDragEnd:p,onClick:()=>e(g),className:`group flex items-center gap-2 px-4 py-2.5 rounded-xl border-2 cursor-grab transition-all duration-200 ${d===g?"bg-gradient-to-r from-blue-50 to-indigo-50 border-blue-400 shadow-md":"bg-white border-gray-200 hover:border-blue-300 hover:shadow-md"} ${i===g?"opacity-50":""} ${k===g?"border-blue-500 border-dashed":""}`,children:[(0,b.jsx)("span",{className:`text-sm font-medium ${d===g?"text-blue-700":"text-gray-700"}`,children:function(a,b){let c=a.split(/[/\\]/).pop()||a,d=b.filter(a=>a.split(/[/\\]/).pop()===c);if(1===d.length)return c;let e=a.split(/[/\\]/);for(let b=1;b<e.length;b++){let c=e.slice(-b-1).join("/");if(0===d.filter(d=>c===d.split(/[/\\]/).slice(-b-1).join("/")&&d!==a).length)return c}return a}(c.filePath,q)}),(0,b.jsx)("button",{onClick:a=>{a.stopPropagation(),f(g)},className:"text-gray-400 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:(0,b.jsx)(m,{className:"w-4 h-4"})})]},c.filePath))}):(0,b.jsxs)("div",{className:"text-center py-12 bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl border-2 border-dashed border-gray-300",children:[(0,b.jsx)(l,{className:"w-16 h-16 text-gray-400 mx-auto mb-3"}),(0,b.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"設定ファイルを選択してください"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"「ファイルを追加」ボタンから開始"})]})]})}let o=h("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),p=h("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),q=h("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),r=h("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),s=h("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function t({label:a,items:d,onItemsChange:e,editButtonTitle:f,editModeDescription:g,inputPlaceholder:h,newItemPlaceholder:i,deleteButtonTitle:j,addButtonTitle:k,duplicateErrorMessage:l,onRename:n,children:p}){let[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)([]),[x,y]=(0,c.useState)(""),[z,A]=(0,c.useState)(null),[B,C]=(0,c.useState)(null),D=(0,c.useMemo)(()=>{if(null===z||null===B||z===B)return v.map((a,b)=>({item:a,originalIndex:b}));let a=v.map((a,b)=>({item:a,originalIndex:b})),[b]=a.splice(z,1);return a.splice(B,0,b),a},[v,z,B]),E=()=>{let a=x.trim();a&&!v.some(b=>b.newName===a)&&(w([...v,{originalName:"",newName:a,isNew:!0}]),y(""))},F=()=>{if(null===z||null===B||z===B){A(null),C(null);return}let a=[...v],[b]=a.splice(z,1);a.splice(B,0,b),w(a),A(null),C(null)},G=()=>{A(null),C(null)},H=()=>{let a=v.map(a=>a.newName.trim()).filter(Boolean);return new Set(a).size!==a.length},I=!H()&&!v.some(a=>!a.newName.trim());return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("label",{className:"block text-sm font-semibold text-gray-700",children:a}),!t&&(0,b.jsx)("button",{onClick:()=>{w(d.map(a=>({originalName:a,newName:a,isNew:!1}))),u(!0),y("")},className:"text-gray-500 hover:text-blue-600 transition-colors p-1",title:f,children:(0,b.jsx)(q,{className:"w-4 h-4"})})]}),t?(0,b.jsxs)("div",{className:"space-y-3 p-4 bg-blue-50 rounded-lg border-2 border-blue-200",children:[(0,b.jsxs)("div",{className:"text-xs font-medium text-blue-700 mb-2",children:[g,"(ドラッグで並び替え可能)"]}),(0,b.jsx)("div",{className:"space-y-2",children:D.map(({item:a,originalIndex:c},d)=>{let e=z===c;return(0,b.jsxs)("div",{draggable:!0,onDragStart:()=>{A(c)},onDragOver:a=>{a.preventDefault(),null!==z&&B!==d&&C(d)},onDrop:F,onDragEnd:G,className:`flex items-center gap-2 transition-all ${e?"opacity-50":""}`,children:[(0,b.jsx)("div",{className:"cursor-grab text-gray-400 hover:text-gray-600 p-1",title:"ドラッグして並び替え",children:(0,b.jsx)(s,{className:"w-4 h-4"})}),(0,b.jsx)("input",{type:"text",value:a.newName,onChange:a=>{var b;return b=a.target.value,void w(v.map((a,d)=>d===c?{...a,newName:b}:a))},placeholder:h,className:`flex-1 px-3 py-2 border-2 rounded-lg text-sm focus:ring-2 transition-all duration-200 ${!a.newName.trim()?"border-red-300 focus:border-red-400 focus:ring-red-200":"border-gray-200 focus:border-blue-400 focus:ring-blue-200"}`}),(0,b.jsx)("button",{onClick:()=>{w(v.filter((a,b)=>b!==c))},className:"text-gray-400 hover:text-red-600 transition-colors p-2",title:j,children:(0,b.jsx)(m,{className:"w-4 h-4"})})]},c)})}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-2 border-t border-blue-200",children:[(0,b.jsx)("input",{type:"text",value:x,onChange:a=>y(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),E())},placeholder:i,className:"flex-1 px-3 py-2 border-2 border-gray-200 rounded-lg text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200"}),(0,b.jsx)("button",{onClick:E,disabled:!x.trim()||v.some(a=>a.newName.trim()===x.trim()),className:"px-3 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",title:k,children:(0,b.jsx)(r,{className:"w-4 h-4"})})]}),H()&&(0,b.jsx)("div",{className:"text-xs text-red-600 mt-2",children:l}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-blue-200",children:[(0,b.jsxs)("button",{onClick:()=>{let a=[],b={};for(let c of v){let d=c.newName.trim();d&&(a.push(d),c.isNew||c.originalName===d||(b[c.originalName]=d))}let c=x.trim();c&&!a.includes(c)&&a.push(c),n&&Object.keys(b).length>0&&n(b),e(a),u(!1),w([]),y("")},disabled:!I,className:"flex-1 flex items-center justify-center gap-2 px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed text-sm font-medium",children:[(0,b.jsx)(o,{className:"w-4 h-4"}),"保存"]}),(0,b.jsx)("button",{onClick:()=>{u(!1),w([]),y(""),A(null),C(null)},className:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors text-sm font-medium",children:"キャンセル"})]})]}):p]})}function u({selectedTags:a,availableTags:c,onSelectedTagsChange:d,onAvailableTagsChange:e}){return(0,b.jsx)(t,{label:"タグ",items:c,onItemsChange:b=>{let c=a.filter(a=>b.includes(a));c.length!==a.length&&d(c),e(b)},editButtonTitle:"タグを編集",editModeDescription:"タグの追加・削除・名前変更",inputPlaceholder:"タグ名",newItemPlaceholder:"新しいタグ名を入力",deleteButtonTitle:"タグを削除",addButtonTitle:"タグを追加",duplicateErrorMessage:"同じ名前のタグがあります",onRename:b=>{let c=a.map(a=>b[a]||a);JSON.stringify(c)!==JSON.stringify(a)&&d(c)},children:(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:0===c.length?(0,b.jsx)("div",{className:"text-sm text-gray-500",children:"タグがありません。鉛筆アイコンをクリックして追加してください。"}):c.map(c=>{let e=a.includes(c);return(0,b.jsxs)("button",{onClick:()=>{a.includes(c)?d(a.filter(a=>a!==c)):d([...a,c])},className:`flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all duration-200 ${e?"bg-blue-500 text-white border-blue-600 shadow-md":"bg-white text-gray-700 border-gray-200 hover:border-blue-300 hover:bg-blue-50"}`,children:[e&&(0,b.jsx)(p,{className:"w-3 h-3"}),(0,b.jsx)("span",{children:c})]},c)})})})}function v({fields:a,projectFields:c,onFieldsChange:d,onUpdateProjectFields:e}){let f=Object.keys(c);return(0,b.jsx)(t,{label:"フィールド",items:f,onItemsChange:b=>{let c={};for(let d of b)c[d]=a[d]||"";if(d(c),e){let a={};for(let c of b)a[c]="";e(a)}},editButtonTitle:"フィールドを編集",editModeDescription:"フィールドの追加・削除・名前変更",inputPlaceholder:"フィールド名",newItemPlaceholder:"新しいフィールド名を入力",deleteButtonTitle:"フィールドを削除",addButtonTitle:"フィールドを追加",duplicateErrorMessage:"同じ名前のフィールドがあります",onRename:b=>{let c={};for(let[d,e]of Object.entries(a))c[b[d]||d]=e;d(c)},children:(0,b.jsx)("div",{className:"space-y-3",children:Object.entries(a).map(([c,e])=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:c}),(0,b.jsx)("textarea",{value:e,onChange:b=>{var e;return e=b.target.value,void d({...a,[c]:e})},className:"w-full border-2 border-gray-200 rounded-lg p-3 min-h-[80px] text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200 shadow-sm hover:shadow-md",placeholder:`${c}を入力してください`})]},c))})})}function w({selectedPath:a,editingDoc:c,hasUnsavedChanges:d,availableTags:e,projectFields:f,onEditingDocChange:g,onAvailableTagsChange:h,onProjectFieldsChange:j,onSave:k}){return(0,b.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,b.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-indigo-500 to-indigo-600 rounded-lg flex items-center justify-center",children:(0,b.jsx)(o,{className:"w-5 h-5 text-white"})}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"プロパティ詳細"})]}),a&&c?(0,b.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,b.jsxs)("div",{className:"flex-shrink-0 pb-4 border-b border-gray-200",children:[(0,b.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"パス"}),(0,b.jsx)("div",{className:"text-sm text-gray-700 bg-gradient-to-r from-blue-50 to-indigo-50 p-3 rounded-lg font-mono border border-blue-200 shadow-sm",children:a})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 space-y-6 min-h-0",children:[(0,b.jsx)(u,{selectedTags:c.tags||[],availableTags:e,onSelectedTagsChange:a=>{g({...c,tags:a})},onAvailableTagsChange:h}),(0,b.jsx)(v,{fields:c.fields||{},projectFields:f,onFieldsChange:a=>{g({...c,fields:a})},onUpdateProjectFields:j})]}),(0,b.jsx)("div",{className:"flex-shrink-0 pt-4 border-t border-gray-200",children:(0,b.jsxs)("button",{onClick:k,disabled:!d,className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg shadow-md transition-all duration-200 transform ${d?"bg-gradient-to-r from-green-500 to-emerald-600 text-white hover:from-green-600 hover:to-emerald-700 hover:shadow-lg cursor-pointer":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:[(0,b.jsx)(o,{className:"w-5 h-5"}),(0,b.jsx)("span",{className:"font-medium",children:"保存"})]})})]}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center flex-1",children:[(0,b.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-gray-100 to-gray-200 rounded-full flex items-center justify-center mb-4",children:(0,b.jsx)(i,{className:"w-10 h-10 text-gray-400"})}),(0,b.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"プロパティを選択してください"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"左側のツリーから項目を選択"})]})]})}let x=h("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),y=h("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);class z{static flattenConfig(a,b=""){let c={};for(let d in a){let e=b?`${b}:${d}`:d,f=a[d];f&&"object"==typeof f?Array.isArray(f)?f.some(a=>a&&"object"==typeof a&&!Array.isArray(a))?f.forEach((a,b)=>{a&&"object"==typeof a&&!Array.isArray(a)&&Object.assign(c,this.flattenConfig(a,`${e}[${b}]`))}):c[e]=f:Object.assign(c,this.flattenConfig(f,e)):c[e]=f}return c}static buildTree(a,b=""){let c=[];for(let d in a){let e=b?`${b}:${d}`:d,f=a[d];if(f&&"object"==typeof f)if(Array.isArray(f))if(f.some(a=>a&&"object"==typeof a&&!Array.isArray(a))){let a=[];f.forEach((b,c)=>{b&&"object"==typeof b&&!Array.isArray(b)&&a.push({key:`[${c}]`,fullPath:`${e}[${c}]`,value:b,children:this.buildTree(b,`${e}[${c}]`),hasDocumentation:!1,type:"object"})}),c.push({key:d,fullPath:e,value:f,children:a.length>0?a:void 0,hasDocumentation:!1,type:"array"})}else c.push({key:d,fullPath:e,value:f,hasDocumentation:!1,type:"array"});else c.push({key:d,fullPath:e,value:f,children:this.buildTree(f,e),hasDocumentation:!1,type:"object"});else c.push({key:d,fullPath:e,value:f,hasDocumentation:!1,type:typeof f})}return c}}function A({config:a,docs:d,onSelectProperty:e,onEditProperty:f,selectedPath:g}){let[h,j]=(0,c.useState)(new Set),k=(a,c=0)=>{var l;let m,n=(l=a.fullPath,!!(m=d.properties[l])&&(!!(m.tags&&m.tags.length>0||m.fields&&Object.values(m.fields).some(a=>a&&""!==a.trim()))||!1)),o=h.has(a.fullPath),p=g===a.fullPath;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{paddingLeft:`${20*c}px`},className:`group flex items-center gap-2 py-2 px-3 cursor-pointer rounded-lg transition-all duration-150 ${p?"bg-gradient-to-r from-blue-100 to-indigo-100 border-l-4 border-blue-500 shadow-sm":"hover:bg-gradient-to-r hover:from-gray-50 hover:to-gray-100"}`,children:[a.children&&a.children.length>0?(0,b.jsx)("button",{onClick:()=>{var b;let c;return b=a.fullPath,void((c=new Set(h)).has(b)?c.delete(b):c.add(b),j(c))},className:"p-1 hover:bg-blue-100 rounded-md transition-colors",children:o?(0,b.jsx)(y,{className:"w-4 h-4 text-blue-600"}):(0,b.jsx)(x,{className:"w-4 h-4 text-gray-600"})}):(0,b.jsx)("div",{className:"w-6"}),(0,b.jsxs)("div",{onClick:()=>e(a.fullPath),className:"flex-1 flex items-center gap-2",children:[(0,b.jsx)("span",{className:`${a.children?"font-bold text-gray-800":"font-medium text-gray-700"}`,children:a.key}),!a.children&&(0,b.jsxs)("span",{className:"text-sm text-gray-500 truncate max-w-[200px]",children:[": ",JSON.stringify(a.value)]}),n&&(0,b.jsxs)("div",{className:"flex items-center gap-1 px-2 py-0.5 bg-green-100 border border-green-300 rounded-full",children:[(0,b.jsx)(i,{className:"w-3 h-3 text-green-600"}),(0,b.jsx)("span",{className:"text-xs text-green-700 font-medium",children:"Doc"})]})]}),!a.children&&(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),f(a.fullPath)},className:"p-1 hover:bg-gray-200 rounded",title:"編集"})]}),a.children&&o&&(0,b.jsx)("div",{children:a.children.map(a=>k(a,c+1))})]},a.fullPath)},l=z.buildTree(a);return(0,b.jsxs)("div",{className:"h-full flex flex-col border-2 border-gray-100 rounded-xl bg-white shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 p-3 border-b-2 border-gray-100 bg-gradient-to-r from-gray-50 to-gray-100",children:[(0,b.jsx)("button",{onClick:()=>{var b;let c,d;j(new Set((b=z.buildTree(a),c=[],d=a=>{a.children&&a.children.length>0&&(c.push(a.fullPath),a.children.forEach(d))},b.forEach(d),c)))},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-blue-200 text-blue-600 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて展開"}),(0,b.jsx)("button",{onClick:()=>{j(new Set)},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-gray-200 text-gray-600 rounded-lg hover:bg-gray-50 hover:border-gray-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて閉じる"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-3",children:l.map(a=>k(a))})]})}let B=h("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),C=h("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),D=h("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function E({isOpen:a,currentPath:d,onSelect:e,onClose:f,multiSelect:g=!1,filterJsonOnly:h=!1,folderSelectMode:i=!1,title:j}){let[k,l]=(0,c.useState)(d),[m,n]=(0,c.useState)([]),[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)([]);(0,c.useEffect)(()=>{a&&(l(d),r([]))},[a,d]),(0,c.useEffect)(()=>{a&&s(k)},[a,k]);let s=async a=>{p(!0);try{let b=await fetch("/api/files/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({directory:a})}),c=await b.json();if(c.success){let a=c.data.items;i?a=c.data.items.filter(a=>"directory"===a.type):h&&(a=c.data.items.filter(a=>"directory"===a.type||".json"===a.extension)),n(a)}else console.error("API returned error:",c.error)}catch(a){console.error("Failed to load directory:",a)}finally{p(!1)}},t=()=>k.replace(/\\/g,"/").toLowerCase()!==d.replace(/\\/g,"/").toLowerCase(),u=()=>{r([]),f()};return a?(0,b.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,b.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:j||(i?"フォルダを選択":"ファイルを選択")}),(0,b.jsx)("button",{onClick:u,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b bg-gray-50",children:[(0,b.jsx)("button",{onClick:()=>{if(!t())return;let a=k.replace(/\\/g,"/"),b=a.split("/").filter(a=>a);if(b.length>1){let c,e=b.slice(0,-1),f=(c=1===e.length&&e[0].includes(":")?e[0]+"/":e[0].includes(":")?e[0]+"/"+e.slice(1).join("/"):a.startsWith("/")?"/"+e.join("/"):e.join("/")).replace(/\\/g,"/").toLowerCase(),g=d.replace(/\\/g,"/").toLowerCase();(f.startsWith(g)||f===g)&&l(c)}else if(1===b.length&&!b[0].includes(":")){if("."===d.replace(/\\/g,"/").toLowerCase())return;l(".")}},disabled:!t(),className:`p-2 rounded flex-shrink-0 ${t()?"hover:bg-gray-200":"opacity-50 cursor-not-allowed"}`,title:t()?"上のディレクトリへ":"ルートディレクトリです",children:(0,b.jsx)(D,{className:"w-5 h-5"})}),(0,b.jsxs)("span",{className:"text-sm text-gray-600 flex-1 truncate",children:["パス: ",k]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:o?(0,b.jsx)("div",{className:"text-center text-gray-500",children:"読み込み中..."}):(0,b.jsx)("div",{className:"space-y-1",children:m.map(a=>{let c=q.includes(a.path);return(0,b.jsxs)("div",{onClick:()=>{"directory"===a.type?i?r([a.path]):l(a.path):g?r(b=>b.includes(a.path)?b.filter(b=>b!==a.path):[...b,a.path]):r([a.path])},onDoubleClick:()=>{"directory"===a.type&&(l(a.path),r([]))},className:`flex items-center gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 ${c?"bg-blue-100":""}`,children:["directory"===a.type?(0,b.jsx)(B,{className:"w-5 h-5 text-blue-500"}):(0,b.jsx)(C,{className:"w-5 h-5 text-green-500"}),(0,b.jsx)("span",{className:"text-sm",children:a.name}),c&&(g||i)&&(0,b.jsx)("span",{className:"ml-auto text-blue-500",children:"✓"})]},a.path)})})}),(0,b.jsxs)("div",{className:"flex items-center justify-between p-4 border-t",children:[i?(0,b.jsx)("div",{className:"text-sm text-gray-600",children:q.length>0?`選択中: ${q[0].split(/[/\\]/).pop()}`:`現在のフォルダ: ${k.split(/[/\\]/).pop()||k}`}):g&&q.length>0?(0,b.jsxs)("div",{className:"text-sm text-gray-600",children:[q.length,"件選択中"]}):null,(0,b.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,b.jsx)("button",{onClick:u,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded",children:"キャンセル"}),(0,b.jsx)("button",{onClick:()=>{i?(e(q.length>0?q:[k]),r([]),f()):q.length>0&&(e(q),r([]),f())},disabled:!i&&0===q.length,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:bg-gray-300 disabled:cursor-not-allowed",children:"選択"})]})]})]})}):null}let F={format:"html",autoExport:!0,fileName:"config-doc",outputDir:".config_doc/output"};function G({isOpen:a,onClose:d,onExport:e,currentSettings:f,rootPath:g="."}){let[h,i]=(0,c.useState)(f||F),[k,l]=(0,c.useState)(!1),[n,o]=(0,c.useState)(!1);(0,c.useEffect)(()=>{f&&i(f)},[f]);let p=(0,c.useMemo)(()=>{let a=g.replace(/\//g,"\\"),b=h.outputDir?.trim()||"",c=h.fileName||"config-doc",d="markdown"===h.format||"markdown-table"===h.format?"md":"html";if(b){let e=b.replace(/\//g,"\\");return`${a}\\${e}\\${c}.${d}`}return`${a}\\${c}.${d}`},[h.format,h.fileName,h.outputDir,g]);if(!a)return null;let q=async()=>{l(!0);try{await e(h),d()}catch(a){console.error("Export failed:",a)}finally{l(!1)}};return(0,b.jsxs)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:[(0,b.jsxs)("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:"エクスポート設定"}),(0,b.jsx)("button",{onClick:d,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,b.jsx)(m,{className:"w-5 h-5"})})]}),(0,b.jsxs)("div",{className:"p-6 space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先フォルダ"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:h.outputDir||"",onChange:a=>i({...h,outputDir:a.target.value}),className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"(空欄でプロジェクトルート)"}),(0,b.jsx)("button",{type:"button",onClick:()=>o(!0),className:"px-3 py-2 border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500",title:"フォルダを選択",children:(0,b.jsx)(B,{className:"w-5 h-5 text-gray-500"})})]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"相対パスを入力またはフォルダを選択(空欄でプロジェクトルート、チーム共有設定)"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"ファイル名"}),(0,b.jsx)("input",{type:"text",value:h.fileName??"",onChange:a=>i({...h,fileName:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"config-doc"}),(0,b.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"拡張子なしのファイル名を指定します(空欄でconfig-doc、チーム共有設定)"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力形式"}),(0,b.jsxs)("select",{value:h.format,onChange:a=>i({...h,format:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(0,b.jsx)("option",{value:"html",children:"HTML"}),(0,b.jsx)("option",{value:"markdown",children:"Markdown"}),(0,b.jsx)("option",{value:"markdown-table",children:"Markdown (テーブル形式)"})]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"html"===h.format?"スタイル付きのHTMLファイルとして出力します":"markdown-table"===h.format?"Markdownテーブル形式で出力します(プロパティ名、説明、値、備考)":"テキストベースのMarkdownファイルとして出力します"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先パス"}),(0,b.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md text-sm text-gray-700 font-mono break-all",children:p})]}),(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)("div",{className:"flex items-center h-5",children:(0,b.jsx)("input",{id:"auto-export",type:"checkbox",checked:h.autoExport,onChange:a=>i({...h,autoExport:a.target.checked}),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"})}),(0,b.jsxs)("div",{className:"ml-3",children:[(0,b.jsx)("label",{htmlFor:"auto-export",className:"text-sm font-medium text-gray-700 cursor-pointer",children:"保存時に自動エクスポート"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"ドキュメントを保存したときに自動的にHTMLファイルを更新します"})]})]}),h.lastExportedAt&&(0,b.jsx)("div",{className:"pt-4 border-t",children:(0,b.jsxs)("p",{className:"text-xs text-gray-500",children:["最終エクスポート: ",new Date(h.lastExportedAt).toLocaleString("ja-JP")]})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-3 p-6 border-t bg-gray-50 rounded-b-lg",children:[(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"キャンセル"}),(0,b.jsxs)("button",{onClick:q,disabled:k,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,b.jsx)(j,{className:"w-4 h-4"}),k?"エクスポート中...":"エクスポート"]})]})]}),(0,b.jsx)(E,{isOpen:n,currentPath:g,onSelect:a=>{if(a.length>0){let b=a[0],c=g.replace(/\\/g,"/"),d=b.replace(/\\/g,"/"),e=d;d.startsWith(c)&&(e=d.slice(c.length)).startsWith("/")&&(e=e.slice(1)),e||(e="."),i({...h,outputDir:e})}o(!1)},onClose:()=>o(!1),folderSelectMode:!0,title:"出力先フォルダを選択"})]})}let H=h("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),I=h("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),J=h("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);function K({message:a,type:d,duration:e=3e3,onClose:f}){let[g,h]=(0,c.useState)(!1);(0,c.useEffect)(()=>{setTimeout(()=>h(!0),10);let a=setTimeout(()=>{h(!1),setTimeout(f,300)},e);return()=>clearTimeout(a)},[e,f]);let i={success:(0,b.jsx)(H,{className:"w-5 h-5 text-green-500"}),error:(0,b.jsx)(I,{className:"w-5 h-5 text-red-500"}),warning:(0,b.jsx)(J,{className:"w-5 h-5 text-yellow-500"})};return(0,b.jsx)("div",{className:`fixed bottom-4 left-4 z-50 transition-all duration-300 ${g?"opacity-100 translate-y-0":"opacity-0 translate-y-2"}`,children:(0,b.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg border ${{success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",warning:"bg-yellow-50 border-yellow-200"}[d]} min-w-[300px] max-w-[500px]`,children:[i[d],(0,b.jsx)("span",{className:"flex-1 text-sm text-gray-800",children:a}),(0,b.jsx)("button",{onClick:()=>{h(!1),setTimeout(f,300)},className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,b.jsx)(m,{className:"w-4 h-4"})})]})})}function L({toasts:a,onRemove:c}){return(0,b.jsx)(b.Fragment,{children:a.map((a,d)=>(0,b.jsx)("div",{style:{bottom:`${16+80*d}px`},className:"fixed left-4 z-50",children:(0,b.jsx)(K,{message:a.message,type:a.type,onClose:()=>c(a.id)})},a.id))})}let M={説明:""};function N(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)(!1),{loadedConfigs:g,activeConfigIndex:h,activeConfig:j,selectedPath:l,editingDoc:m,originalDoc:o,hasUnsavedChanges:p,exportSettings:q,availableTags:r,projectFields:s,toasts:t,rootPath:u,setActiveConfigIndex:v,setEditingDoc:x,setHasUnsavedChanges:y,removeToast:z,handleSelectConfigFiles:B,handleRemoveConfig:C,handleReorderConfigs:D,handleSelectProperty:F,handleSaveProperty:H,handleExport:I,handleAvailableTagsChange:J,handleProjectFieldsChange:K,checkForChanges:N,resetSelection:O}=function(){let[a,b]=(0,c.useState)([]),[d,e]=(0,c.useState)(0),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)("."),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(),[t,u]=(0,c.useState)(["required","nullable","string","number","boolean"]),[v,w]=(0,c.useState)(M),[x,y]=(0,c.useState)([]),z=a[d],A=(0,c.useCallback)((a,b="success")=>{let c=Date.now().toString();y(d=>[...d,{id:c,message:a,type:b}])},[]),B=(0,c.useCallback)(a=>{y(b=>b.filter(b=>b.id!==a))},[]),C=(0,c.useCallback)((a,b)=>{if(!a||!b)return!1;let c=a.tags||[],d=b.tags||[];if(c.length!==d.length||c.some((a,b)=>a!==d[b]))return!0;let e=a.fields||{},f=b.fields||{};for(let a of new Set([...Object.keys(e),...Object.keys(f)]))if((e[a]||"")!==(f[a]||""))return!0;return!1},[]),D=(0,c.useCallback)((a,b)=>{let c=a.replace(/\\/g,"/"),d=b.replace(/\\/g,"/");if(!c.match(/^[a-zA-Z]:\//)&&!c.startsWith("/"))return a;if(c.startsWith(d)){let a=c.substring(d.length);return a.startsWith("/")?a.substring(1):a}return a},[]),E=(0,c.useCallback)(a=>{let b={};for(let c of Object.keys(v))b[c]=a.fields[c]||"";return{...a,fields:b}},[v]),F=(0,c.useCallback)(async a=>{try{let c=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:a})}),d=await c.json();d.success&&b(b=>b.some(b=>b.filePath===a)?b:[...b,{filePath:a,configData:d.data.configData,docs:d.data.docs}])}catch(a){console.error("Failed to load config file:",a)}},[]),G=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePaths:a})}),c=await b.json();c.deletedDocsFiles&&c.deletedDocsFiles.length>0&&A(`${c.deletedDocsFiles.length}件のドキュメントファイルを削除しました`,"warning")}catch(a){console.error("Failed to update metadata:",a)}},[A]),H=(0,c.useCallback)(async()=>{if(r)try{if((await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:r.format,fileName:r.fileName,outputDir:r.outputDir})})).ok){let a={...r,lastExportedAt:new Date().toISOString()};s(a),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:a})})}}catch(a){console.error("Auto export failed:",a)}},[r]);(0,c.useEffect)(()=>{(async()=>{try{let a=await fetch("/api/project"),b=await a.json();if(b.success&&(k(b.data.rootPath),b.data.hasConfigDoc)){let a=await fetch("/api/config/metadata"),b=await a.json();if(b.success&&b.data?.configFiles)for(let a of b.data.configFiles)await F(a.filePath);b.success&&b.data?.availableTags&&u(b.data.availableTags),b.success&&b.data?.fields&&w(b.data.fields)}let c=await fetch("/api/export/settings"),d=await c.json();d.success&&s(d.data)}catch(a){console.error("Failed to load saved configs:",a)}finally{i(!0)}})()},[F]);let I=(0,c.useCallback)(async c=>{let d=[];for(let b of c){let c=D(b,j);if(!a.some(a=>a.filePath===c))try{let a=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:b})}),e=await a.json();e.success?d.push({filePath:c,configData:e.data.configData,docs:e.data.docs}):A(`設定ファイルの読み込みに失敗しました (${b}): ${e.error}`,"error")}catch(a){console.error("Failed to load config:",a),A(`設定ファイルの読み込み中にエラーが発生しました: ${b}`,"error")}}d.length>0&&b(a=>{let b=[...a,...d];return G(b.map(a=>a.filePath)),b})},[a,j,A,D,G]),J=(0,c.useCallback)(async c=>{let f=a[c];(!f.docs||!(Object.keys(f.docs.properties).length>0)||confirm("既に説明文が設定されていますが、削除してよろしいですか?"))&&(b(a=>{let b=a.filter((a,b)=>b!==c);return G(b.map(a=>a.filePath)),b}),d>=c&&d>0&&e(d-1),g(""),m(null),q(!1))},[d,a,G]),K=(0,c.useCallback)((a,c)=>{b(a),e(c),G(a.map(a=>a.filePath))},[G]),L=(0,c.useCallback)(a=>{if(p&&!confirm("保存されていない変更があります。破棄しますか?"))return;g(a);let b=z?.docs.properties[a];if(b){let a=E({...b,tags:b.tags||[]});m(a),o(a)}else{let b={path:a,tags:[],fields:{...v},modifiedAt:new Date().toISOString()};m(b),o(b)}q(!1)},[z,p,E,v]),N=(0,c.useCallback)(async()=>{if(l&&z)try{let a={...l,modifiedAt:new Date().toISOString()},c=await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:z.filePath,propertyPath:f,propertyDoc:a})}),e=await c.json();e.success?(b(b=>b.map((b,c)=>c===d?{...b,docs:{...b.docs,properties:{...b.docs.properties,[f]:a}}}:b)),m(a),o(a),q(!1),A("保存しました"),r?.autoExport&&await H()):A("保存に失敗しました: "+e.error,"error")}catch(a){console.error("Failed to save:",a),A("保存中にエラーが発生しました","error")}},[z,d,l,r?.autoExport,H,f,A]),O=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:a.format,fileName:a.fileName,outputDir:a.outputDir})}),c=await b.json();if(c.success){let b={...a,lastExportedAt:new Date().toISOString()};s(b),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:b})}),A(`エクスポートしました: ${c.outputPath}`)}else A("エクスポートに失敗しました: "+c.error,"error")}catch(a){console.error("Export failed:",a),A("エクスポート中にエラーが発生しました","error")}},[A]),P=(0,c.useCallback)(async c=>{let d=t.filter(a=>!c.includes(a));if(u(c),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({availableTags:c})}),d.length>0){for(let c of a){let a=!1,e={...c.docs.properties};for(let[b,c]of Object.entries(e))if(c.tags&&c.tags.length>0){let f=c.tags.filter(a=>!d.includes(a));f.length!==c.tags.length&&(e[b]={...c,tags:f},a=!0)}a&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:c.filePath,properties:e})}),b(a=>a.map(a=>a.filePath===c.filePath?{...a,docs:{...a.docs,properties:e}}:a)))}if(l&&l.tags){let a=l.tags.filter(a=>!d.includes(a));if(a.length!==l.tags.length&&(m({...l,tags:a}),n)){let a=(n.tags||[]).filter(a=>!d.includes(a));o({...n,tags:a})}}}},[t,l,a,n]),Q=(0,c.useCallback)(async c=>{let d=Object.keys(v),e=Object.keys(c),f=d.filter(a=>!e.includes(a));if(w(c),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fields:c})}),f.length>0)for(let c of a){let a=!1,d={...c.docs.properties};for(let[b,c]of Object.entries(d))if(c.fields){let e={...c.fields},g=!1;for(let a of f)a in e&&(delete e[a],g=!0);g&&(d[b]={...c,fields:e},a=!0)}a&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:c.filePath,properties:d})}),b(a=>a.map(a=>a.filePath===c.filePath?{...a,docs:{...a.docs,properties:d}}:a)))}if(n){let a={};for(let b of e)a[b]=n.fields?.[b]||"";o({...n,fields:a})}if(l){let a={};for(let b of e)a[b]=l.fields?.[b]||"";let b={...l,fields:a};m(b),q(C(b,n?{...n,fields:Object.fromEntries(e.map(a=>[a,n.fields?.[a]||""]))}:null))}},[C,l,a,n,v]),R=(0,c.useCallback)(()=>{g(""),m(null),q(!1)},[]);return{loadedConfigs:a,activeConfigIndex:d,activeConfig:z,selectedPath:f,editingDoc:l,originalDoc:n,hasUnsavedChanges:p,exportSettings:r,availableTags:t,projectFields:v,toasts:x,rootPath:j,isInitialized:h,setActiveConfigIndex:e,setSelectedPath:g,setEditingDoc:m,setHasUnsavedChanges:q,showToast:A,removeToast:B,loadConfigFile:F,handleSelectConfigFiles:I,handleRemoveConfig:J,handleReorderConfigs:K,handleSelectProperty:L,handleSaveProperty:N,handleExport:O,handleAvailableTagsChange:P,handleProjectFieldsChange:Q,checkForChanges:C,resetSelection:R}}();return(0,b.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50",children:[(0,b.jsx)(k,{onExportClick:()=>f(!0)}),(0,b.jsxs)("main",{className:"container mx-auto px-6 py-8",children:[(0,b.jsx)(n,{loadedConfigs:g,activeConfigIndex:h,onTabClick:a=>{v(a),O()},onRemoveConfig:C,onAddFileClick:()=>d(!0),onReorder:D}),j&&(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,b.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-purple-500 to-purple-600 rounded-lg flex items-center justify-center",children:(0,b.jsx)(i,{className:"w-5 h-5 text-white"})}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"JSON構造"})]}),(0,b.jsx)("div",{className:"overflow-y-auto flex-1",children:(0,b.jsx)(A,{config:j.configData,docs:j.docs,onSelectProperty:F,onEditProperty:F,selectedPath:l})})]}),(0,b.jsx)(w,{selectedPath:l,editingDoc:m,hasUnsavedChanges:p,availableTags:r,projectFields:s,onEditingDocChange:a=>{x(a),y(N(a,o))},onAvailableTagsChange:J,onProjectFieldsChange:K,onSave:H})]})]}),(0,b.jsx)(E,{isOpen:a,currentPath:u,multiSelect:!0,filterJsonOnly:!0,onSelect:a=>{B(a),d(!1)},onClose:()=>d(!1)}),(0,b.jsx)(G,{isOpen:e,onClose:()=>f(!1),onExport:I,currentSettings:q,rootPath:u}),(0,b.jsx)(L,{toasts:t,onRemove:z})]})}a.s(["default",()=>N],60350)}];
|
|
1
|
+
module.exports=[60350,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)},e=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim();var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let g=(0,c.forwardRef)(({color:a="currentColor",size:b=24,strokeWidth:d=2,absoluteStrokeWidth:g,className:h="",children:i,iconNode:j,...k},l)=>(0,c.createElement)("svg",{ref:l,...f,width:b,height:b,stroke:a,strokeWidth:g?24*Number(d)/Number(b):d,className:e("lucide",h),...!i&&!(a=>{for(let b in a)if(b.startsWith("aria-")||"role"===b||"title"===b)return!0})(k)&&{"aria-hidden":"true"},...k},[...j.map(([a,b])=>(0,c.createElement)(a,b)),...Array.isArray(i)?i:[i]])),h=(a,b)=>{let f=(0,c.forwardRef)(({className:f,...h},i)=>(0,c.createElement)(g,{ref:i,iconNode:b,className:e(`lucide-${d(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,f),...h}));return f.displayName=d(a),f},i=h("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),j=h("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);function k({onExportClick:a}){return(0,b.jsx)("header",{className:"bg-white/80 backdrop-blur-md border-b border-gray-200 shadow-sm sticky top-0 z-50",children:(0,b.jsxs)("div",{className:"container mx-auto px-6 py-4 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("img",{src:"/logo.svg",alt:"ConfigDoc",className:"w-12 h-12 rounded-lg"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"ConfigDoc"}),(0,b.jsx)("p",{className:"text-xs text-gray-500",children:"Configuration Documentation Tool"})]})]}),(0,b.jsxs)("button",{onClick:a,className:"flex items-center gap-2 px-5 py-2.5 bg-gradient-to-r from-green-500 to-emerald-600 text-white rounded-lg hover:from-green-600 hover:to-emerald-700 shadow-md hover:shadow-lg transition-all duration-200 transform",title:"エクスポート",children:[(0,b.jsx)(j,{className:"w-5 h-5"}),(0,b.jsx)("span",{className:"font-medium",children:"エクスポート"})]})]})})}let l=h("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),m=h("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function n({loadedConfigs:a,activeConfigIndex:d,onTabClick:e,onRemoveConfig:f,onAddFileClick:g,onReorder:h}){let[i,j]=(0,c.useState)(null),[k,n]=(0,c.useState)(null),o=()=>{n(null)},p=()=>{j(null),n(null)},q=a.map(a=>a.filePath);return(0,b.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 mb-8 hover:shadow-2xl transition-shadow duration-300",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center",children:(0,b.jsx)(l,{className:"w-5 h-5 text-white"})}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"設定ファイル"})]}),(0,b.jsxs)("button",{onClick:g,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-lg hover:from-blue-600 hover:to-blue-700 shadow-md hover:shadow-lg transition-all duration-200 transform",children:[(0,b.jsx)(l,{className:"w-5 h-5"}),(0,b.jsx)("span",{className:"font-medium",children:"ファイルを追加"})]})]}),a.length>0?(0,b.jsx)("div",{className:"flex flex-wrap gap-3",children:a.map((c,g)=>(0,b.jsxs)("div",{draggable:!0,onDragStart:()=>{j(g)},onDragOver:a=>{a.preventDefault(),null!==i&&i!==g&&n(g)},onDragLeave:o,onDrop:()=>(b=>{if(null===i||i===b){j(null),n(null);return}let c=[...a],[e]=c.splice(i,1);c.splice(b,0,e);let f=d;d===i?f=b:i<d&&b>=d?f=d-1:i>d&&b<=d&&(f=d+1),h(c,f),j(null),n(null)})(g),onDragEnd:p,onClick:()=>e(g),className:`group flex items-center gap-2 px-4 py-2.5 rounded-xl border-2 cursor-grab transition-all duration-200 ${d===g?"bg-gradient-to-r from-blue-50 to-indigo-50 border-blue-400 shadow-md":"bg-white border-gray-200 hover:border-blue-300 hover:shadow-md"} ${i===g?"opacity-50":""} ${k===g?"border-blue-500 border-dashed":""}`,children:[(0,b.jsx)("span",{className:`text-sm font-medium ${d===g?"text-blue-700":"text-gray-700"}`,children:function(a,b){let c=a.split(/[/\\]/).pop()||a,d=b.filter(a=>a.split(/[/\\]/).pop()===c);if(1===d.length)return c;let e=a.split(/[/\\]/);for(let b=1;b<e.length;b++){let c=e.slice(-b-1).join("/");if(0===d.filter(d=>c===d.split(/[/\\]/).slice(-b-1).join("/")&&d!==a).length)return c}return a}(c.filePath,q)}),(0,b.jsx)("button",{onClick:a=>{a.stopPropagation(),f(g)},className:"text-gray-400 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:(0,b.jsx)(m,{className:"w-4 h-4"})})]},c.filePath))}):(0,b.jsxs)("div",{className:"text-center py-12 bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl border-2 border-dashed border-gray-300",children:[(0,b.jsx)(l,{className:"w-16 h-16 text-gray-400 mx-auto mb-3"}),(0,b.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"設定ファイルを選択してください"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"「ファイルを追加」ボタンから開始"})]})]})}let o=h("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),p=h("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),q=h("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),r=h("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),s=h("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function t({label:a,items:d,onItemsChange:e,editButtonTitle:f,editModeDescription:g,inputPlaceholder:h,newItemPlaceholder:i,deleteButtonTitle:j,addButtonTitle:k,duplicateErrorMessage:l,onRename:n,children:p}){let[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)([]),[x,y]=(0,c.useState)(""),[z,A]=(0,c.useState)(null),[B,C]=(0,c.useState)(null),D=(0,c.useMemo)(()=>{if(null===z||null===B||z===B)return v.map((a,b)=>({item:a,originalIndex:b}));let a=v.map((a,b)=>({item:a,originalIndex:b})),[b]=a.splice(z,1);return a.splice(B,0,b),a},[v,z,B]),E=()=>{let a=x.trim();a&&!v.some(b=>b.newName===a)&&(w([...v,{originalName:"",newName:a,isNew:!0}]),y(""))},F=()=>{if(null===z||null===B||z===B){A(null),C(null);return}let a=[...v],[b]=a.splice(z,1);a.splice(B,0,b),w(a),A(null),C(null)},G=()=>{A(null),C(null)},H=()=>{let a=v.map(a=>a.newName.trim()).filter(Boolean);return new Set(a).size!==a.length},I=!H()&&!v.some(a=>!a.newName.trim());return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("label",{className:"block text-sm font-semibold text-gray-700",children:a}),!t&&(0,b.jsx)("button",{onClick:()=>{w(d.map(a=>({originalName:a,newName:a,isNew:!1}))),u(!0),y("")},className:"text-gray-500 hover:text-blue-600 transition-colors p-1",title:f,children:(0,b.jsx)(q,{className:"w-4 h-4"})})]}),t?(0,b.jsxs)("div",{className:"space-y-3 p-4 bg-blue-50 rounded-lg border-2 border-blue-200",children:[(0,b.jsxs)("div",{className:"text-xs font-medium text-blue-700 mb-2",children:[g,"(ドラッグで並び替え可能)"]}),(0,b.jsx)("div",{className:"space-y-2",children:D.map(({item:a,originalIndex:c},d)=>{let e=z===c;return(0,b.jsxs)("div",{draggable:!0,onDragStart:()=>{A(c)},onDragOver:a=>{a.preventDefault(),null!==z&&B!==d&&C(d)},onDrop:F,onDragEnd:G,className:`flex items-center gap-2 transition-all ${e?"opacity-50":""}`,children:[(0,b.jsx)("div",{className:"cursor-grab text-gray-400 hover:text-gray-600 p-1",title:"ドラッグして並び替え",children:(0,b.jsx)(s,{className:"w-4 h-4"})}),(0,b.jsx)("input",{type:"text",value:a.newName,onChange:a=>{var b;return b=a.target.value,void w(v.map((a,d)=>d===c?{...a,newName:b}:a))},placeholder:h,className:`flex-1 px-3 py-2 border-2 rounded-lg text-sm focus:ring-2 transition-all duration-200 ${!a.newName.trim()?"border-red-300 focus:border-red-400 focus:ring-red-200":"border-gray-200 focus:border-blue-400 focus:ring-blue-200"}`}),(0,b.jsx)("button",{onClick:()=>{w(v.filter((a,b)=>b!==c))},className:"text-gray-400 hover:text-red-600 transition-colors p-2",title:j,children:(0,b.jsx)(m,{className:"w-4 h-4"})})]},c)})}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-2 border-t border-blue-200",children:[(0,b.jsx)("input",{type:"text",value:x,onChange:a=>y(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),E())},placeholder:i,className:"flex-1 px-3 py-2 border-2 border-gray-200 rounded-lg text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200"}),(0,b.jsx)("button",{onClick:E,disabled:!x.trim()||v.some(a=>a.newName.trim()===x.trim()),className:"px-3 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",title:k,children:(0,b.jsx)(r,{className:"w-4 h-4"})})]}),H()&&(0,b.jsx)("div",{className:"text-xs text-red-600 mt-2",children:l}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-blue-200",children:[(0,b.jsxs)("button",{onClick:()=>{let a=[],b={};for(let c of v){let d=c.newName.trim();d&&(a.push(d),c.isNew||c.originalName===d||(b[c.originalName]=d))}let c=x.trim();c&&!a.includes(c)&&a.push(c),n&&Object.keys(b).length>0&&n(b),e(a),u(!1),w([]),y("")},disabled:!I,className:"flex-1 flex items-center justify-center gap-2 px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed text-sm font-medium",children:[(0,b.jsx)(o,{className:"w-4 h-4"}),"保存"]}),(0,b.jsx)("button",{onClick:()=>{u(!1),w([]),y(""),A(null),C(null)},className:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors text-sm font-medium",children:"キャンセル"})]})]}):p]})}function u({selectedTags:a,availableTags:c,onSelectedTagsChange:d,onAvailableTagsChange:e}){return(0,b.jsx)(t,{label:"タグ",items:c,onItemsChange:b=>{let c=a.filter(a=>b.includes(a));c.length!==a.length&&d(c),e(b)},editButtonTitle:"タグを編集",editModeDescription:"タグの追加・削除・名前変更",inputPlaceholder:"タグ名",newItemPlaceholder:"新しいタグ名を入力",deleteButtonTitle:"タグを削除",addButtonTitle:"タグを追加",duplicateErrorMessage:"同じ名前のタグがあります",onRename:b=>{let c=a.map(a=>b[a]||a);JSON.stringify(c)!==JSON.stringify(a)&&d(c)},children:(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:0===c.length?(0,b.jsx)("div",{className:"text-sm text-gray-500",children:"タグがありません。鉛筆アイコンをクリックして追加してください。"}):c.map(c=>{let e=a.includes(c);return(0,b.jsxs)("button",{onClick:()=>{a.includes(c)?d(a.filter(a=>a!==c)):d([...a,c])},className:`flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all duration-200 ${e?"bg-blue-500 text-white border-blue-600 shadow-md":"bg-white text-gray-700 border-gray-200 hover:border-blue-300 hover:bg-blue-50"}`,children:[e&&(0,b.jsx)(p,{className:"w-3 h-3"}),(0,b.jsx)("span",{children:c})]},c)})})})}function v({fields:a,projectFields:c,onFieldsChange:d,onUpdateProjectFields:e}){let f=Object.keys(c);return(0,b.jsx)(t,{label:"フィールド",items:f,onItemsChange:b=>{let c={};for(let d of b)c[d]=a[d]||"";if(d(c),e){let a={};for(let c of b)a[c]="";e(a)}},editButtonTitle:"フィールドを編集",editModeDescription:"フィールドの追加・削除・名前変更",inputPlaceholder:"フィールド名",newItemPlaceholder:"新しいフィールド名を入力",deleteButtonTitle:"フィールドを削除",addButtonTitle:"フィールドを追加",duplicateErrorMessage:"同じ名前のフィールドがあります",onRename:b=>{let c={};for(let[d,e]of Object.entries(a))c[b[d]||d]=e;d(c)},children:(0,b.jsx)("div",{className:"space-y-3",children:Object.entries(a).map(([c,e])=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:c}),(0,b.jsx)("textarea",{value:e,onChange:b=>{var e;return e=b.target.value,void d({...a,[c]:e})},className:"w-full border-2 border-gray-200 rounded-lg p-3 min-h-[80px] text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200 shadow-sm hover:shadow-md",placeholder:`${c}を入力してください`})]},c))})})}function w({selectedPath:a,editingDoc:c,hasUnsavedChanges:d,availableTags:e,projectFields:f,onEditingDocChange:g,onAvailableTagsChange:h,onProjectFieldsChange:j,onSave:k}){return(0,b.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,b.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-indigo-500 to-indigo-600 rounded-lg flex items-center justify-center",children:(0,b.jsx)(o,{className:"w-5 h-5 text-white"})}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"プロパティ詳細"})]}),a&&c?(0,b.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,b.jsxs)("div",{className:"flex-shrink-0 pb-4 border-b border-gray-200",children:[(0,b.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"パス"}),(0,b.jsx)("div",{className:"text-sm text-gray-700 bg-gradient-to-r from-blue-50 to-indigo-50 p-3 rounded-lg font-mono border border-blue-200 shadow-sm",children:a})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 space-y-6 min-h-0",children:[(0,b.jsx)(u,{selectedTags:c.tags||[],availableTags:e,onSelectedTagsChange:a=>{g({...c,tags:a})},onAvailableTagsChange:h}),(0,b.jsx)(v,{fields:c.fields||{},projectFields:f,onFieldsChange:a=>{g({...c,fields:a})},onUpdateProjectFields:j})]}),(0,b.jsx)("div",{className:"flex-shrink-0 pt-4 border-t border-gray-200",children:(0,b.jsxs)("button",{onClick:k,disabled:!d,className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg shadow-md transition-all duration-200 transform ${d?"bg-gradient-to-r from-green-500 to-emerald-600 text-white hover:from-green-600 hover:to-emerald-700 hover:shadow-lg cursor-pointer":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:[(0,b.jsx)(o,{className:"w-5 h-5"}),(0,b.jsx)("span",{className:"font-medium",children:"保存"})]})})]}):(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center flex-1",children:[(0,b.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-gray-100 to-gray-200 rounded-full flex items-center justify-center mb-4",children:(0,b.jsx)(i,{className:"w-10 h-10 text-gray-400"})}),(0,b.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"プロパティを選択してください"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"左側のツリーから項目を選択"})]})]})}let x=h("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),y=h("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);class z{static flattenConfig(a,b=""){let c={};for(let d in a){let e=b?`${b}:${d}`:d,f=a[d];f&&"object"==typeof f?Array.isArray(f)?f.some(a=>a&&"object"==typeof a&&!Array.isArray(a))?f.forEach((a,b)=>{a&&"object"==typeof a&&!Array.isArray(a)&&Object.assign(c,this.flattenConfig(a,`${e}[${b}]`))}):c[e]=f:Object.assign(c,this.flattenConfig(f,e)):c[e]=f}return c}static getAllPropertyPaths(a,b=""){let c=[];for(let d in a){let e=b?`${b}:${d}`:d,f=a[d];c.push(e),f&&"object"==typeof f&&(Array.isArray(f)?f.some(a=>a&&"object"==typeof a&&!Array.isArray(a))&&f.forEach((a,b)=>{if(a&&"object"==typeof a&&!Array.isArray(a)){let d=`${e}[${b}]`;c.push(d),c.push(...this.getAllPropertyPaths(a,d))}}):c.push(...this.getAllPropertyPaths(f,e)))}return c}static buildTree(a,b=""){let c=[];for(let d in a){let e=b?`${b}:${d}`:d,f=a[d];if(f&&"object"==typeof f)if(Array.isArray(f))if(f.some(a=>a&&"object"==typeof a&&!Array.isArray(a))){let a=[];f.forEach((b,c)=>{b&&"object"==typeof b&&!Array.isArray(b)&&a.push({key:`[${c}]`,fullPath:`${e}[${c}]`,value:b,children:this.buildTree(b,`${e}[${c}]`),hasDocumentation:!1,type:"object"})}),c.push({key:d,fullPath:e,value:f,children:a.length>0?a:void 0,hasDocumentation:!1,type:"array"})}else c.push({key:d,fullPath:e,value:f,hasDocumentation:!1,type:"array"});else c.push({key:d,fullPath:e,value:f,children:this.buildTree(f,e),hasDocumentation:!1,type:"object"});else c.push({key:d,fullPath:e,value:f,hasDocumentation:!1,type:typeof f})}return c}}function A({config:a,docs:d,onSelectProperty:e,onEditProperty:f,selectedPath:g}){let[h,j]=(0,c.useState)(new Set),k=(a,c=0)=>{var l;let m,n=(l=a.fullPath,!!(m=d.properties[l])&&(!!(m.tags&&m.tags.length>0||m.fields&&Object.values(m.fields).some(a=>a&&""!==a.trim()))||!1)),o=h.has(a.fullPath),p=g===a.fullPath;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{paddingLeft:`${20*c}px`},className:`group flex items-center gap-2 py-2 px-3 cursor-pointer rounded-lg transition-all duration-150 ${p?"bg-gradient-to-r from-blue-100 to-indigo-100 border-l-4 border-blue-500 shadow-sm":"hover:bg-gradient-to-r hover:from-gray-50 hover:to-gray-100"}`,children:[a.children&&a.children.length>0?(0,b.jsx)("button",{onClick:()=>{var b;let c;return b=a.fullPath,void((c=new Set(h)).has(b)?c.delete(b):c.add(b),j(c))},className:"p-1 hover:bg-blue-100 rounded-md transition-colors",children:o?(0,b.jsx)(y,{className:"w-4 h-4 text-blue-600"}):(0,b.jsx)(x,{className:"w-4 h-4 text-gray-600"})}):(0,b.jsx)("div",{className:"w-6"}),(0,b.jsxs)("div",{onClick:()=>e(a.fullPath),className:"flex-1 flex items-center gap-2",children:[(0,b.jsx)("span",{className:`${a.children?"font-bold text-gray-800":"font-medium text-gray-700"}`,children:a.key}),!a.children&&(0,b.jsxs)("span",{className:"text-sm text-gray-500 truncate max-w-[200px]",children:[": ",JSON.stringify(a.value)]}),n&&(0,b.jsxs)("div",{className:"flex items-center gap-1 px-2 py-0.5 bg-green-100 border border-green-300 rounded-full",children:[(0,b.jsx)(i,{className:"w-3 h-3 text-green-600"}),(0,b.jsx)("span",{className:"text-xs text-green-700 font-medium",children:"Doc"})]})]}),!a.children&&(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),f(a.fullPath)},className:"p-1 hover:bg-gray-200 rounded",title:"編集"})]}),a.children&&o&&(0,b.jsx)("div",{children:a.children.map(a=>k(a,c+1))})]},a.fullPath)},l=z.buildTree(a);return(0,b.jsxs)("div",{className:"h-full flex flex-col border-2 border-gray-100 rounded-xl bg-white shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 p-3 border-b-2 border-gray-100 bg-gradient-to-r from-gray-50 to-gray-100",children:[(0,b.jsx)("button",{onClick:()=>{var b;let c,d;j(new Set((b=z.buildTree(a),c=[],d=a=>{a.children&&a.children.length>0&&(c.push(a.fullPath),a.children.forEach(d))},b.forEach(d),c)))},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-blue-200 text-blue-600 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて展開"}),(0,b.jsx)("button",{onClick:()=>{j(new Set)},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-gray-200 text-gray-600 rounded-lg hover:bg-gray-50 hover:border-gray-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて閉じる"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-3",children:l.map(a=>k(a))})]})}let B=h("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),C=h("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),D=h("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function E({isOpen:a,currentPath:d,onSelect:e,onClose:f,multiSelect:g=!1,filterJsonOnly:h=!1,folderSelectMode:i=!1,title:j}){let[k,l]=(0,c.useState)(d),[m,n]=(0,c.useState)([]),[o,p]=(0,c.useState)(!1),[q,r]=(0,c.useState)([]);(0,c.useEffect)(()=>{a&&(l(d),r([]))},[a,d]),(0,c.useEffect)(()=>{a&&s(k)},[a,k]);let s=async a=>{p(!0);try{let b=await fetch("/api/files/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({directory:a})}),c=await b.json();if(c.success){let a=c.data.items;i?a=c.data.items.filter(a=>"directory"===a.type):h&&(a=c.data.items.filter(a=>"directory"===a.type||".json"===a.extension)),n(a)}else console.error("API returned error:",c.error)}catch(a){console.error("Failed to load directory:",a)}finally{p(!1)}},t=()=>k.replace(/\\/g,"/").toLowerCase()!==d.replace(/\\/g,"/").toLowerCase(),u=()=>{r([]),f()};return a?(0,b.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,b.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:j||(i?"フォルダを選択":"ファイルを選択")}),(0,b.jsx)("button",{onClick:u,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b bg-gray-50",children:[(0,b.jsx)("button",{onClick:()=>{if(!t())return;let a=k.replace(/\\/g,"/"),b=a.split("/").filter(a=>a);if(b.length>1){let c,e=b.slice(0,-1),f=(c=1===e.length&&e[0].includes(":")?e[0]+"/":e[0].includes(":")?e[0]+"/"+e.slice(1).join("/"):a.startsWith("/")?"/"+e.join("/"):e.join("/")).replace(/\\/g,"/").toLowerCase(),g=d.replace(/\\/g,"/").toLowerCase();(f.startsWith(g)||f===g)&&l(c)}else if(1===b.length&&!b[0].includes(":")){if("."===d.replace(/\\/g,"/").toLowerCase())return;l(".")}},disabled:!t(),className:`p-2 rounded flex-shrink-0 ${t()?"hover:bg-gray-200":"opacity-50 cursor-not-allowed"}`,title:t()?"上のディレクトリへ":"ルートディレクトリです",children:(0,b.jsx)(D,{className:"w-5 h-5"})}),(0,b.jsxs)("span",{className:"text-sm text-gray-600 flex-1 truncate",children:["パス: ",k]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:o?(0,b.jsx)("div",{className:"text-center text-gray-500",children:"読み込み中..."}):(0,b.jsx)("div",{className:"space-y-1",children:m.map(a=>{let c=q.includes(a.path);return(0,b.jsxs)("div",{onClick:()=>{"directory"===a.type?i?r([a.path]):l(a.path):g?r(b=>b.includes(a.path)?b.filter(b=>b!==a.path):[...b,a.path]):r([a.path])},onDoubleClick:()=>{"directory"===a.type&&(l(a.path),r([]))},className:`flex items-center gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 ${c?"bg-blue-100":""}`,children:["directory"===a.type?(0,b.jsx)(B,{className:"w-5 h-5 text-blue-500"}):(0,b.jsx)(C,{className:"w-5 h-5 text-green-500"}),(0,b.jsx)("span",{className:"text-sm",children:a.name}),c&&(g||i)&&(0,b.jsx)("span",{className:"ml-auto text-blue-500",children:"✓"})]},a.path)})})}),(0,b.jsxs)("div",{className:"flex items-center justify-between p-4 border-t",children:[i?(0,b.jsx)("div",{className:"text-sm text-gray-600",children:q.length>0?`選択中: ${q[0].split(/[/\\]/).pop()}`:`現在のフォルダ: ${k.split(/[/\\]/).pop()||k}`}):g&&q.length>0?(0,b.jsxs)("div",{className:"text-sm text-gray-600",children:[q.length,"件選択中"]}):null,(0,b.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,b.jsx)("button",{onClick:u,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded",children:"キャンセル"}),(0,b.jsx)("button",{onClick:()=>{i?(e(q.length>0?q:[k]),r([]),f()):q.length>0&&(e(q),r([]),f())},disabled:!i&&0===q.length,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:bg-gray-300 disabled:cursor-not-allowed",children:"選択"})]})]})]})}):null}let F={format:"html",autoExport:!0,fileName:"config-doc",outputDir:".config_doc/output"};function G({isOpen:a,onClose:d,onExport:e,currentSettings:f,rootPath:g="."}){let[h,i]=(0,c.useState)(f||F),[k,l]=(0,c.useState)(!1),[n,o]=(0,c.useState)(!1);(0,c.useEffect)(()=>{f&&i(f)},[f]);let p=(0,c.useMemo)(()=>{let a=g.replace(/\//g,"\\"),b=h.outputDir?.trim()||"",c=h.fileName||"config-doc",d="markdown"===h.format||"markdown-table"===h.format?"md":"html";if(b){let e=b.replace(/\//g,"\\");return`${a}\\${e}\\${c}.${d}`}return`${a}\\${c}.${d}`},[h.format,h.fileName,h.outputDir,g]);if(!a)return null;let q=async()=>{l(!0);try{await e(h),d()}catch(a){console.error("Export failed:",a)}finally{l(!1)}};return(0,b.jsxs)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:[(0,b.jsxs)("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:"エクスポート設定"}),(0,b.jsx)("button",{onClick:d,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,b.jsx)(m,{className:"w-5 h-5"})})]}),(0,b.jsxs)("div",{className:"p-6 space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先フォルダ"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:h.outputDir||"",onChange:a=>i({...h,outputDir:a.target.value}),className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"(空欄でプロジェクトルート)"}),(0,b.jsx)("button",{type:"button",onClick:()=>o(!0),className:"px-3 py-2 border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500",title:"フォルダを選択",children:(0,b.jsx)(B,{className:"w-5 h-5 text-gray-500"})})]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"相対パスを入力またはフォルダを選択(空欄でプロジェクトルート、チーム共有設定)"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"ファイル名"}),(0,b.jsx)("input",{type:"text",value:h.fileName??"",onChange:a=>i({...h,fileName:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"config-doc"}),(0,b.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"拡張子なしのファイル名を指定します(空欄でconfig-doc、チーム共有設定)"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力形式"}),(0,b.jsxs)("select",{value:h.format,onChange:a=>i({...h,format:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(0,b.jsx)("option",{value:"html",children:"HTML"}),(0,b.jsx)("option",{value:"markdown",children:"Markdown"}),(0,b.jsx)("option",{value:"markdown-table",children:"Markdown (テーブル形式)"})]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"html"===h.format?"スタイル付きのHTMLファイルとして出力します":"markdown-table"===h.format?"Markdownテーブル形式で出力します(プロパティ名、説明、値、備考)":"テキストベースのMarkdownファイルとして出力します"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先パス"}),(0,b.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md text-sm text-gray-700 font-mono break-all",children:p})]}),(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)("div",{className:"flex items-center h-5",children:(0,b.jsx)("input",{id:"auto-export",type:"checkbox",checked:h.autoExport,onChange:a=>i({...h,autoExport:a.target.checked}),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"})}),(0,b.jsxs)("div",{className:"ml-3",children:[(0,b.jsx)("label",{htmlFor:"auto-export",className:"text-sm font-medium text-gray-700 cursor-pointer",children:"保存時に自動エクスポート"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"ドキュメントを保存したときに自動的にHTMLファイルを更新します"})]})]}),h.lastExportedAt&&(0,b.jsx)("div",{className:"pt-4 border-t",children:(0,b.jsxs)("p",{className:"text-xs text-gray-500",children:["最終エクスポート: ",new Date(h.lastExportedAt).toLocaleString("ja-JP")]})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-3 p-6 border-t bg-gray-50 rounded-b-lg",children:[(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"キャンセル"}),(0,b.jsxs)("button",{onClick:q,disabled:k,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,b.jsx)(j,{className:"w-4 h-4"}),k?"エクスポート中...":"エクスポート"]})]})]}),(0,b.jsx)(E,{isOpen:n,currentPath:g,onSelect:a=>{if(a.length>0){let b=a[0],c=g.replace(/\\/g,"/"),d=b.replace(/\\/g,"/"),e=d;d.startsWith(c)&&(e=d.slice(c.length)).startsWith("/")&&(e=e.slice(1)),e||(e="."),i({...h,outputDir:e})}o(!1)},onClose:()=>o(!1),folderSelectMode:!0,title:"出力先フォルダを選択"})]})}let H=h("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),I=h("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),J=h("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);function K({message:a,type:d,duration:e=3e3,onClose:f}){let[g,h]=(0,c.useState)(!1);(0,c.useEffect)(()=>{setTimeout(()=>h(!0),10);let a=setTimeout(()=>{h(!1),setTimeout(f,300)},e);return()=>clearTimeout(a)},[e,f]);let i={success:(0,b.jsx)(H,{className:"w-5 h-5 text-green-500"}),error:(0,b.jsx)(I,{className:"w-5 h-5 text-red-500"}),warning:(0,b.jsx)(J,{className:"w-5 h-5 text-yellow-500"})};return(0,b.jsx)("div",{className:`fixed bottom-4 left-4 z-50 transition-all duration-300 ${g?"opacity-100 translate-y-0":"opacity-0 translate-y-2"}`,children:(0,b.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg border ${{success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",warning:"bg-yellow-50 border-yellow-200"}[d]} min-w-[300px] max-w-[500px]`,children:[i[d],(0,b.jsx)("span",{className:"flex-1 text-sm text-gray-800",children:a}),(0,b.jsx)("button",{onClick:()=>{h(!1),setTimeout(f,300)},className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,b.jsx)(m,{className:"w-4 h-4"})})]})})}function L({toasts:a,onRemove:c}){return(0,b.jsx)(b.Fragment,{children:a.map((a,d)=>(0,b.jsx)("div",{style:{bottom:`${16+80*d}px`},className:"fixed left-4 z-50",children:(0,b.jsx)(K,{message:a.message,type:a.type,onClose:()=>c(a.id)})},a.id))})}let M={説明:""};function N(a,b){return[...a].sort((a,c)=>{let d=b.indexOf(a),e=b.indexOf(c);return -1!==d&&-1!==e?d-e:-1===d?1:-1===e?-1:0})}function O(a,b){return a.length!==b.length||a.some((a,c)=>a!==b[c])}function P(){let[a,d]=(0,c.useState)(!1),[e,f]=(0,c.useState)(!1),{loadedConfigs:g,activeConfigIndex:h,activeConfig:j,selectedPath:l,editingDoc:m,originalDoc:o,hasUnsavedChanges:p,exportSettings:q,availableTags:r,projectFields:s,toasts:t,rootPath:u,setActiveConfigIndex:v,setEditingDoc:x,setHasUnsavedChanges:y,removeToast:z,handleSelectConfigFiles:B,handleRemoveConfig:C,handleReorderConfigs:D,handleSelectProperty:F,handleSaveProperty:H,handleExport:I,handleAvailableTagsChange:J,handleProjectFieldsChange:K,checkForChanges:P,resetSelection:Q}=function(){let[a,b]=(0,c.useState)([]),[d,e]=(0,c.useState)(0),[f,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)("."),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(),[t,u]=(0,c.useState)(["required","nullable","string","number","boolean"]),[v,w]=(0,c.useState)(M),[x,y]=(0,c.useState)([]),z=a[d],A=(0,c.useCallback)((a,b="success")=>{let c=Date.now().toString();y(d=>[...d,{id:c,message:a,type:b}])},[]),B=(0,c.useCallback)(a=>{y(b=>b.filter(b=>b.id!==a))},[]),C=(0,c.useCallback)((a,b)=>{if(!a||!b)return!1;let c=a.tags||[];if(O(b.tags||[],c))return!0;let d=a.fields||{};return!!function(a,b){for(let c of new Set([...Object.keys(a),...Object.keys(b)]))if((a[c]||"")!==(b[c]||""))return!0;return!1}(b.fields||{},d)},[]),D=(0,c.useCallback)((a,b)=>{let c=a.replace(/\\/g,"/"),d=b.replace(/\\/g,"/");if(!c.match(/^[a-zA-Z]:\//)&&!c.startsWith("/"))return a;if(c.startsWith(d)){let a=c.substring(d.length);return a.startsWith("/")?a.substring(1):a}return a},[]),E=(0,c.useCallback)(a=>{let b={};for(let c of Object.keys(v))b[c]=a.fields[c]||"";return{...a,fields:b}},[v]),F=(0,c.useCallback)(async a=>{try{let c=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:a})}),d=await c.json();d.success&&b(b=>b.some(b=>b.filePath===a)?b:[...b,{filePath:a,configData:d.data.configData,docs:d.data.docs}])}catch(a){console.error("Failed to load config file:",a)}},[]),G=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePaths:a})}),c=await b.json();c.deletedDocsFiles&&c.deletedDocsFiles.length>0&&A(`${c.deletedDocsFiles.length}件のドキュメントファイルを削除しました`,"warning")}catch(a){console.error("Failed to update metadata:",a)}},[A]),H=(0,c.useCallback)(async()=>{if(r)try{if((await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:r.format,fileName:r.fileName,outputDir:r.outputDir})})).ok){let a={...r,lastExportedAt:new Date().toISOString()};s(a),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:a})})}}catch(a){console.error("Auto export failed:",a)}},[r]);(0,c.useEffect)(()=>{(async()=>{try{let a=await fetch("/api/project"),b=await a.json();if(b.success&&(k(b.data.rootPath),b.data.hasConfigDoc)){let a=await fetch("/api/config/metadata"),b=await a.json();if(b.success&&b.data?.configFiles)for(let a of b.data.configFiles)await F(a.filePath);b.success&&b.data?.availableTags&&u(b.data.availableTags),b.success&&b.data?.fields&&w(b.data.fields)}let c=await fetch("/api/export/settings"),d=await c.json();d.success&&s(d.data)}catch(a){console.error("Failed to load saved configs:",a)}finally{i(!0)}})()},[F]);let I=(0,c.useCallback)(async c=>{let d=[];for(let b of c){let c=D(b,j);if(!a.some(a=>a.filePath===c))try{let a=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:b})}),e=await a.json();e.success?d.push({filePath:c,configData:e.data.configData,docs:e.data.docs}):A(`設定ファイルの読み込みに失敗しました (${b}): ${e.error}`,"error")}catch(a){console.error("Failed to load config:",a),A(`設定ファイルの読み込み中にエラーが発生しました: ${b}`,"error")}}d.length>0&&b(a=>{let b=[...a,...d];return G(b.map(a=>a.filePath)),b})},[a,j,A,D,G]),J=(0,c.useCallback)(async c=>{let f=a[c];(!f.docs||!(Object.keys(f.docs.properties).length>0)||confirm("既に説明文が設定されていますが、削除してよろしいですか?"))&&(b(a=>{let b=a.filter((a,b)=>b!==c);return G(b.map(a=>a.filePath)),b}),d>=c&&d>0&&e(d-1),g(""),m(null),q(!1))},[d,a,G]),K=(0,c.useCallback)((a,c)=>{b(a),e(c),G(a.map(a=>a.filePath))},[G]),L=(0,c.useCallback)(a=>{if(p&&!confirm("保存されていない変更があります。破棄しますか?"))return;g(a);let b=z?.docs.properties[a];if(b){let a=E({...b,tags:b.tags||[]});m(a),o(a)}else{let b={path:a,tags:[],fields:{...v},modifiedAt:new Date().toISOString()};m(b),o(b)}q(!1)},[z,p,E,v]),P=(0,c.useCallback)(async()=>{if(l&&z)try{let a={...l,modifiedAt:new Date().toISOString()},c=await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:z.filePath,propertyPath:f,propertyDoc:a})}),e=await c.json();e.success?(b(b=>b.map((b,c)=>c===d?{...b,docs:{...b.docs,properties:{...b.docs.properties,[f]:a}}}:b)),m(a),o(a),q(!1),A("保存しました"),r?.autoExport&&await H()):A("保存に失敗しました: "+e.error,"error")}catch(a){console.error("Failed to save:",a),A("保存中にエラーが発生しました","error")}},[z,d,l,r?.autoExport,H,f,A]),Q=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:a.format,fileName:a.fileName,outputDir:a.outputDir})}),c=await b.json();if(c.success){let b={...a,lastExportedAt:new Date().toISOString()};s(b),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:b})}),A(`エクスポートしました: ${c.outputPath}`)}else A("エクスポートに失敗しました: "+c.error,"error")}catch(a){console.error("Export failed:",a),A("エクスポート中にエラーが発生しました","error")}},[A]),R=(0,c.useCallback)(async c=>{let d=t.filter(a=>!c.includes(a));u(c),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({availableTags:c})});let e=d.length>0,f=t.some((a,b)=>a!==c[b])||t.length!==c.length;if(e||f){for(let e of a){let a=!1,f={...e.docs.properties};for(let[b,e]of Object.entries(f))if(e.tags&&e.tags.length>0){let g=N(e.tags.filter(a=>!d.includes(a)),c);O(e.tags,g)&&(f[b]={...e,tags:g},a=!0)}a&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:e.filePath,properties:f})}),b(a=>a.map(a=>a.filePath===e.filePath?{...a,docs:{...a.docs,properties:f}}:a)))}if(l&&l.tags&&l.tags.length>0){let a=N(l.tags.filter(a=>!d.includes(a)),c);if(O(l.tags,a)&&(m({...l,tags:a}),n&&n.tags)){let a=N(n.tags.filter(a=>!d.includes(a)),c);o({...n,tags:a})}}}},[t,l,a,n]),S=(0,c.useCallback)(async c=>{let d=Object.keys(v),e=Object.keys(c),f=d.filter(a=>!e.includes(a));for(let d of(w(c),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fields:c})}),a)){let a=!1,c={...d.docs.properties};for(let[b,d]of Object.entries(c))if(d.fields){let g=function(a,b){let c={};for(let d of b)c[d]=a[d]||"";return c}(d.fields,e),h=Object.keys(d.fields),i=h.some((a,b)=>a!==e[b]),j=f.some(a=>a in d.fields);(i||j||h.length!==e.length)&&(c[b]={...d,fields:g},a=!0)}a&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:d.filePath,properties:c})}),b(a=>a.map(a=>a.filePath===d.filePath?{...a,docs:{...a.docs,properties:c}}:a)))}if(n){let a={};for(let b of e)a[b]=n.fields?.[b]||"";o({...n,fields:a})}if(l){let a={};for(let b of e)a[b]=l.fields?.[b]||"";let b={...l,fields:a};m(b),q(C(b,n?{...n,fields:Object.fromEntries(e.map(a=>[a,n.fields?.[a]||""]))}:null))}},[C,l,a,n,v]),T=(0,c.useCallback)(()=>{g(""),m(null),q(!1)},[]);return{loadedConfigs:a,activeConfigIndex:d,activeConfig:z,selectedPath:f,editingDoc:l,originalDoc:n,hasUnsavedChanges:p,exportSettings:r,availableTags:t,projectFields:v,toasts:x,rootPath:j,isInitialized:h,setActiveConfigIndex:e,setSelectedPath:g,setEditingDoc:m,setHasUnsavedChanges:q,showToast:A,removeToast:B,loadConfigFile:F,handleSelectConfigFiles:I,handleRemoveConfig:J,handleReorderConfigs:K,handleSelectProperty:L,handleSaveProperty:P,handleExport:Q,handleAvailableTagsChange:R,handleProjectFieldsChange:S,checkForChanges:C,resetSelection:T}}();return(0,b.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50",children:[(0,b.jsx)(k,{onExportClick:()=>f(!0)}),(0,b.jsxs)("main",{className:"container mx-auto px-6 py-8",children:[(0,b.jsx)(n,{loadedConfigs:g,activeConfigIndex:h,onTabClick:a=>{v(a),Q()},onRemoveConfig:C,onAddFileClick:()=>d(!0),onReorder:D}),j&&(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,b.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-purple-500 to-purple-600 rounded-lg flex items-center justify-center",children:(0,b.jsx)(i,{className:"w-5 h-5 text-white"})}),(0,b.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"JSON構造"})]}),(0,b.jsx)("div",{className:"overflow-y-auto flex-1",children:(0,b.jsx)(A,{config:j.configData,docs:j.docs,onSelectProperty:F,onEditProperty:F,selectedPath:l})})]}),(0,b.jsx)(w,{selectedPath:l,editingDoc:m,hasUnsavedChanges:p,availableTags:r,projectFields:s,onEditingDocChange:a=>{x(a),y(P(a,o))},onAvailableTagsChange:J,onProjectFieldsChange:K,onSave:H})]})]}),(0,b.jsx)(E,{isOpen:a,currentPath:u,multiSelect:!0,filterJsonOnly:!0,onSelect:a=>{B(a),d(!1)},onClose:()=>d(!1)}),(0,b.jsx)(G,{isOpen:e,onClose:()=>f(!1),onExport:I,currentSettings:q,rootPath:u}),(0,b.jsx)(L,{toasts:t,onRemove:z})]})}a.s(["default",()=>P],60350)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_page_tsx_55b2e5ee._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--config_doc_build--><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/
|
|
1
|
+
<!DOCTYPE html><!--config_doc_build--><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/cd878566fda12635.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f8f53e7772f4262.js"/><script src="/_next/static/chunks/cc759f7c2413b7ff.js" async=""></script><script src="/_next/static/chunks/30420d12e4f82b67.js" async=""></script><script src="/_next/static/chunks/turbopack-5b6cb51ab4268fba.js" async=""></script><script src="/_next/static/chunks/4fd93823156e59e8.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>ConfigDoc Web</title><meta name="description" content="設定ファイルのドキュメント化ツール"/><link rel="icon" href="/icon.svg?icon.a94c747f.svg" sizes="any" type="image/svg+xml"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f8f53e7772f4262.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/cd878566fda12635.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"config-doc-build\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/cd878566fda12635.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ja\",\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"c:I[27201,[\"/_next/static/chunks/4fd93823156e59e8.js\"],\"IconMark\"]\n6:null\na:[[\"$\",\"title\",\"0\",{\"children\":\"ConfigDoc Web\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"設定ファイルのドキュメント化ツール\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?icon.a94c747f.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$Lc\",\"3\",{}]]\n"])</script></body></html>
|