Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: typescript
versions:
- 4.1.3
- 4.1.4
- 4.1.5
- 4.2.2
- 4.2.3
- package-ecosystem: "github-actions"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
25 changes: 24 additions & 1 deletion custom-elements-manifest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
import { jsdocFunctionPlugin } from "cem-plugin-jsdoc-function";
/**
* @return {import('@custom-elements-manifest/analyzer').Plugin}
*/
function jsdocFunctionPlugin() {
return {
name: "jsdoc-function",
analyzePhase({ ts, node, moduleDoc }) {
if (ts.isVariableStatement(node)) {
// @ts-expect-error: it very well might
const comments = node.jsDoc ?? [];
const tags = comments.flatMap((x) => x.tags ?? []);
if (tags.some((x) => x.tagName?.getText?.() === "function")) {
const { declarations } = node.declarationList;
if (declarations.length > 1) return;
const [{ name }] = declarations;
const doc = moduleDoc.declarations.find(
(d) => d.name === name.getText()
);
doc.kind = "function";
}
}
},
};
}

/** @type {{ plugins: import('@custom-elements-manifest/analyzer').Plugin[] }} */
export default {
Expand Down
235 changes: 186 additions & 49 deletions custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@
"module": "./use-context"
}
},
{
"kind": "js",
"name": "useProperty",
"declaration": {
"name": "useProperty",
"module": "./use-property"
}
},
{
"kind": "js",
"name": "lift",
"declaration": {
"name": "lift",
"module": "./use-property"
}
},
{
"kind": "js",
"name": "useRef",
Expand All @@ -114,6 +130,14 @@
"module": "./use-ref"
}
},
{
"kind": "js",
"name": "useHost",
"declaration": {
"name": "useHost",
"module": "./use-host"
}
},
{
"kind": "js",
"name": "hook",
Expand Down Expand Up @@ -248,7 +272,15 @@
"name": "*",
"declaration": {
"name": "*",
"package": "./core"
"module": "lib/core"
}
},
{
"kind": "js",
"name": "*",
"declaration": {
"name": "*",
"module": "lib/util"
}
},
{
Expand Down Expand Up @@ -464,6 +496,14 @@
},
"default": "false"
},
{
"kind": "field",
"name": "_active",
"type": {
"text": "boolean"
},
"default": "true"
},
{
"kind": "method",
"name": "update"
Expand Down Expand Up @@ -497,6 +537,14 @@
"kind": "method",
"name": "teardown"
},
{
"kind": "method",
"name": "pause"
},
{
"kind": "method",
"name": "resume"
},
{
"kind": "field",
"type": {
Expand Down Expand Up @@ -638,7 +686,7 @@
"type": {
"text": "string"
},
"default": "'haunted.context'"
"default": "\"haunted.context\""
}
],
"exports": [
Expand Down Expand Up @@ -774,41 +822,6 @@
}
]
},
{
"kind": "javascript-module",
"path": "lib/use-controller.js",
"declarations": [
{
"kind": "function",
"name": "useController",
"parameters": [
{
"name": "createController",
"description": "A function that creates a controller instance.\nThis function is given a HauntedControllerHost to pass to the controller. The\ncreate function is only called once per component.",
"type": {
"text": "<C extends ReactiveController>(host: ReactiveControllerHost) => C"
}
}
],
"description": "Creates and stores a stateful ReactiveController instance and provides it\nwith a ReactiveControllerHost that drives the controller lifecycle.\n\nUse this hook to convert a ReactiveController into a pion hook.",
"return": {
"type": {
"text": "ReactiveController"
}
}
}
],
"exports": [
{
"kind": "js",
"name": "useController",
"declaration": {
"name": "useController",
"module": "lib/use-controller.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "lib/use-effect.js",
Expand Down Expand Up @@ -871,6 +884,26 @@
}
]
},
{
"kind": "javascript-module",
"path": "lib/use-host.js",
"declarations": [
{
"kind": "variable",
"name": "useHost"
}
],
"exports": [
{
"kind": "js",
"name": "useHost",
"declaration": {
"name": "useHost",
"module": "lib/use-host.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "lib/use-layout-effect.js",
Expand Down Expand Up @@ -932,7 +965,7 @@
"description": "dependencies to the memoized computation",
"name": "values",
"type": {
"text": "unknown[]"
"text": "readonly unknown[]"
}
}
],
Expand All @@ -954,6 +987,43 @@
}
]
},
{
"kind": "javascript-module",
"path": "lib/use-property.js",
"declarations": [
{
"kind": "variable",
"name": "useProperty"
},
{
"kind": "function",
"name": "lift",
"parameters": [
{
"name": "setter"
}
]
}
],
"exports": [
{
"kind": "js",
"name": "useProperty",
"declaration": {
"name": "useProperty",
"module": "lib/use-property.js"
}
},
{
"kind": "js",
"name": "lift",
"declaration": {
"name": "lift",
"module": "lib/use-property.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "lib/use-reducer.js",
Expand Down Expand Up @@ -1013,17 +1083,9 @@
"name": "useRef",
"parameters": [
{
"name": "initialValue",
"type": {
"text": "T"
}
}
],
"return": {
"type": {
"text": "{ current: T }"
"name": "initialValue"
}
}
]
}
],
"exports": [
Expand Down Expand Up @@ -1056,7 +1118,7 @@
],
"return": {
"type": {
"text": "readonly [state: T, updaterFn: StateUpdater<T>]"
"text": "StateTuple<T>"
}
}
}
Expand All @@ -1072,6 +1134,81 @@
}
]
},
{
"kind": "javascript-module",
"path": "lib/util.js",
"declarations": [
{
"kind": "function",
"name": "sheet",
"parameters": [
{
"name": "styles"
}
]
},
{
"kind": "function",
"name": "sheets",
"parameters": [
{
"name": "styleSheets"
}
]
},
{
"kind": "function",
"name": "tagged",
"parameters": [
{
"name": "strings"
},
{
"name": "values"
}
]
},
{
"kind": "variable",
"name": "css",
"default": "tagged"
}
],
"exports": [
{
"kind": "js",
"name": "sheet",
"declaration": {
"name": "sheet",
"module": "lib/util.js"
}
},
{
"kind": "js",
"name": "sheets",
"declaration": {
"name": "sheets",
"module": "lib/util.js"
}
},
{
"kind": "js",
"name": "tagged",
"declaration": {
"name": "tagged",
"module": "lib/util.js"
}
},
{
"kind": "js",
"name": "css",
"declaration": {
"name": "css",
"module": "lib/util.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "lib/virtual.js",
Expand Down
Loading
Loading