dimcode-darwin-arm64 0.2.19 → 0.2.20

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 (109) hide show
  1. package/bin/dimcode +0 -0
  2. package/bin/skills-assets/chrome-control/SKILL.md +96 -0
  3. package/bin/skills-assets/dim-workflow/SKILL.md +78 -30
  4. package/bin/skills-assets/officecli/SKILL.md +423 -0
  5. package/package.json +1 -1
  6. package/bin/skills-assets/docx/SKILL.md +0 -273
  7. package/bin/skills-assets/docx/assets/styles/academic_styles.xml +0 -250
  8. package/bin/skills-assets/docx/assets/styles/corporate_styles.xml +0 -284
  9. package/bin/skills-assets/docx/assets/styles/default_styles.xml +0 -449
  10. package/bin/skills-assets/docx/assets/xsd/aesthetic-rules.xsd +0 -470
  11. package/bin/skills-assets/docx/assets/xsd/business-rules.xsd +0 -130
  12. package/bin/skills-assets/docx/assets/xsd/common-types.xsd +0 -159
  13. package/bin/skills-assets/docx/assets/xsd/wml-subset.xsd +0 -589
  14. package/bin/skills-assets/docx/references/cjk_typography.md +0 -357
  15. package/bin/skills-assets/docx/references/cjk_university_template_guide.md +0 -184
  16. package/bin/skills-assets/docx/references/comments_guide.md +0 -191
  17. package/bin/skills-assets/docx/references/design_good_bad_examples.md +0 -829
  18. package/bin/skills-assets/docx/references/design_principles.md +0 -819
  19. package/bin/skills-assets/docx/references/openxml_element_order.md +0 -308
  20. package/bin/skills-assets/docx/references/openxml_encyclopedia_part1.md +0 -4061
  21. package/bin/skills-assets/docx/references/openxml_encyclopedia_part2.md +0 -2820
  22. package/bin/skills-assets/docx/references/openxml_encyclopedia_part3.md +0 -3381
  23. package/bin/skills-assets/docx/references/openxml_namespaces.md +0 -82
  24. package/bin/skills-assets/docx/references/openxml_units.md +0 -72
  25. package/bin/skills-assets/docx/references/scenario_a_create.md +0 -284
  26. package/bin/skills-assets/docx/references/scenario_b_edit_content.md +0 -295
  27. package/bin/skills-assets/docx/references/scenario_c_apply_template.md +0 -456
  28. package/bin/skills-assets/docx/references/track_changes_guide.md +0 -200
  29. package/bin/skills-assets/docx/references/troubleshooting.md +0 -506
  30. package/bin/skills-assets/docx/references/typography_guide.md +0 -294
  31. package/bin/skills-assets/docx/references/xsd_validation_guide.md +0 -158
  32. package/bin/skills-assets/docx/scripts/doc_to_docx.sh +0 -40
  33. package/bin/skills-assets/docx/scripts/docx_preview.sh +0 -37
  34. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Docx.Cli.csproj +0 -19
  35. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Program.cs +0 -18
  36. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/AnalyzeCommand.cs +0 -147
  37. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ApplyTemplateCommand.cs +0 -322
  38. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/CreateCommand.cs +0 -324
  39. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/DiffCommand.cs +0 -155
  40. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/EditContentCommand.cs +0 -487
  41. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/FixOrderCommand.cs +0 -108
  42. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/MergeRunsCommand.cs +0 -122
  43. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ValidateCommand.cs +0 -107
  44. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Docx.Core.csproj +0 -15
  45. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/CommentSynchronizer.cs +0 -169
  46. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/ElementOrder.cs +0 -80
  47. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/NamespaceConstants.cs +0 -42
  48. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/RunMerger.cs +0 -81
  49. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/StyleAnalyzer.cs +0 -81
  50. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/TrackChangesHelper.cs +0 -99
  51. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/UnitConverter.cs +0 -23
  52. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples.cs +0 -1832
  53. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch1.cs +0 -910
  54. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch2.cs +0 -999
  55. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch3.cs +0 -1048
  56. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch4.cs +0 -1038
  57. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/CharacterFormattingSamples.cs +0 -1020
  58. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/DocumentCreationSamples.cs +0 -1121
  59. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FieldAndTocSamples.cs +0 -624
  60. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FootnoteAndCommentSamples.cs +0 -675
  61. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/HeaderFooterSamples.cs +0 -838
  62. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ImageSamples.cs +0 -917
  63. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ListAndNumberingSamples.cs +0 -826
  64. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ParagraphFormattingSamples.cs +0 -1199
  65. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/StyleSystemSamples.cs +0 -1487
  66. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TableSamples.cs +0 -1163
  67. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TrackChangesSamples.cs +0 -595
  68. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/CjkHelper.cs +0 -39
  69. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/FontDefaults.cs +0 -24
  70. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/PageSizes.cs +0 -20
  71. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/BusinessRuleValidator.cs +0 -224
  72. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/GateCheckValidator.cs +0 -148
  73. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/ValidationResult.cs +0 -23
  74. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/XsdValidator.cs +0 -69
  75. package/bin/skills-assets/docx/scripts/dotnet/Docx.slnx +0 -4
  76. package/bin/skills-assets/docx/scripts/env_check.sh +0 -196
  77. package/bin/skills-assets/docx/scripts/setup.ps1 +0 -274
  78. package/bin/skills-assets/docx/scripts/setup.sh +0 -504
  79. package/bin/skills-assets/pptx-generator/SKILL.md +0 -248
  80. package/bin/skills-assets/pptx-generator/references/design-system.md +0 -392
  81. package/bin/skills-assets/pptx-generator/references/editing.md +0 -162
  82. package/bin/skills-assets/pptx-generator/references/pitfalls.md +0 -112
  83. package/bin/skills-assets/pptx-generator/references/pptxgenjs.md +0 -420
  84. package/bin/skills-assets/pptx-generator/references/slide-types.md +0 -413
  85. package/bin/skills-assets/xlsx/SKILL.md +0 -137
  86. package/bin/skills-assets/xlsx/references/create.md +0 -691
  87. package/bin/skills-assets/xlsx/references/edit.md +0 -684
  88. package/bin/skills-assets/xlsx/references/fix.md +0 -37
  89. package/bin/skills-assets/xlsx/references/format.md +0 -768
  90. package/bin/skills-assets/xlsx/references/ooxml-cheatsheet.md +0 -231
  91. package/bin/skills-assets/xlsx/references/read-analyze.md +0 -97
  92. package/bin/skills-assets/xlsx/references/validate.md +0 -772
  93. package/bin/skills-assets/xlsx/scripts/formula_check.py +0 -422
  94. package/bin/skills-assets/xlsx/scripts/libreoffice_recalc.py +0 -248
  95. package/bin/skills-assets/xlsx/scripts/shared_strings_builder.py +0 -163
  96. package/bin/skills-assets/xlsx/scripts/style_audit.py +0 -575
  97. package/bin/skills-assets/xlsx/scripts/xlsx_add_column.py +0 -395
  98. package/bin/skills-assets/xlsx/scripts/xlsx_insert_row.py +0 -274
  99. package/bin/skills-assets/xlsx/scripts/xlsx_pack.py +0 -87
  100. package/bin/skills-assets/xlsx/scripts/xlsx_reader.py +0 -362
  101. package/bin/skills-assets/xlsx/scripts/xlsx_shift_rows.py +0 -396
  102. package/bin/skills-assets/xlsx/scripts/xlsx_unpack.py +0 -130
  103. package/bin/skills-assets/xlsx/templates/minimal_xlsx/[Content_Types].xml +0 -9
  104. package/bin/skills-assets/xlsx/templates/minimal_xlsx/_rels/.rels +0 -6
  105. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +0 -19
  106. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +0 -33
  107. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/styles.xml +0 -160
  108. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/workbook.xml +0 -30
  109. 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
- }