move dep to submodule

This commit is contained in:
dragonwocky 2021-10-03 21:02:22 +11:00
parent c80ee2635f
commit 3f81a32351
10 changed files with 4 additions and 2669 deletions

View File

@ -7,3 +7,6 @@
[submodule "media"]
path = media
url = git@github.com:notion-enhancer/media.git
[submodule "dep"]
path = dep
url = git@github.com:notion-enhancer/dep.git

1
extension/dep Submodule

@ -0,0 +1 @@
Subproject commit 8c9dca0c84ecc0120537da6d74b45c3f74b8768a

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,58 +0,0 @@
/**
* style-vendorizer v2.0.0
* @license MIT
* @source https://unpkg.com/style-vendorizer@^2.0.0?module
*/
var i = new Map([
['align-self', '-ms-grid-row-align'],
['color-adjust', '-webkit-print-color-adjust'],
['column-gap', 'grid-column-gap'],
['gap', 'grid-gap'],
['grid-template-columns', '-ms-grid-columns'],
['grid-template-rows', '-ms-grid-rows'],
['justify-self', '-ms-grid-column-align'],
['margin-inline-end', '-webkit-margin-end'],
['margin-inline-start', '-webkit-margin-start'],
['overflow-wrap', 'word-wrap'],
['padding-inline-end', '-webkit-padding-end'],
['padding-inline-start', '-webkit-padding-start'],
['row-gap', 'grid-row-gap'],
['scroll-margin-bottom', 'scroll-snap-margin-bottom'],
['scroll-margin-left', 'scroll-snap-margin-left'],
['scroll-margin-right', 'scroll-snap-margin-right'],
['scroll-margin-top', 'scroll-snap-margin-top'],
['scroll-margin', 'scroll-snap-margin'],
['text-combine-upright', '-ms-text-combine-horizontal'],
]);
function r(r) {
return i.get(r);
}
function n(i) {
var r =
/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|(?:mask(?:$|-[ispro]|-cl)))|(tab-|column(?!-s)|text-align-l)|(ap)|(u|hy))/i.exec(
i
);
return r ? (r[1] ? 1 : r[2] ? 2 : r[3] ? 3 : 5) : 0;
}
function t(i, r) {
var n = /^(?:(pos)|(background-i)|((?:max-|min-)?(?:block-s|inl|he|widt))|(dis))/i.exec(i);
return n
? n[1]
? /^sti/i.test(r)
? 1
: 0
: n[2]
? /^image-/i.test(r)
? 1
: 0
: n[3]
? '-' === r[3]
? 2
: 0
: /^(inline-)?grid$/i.test(r)
? 4
: 0
: 0;
}
export { r as cssPropertyAlias, n as cssPropertyPrefixFlags, t as cssValuePrefixFlags };

View File

@ -1,43 +0,0 @@
/**
* Twind v0.16.16
* @license MIT
* @source https://unpkg.com/@twind/content@0.1.0/content.js?module
*/
import { directive as o } from './twind.mjs';
var c = new Set([
'open-quote',
'close-quote',
'no-open-quote',
'no-close-quote',
'normal',
'none',
'inherit',
'initial',
'unset',
]),
n = (t) => t.join('-'),
s = (t) => {
switch (t[0]) {
case 'data':
return `attr(${n(t)})`;
case 'attr':
case 'counter':
return `${t[0]}(${n(t.slice(1))})`;
case 'var':
return `var(--${n(t)})`;
case void 0:
return 'attr(data-content)';
default:
return JSON.stringify(n(t));
}
},
i = (t, { theme: r }) => {
let e = Array.isArray(t) ? n(t) : t;
return {
content:
(e && r('content', [e], '')) || (c.has(e) && e) || (Array.isArray(t) ? s(t) : e),
};
},
u = (t, r) => (Array.isArray(t) ? i(t, r) : o(i, t));
export { u as content };

View File

