dimcode-darwin-x64 0.1.2-beta.1 → 0.1.2

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.
Files changed (148) hide show
  1. package/bin/dimcode +0 -0
  2. package/package.json +1 -1
  3. package/bin/runtime/sandbox/dim-sandbox-runner +0 -0
  4. package/bin/runtime/sandbox/manifest.json +0 -15
  5. package/bin/skills-assets/deep-investigate/SKILL.md +0 -101
  6. package/bin/skills-assets/deep-investigate/references/prompts.md +0 -75
  7. package/bin/skills-assets/deep-investigate/references/templates.md +0 -73
  8. package/bin/skills-assets/deep-investigate/references/thinking-tools.md +0 -36
  9. package/bin/skills-assets/docs-sprint/SKILL.md +0 -73
  10. package/bin/skills-assets/docs-sprint/agents/openai.yaml +0 -4
  11. package/bin/skills-assets/docs-sprint/references/contract-discipline.md +0 -30
  12. package/bin/skills-assets/docs-sprint/references/delivery-plan.md +0 -162
  13. package/bin/skills-assets/docs-sprint/references/documentation-system.md +0 -109
  14. package/bin/skills-assets/docs-sprint/references/ui-layout.md +0 -73
  15. package/bin/skills-assets/docs-sprint/references/worktree-guide.md +0 -45
  16. package/bin/skills-assets/docx/SKILL.md +0 -273
  17. package/bin/skills-assets/docx/assets/styles/academic_styles.xml +0 -250
  18. package/bin/skills-assets/docx/assets/styles/corporate_styles.xml +0 -284
  19. package/bin/skills-assets/docx/assets/styles/default_styles.xml +0 -449
  20. package/bin/skills-assets/docx/assets/xsd/aesthetic-rules.xsd +0 -470
  21. package/bin/skills-assets/docx/assets/xsd/business-rules.xsd +0 -130
  22. package/bin/skills-assets/docx/assets/xsd/common-types.xsd +0 -159
  23. package/bin/skills-assets/docx/assets/xsd/wml-subset.xsd +0 -589
  24. package/bin/skills-assets/docx/references/cjk_typography.md +0 -357
  25. package/bin/skills-assets/docx/references/cjk_university_template_guide.md +0 -184
  26. package/bin/skills-assets/docx/references/comments_guide.md +0 -191
  27. package/bin/skills-assets/docx/references/design_good_bad_examples.md +0 -829
  28. package/bin/skills-assets/docx/references/design_principles.md +0 -819
  29. package/bin/skills-assets/docx/references/openxml_element_order.md +0 -308
  30. package/bin/skills-assets/docx/references/openxml_encyclopedia_part1.md +0 -4061
  31. package/bin/skills-assets/docx/references/openxml_encyclopedia_part2.md +0 -2820
  32. package/bin/skills-assets/docx/references/openxml_encyclopedia_part3.md +0 -3381
  33. package/bin/skills-assets/docx/references/openxml_namespaces.md +0 -82
  34. package/bin/skills-assets/docx/references/openxml_units.md +0 -72
  35. package/bin/skills-assets/docx/references/scenario_a_create.md +0 -284
  36. package/bin/skills-assets/docx/references/scenario_b_edit_content.md +0 -295
  37. package/bin/skills-assets/docx/references/scenario_c_apply_template.md +0 -456
  38. package/bin/skills-assets/docx/references/track_changes_guide.md +0 -200
  39. package/bin/skills-assets/docx/references/troubleshooting.md +0 -506
  40. package/bin/skills-assets/docx/references/typography_guide.md +0 -294
  41. package/bin/skills-assets/docx/references/xsd_validation_guide.md +0 -158
  42. package/bin/skills-assets/docx/scripts/doc_to_docx.sh +0 -40
  43. package/bin/skills-assets/docx/scripts/docx_preview.sh +0 -37
  44. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Docx.Cli.csproj +0 -19
  45. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Program.cs +0 -18
  46. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/AnalyzeCommand.cs +0 -147
  47. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ApplyTemplateCommand.cs +0 -322
  48. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/CreateCommand.cs +0 -324
  49. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/DiffCommand.cs +0 -155
  50. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/EditContentCommand.cs +0 -487
  51. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/FixOrderCommand.cs +0 -108
  52. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/MergeRunsCommand.cs +0 -122
  53. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ValidateCommand.cs +0 -107
  54. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Docx.Core.csproj +0 -15
  55. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/CommentSynchronizer.cs +0 -169
  56. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/ElementOrder.cs +0 -80
  57. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/NamespaceConstants.cs +0 -42
  58. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/RunMerger.cs +0 -81
  59. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/StyleAnalyzer.cs +0 -81
  60. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/TrackChangesHelper.cs +0 -99
  61. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/UnitConverter.cs +0 -23
  62. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples.cs +0 -1832
  63. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch1.cs +0 -910
  64. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch2.cs +0 -999
  65. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch3.cs +0 -1048
  66. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch4.cs +0 -1038
  67. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/CharacterFormattingSamples.cs +0 -1020
  68. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/DocumentCreationSamples.cs +0 -1121
  69. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FieldAndTocSamples.cs +0 -624
  70. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FootnoteAndCommentSamples.cs +0 -675
  71. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/HeaderFooterSamples.cs +0 -838
  72. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ImageSamples.cs +0 -917
  73. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ListAndNumberingSamples.cs +0 -826
  74. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ParagraphFormattingSamples.cs +0 -1199
  75. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/StyleSystemSamples.cs +0 -1487
  76. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TableSamples.cs +0 -1163
  77. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TrackChangesSamples.cs +0 -595
  78. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/CjkHelper.cs +0 -39
  79. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/FontDefaults.cs +0 -24
  80. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/PageSizes.cs +0 -20
  81. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/BusinessRuleValidator.cs +0 -224
  82. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/GateCheckValidator.cs +0 -148
  83. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/ValidationResult.cs +0 -23
  84. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/XsdValidator.cs +0 -69
  85. package/bin/skills-assets/docx/scripts/dotnet/Docx.slnx +0 -4
  86. package/bin/skills-assets/docx/scripts/env_check.sh +0 -196
  87. package/bin/skills-assets/docx/scripts/setup.ps1 +0 -274
  88. package/bin/skills-assets/docx/scripts/setup.sh +0 -504
  89. package/bin/skills-assets/pdf/README.md +0 -222
  90. package/bin/skills-assets/pdf/SKILL.md +0 -191
  91. package/bin/skills-assets/pdf/design/design.md +0 -381
  92. package/bin/skills-assets/pdf/scripts/cover.py +0 -1579
  93. package/bin/skills-assets/pdf/scripts/fill_inspect.py +0 -200
  94. package/bin/skills-assets/pdf/scripts/fill_write.py +0 -242
  95. package/bin/skills-assets/pdf/scripts/make.sh +0 -491
  96. package/bin/skills-assets/pdf/scripts/merge.py +0 -112
  97. package/bin/skills-assets/pdf/scripts/palette.py +0 -521
  98. package/bin/skills-assets/pdf/scripts/reformat_parse.py +0 -374
  99. package/bin/skills-assets/pdf/scripts/render_body.py +0 -1052
  100. package/bin/skills-assets/pdf/scripts/render_cover.js +0 -111
  101. package/bin/skills-assets/pptx-generator/SKILL.md +0 -248
  102. package/bin/skills-assets/pptx-generator/references/design-system.md +0 -392
  103. package/bin/skills-assets/pptx-generator/references/editing.md +0 -162
  104. package/bin/skills-assets/pptx-generator/references/pitfalls.md +0 -112
  105. package/bin/skills-assets/pptx-generator/references/pptxgenjs.md +0 -420
  106. package/bin/skills-assets/pptx-generator/references/slide-types.md +0 -413
  107. package/bin/skills-assets/skill-creator/SKILL.md +0 -368
  108. package/bin/skills-assets/skill-creator/agents/openai.yaml +0 -5
  109. package/bin/skills-assets/skill-creator/assets/skill-creator-small.svg +0 -3
  110. package/bin/skills-assets/skill-creator/assets/skill-creator.png +0 -0
  111. package/bin/skills-assets/skill-creator/license.txt +0 -202
  112. package/bin/skills-assets/skill-creator/references/openai_yaml.md +0 -49
  113. package/bin/skills-assets/skill-creator/scripts/generate_openai_yaml.py +0 -226
  114. package/bin/skills-assets/skill-creator/scripts/init_skill.py +0 -397
  115. package/bin/skills-assets/skill-creator/scripts/quick_validate.py +0 -101
  116. package/bin/skills-assets/skill-installer/LICENSE.txt +0 -202
  117. package/bin/skills-assets/skill-installer/SKILL.md +0 -58
  118. package/bin/skills-assets/skill-installer/agents/openai.yaml +0 -5
  119. package/bin/skills-assets/skill-installer/assets/skill-installer-small.svg +0 -3
  120. package/bin/skills-assets/skill-installer/assets/skill-installer.png +0 -0
  121. package/bin/skills-assets/skill-installer/scripts/github_utils.py +0 -21
  122. package/bin/skills-assets/skill-installer/scripts/install-skill-from-github.py +0 -308
  123. package/bin/skills-assets/skill-installer/scripts/list-skills.py +0 -107
  124. package/bin/skills-assets/xlsx/SKILL.md +0 -137
  125. package/bin/skills-assets/xlsx/references/create.md +0 -691
  126. package/bin/skills-assets/xlsx/references/edit.md +0 -684
  127. package/bin/skills-assets/xlsx/references/fix.md +0 -37
  128. package/bin/skills-assets/xlsx/references/format.md +0 -768
  129. package/bin/skills-assets/xlsx/references/ooxml-cheatsheet.md +0 -231
  130. package/bin/skills-assets/xlsx/references/read-analyze.md +0 -97
  131. package/bin/skills-assets/xlsx/references/validate.md +0 -772
  132. package/bin/skills-assets/xlsx/scripts/formula_check.py +0 -422
  133. package/bin/skills-assets/xlsx/scripts/libreoffice_recalc.py +0 -248
  134. package/bin/skills-assets/xlsx/scripts/shared_strings_builder.py +0 -163
  135. package/bin/skills-assets/xlsx/scripts/style_audit.py +0 -575
  136. package/bin/skills-assets/xlsx/scripts/xlsx_add_column.py +0 -395
  137. package/bin/skills-assets/xlsx/scripts/xlsx_insert_row.py +0 -274
  138. package/bin/skills-assets/xlsx/scripts/xlsx_pack.py +0 -87
  139. package/bin/skills-assets/xlsx/scripts/xlsx_reader.py +0 -362
  140. package/bin/skills-assets/xlsx/scripts/xlsx_shift_rows.py +0 -396
  141. package/bin/skills-assets/xlsx/scripts/xlsx_unpack.py +0 -130
  142. package/bin/skills-assets/xlsx/templates/minimal_xlsx/[Content_Types].xml +0 -9
  143. package/bin/skills-assets/xlsx/templates/minimal_xlsx/_rels/.rels +0 -6
  144. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +0 -19
  145. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +0 -33
  146. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/styles.xml +0 -160
  147. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/workbook.xml +0 -30
  148. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +0 -70
