Skip to content

Commit be174a8

Browse files
committed
🎯Bump to 0.2.4
- Separate out js and css for better loading - Add nav component - Move aside to be floating - Improve article css - Migrate away from underscore - Default outline points to article - Outline is default open when the first header is on screen - Use registerComponent from components - Remove all references to lit-element underscore - they were double counting in the pacakge size. - Migrate all elements to withRuntime - Limit languages that are installed with hljs - Pad code when put back in textContent - Imporves formatting - Add card component - Improve setup and rendering of math, outline, etc. - Add theme.css - Added size analyzers - Expose shortcut to global window iooxa object.
1 parent 6d6930c commit be174a8

23 files changed

+1811
-304
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
dist/
22
node_modules/
33
styles/index.css*
4+
styles/_components.scss
5+
stats.json

README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# @iooxa/ink-article
1+
# @iooxa/article
22

3-
[![Ink-Basic on npm](https://img.shields.io/npm/v/@iooxa/ink-article.svg)](https://www.npmjs.com/package/@iooxa/ink-article)
4-
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/iooxa/ink-article/blob/master/LICENSE)
3+
[![iooxa/article on npm](https://img.shields.io/npm/v/@iooxa/article.svg)](https://www.npmjs.com/package/@iooxa/article)
4+
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/iooxa/article/blob/master/LICENSE)
55

6-
The goal of `ink-article` is to provide web-components for interactive scientific writing, reactive documents and [explorable explanations](https://explorabl.es). This library provides the layout and scientific specific parts of [ink-components](https://components.ink) including ways equations, asides.
6+
The goal of `@iooxa/article` is to provide web-components for interactive scientific writing, reactive documents and [explorable explanations](https://explorabl.es). This library provides the layout and scientific specific parts of [iooxa/article](https://iooxa.dev) including ways equations, asides, callouts, outlines, etc.
77

8-
The [ink-components](https://components.ink) project is heavily inspired by [tangle.js](http://worrydream.com/Tangle/guide.html), re-imagined to use [web-components](https://www.webcomponents.org/)!
8+
The [iooxa/article](https://iooxa.dev/article) project is heavily inspired by [tangle.js](http://worrydream.com/Tangle/guide.html), re-imagined to use [web-components](https://www.webcomponents.org/)!
99
This means you can declaratively write your variables and how to display them in `html` markup.
1010
To get an idea of what that looks like, let's take the canonical example of *Tangled Cookies* - a simple reactive document.
1111

1212
![How many calories in that cookie?](images/tangle.gif)
1313

1414
```html
15-
<ink-var name="cookies" value="3" format=".4"></ink-var>
16-
<ink-var name="caloriesPerCookie" value="50"></ink-var>
17-
<ink-var name="dailyCalories" value="2100"></ink-var>
15+
<r-var name="cookies" value="3" format=".4"></r-var>
16+
<r-var name="caloriesPerCookie" value="50"></r-var>
17+
<r-var name="dailyCalories" value="2100"></r-var>
1818

19-
<ink-var name="calories" :value="cookies * caloriesPerCookie" format=".0f"></ink-var>
20-
<ink-var name="dailyPercent" :value="calories / dailyCalories" format=".0%"></ink-var>
19+
<r-var name="calories" :value="cookies * caloriesPerCookie" format=".0f"></r-var>
20+
<r-var name="dailyPercent" :value="calories / dailyCalories" format=".0%"></r-var>
2121

2222
<p>
23-
When you eat <ink-dynamic bind="cookies" min="2" max="100">cookies</ink-dynamic>,
24-
you consume <ink-display bind="calories"></ink-display> calories.<br>
25-
That's <ink-display bind="dailyPercent"></ink-display> of your recommended daily calories.
23+
When you eat <r-dynamic bind="cookies" min="2" max="100">cookies</r-dynamic>,
24+
you consume <r-display bind="calories"></r-display> calories.<br>
25+
That's <r-display bind="dailyPercent"></r-display> of your recommended daily calories.
2626
</p>
2727
```
2828

@@ -32,19 +32,19 @@ Ink is based on web-components, which creates custom HTML tags so that they can
3232
To get started, copy the built javascript file to the head of your page:
3333

3434
```html
35-
<script src="https://unpkg.com/@iooxa/ink-article"></script>
35+
<script src="https://unpkg.com/@iooxa/article"></script>
3636
```
3737

38-
You can also download the [latest release](https://github.com/iooxa/ink-article/releases) from GitHub. If you are running this without a web server, ensure the script has `charset="utf-8"` in the script tag. You can also [install from npm](https://www.npmjs.com/package/@iooxa/ink-article):
38+
You can also download the [latest release](https://github.com/iooxa/article/releases) from GitHub. If you are running this without a web server, ensure the script has `charset="utf-8"` in the script tag. You can also [install from npm](https://www.npmjs.com/package/@iooxa/article):
3939

4040
```bash
41-
>> npm install @iooxa/ink-article
41+
>> npm install @iooxa/article
4242
```
4343

44-
You should then be able to extend ink as you see fit:
44+
You should then be able to extend the package as you see fit:
4545

4646
```javascript
47-
import components from '@iooxa/ink-article';
47+
import components from '@iooxa/article';
4848
```
4949

50-
Note that the npm module does not setup the [@iooxa/runtime](https://github.com/iooxa/runtime) store, nor does it register the components. See the [ink.ts](/ink.ts) file for what the built package does to `setup` the store and `register` the components.
50+
Note that the npm module does not setup the [@iooxa/runtime](https://github.com/iooxa/runtime) store, nor does it register the components. See the [iooxa.ts](/iooxa.ts) file for what the built package does to `setup` the store and `register` the components.

index.css

-18
This file was deleted.

0 commit comments

Comments
 (0)