Commit Graph

95 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).
1.1.0
2026-09-07 11:45:45 -04:00
olivier 978181b27d petits changements v1.0.0 2026-02-24 21:55:09 -05:00
olivier 3524862184 show minutes 2026-01-04 21:36:47 -05:00
olivier fe6a1cb968 improve readme 2026-01-04 21:36:38 -05:00
olivier 4dc6901ba8 update 2026-01-04 21:11:14 -05:00
olivier 32daa33af6 fix codeblock 2026-01-04 21:10:35 -05:00
olivier 83846e7602 make it work well 2026-01-04 20:42:36 -05:00
olivier e5552e2d4c chore: update dependencies and clean up styles
- Added @codemirror/language and @lezer/common as devDependencies in package.json and package-lock.json.
- Removed inline date-calc styling and specific CodeMirror styles from styles.css for a cleaner design.
2026-01-04 19:59:31 -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 9021a11172 WIP. inline doesn't work, but the rest does. 2025-09-19 20:54:43 -04:00
olivier ee7be363cc WIP. inline doesn't work, but the rest does. 2025-09-19 20:52:30 -04:00
Johannes Theiner e2a64e0534 Merge pull request #151 from adamu/main
Prefix unused variables with _
2025-09-17 18:12:44 +02:00
Johannes Theiner 8933f6ce64 Merge pull request #142 from johannrichard/declutter-version-bump
build: only write new minAppVersion requirements to `versions.json`
2025-09-17 17:54:33 +02:00
Steph Ango db97f5f629 Merge pull request #155 from obsidianmd/agents-md
AGENTS.md
2025-09-05 09:12:10 -07:00
Steph Ango 9673533aa9 language 2025-09-05 09:10:47 -07:00
Steph Ango 33075ecd13 use forward slashes for cross OS compatibility 2025-09-05 09:04:04 -07:00
Steph Ango 188bb6120f small copy tweaks 2025-09-05 09:01:58 -07:00
Steph Ango a4398b8ecc Corrections based on feedback 2025-09-05 08:58:49 -07:00
Steph Ango ce4fc8c209 First pass 2025-09-04 15:28:25 -07:00
Adam Millerchip f16c1401b3 Prefix unused variables with _ 2025-08-28 14:38:40 +09:00
Johann Richard 3fe07677b5 build: only write new minAppVersion requirements to versions.json
Only add a new version requirements if `minAppVersion` is not already in `versions.json`. Should declutter `versions.json`.
2025-04-28 08:38:38 +02:00
Johannes Theiner 6d09ce3e39 Add license, fixes #98 2025-01-27 21:38:01 +00:00
Johannes Theiner ee04e2f81f Merge pull request #120 from claremacrae/fix-readme-api-comment
Remove statement that API is unstable
2024-11-11 21:25:18 +01:00
Clare Macrae 92050ad841 Remove statement that API is unstable 2024-11-11 19:58:31 +00:00
Steph Ango daa0cba23c Merge pull request #78 from aleksey-rowan/patch-1
Minify production build
2024-08-21 11:22:30 -07:00
Johannes Theiner bfa0145644 Merge pull request #91 from revolter/patch-1
Fix inconsistent indentation
2024-07-31 22:06:34 +02:00
Johannes Theiner 893e489e84 Merge pull request #92 from revolter/patch-2
Fix incorrect TypeScript spelling
2024-07-31 21:47:47 +02:00
Johannes Theiner d05f42d8c5 Merge pull request #95 from tobiasvl/patch-1
Update README.md
2024-07-31 20:18:53 +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
iulianOnofrei (U-lee-aan) f4debcda6b Fix inconsistent indentation 2024-01-19 21:14:58 +02:00
Aleksey Rowan 7330e7499a build: minify prod build
closes #70
2023-11-15 14:10:43 -05:00
Aleksey Rowan e60294b950 Update manifest description (#77) 2023-11-15 12:17:04 -05:00
Lishid 7112f01bc6 Update README.md 2023-07-25 15:17:26 -04:00
Johannes Theiner e8f03522bc Adapt to plugin guidelines (#65)
- remove header in settings
- remove logging of changed settings value
2023-07-17 12:36:25 -04:00
Erica Xu 9be2b5d748 Update manifest.json 2023-07-11 11:37:36 -04:00
Alexander Pozdneev 2aee08d3d5 Remove old info about styles.css (#56) 2023-05-01 14:48:46 -04:00
Tim Rogers 0b5e5a2f6e Upgrade esbuild to v0.17.x (#47) 2023-01-25 13:49:50 -05:00
INOUE Takuya 49fba8aa1f fix .eslintignore (#48) 2023-01-19 10:06:51 -05:00
Erica Xu 747672e2f8 Merge pull request #42 from obsidianmd/funding-url
Add funding URL documentation
2022-12-05 15:57:04 -05: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
Erica Xu 97d84bc54b Update manifest.json 2022-12-05 15:28:53 -05:00
lishid 866d3b8f0d Build: Target ES2018. 2022-08-20 20:25:17 -04:00
lishid 64e8649877 Update sample css file. 2022-08-09 13:39:02 -04:00
lishid b46f6c9322 Update for 0.15 2022-08-09 13:38:50 -04:00
lishid 04432b2ebf Upgrade dependencies, add strictNullChecks. 2022-06-24 15:41:39 -04:00