@@ -1,81 +0,0 @@
1
- using System.Xml.Linq;
2
-
3
- namespace Docx.Core.OpenXml;
4
-
5
- public record StyleInfo(string Id, string? Name, string Type, string? BasedOn, bool IsDefault);
6
-
7
- public record StyleReport(
8
- List<StyleInfo> AllStyles,
9
- Dictionary<string, List<string>> InheritanceTree,
10
- string? DefaultParagraphStyle,
11
- string? DefaultCharacterStyle,
12
- int DirectFormattingCount);
13
-
14
- /// <summary>
15
- /// Analyzes the style hierarchy of a DOCX document.
16
- /// </summary>
17
- public static class StyleAnalyzer
18
- {
19
- /// <summary>
20
- /// Analyzes styles.xml content and document.xml for direct formatting usage.
21
- /// </summary>
22
- public static StyleReport Analyze(XDocument stylesXml, XDocument documentXml)
23
- {
24
- var styles = ExtractStyles(stylesXml);
25
- var tree = BuildInheritanceTree(styles);
26
- var defaultPara = styles.FirstOrDefault(s => s.Type == "paragraph" && s.IsDefault)?.Id;
27
- var defaultChar = styles.FirstOrDefault(s => s.Type == "character" && s.IsDefault)?.Id;
28
- var directCount = CountDirectFormatting(documentXml);
29
-
30
- return new(styles, tree, defaultPara, defaultChar, directCount);
31
- }
32
-
33
- private static List<StyleInfo> ExtractStyles(XDocument stylesXml)
34
- {
35
- var result = new List<StyleInfo>();
36
- var root = stylesXml.Root;
37
- if (root == null) return result;
38
-
39
- foreach (var style in root.Elements(Ns.W + "style"))
40
- {
41
- var id = style.Attribute(Ns.W + "styleId")?.Value ?? "";
42
- var name = style.Element(Ns.W + "name")?.Attribute(Ns.W + "val")?.Value;
43
- var type = style.Attribute(Ns.W + "type")?.Value ?? "unknown";
44
- var basedOn = style.Element(Ns.W + "basedOn")?.Attribute(Ns.W + "val")?.Value;
45
- var isDefault = style.Attribute(Ns.W + "default")?.Value == "1";
46
- result.Add(new(id, name, type, basedOn, isDefault));
47
- }
48
-
49
- return result;
50
- }
51
-
52
- private static Dictionary<string, List<string>> BuildInheritanceTree(List<StyleInfo> styles)
53
- {
54
- var tree = new Dictionary<string, List<string>>();
55
- foreach (var style in styles)
56
- {
57
- var parent = style.BasedOn ?? "(root)";
58
- if (!tree.ContainsKey(parent))
59
- tree[parent] = [];
60
- tree[parent].Add(style.Id);
61
- }
62
- return tree;
63
- }
64
-
65
- private static int CountDirectFormatting(XDocument documentXml)
66
- {
67
- var body = documentXml.Root?.Element(Ns.W + "body");
68
- if (body == null) return 0;
69
-
70
- int count = 0;
71
- // Count inline rPr on runs (direct character formatting)
72
- count += body.Descendants(Ns.W + "r")
73
- .Count(r => r.Element(Ns.W + "rPr") != null);
74
- // Count inline pPr that contain more than just pStyle (direct paragraph formatting)
75
- count += body.Descendants(Ns.W + "p")
76
- .Select(p => p.Element(Ns.W + "pPr"))
77
- .Count(pPr => pPr != null && pPr.Elements().Any(e => e.Name != Ns.W + "pStyle"));
78
-
79
- return count;
80
- }
81
- }
@@ -1,99 +0,0 @@
1
- using DocumentFormat.OpenXml;
2
- using DocumentFormat.OpenXml.Packaging;
3
- using DocumentFormat.OpenXml.Wordprocessing;
4
-
5
- namespace Docx.Core.OpenXml;
6
-
7
- /// <summary>
8
- /// Helpers for Track Changes (revision marks) operations.
9
- /// </summary>
10
- public static class TrackChangesHelper
11
- {
12
- /// <summary>
13
- /// Wraps a run in a w:ins element to propose an insertion.
14
- /// </summary>
15
- public static InsertedRun ProposeInsertion(Run run, string author, DateTime date)
16
- {
17
- var ins = new InsertedRun
18
- {
19
- Author = author,
20
- Date = date,
21
- Id = run.Parent is Body body ? GetNextRevisionId(body).ToString() : "1"
22
- };
23
- run.Remove();
24
- ins.Append(run);
25
- return ins;
26
- }
27
-
28
- /// <summary>
29
- /// Wraps a run in a w:del element, converting w:t to w:delText.
30
- /// </summary>
31
- public static DeletedRun ProposeDeletion(Run run, string author, DateTime date)
32
- {
33
- // Convert w:t elements to w:delText
34
- foreach (var text in run.Elements<Text>().ToList())
35
- {
36
- var delText = new DeletedText { Text = text.Text, Space = SpaceProcessingModeValues.Preserve };
37
- text.InsertAfterSelf(delText);
38
- text.Remove();
39
- }
40
-
41
- var del = new DeletedRun
42
- {
43
- Author = author,
44
- Date = date,
45
- Id = run.Parent is Body body ? GetNextRevisionId(body).ToString() : "1"
46
- };
47
- run.Remove();
48
- del.Append(run);
49
- return del;
50
- }
51
-
52
- /// <summary>
53
- /// Accepts an insertion by removing the w:ins wrapper and keeping content.
54
- /// </summary>
55
- public static void AcceptInsertion(OpenXmlElement insElement)
56
- {
57
- if (insElement is not InsertedRun) return;
58
- var parent = insElement.Parent;
59
- if (parent == null) return;
60
-
61
- var children = insElement.ChildElements.ToList();
62
- foreach (var child in children)
63
- {
64
- child.Remove();
65
- insElement.InsertBeforeSelf(child);
66
- }
67
- insElement.Remove();
68
- }
69
-
70
- /// <summary>
71
- /// Accepts a deletion by removing the entire w:del element and its content.
72
- /// </summary>
73
- public static void AcceptDeletion(OpenXmlElement delElement)
74
- {
75
- delElement.Remove();
76
- }
77
-
78
- /// <summary>
79
- /// Finds the maximum existing revision ID in the document and returns the next one.
80
- /// </summary>
81
- public static int GetNextRevisionId(WordprocessingDocument doc)
82
- {
83
- var body = doc.MainDocumentPart?.Document?.Body;
84
- if (body == null) return 1;
85
- return GetNextRevisionId(body);
86
- }
87
-
88
- private static int GetNextRevisionId(OpenXmlElement root)
89
- {
90
- int maxId = 0;
91
- foreach (var element in root.Descendants())
92
- {
93
- var idAttr = element.GetAttributes().FirstOrDefault(a => a.LocalName == "id");
94
- if (idAttr.Value != null && int.TryParse(idAttr.Value, out int id) && id > maxId)
95
- maxId = id;
96
- }
97
- return maxId + 1;
98
- }
99
- }
@@ -1,23 +0,0 @@
1
- namespace Docx.Core.OpenXml;
2
-
3
- /// <summary>
4
- /// Conversion utilities between OpenXML measurement units (DXA, EMU, points, half-points).
5
- /// </summary>
6
- public static class UnitConverter
7
- {
8
- // 1 inch = 1440 DXA = 914400 EMU = 72 pt = 144 half-pt
9
-
10
- public static int InchesToDxa(double inches) => (int)(inches * 1440);
11
- public static int CmToDxa(double cm) => (int)(cm * 567.0);
12
- public static int PtToDxa(double pt) => (int)(pt * 20);
13
- public static long InchesToEmu(double inches) => (long)(inches * 914400);
14
- public static long CmToEmu(double cm) => (long)(cm * 360000);
15
- public static int PtToHalfPt(double pt) => (int)(pt * 2);
16
- public static string FontSizeToSz(double ptSize) => ((int)(ptSize * 2)).ToString();
17
-
18
- public static double DxaToInches(int dxa) => dxa / 1440.0;
19
- public static double DxaToCm(int dxa) => dxa / 567.0;
20
- public static double DxaToPt(int dxa) => dxa / 20.0;
21
- public static double EmuToInches(long emu) => emu / 914400.0;
22
- public static double EmuToCm(long emu) => emu / 360000.0;
23
- }