@ -1,134 +0,0 @@
/**
* Twind v0.16.16
* @license MIT
* @source https://unpkg.com/twind@0.16.16/css/css.js?module
*/
// src/css/index.ts
import { apply, hash, directive } from "./twind.mjs";
// src/internal/util.ts
var includes = (value, search) => !!~value.indexOf(search);
var join = (parts, separator = "-") => parts.join(separator);
var hyphenate = value => value.replace(/[A-Z]/g, "-$&").toLowerCase();
var evalThunk = (value, context) => {
while (typeof value == "function") {
value = value(context);
}
return value;
};
var isCSSProperty = (key, value) => !includes("@:&", key[0]) && (includes("rg", (typeof value)[5]) || Array.isArray(value));
var merge = (target, source, context) => source ? Object.keys(source).reduce((target2, key) => {
const value = evalThunk(source[key], context);
if (isCSSProperty(key, value)) {
target2[hyphenate(key)] = value;
} else {
target2[key] = key[0] == "@" && includes("figa", key[1]) ? (target2[key] || []).concat(value) : merge(target2[key] || {}, value, context);
}
return target2;
}, target) : target;
var escape = typeof CSS !== "undefined" && CSS.escape || (className => className.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g, "\\$&").replace(/^\d/, "\\3$& "));
var buildMediaQuery = screen2 => {
if (!Array.isArray(screen2)) {
screen2 = [screen2];
}
return "@media " + join(screen2.map(screen3 => {
if (typeof screen3 == "string") {
screen3 = { min: screen3 };
}
return screen3.raw || join(Object.keys(screen3).map(feature => `(${feature}-width:${screen3[feature]})`), " and ");
}), ",");
};
// src/css/index.ts
var translate = (tokens, context) => {
const collect = (target, token) => Array.isArray(token) ? token.reduce(collect, target) : merge(target, evalThunk(token, context), context);
return tokens.reduce(collect, {});
};
var newRule = /\s*(?:([\w-%@]+)\s*:?\s*([^{;]+?)\s*(?:;|$|})|([^;}{]*?)\s*{)|(})/gi;
var ruleClean = /\/\*[\s\S]*?\*\/|\s+|\n/gm;
var decorate = (selectors, currentBlock) => selectors.reduceRight((rules, selector) => ({ [selector]: rules }), currentBlock);
var saveBlock = (rules, selectors, currentBlock) => {
if (currentBlock) {
rules.push(decorate(selectors, currentBlock));
}
};
var interleave = (strings, interpolations, context) => {
let buffer = strings[0];
const result = [];
for (let index = 0; index < interpolations.length;) {
const interpolation = evalThunk(interpolations[index], context);
if (interpolation && typeof interpolation == "object") {
result.push(buffer, interpolation);
buffer = strings[++index];
} else {
buffer += (interpolation || "") + strings[++index];
}
}
result.push(buffer);
return result;
};
var astish = (values, context) => {
const selectors = [];
const rules = [];
let currentBlock;
let match;
for (let index = 0; index < values.length; index++) {
const value = values[index];
if (typeof value == "string") {
while (match = newRule.exec(value.replace(ruleClean, " "))) {
if (!match[0])
continue;
if (match[4]) {
currentBlock = saveBlock(rules, selectors, currentBlock);
selectors.pop();
}
if (match[3]) {
currentBlock = saveBlock(rules, selectors, currentBlock);
selectors.push(match[3]);
} else if (!match[4]) {
if (!currentBlock)
currentBlock = {};
const value2 = match[2] && /\S/.test(match[2]) ? match[2] : values[++index];
if (value2) {
if (match[1] == "@apply") {
merge(currentBlock, evalThunk(apply(value2), context), context);
} else {
currentBlock[match[1]] = value2;
}
}
}
}
} else {
currentBlock = saveBlock(rules, selectors, currentBlock);
rules.push(decorate(selectors, value));
}
}
saveBlock(rules, selectors, currentBlock);
return rules;
};
var cssFactory = (tokens, context) => translate(Array.isArray(tokens[0]) && Array.isArray(tokens[0].raw) ? astish(interleave(tokens[0], tokens.slice(1), context), context) : tokens, context);
var css = (...tokens) => directive(cssFactory, tokens);
var keyframesFactory = (tokens, context) => {
const waypoints = cssFactory(tokens, context);
const id = hash(JSON.stringify(waypoints));
context.tw(() => ({ [`@keyframes ${id}`]: waypoints }));
return id;
};
var keyframes = (...tokens) => directive(keyframesFactory, tokens);
var animation = (value, waypoints) => waypoints === void 0 ? (...args) => animation(value, keyframes(...args)) : css({
...(value && typeof value == "object" ? value : { animation: value }),
animationName: typeof waypoints == "function" ? waypoints : keyframes(waypoints) });
var screenFactory = ({ size, rules }, context) => {
const media = buildMediaQuery(context.theme("screens", size));
return rules === void 0 ? media : {
[media]: typeof rules == "function" ? evalThunk(rules, context) : cssFactory([rules], context) };
};
var screen = (size, rules) => directive(screenFactory, { size, rules });
export {
animation,
css,
keyframes,
screen };

File diff suppressed because it is too large Load Diff