rehype-video 1.0.2 → 1.1.2

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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ rehype-video
7
7
  [![Coverage Status](https://jaywcjlove.github.io/rehype-video/badges.svg)](https://jaywcjlove.github.io/rehype-video/lcov-report/)
8
8
  [![npm bundle size](https://img.shields.io/bundlephobia/minzip/rehype-video)](https://bundlephobia.com/result?p=rehype-video)
9
9
 
10
- Markdown supports video play with `.mp4` and `.mov` URLs. like [`github video`](https://github.blog/2021-05-13-video-uploads-available-github/) features.
10
+ Add improved video syntax: links to `.mp4` and `.mov` turn into videos. like [`github video`](https://github.blog/2021-05-13-video-uploads-available-github/) features.
11
11
 
12
12
  The following is a sample test of the video preview in GitHub:
13
13
 
@@ -130,4 +130,4 @@ export declare type RehypeVideoOptions = {
130
130
 
131
131
  ## License
132
132
 
133
- MIT © [Kenny Wong](https://github.com/jaywcjlove)
133
+ MIT © [Kenny Wong](https://github.com/jaywcjlove)
@@ -2,7 +2,7 @@ export function detailsNode(title) {
2
2
  return {
3
3
  type: 'element',
4
4
  tagName: 'details',
5
- properties: { open: true },
5
+ properties: { open: true, className: 'octicon octicon-video' },
6
6
  children: [
7
7
  {
8
8
  type: 'element',
@@ -1 +1 @@
1
- {"version":3,"file":"detailsNode.js","sourceRoot":"","sources":["../src/detailsNode.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO;QACL,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1B,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;wBACd,UAAU,EAAE;4BACV,aAAa,EAAE,IAAI,EAAE,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EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI;4BAC7G,SAAS,EAAE,qCAAqC;yBACjD;wBACD,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE,MAAM;gCACf,UAAU,EAAE;oCACV,WAAW,EAAE,SAAS;oCACtB,CAAC,EAAE,oVAAoV;iCACxV;gCACD,QAAQ,EAAE,EAAE;6BACb;yBACF;qBACF;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE;4BACV,YAAY,EAAE,qBAAqB,KAAK,IAAI,EAAE,EAAE;yBACjD;wBACD,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE,KAAK,IAAI,EAAE;6BACnB;yBACF;qBACF;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE;4BACV,SAAS,EAAE,gBAAgB;yBAC5B;wBACD,QAAQ,EAAE,EAAE;qBACb;iBACF;aACF;SACF;KACF,CAAA;AACH,CAAC"}
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { visit } from 'unist-util-visit';
2
- import { detailsNode } from './detailsNode';
2
+ import { detailsNode } from './detailsNode.js';
3
3
  const properties = { muted: 'muted', controls: 'controls', style: 'max-height:640px;' };
4
4
  function reElement(node, details, href) {
5
5
  const filename = href.split('/').pop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rehype-video",
3
- "version": "1.0.2",
3
+ "version": "1.1.2",
4
4
  "description": "Markdown supports video play with `.mp4` and `.mov` URLs.",
5
5
  "homepage": "https://jaywcjlove.github.io/rehype-video",
6
6
  "sideEffects": false,
@@ -12,7 +12,8 @@
12
12
  "scripts": {
13
13
  "prepack": "npm run build",
14
14
  "watch": "tsbb watch --disable-babel",
15
- "build": "tsbb build --disable-babel",
15
+ "build": "tsbb build --disable-babel && npm run fix",
16
+ "fix": "tsc-esm-fix --target='lib' --ext='.js'",
16
17
  "type-check": "tsc --noEmit",
17
18
  "test": "tsbb test",
18
19
  "coverage": "tsbb test --coverage"
@@ -44,16 +45,17 @@
44
45
  "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
45
46
  },
46
47
  "dependencies": {
47
- "unified": "10.1.0",
48
- "unist-util-visit": "4.1.0"
48
+ "unified": "~10.1.1",
49
+ "unist-util-visit": "~4.1.0"
49
50
  },
50
51
  "devDependencies": {
51
- "rehype": "12.0.0",
52
- "rehype-stringify": "9.0.2",
53
- "remark": "14.0.1",
54
- "remark-gfm": "3.0.0",
55
- "remark-parse": "10.0.0",
56
- "remark-rehype": "10.0.0",
57
- "tsbb": "3.4.4"
52
+ "rehype": "~12.0.0",
53
+ "rehype-stringify": "~9.0.2",
54
+ "remark": "~14.0.1",
55
+ "remark-gfm": "~3.0.0",
56
+ "remark-parse": "~10.0.0",
57
+ "remark-rehype": "~10.1.0",
58
+ "tsc-esm-fix": "~2.7.3",
59
+ "tsbb": "~3.7.1"
58
60
  }
59
61
  }
@@ -1,11 +1,10 @@
1
-
2
- import { Root, Element } from 'hast';
1
+ import { Element } from 'hast';
3
2
 
4
3
  export function detailsNode(title?: string): Element {
5
4
  return {
6
5
  type: 'element',
7
6
  tagName: 'details',
8
- properties: { open: true },
7
+ properties: { open: true, className: 'octicon octicon-video' },
9
8
  children: [
10
9
  {
11
10
  type: 'element',