framercode 0.1.0
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/dist/breakpoints.d.ts +17 -0
- package/dist/breakpoints.js +28 -0
- package/dist/framer-chunks/SqliteDatabase-VAKIICSG-OPV4MG3Y.js +98 -0
- package/dist/framer-chunks/chunk-7ZLQTYXQ.js +102 -0
- package/dist/framer-chunks/chunk-IKQSD2QC.js +10 -0
- package/dist/framer-chunks/default-blog-sqlite-7ZHEY3GT-TVGUYU6H.js +7 -0
- package/dist/framer-chunks/fontshare-4THNDPMZ-FLLTWCDO.js +7 -0
- package/dist/framer-chunks/fontshare-B2QLD7YB-5V3XZJAH.js +7 -0
- package/dist/framer-chunks/fontshare-O22OBJ3D-FIG3CRN3.js +7 -0
- package/dist/framer-chunks/fontshare-PZLWRK4B-MHMZIGTX.js +7 -0
- package/dist/framer-chunks/fontshare-SXU5BGFE-OWTMMPGS.js +7 -0
- package/dist/framer-chunks/fontshare-TIA7QUPT-PUDLUTQ7.js +7 -0
- package/dist/framer-chunks/framer-font-45AI7UCZ-CKGC4MJC.js +7 -0
- package/dist/framer-chunks/framer-font-RD2SUPQH-Q4MS7WS6.js +7 -0
- package/dist/framer-chunks/google-3FCAKCAC-AM34UPJK.js +7 -0
- package/dist/framer-chunks/google-3SZHWBC6-2VTQEQ7J.js +7 -0
- package/dist/framer-chunks/google-EGNT223R-P4DUHBW2.js +7 -0
- package/dist/framer-chunks/google-GXDJLGJB-JNEJGCGD.js +7 -0
- package/dist/framer-chunks/google-H6SFY4F5-5JSJCGDR.js +7 -0
- package/dist/framer-chunks/google-YSYBFRE6-L7YAHH7V.js +7 -0
- package/dist/framer-chunks/sqlite-wasm-FGP37EAY-NO5QVZDI.js +7 -0
- package/dist/framer-chunks/sqlite3-SISQ6ENZ-5WRKGWTY.js +7 -0
- package/dist/framer.d.ts +4990 -0
- package/dist/framer.js +63235 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/react.d.ts +44 -0
- package/dist/react.js +79 -0
- package/dist/styles/framer.css +920 -0
- package/dist/styles/reset.css +37 -0
- package/package.json +38 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const defaultBreakpointSizes: {
|
|
2
|
+
readonly base: 0;
|
|
3
|
+
readonly sm: 320;
|
|
4
|
+
readonly md: 768;
|
|
5
|
+
readonly lg: 960;
|
|
6
|
+
readonly xl: 1200;
|
|
7
|
+
readonly "2xl": 1536;
|
|
8
|
+
};
|
|
9
|
+
export type Breakpoint = keyof typeof defaultBreakpointSizes;
|
|
10
|
+
export declare const breakpointsDescending: ("base" | "sm" | "md" | "lg" | "xl" | "2xl")[];
|
|
11
|
+
export declare function breakpointForWidth(windowWidth: number): Breakpoint | undefined;
|
|
12
|
+
export type VariantMap = Partial<Record<Breakpoint, string>>;
|
|
13
|
+
/**
|
|
14
|
+
* Forward-fill a sparse breakpoint→variant map so every breakpoint has a
|
|
15
|
+
* variant (a breakpoint without an explicit variant inherits the previous one).
|
|
16
|
+
*/
|
|
17
|
+
export declare function fillBreakpoints(map: VariantMap): VariantMap;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const defaultBreakpointSizes = {
|
|
2
|
+
base: 0,
|
|
3
|
+
sm: 320,
|
|
4
|
+
md: 768,
|
|
5
|
+
lg: 960,
|
|
6
|
+
xl: 1200,
|
|
7
|
+
"2xl": 1536,
|
|
8
|
+
};
|
|
9
|
+
// Ordered from the widest breakpoint down to the base.
|
|
10
|
+
export const breakpointsDescending = Object.keys(defaultBreakpointSizes).reverse();
|
|
11
|
+
export function breakpointForWidth(windowWidth) {
|
|
12
|
+
return breakpointsDescending.find((name) => windowWidth >= defaultBreakpointSizes[name]);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Forward-fill a sparse breakpoint→variant map so every breakpoint has a
|
|
16
|
+
* variant (a breakpoint without an explicit variant inherits the previous one).
|
|
17
|
+
*/
|
|
18
|
+
export function fillBreakpoints(map) {
|
|
19
|
+
const order = ["base", "sm", "md", "lg", "xl", "2xl"];
|
|
20
|
+
const filled = { ...map };
|
|
21
|
+
for (let i = 1; i < order.length; i++) {
|
|
22
|
+
const current = order[i];
|
|
23
|
+
const previous = order[i - 1];
|
|
24
|
+
if (!filled[current])
|
|
25
|
+
filled[current] = filled[previous];
|
|
26
|
+
}
|
|
27
|
+
return filled;
|
|
28
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import "./chunk-7ZLQTYXQ.js";
|
|
2
|
+
import "./chunk-IKQSD2QC.js";
|
|
3
|
+
|
|
4
|
+
// /:https://app.framerstatic.com/SqliteDatabase-VAKIICSG.mjs
|
|
5
|
+
var __framercodeWindow = typeof window !== "undefined" ? window : void 0;
|
|
6
|
+
var SQLITE_GROWTH_PADDING_BYTES = 1048576;
|
|
7
|
+
var databaseSession;
|
|
8
|
+
var databaseSessionPromise;
|
|
9
|
+
async function createDatabaseSession() {
|
|
10
|
+
if (typeof __framercodeWindow === "undefined") {
|
|
11
|
+
throw new Error("The CMS SQLite database can only be loaded in a browser environment.");
|
|
12
|
+
}
|
|
13
|
+
const [{ default: initSqlite3 }, { default: defaultBlogDatabaseBytes }, { default: sqliteWasmBytes }] = await Promise.all([
|
|
14
|
+
import("./sqlite-wasm-FGP37EAY-NO5QVZDI.js"),
|
|
15
|
+
import("./default-blog-sqlite-7ZHEY3GT-TVGUYU6H.js"),
|
|
16
|
+
import("./sqlite3-SISQ6ENZ-5WRKGWTY.js")
|
|
17
|
+
]);
|
|
18
|
+
const initOptions = {
|
|
19
|
+
wasmBinary: sqliteWasmBytes
|
|
20
|
+
};
|
|
21
|
+
const sqlite3 = await initSqlite3(initOptions);
|
|
22
|
+
const bytes = new Uint8Array(defaultBlogDatabaseBytes);
|
|
23
|
+
const db = new sqlite3.oo1.DB(":memory:");
|
|
24
|
+
const bufferSize = Math.max(bytes.byteLength * 2, bytes.byteLength + SQLITE_GROWTH_PADDING_BYTES);
|
|
25
|
+
const dataPointer = sqlite3.capi.sqlite3_malloc(bufferSize);
|
|
26
|
+
try {
|
|
27
|
+
sqlite3.wasm.heap8u().fill(0, dataPointer, dataPointer + bufferSize);
|
|
28
|
+
sqlite3.wasm.heap8u().set(bytes, dataPointer);
|
|
29
|
+
db.checkRc(
|
|
30
|
+
sqlite3.capi.sqlite3_deserialize(
|
|
31
|
+
db,
|
|
32
|
+
"main",
|
|
33
|
+
dataPointer,
|
|
34
|
+
bytes.byteLength,
|
|
35
|
+
bufferSize,
|
|
36
|
+
sqlite3.capi.SQLITE_DESERIALIZE_FREEONCLOSE | sqlite3.capi.SQLITE_DESERIALIZE_RESIZEABLE
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
return {
|
|
40
|
+
db
|
|
41
|
+
};
|
|
42
|
+
} catch (error) {
|
|
43
|
+
sqlite3.capi.sqlite3_free(dataPointer);
|
|
44
|
+
db.close();
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function getDatabaseSession() {
|
|
49
|
+
if (databaseSession) return databaseSession;
|
|
50
|
+
if (!databaseSessionPromise) {
|
|
51
|
+
databaseSessionPromise = createDatabaseSession().then((session) => {
|
|
52
|
+
databaseSession = session;
|
|
53
|
+
return session;
|
|
54
|
+
}).catch((error) => {
|
|
55
|
+
databaseSessionPromise = void 0;
|
|
56
|
+
throw error;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return databaseSessionPromise;
|
|
60
|
+
}
|
|
61
|
+
function executeSqlQuery(db, sql) {
|
|
62
|
+
const columnNames = [];
|
|
63
|
+
const executedSql = [];
|
|
64
|
+
const rows = db.exec({
|
|
65
|
+
sql,
|
|
66
|
+
columnNames,
|
|
67
|
+
resultRows: [],
|
|
68
|
+
returnValue: "resultRows",
|
|
69
|
+
rowMode: "object",
|
|
70
|
+
saveSql: executedSql
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
columnNames,
|
|
74
|
+
executedSql,
|
|
75
|
+
rows,
|
|
76
|
+
changes: db.changes(),
|
|
77
|
+
totalChanges: db.changes(true)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
async function executeServerDatabaseQuery(sql) {
|
|
81
|
+
const trimmedSql = sql.trim();
|
|
82
|
+
if (!trimmedSql) {
|
|
83
|
+
throw new Error("Enter a SQL statement to run.");
|
|
84
|
+
}
|
|
85
|
+
const session = await getDatabaseSession();
|
|
86
|
+
return executeSqlQuery(session.db, trimmedSql);
|
|
87
|
+
}
|
|
88
|
+
async function resetSqliteDatabase() {
|
|
89
|
+
if (databaseSession) {
|
|
90
|
+
databaseSession.db.close();
|
|
91
|
+
}
|
|
92
|
+
databaseSession = void 0;
|
|
93
|
+
databaseSessionPromise = void 0;
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
executeServerDatabaseQuery,
|
|
97
|
+
resetSqliteDatabase
|
|
98
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__require
|
|
3
|
+
} from "./chunk-IKQSD2QC.js";
|
|
4
|
+
|
|
5
|
+
// /:https://app.framerstatic.com/chunk-SB6EN5U7.mjs
|
|
6
|
+
var __create = Object.create;
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
13
|
+
var __typeError = (msg) => {
|
|
14
|
+
throw TypeError(msg);
|
|
15
|
+
};
|
|
16
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
18
|
+
var __require2 = /* @__PURE__ */ ((x) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
19
|
+
get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b]
|
|
20
|
+
}) : x)(function(x) {
|
|
21
|
+
if (typeof __require !== "undefined") return __require.apply(this, arguments);
|
|
22
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
23
|
+
});
|
|
24
|
+
var __commonJS = (cb, mod) => function __require22() {
|
|
25
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
26
|
+
};
|
|
27
|
+
var __export = (target, all) => {
|
|
28
|
+
for (var name in all)
|
|
29
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
30
|
+
};
|
|
31
|
+
var __copyProps = (to, from, except, desc) => {
|
|
32
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
33
|
+
for (let key of __getOwnPropNames(from))
|
|
34
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
35
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
36
|
+
}
|
|
37
|
+
return to;
|
|
38
|
+
};
|
|
39
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
40
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
41
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
42
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
43
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
44
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
45
|
+
mod
|
|
46
|
+
));
|
|
47
|
+
var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
|
|
48
|
+
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
|
|
49
|
+
var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
|
|
50
|
+
var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
|
|
51
|
+
var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
|
|
52
|
+
var __runInitializers = (array, flags, self, value) => {
|
|
53
|
+
for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
|
|
54
|
+
return value;
|
|
55
|
+
};
|
|
56
|
+
var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
57
|
+
var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
|
|
58
|
+
var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
|
|
59
|
+
var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
|
|
60
|
+
var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
|
|
61
|
+
return __privateGet(this, extra);
|
|
62
|
+
}, set [name](x) {
|
|
63
|
+
return __privateSet(this, extra, x);
|
|
64
|
+
} }, name));
|
|
65
|
+
k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
|
|
66
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
67
|
+
ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
|
|
68
|
+
if (k) {
|
|
69
|
+
ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
|
|
70
|
+
if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
|
|
71
|
+
if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
|
|
72
|
+
}
|
|
73
|
+
it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
|
|
74
|
+
if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
|
|
75
|
+
else if (typeof it !== "object" || it === null) __typeError("Object expected");
|
|
76
|
+
else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
|
|
77
|
+
}
|
|
78
|
+
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
79
|
+
};
|
|
80
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
81
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
82
|
+
var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
|
|
83
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
84
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
85
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
86
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
__require2 as __require,
|
|
90
|
+
__commonJS,
|
|
91
|
+
__export,
|
|
92
|
+
__toESM,
|
|
93
|
+
__decoratorStart,
|
|
94
|
+
__decoratorMetadata,
|
|
95
|
+
__runInitializers,
|
|
96
|
+
__decorateElement,
|
|
97
|
+
__publicField,
|
|
98
|
+
__privateGet,
|
|
99
|
+
__privateAdd,
|
|
100
|
+
__privateSet,
|
|
101
|
+
__privateMethod
|
|
102
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
__require
|
|
10
|
+
};
|