Commit Graph

33 Commits

Author SHA1 Message Date
olivier 537198c4f1 Add remaining type aliases, rewrite settings tab as syntax TL;DR
- Add age (birthday), remaining (countdown), elapsed (since) aliases,
  alongside the existing bday/until/difference.
- README: document new aliases in each type's header and the Type
  Aliases section.
- Settings tab rewritten: drop the stale GitHub doc link and hardcoded
  pre-redesign examples (countdown+from, auto-colon labels). Replace
  with a compact syntax TL;DR \u2014 all four types with their aliases,
  fields, and one-line descriptions, plus relative dates, frontmatter
  fallback, and inline/fenced examples \u2014 and link to the README on
  Gitea (was pointing at a stale GitHub URL).

Verified: aliases tested against the real shipped config parser; the
settings tab's actual display() (found via app.setting.pluginTabs) was
invoked live in Obsidian and rendered exactly the intended content with
no errors.
2026-09-07 12:09:55 -04:00
olivier 68e7b3ab04 Syntax redesign: sharpen countdown/diff, symmetric frontmatter, relative dates
- Sharpen countdown vs diff: countdown is now always relative to now and
  no longer accepts a 'from' field (previously identical math to diff
  with a custom from, just different message framing).
- Add symmetric frontmatter fallback to countdown (to/deadline), diff
  (from/start, to/end), and since (since/created) \u2014 previously only
  birthday read frontmatter.
- Add relative date support to parseMoment: today, now, tomorrow,
  yesterday, and +/-N offsets (d/w/mo/y/h/m), always relative to now.
  Fixes diff's main weakness of needing hardcoded, staling dates.
- Make label verbatim everywhere (was auto-appending ': ' for countdown
  only, inconsistent with birthday's verbatim convention).
- Fix silent inline failures: unresolvable type now shows an explicit
  error ('Missing or unrecognized type') instead of rendering nothing,
  matching fenced-block behavior. Also fixes 'from=X' alone (documented
  since-alias) not inferring a type.
- Remove the 'YAML-like' comma-separated inline format from docs \u2014 it
  isn't valid non-flow YAML and silently produced nothing; only
  key=value and {flow-mapping} are documented now.
- README rewritten to match: field references, frontmatter docs per
  type, and a new relative-dates section.

Verified against the real bundled logic (12 behavioral checks) and live
in Obsidian via CDP across both Live Preview and Reading View.
2026-09-07 12:04:35 -04:00
olivier 526f54a640 1.1.0: fix Live Preview crash, add Reading View inline support, birthday labels
- Fix RangeSetBuilder ordering crash: inline and fenced-block decorations
  are now merged and sorted before being added, instead of two unsorted
  passes (crashed whenever a fenced block preceded inline code in a note).
- Add explicit @codemirror/state and @codemirror/view devDependencies
  (previously only transitive via @codemirror/language).
- Add Reading View support for inline `date-calc:` spans via
  registerMarkdownPostProcessor (previously Live Preview only), mirroring
  the approach used by Dataview's inline queries.
- Fix verbose=false being silently truthy (non-empty string) in inline
  key=value config, which meant it never actually disabled verbose output.
- Fix diff type auto-inference: from/to was dead code (countdown's check
  always matched first); reordered so from+to or start+end infer diff.
- Implement documented but missing birthday label support: cfg.label,
  falling back to frontmatter name ("Jane's age:"), then "Age:".
- Split main.ts (777 lines) into src/ modules per AGENTS.md conventions.
- Fix duplicated command-palette prefixes, move inline JS styles to
  styles.css, fix package.json author, drop orphaned showArrow setting.

Verified: unit tests against the real bundled logic (mocked obsidian
module), a reproduction of the RangeSetBuilder crash against the real
@codemirror/state package, and live end-to-end testing in Obsidian via
CDP/Playwright (Tchernobyl vault).
2026-09-07 11:45:45 -04:00
olivier fe6a1cb968 improve readme 2026-01-04 21:36:38 -05:00
olivier e6e791ad35 feat: Enhance inline date calculation with improved Live Preview support, type normalization, and plugin cleanup. 2025-12-02 22:02:36 -05:00
olivier 08f75a8d8a update readme 2025-09-19 21:16:27 -04:00
olivier ee7be363cc WIP. inline doesn't work, but the rest does. 2025-09-19 20:52:30 -04:00
Steph Ango 33075ecd13 use forward slashes for cross OS compatibility 2025-09-05 09:04:04 -07:00
Clare Macrae 92050ad841 Remove statement that API is unstable 2024-11-11 19:58:31 +00:00
Johannes Theiner 893e489e84 Merge pull request #92 from revolter/patch-2
Fix incorrect TypeScript spelling
2024-07-31 21:47:47 +02:00
Tobias V. Langhoff 47ec36c11e Update README.md
Update link to plugin guidelines
2024-03-02 22:30:14 +01:00
iulianOnofrei (U-lee-aan) de770934b2 Fix incorrect TypeScript spelling 2024-01-21 15:20:39 +02:00
Lishid 7112f01bc6 Update README.md 2023-07-25 15:17:26 -04:00
Alexander Pozdneev 2aee08d3d5 Remove old info about styles.css (#56) 2023-05-01 14:48:46 -04:00
Erica Xu d3bb1e6775 Update README.md 2022-12-05 15:55:39 -05:00
Erica Xu b376f9c428 Add funding URL documentation 2022-12-05 15:49:16 -05:00
Henré Botha f85d2b74b5 Fix README headings (#29) 2022-05-07 11:15:23 -04:00
Xiao Meng f690c04577 use LF instead of CRLF (#28) 2022-04-15 14:13:31 -04:00
Lishid 24918c946d Update README.md 2022-04-04 22:20:58 -04:00
aidenlx f3286063d3 add version bump script (#10) 2022-01-22 16:13:50 -05:00
Federico Granata 4f502e92eb Update README.md (#24) 2022-01-21 11:15:02 -05:00
TfTHacker 6fdd374cb8 Adding eslint for code .\src\ (#17) 2021-10-30 14:04:07 -04:00
GitMurf 26721337a7 Update README - Obsidian API update instructions
Add the following to the "First time developing plugins?" section:

For updates to the Obsidian API run `npm update` in the command line under your repo folder.
2021-04-23 16:59:52 -04:00
Maciej Beimcik 123b00ca52 a note regarding "use this template" button
This button is not visible if you are not logged in to GitHub.
It may be a bit confusing for first-timers so I suggest the note to be added
2021-03-09 16:17:18 -05:00
Konstantin 5355e3337e Update README.md
fix one little misstype
2021-03-07 20:54:45 -05:00
Lishid ceb3837850 Update README.md 2021-03-01 12:59:44 -05:00
lishid 318cb2b055 Added versions.json 2020-11-10 02:52:56 -05:00
lishid 26d068d237 Update readme. 2020-10-28 21:13:03 -04:00
lishid 08add6702a Update readme. 2020-10-28 20:48:24 -04:00
lishid a577988baa Update readme. 2020-10-26 12:15:09 -04:00
lishid 5b96e4a095 Update readme. 2020-10-26 11:15:02 -04:00
lishid dfd3fe233b Update documentation. 2020-10-25 18:45:40 -04:00
lishid ed3770792a Initial commit! 2020-10-25 16:58:31 -04:00