Commit graph

12 commits

Author SHA1 Message Date
mpstaton
6d616c9a63 improve(modal): isolate final reference for conversion to hex
On branch development
 Changes to be committed:
	modified:   src/modals/CitationModal.ts
	modified:   src/services/citationService.ts
	modified:   src/styles/citations.css
2025-07-08 03:29:52 +03:00
mpstaton
7337a11172 improve(modal): improve line identification in modal
On branch development
 Changes to be committed:
	modified:   src/services/citationService.ts
2025-07-08 02:54:29 +03:00
mpstaton
cf09cfa2c1 improve(modal): improve to hex modal by creating a pre-process function
On branch development
 Changes to be committed:
	modified:   src/services/citationService.ts
2025-07-08 02:39:49 +03:00
mpstaton
9f6cbfd4c0 progress(modal): progress on citations modal, now isolates single
citations

 On branch development
 Changes to be committed:
	modified:   src/modals/CitationModal.ts
	modified:   src/services/citationService.ts
	modified:   src/styles/citations.css
2025-07-08 02:12:40 +03:00
mpstaton
ad3303c0e8 iterate(modal): rebuild of modal code
- Fixed method name mismatch between convertCitation and convertCitations
- Made generateHexId private and added public getNewHexId method
- Improved type safety for CitationMatch interface with explicit URL handling
- Cleaned up unused imports and variables in CitationModal
- Fixed file handling to use correct Obsidian API types
- Updated citation conversion logic to handle multiple groups
- Added proper error handling for file operations
- Improved code documentation and type annotations
- Formatted styles.css for better readability
2025-07-08 01:55:44 +03:00
mpstaton
08631c7264 iterate(modal): iterate on CitationModal to isolate one integer at a
time

 On branch development
 Changes to be committed:
	modified:   src/modals/CitationModal.ts
	modified:   src/services/citationService.ts
2025-07-07 23:55:40 +03:00
mpstaton
a957050575 iterate(modal): iterate on CitationModal
On branch development
 Changes to be committed:
	modified:   src/modals/CitationModal.ts
2025-07-07 20:19:08 +03:00
mpstaton
28e713509c iterate(to-hex): iterate on functions transforming Perplexity style
footnotes

Enhanced Type Safety:
Made the type property more specific with a union type: 'footnote' | 'reference' | 'perplexity'
Made lineContent a required property since we always want to track the line context
Added proper null checks for regex match groups
Improved Citation Matching:
Now properly handles three types of citations:
Standard footnotes: [^1]
Standard citations: [1] (excluding markdown links)
Perplexity-style footnotes: 1. [https://example.com]
Added proper line-by-line processing to handle Perplexity-style footnotes correctly
Improved position tracking to handle multi-line content
Better Error Handling:
Added null checks for regex matches
More precise error messages
Better handling of edge cases
Fixed TypeScript Errors:
Ensured all required properties are properly typed
Removed any unsafe type assertions
Made the code more type-safe with proper interfaces
Improved Code Organization:
Better function documentation
More consistent variable naming
Cleaner control flow

 On branch development
 Changes to be committed:
	modified:   src/services/citationService.ts
2025-07-07 19:42:45 +03:00
mpstaton
364243aa40 progress(tohex): progress on to hex transformation from CitationModal
On branch development
 Changes to be committed:
	modified:   src/services/citationService.ts
2025-07-07 14:45:40 +03:00
mpstaton
90f7d18b12 prerun(toHex): save attempt at citation modal based on new spec
On branch development Changes to be committed:
modified:   src/modals/CitationModal.ts
modified:   src/services/citationService.ts
2025-07-07 14:25:30 +03:00
mpstaton
0cb22b7450 start(button): start "to hex" button in modal
On branch development
 Changes to be committed:
	modified:   src/modals/CitationModal.ts
	modified:   src/styles/citations.css
	modified:   styles.css
2025-07-06 18:48:32 +03:00
mpstaton
bc051168d1 feat(modal): milestone of modal feature displaying citations working
On branch development
 Changes to be committed:
	modified:   README.md
	modified:   esbuild.config.mjs
	modified:   main.ts
	modified:   manifest.json
	new file:   src/modals/CitationModal.ts
	new file:   src/services/citationService.ts
	new file:   src/styles/citations.css
	new file:   src/types/obsidian.d.ts
	new file:   src/utils/logger.ts
2025-07-06 18:41:26 +03:00