@contentlayer/react
Advanced tools
Comparing version 0.0.2-18 to 0.0.2-19
@@ -1,16 +0,38 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useContentlayer = exports.ContentlayerContext = void 0; | ||
var React = require("react"); | ||
exports.ContentlayerContext = React.createContext(null); | ||
var useContentlayer = function (fn, deps) { | ||
var docs = React.useContext(exports.ContentlayerContext); | ||
if (fn !== undefined) { | ||
return React.useMemo(function () { | ||
return fn(docs); | ||
}, deps); | ||
} | ||
return docs; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
exports.useContentlayer = useContentlayer; | ||
//# sourceMappingURL=index.js.map | ||
var __reExport = (target, module2, desc) => { | ||
if (module2 && typeof module2 === "object" || typeof module2 === "function") { | ||
for (let key of __getOwnPropNames(module2)) | ||
if (!__hasOwnProp.call(target, key) && key !== "default") | ||
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); | ||
} | ||
return target; | ||
}; | ||
var __toModule = (module2) => { | ||
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); | ||
}; | ||
__markAsModule(exports); | ||
__export(exports, { | ||
ContentlayerContext: () => ContentlayerContext, | ||
useContentlayer: () => useContentlayer | ||
}); | ||
var React = __toModule(require("react")); | ||
const ContentlayerContext = React.createContext(null); | ||
const useContentlayer = (fn, deps) => { | ||
const docs = React.useContext(ContentlayerContext); | ||
if (fn !== void 0) { | ||
return React.useMemo(() => { | ||
return fn(docs); | ||
}, deps); | ||
} | ||
return docs; | ||
}; |
@@ -1,12 +0,15 @@ | ||
import * as React from 'react'; | ||
export const ContentlayerContext = React.createContext(null); | ||
export const useContentlayer = (fn, deps) => { | ||
const docs = React.useContext(ContentlayerContext); | ||
if (fn !== undefined) { | ||
return React.useMemo(() => { | ||
return fn(docs); | ||
}, deps); | ||
} | ||
return docs; | ||
import * as React from "react"; | ||
const ContentlayerContext = React.createContext(null); | ||
const useContentlayer = (fn, deps) => { | ||
const docs = React.useContext(ContentlayerContext); | ||
if (fn !== void 0) { | ||
return React.useMemo(() => { | ||
return fn(docs); | ||
}, deps); | ||
} | ||
return docs; | ||
}; | ||
//# sourceMappingURL=index.js.map | ||
export { | ||
ContentlayerContext, | ||
useContentlayer | ||
}; |
{ | ||
"name": "@contentlayer/react", | ||
"version": "0.0.2-18", | ||
"version": "0.0.2-19", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"types": "./dist/esm/index.d.ts", | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"prepack": "yarn build", | ||
"dev": "rm -rf dist && tsc --watch", | ||
"build": "rm -rf dist && yarn build:esm && yarn build:cjs && echo Build complete", | ||
"build:esm": "tsc --build tsconfig.json", | ||
"build:cjs": "tsc --build tsconfig.cjs.json" | ||
"build": "(yarn workspaces foreach -vpR -j=6 run g:build:lib & run g:build:types) && echo Build complete" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^17.0.5", | ||
"@types/react": "^17.0.9", | ||
"typescript": "^4.2.4" | ||
}, | ||
"dependencies": { | ||
"@contentlayer/client": "0.0.2-18", | ||
"@contentlayer/core": "0.0.2-18" | ||
"@contentlayer/client": "0.0.2-19", | ||
"@contentlayer/core": "0.0.2-19" | ||
}, | ||
"peerDependencies": { | ||
"react": "*" | ||
} | ||
}, | ||
"stableVersion": "0.0.2-18" | ||
} |
{ | ||
"extends": "../../../tsconfig.json", | ||
"compilerOptions": { | ||
"jsx": "preserve", | ||
"rootDir": "./src", | ||
"jsx": "preserve", | ||
"target": "ES2015", | ||
"outDir": "./dist/esm" | ||
"outDir": "./dist/types" | ||
}, | ||
"include": ["./src"], | ||
"references": [{ "path": "../client/tsconfig.json" }, { "path": "../core/tsconfig.json" }] | ||
"references": [{ "path": "../client" }, { "path": "../core" }] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
82
139831
9
+ Added@contentlayer/client@0.0.2-19(transitive)
+ Added@contentlayer/core@0.0.2-19(transitive)
+ Added@contentlayer/utils@0.0.2-19(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addedesbuild@0.12.29(transitive)
+ Addedmarkdown-wasm@1.2.0(transitive)
+ Addedmdast-util-definitions@4.0.0(transitive)
+ Addedmdast-util-from-markdown@0.8.5(transitive)
+ Addedmdast-util-to-hast@10.2.0(transitive)
+ Addedmdast-util-to-string@2.0.0(transitive)
+ Addedmicromark@2.11.4(transitive)
+ Addedms@2.1.3(transitive)
+ Addedrehype-stringify@8.0.0(transitive)
+ Addedremark-parse@9.0.0(transitive)
+ Addedremark-rehype@8.1.0(transitive)
- Removed@contentlayer/client@0.0.2-18(transitive)
- Removed@contentlayer/core@0.0.2-18(transitive)
- Removed@contentlayer/utils@0.0.2-18(transitive)
- Removedcollapse-white-space@1.0.6(transitive)
- Removedesbuild@0.11.23(transitive)
- Removedhast-util-sanitize@3.0.2(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-alphanumeric@1.0.0(transitive)
- Removedis-whitespace-character@1.0.4(transitive)
- Removedis-word-character@1.0.4(transitive)
- Removedlongest-streak@2.0.4(transitive)
- Removedmarkdown-escapes@1.0.4(transitive)
- Removedmarkdown-table@2.0.0(transitive)
- Removedmdast-util-compact@2.0.1(transitive)
- Removedmdast-util-definitions@3.0.1(transitive)
- Removedmdast-util-to-hast@9.1.2(transitive)
- Removedremark@12.0.1(transitive)
- Removedremark-html@12.0.0(transitive)
- Removedremark-parse@8.0.3(transitive)
- Removedremark-stringify@8.1.1(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedstate-toggle@1.0.3(transitive)
- Removedtrim@0.0.1(transitive)
- Removedtrim-trailing-lines@1.1.4(transitive)
- Removedunherit@1.1.3(transitive)
- Removedunist-util-remove-position@2.0.1(transitive)
- Removedvfile-location@3.2.0(transitive)
Updated@contentlayer/core@0.0.2-19