al_charts 0.1.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25e0b671f1ebb9b628e4a963ec2b6ccd842f9e93137bc41254811573e2906595
4
- data.tar.gz: 8b6051a35be65a16d4b26ee212edb287da2d618160d5c3e8a73e62708bdd6bd4
3
+ metadata.gz: 70734429a9d92dbea3868ba50947d585b80f84356797ba19b5d89e66e487c8ac
4
+ data.tar.gz: a9f55b6382dbc7fd7581717910d76c57717ab5322a0a3503932137fc5c02ab93
5
5
  SHA512:
6
- metadata.gz: 42d573ccc8d8e94d7ece7cd2a2f5ed38a74e7e21a35724815043a8d8e663e237c55f662ee7ceb875fec680bef97554ebc087c73bd5878868e6071aa3812135be
7
- data.tar.gz: 46e6eb624f7c87dfb9dd7ac4e03c4ea23043a7c65af6dfd2c4b12c479a52a4a055a7df1226369561c21db92bd9e04b24ee3f625c5603cc66b38b2fef7f2bd72c
6
+ metadata.gz: '068845e4c74fffc8db5dff61f00dee3b7cd6ec1e52c61fb9727269e112b4b39c2662e5dea0d3132fba17a90f1c3b60cf2d01d660bc893b50d119b5eb47d1a12b'
7
+ data.tar.gz: 3d07db9006002fd8252df561b688f3f257385e08879cc7a27559a70991dcd2c1c631a1ac9fb8ae5d60cbdd89ce8316fa86bf349af27f1c8a830a8576b93ed41a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1 - 2026-06-01
4
+
5
+ - Rewrote `chartjs-setup.js` in vanilla JS. It was still jQuery (`$(document).ready`, `$(".language-chartjs")`), so with jQuery removed in al-folio v1 it threw `ReferenceError: $ is not defined` on load and every `chartjs` chart silently failed to render. Behavior and the `.language-chartjs` selector are unchanged.
6
+
3
7
  ## 0.1.0 - 2026-02-07
8
+
4
9
  - Initial gem release.
5
10
  - Added standalone charts and diagram asset pipeline for Jekyll/al-folio sites.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Al-Charts
1
+ # al-charts
2
2
 
3
- A Jekyll plugin that provides chart/diagram script loading and setup logic.
3
+ `al_charts` provides chart/diagram runtime loading and setup logic for `al-folio` v1.x.
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,8 +8,6 @@ A Jekyll plugin that provides chart/diagram script loading and setup logic.
8
8
  gem 'al_charts'
9
9
  ```
10
10
 
11
- Enable in `_config.yml`:
12
-
13
11
  ```yaml
14
12
  plugins:
15
13
  - al_charts
@@ -17,6 +15,17 @@ plugins:
17
15
 
18
16
  ## Usage
19
17
 
18
+ Render chart runtime assets:
19
+
20
20
  ```liquid
21
21
  {% al_charts_scripts %}
22
22
  ```
23
+
24
+ ## Ecosystem context
25
+
26
+ - Starter wiring and examples live in `al-folio`.
27
+ - Shared theme/runtime contracts are defined by `al_folio_core`.
28
+
29
+ ## Contributing
30
+
31
+ Chart runtime behavior and edge cases should be contributed in this repository.
@@ -1,14 +1,18 @@
1
- $(document).ready(function () {
2
- var $canvas = null,
3
- $this = null,
4
- _ctx = null,
5
- _text = "";
6
- $(".language-chartjs").each(function () {
7
- $this = $(this);
8
- $canvas = $("<canvas></canvas>");
9
- _text = $this.text();
10
- $this.text("").append($canvas);
11
- _ctx = $canvas.get(0).getContext("2d");
12
- _ctx && _text && new Chart(_ctx, JSON.parse(_text)) && $this.attr("data-processed", true);
1
+ /* Replace each `chartjs` code block with a rendered Chart.js canvas.
2
+ Runs at full load so the deferred Chart.js CDN script is available.
3
+ Vanilla JS (no jQuery) — jQuery is not loaded in al-folio v1. */
4
+ document.addEventListener("readystatechange", () => {
5
+ if (document.readyState !== "complete") return;
6
+ document.querySelectorAll(".language-chartjs").forEach((el) => {
7
+ const text = el.textContent;
8
+ if (!text) return;
9
+ const canvas = document.createElement("canvas");
10
+ el.textContent = "";
11
+ el.appendChild(canvas);
12
+ const ctx = canvas.getContext("2d");
13
+ if (ctx) {
14
+ new Chart(ctx, JSON.parse(text));
15
+ el.setAttribute("data-processed", "true");
16
+ }
13
17
  });
14
18
  });
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: al_charts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - al-org
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-02-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jekyll
@@ -59,7 +58,7 @@ dependencies:
59
58
  version: '2.0'
60
59
  - - "<"
61
60
  - !ruby/object:Gem::Version
62
- version: '3.0'
61
+ version: '5.0'
63
62
  type: :development
64
63
  prerelease: false
65
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +68,7 @@ dependencies:
69
68
  version: '2.0'
70
69
  - - "<"
71
70
  - !ruby/object:Gem::Version
72
- version: '3.0'
71
+ version: '5.0'
73
72
  - !ruby/object:Gem::Dependency
74
73
  name: rake
75
74
  requirement: !ruby/object:Gem::Requirement
@@ -110,7 +109,6 @@ metadata:
110
109
  allowed_push_host: https://rubygems.org
111
110
  homepage_uri: https://github.com/al-org-dev/al-charts
112
111
  source_code_uri: https://github.com/al-org-dev/al-charts
113
- post_install_message:
114
112
  rdoc_options: []
115
113
  require_paths:
116
114
  - lib
@@ -125,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
123
  - !ruby/object:Gem::Version
126
124
  version: '0'
127
125
  requirements: []
128
- rubygems_version: 3.0.3.1
129
- signing_key:
126
+ rubygems_version: 4.0.10
130
127
  specification_version: 4
131
128
  summary: Chart and diagram asset pipeline for al-folio Jekyll sites
132
129
  test_files: []