@flexkit/studio 0.0.14 → 0.0.15

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.
@@ -1,2 +1,2 @@
1
- import'./index.css';import {generateText}from'@tiptap/core';import {TiptapLink,TiptapImage,UploadImagesPlugin,TaskList,TaskItem,HorizontalRule,StarterKit,CodeBlockLowlight,Youtube,Twitter,Mathematics,CharacterCount,Placeholder,AIHighlight,TiptapUnderline,HighlightExtension,TextStyle,Color,CustomKeymap,GlobalDragHandle}from'novel';import {Markdown}from'tiptap-markdown';import {cx}from'class-variance-authority';import {createLowlight,common}from'lowlight';import {jsx}from'react/jsx-runtime';var C=AIHighlight,I=Placeholder,B=TiptapLink.configure({HTMLAttributes:{class:cx("fk-text-muted-foreground fk-underline fk-underline-offset-[3px] hover:fk-text-primary fk-transition-colors fk-cursor-pointer")}}),P=Markdown.configure({html:true,tightLists:true,tightListClass:"tight",bulletListMarker:"-",linkify:false,breaks:false,transformPastedText:false,transformCopiedText:false}),v=TiptapImage.extend({addProseMirrorPlugins(){return [UploadImagesPlugin({imageClass:cx("fk-opacity-40 fk-rounded-lg fk-border fk-border-stone-200")})]}}).configure({allowBase64:true,HTMLAttributes:{class:cx("fk-rounded-lg fk-border fk-border-muted")}}),z=TaskList.configure({HTMLAttributes:{class:cx("fk-not-prose fk-pl-2 ")}}),K=TaskItem.configure({HTMLAttributes:{class:cx("fk-flex gap-2 fk-items-start fk-my-2")},nested:true}),N=HorizontalRule.configure({HTMLAttributes:{class:cx("mt-4 mb-6 border-t border-muted-foreground")}}),O=StarterKit.configure({bulletList:{HTMLAttributes:{class:cx("fk-list-disc fk-list-outside fk-leading-3 -fk-mt-2")}},orderedList:{HTMLAttributes:{class:cx("fk-list-decimal fk-list-outside fk-leading-3 -fk-mt-2")}},listItem:{HTMLAttributes:{class:cx("fk-leading-normal -fk-mb-2")}},blockquote:{HTMLAttributes:{class:cx("fk-border-l-4 fk-border-primary")}},codeBlock:false,code:{HTMLAttributes:{class:cx("fk-rounded-md fk-bg-muted fk-px-1.5 fk-py-1 fk-font-mono fk-font-medium"),spellcheck:"false"}},horizontalRule:false,dropcursor:{color:"#DBEAFE",width:4},gapcursor:false}),R=CodeBlockLowlight.configure({lowlight:createLowlight(common)}),S=Youtube.configure({HTMLAttributes:{class:cx("fk-rounded-lg fk-border fk-border-muted")},inline:false}),D=Twitter.configure({HTMLAttributes:{class:cx("fk-not-prose")},inline:false}),G=Mathematics.configure({HTMLAttributes:{class:cx("fk-text-foreground fk-rounded fk-p-1 hover:fk-bg-muted fk-cursor-pointer")},katexOptions:{throwOnError:false}}),U=CharacterCount.configure(),o=[O,I,B,v,z,K,N,C,R,S,D,G,U,TiptapUnderline,P,HighlightExtension,TextStyle,Color,CustomKeymap,GlobalDragHandle];var s=100;function $({value:r}){let e;try{e=generateText(JSON.parse(r),o).substring(0,s);}catch{e=r?.substring(0,s)??"";}return jsx("div",{className:"fk-truncate",children:e})}export{o as a,$ as b};//# sourceMappingURL=chunk-HC5NUUAJ.js.map
2
- //# sourceMappingURL=chunk-HC5NUUAJ.js.map
1
+ import'./index.css';import {generateText}from'@tiptap/core';import {TiptapLink,TiptapImage,UploadImagesPlugin,TaskList,TaskItem,HorizontalRule,StarterKit,CodeBlockLowlight,Youtube,Twitter,Mathematics,CharacterCount,Placeholder,AIHighlight,TiptapUnderline,HighlightExtension,TextStyle,Color,CustomKeymap,GlobalDragHandle}from'novel';import {Markdown}from'tiptap-markdown';import {cx}from'class-variance-authority';import {createLowlight,common}from'lowlight';import {jsx}from'react/jsx-runtime';var C=AIHighlight,I=Placeholder,B=TiptapLink.configure({HTMLAttributes:{class:cx("fk-text-muted-foreground fk-underline fk-underline-offset-[3px] hover:fk-text-primary fk-transition-colors fk-cursor-pointer")}}),P=Markdown.configure({html:true,tightLists:true,tightListClass:"tight",bulletListMarker:"-",linkify:false,breaks:false,transformPastedText:false,transformCopiedText:false}),v=TiptapImage.extend({addProseMirrorPlugins(){return [UploadImagesPlugin({imageClass:cx("fk-opacity-40 fk-rounded-lg fk-border fk-border-stone-200")})]}}).configure({allowBase64:true,HTMLAttributes:{class:cx("fk-rounded-lg fk-border fk-border-muted")}}),z=TaskList.configure({HTMLAttributes:{class:cx("fk-not-prose fk-pl-2 ")}}),K=TaskItem.configure({HTMLAttributes:{class:cx("fk-flex gap-2 fk-items-start fk-my-2")},nested:true}),N=HorizontalRule.configure({HTMLAttributes:{class:cx("mt-4 mb-6 border-t border-muted-foreground")}}),O=StarterKit.configure({bulletList:{HTMLAttributes:{class:cx("fk-list-disc fk-list-outside fk-leading-3 -fk-mt-2")}},orderedList:{HTMLAttributes:{class:cx("fk-list-decimal fk-list-outside fk-leading-3 -fk-mt-2")}},listItem:{HTMLAttributes:{class:cx("fk-leading-normal -fk-mb-2")}},blockquote:{HTMLAttributes:{class:cx("fk-border-l-4 fk-border-primary")}},codeBlock:false,code:{HTMLAttributes:{class:cx("fk-rounded-md fk-bg-muted fk-px-1.5 fk-py-1 fk-font-mono fk-font-medium"),spellcheck:"false"}},horizontalRule:false,dropcursor:{color:"#DBEAFE",width:4},gapcursor:false}),R=CodeBlockLowlight.configure({lowlight:createLowlight(common)}),S=Youtube.configure({HTMLAttributes:{class:cx("fk-rounded-lg fk-border fk-border-muted")},inline:false}),D=Twitter.configure({HTMLAttributes:{class:cx("fk-not-prose")},inline:false}),G=Mathematics.configure({HTMLAttributes:{class:cx("fk-text-foreground fk-rounded fk-p-1 hover:fk-bg-muted fk-cursor-pointer")},katexOptions:{throwOnError:false}}),U=CharacterCount.configure(),o=[O,I,B,v,z,K,N,C,R,S,D,G,U,TiptapUnderline,P,HighlightExtension,TextStyle,Color,CustomKeymap,GlobalDragHandle];var s=100;function Z({value:r}){let e;try{e=generateText(JSON.parse(r),o).substring(0,s);}catch{e=r?.substring(0,s)??"";}return jsx("div",{className:"fk-truncate",children:e})}export{o as a,Z as b};//# sourceMappingURL=chunk-6PYMDKS6.js.map
2
+ //# sourceMappingURL=chunk-6PYMDKS6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/form/fields/editor/extensions.ts","../src/data-grid/preview-components/editor.tsx"],"names":["aiHighlight","AIHighlight","placeholder","Placeholder","tiptapLink","TiptapLink","cx","markdownExtension","Markdown","tiptapImage","TiptapImage","UploadImagesPlugin","taskList","TaskList","taskItem","TaskItem","horizontalRule","HorizontalRule","starterKit","StarterKit","codeBlockLowlight","CodeBlockLowlight","createLowlight","common","youtube","Youtube","twitter","Twitter","mathematics","Mathematics","characterCount","CharacterCount","defaultExtensions","TiptapUnderline","HighlightExtension","TextStyle","Color","CustomKeymap","GlobalDragHandle","MAX_LENGTH","Editor","value","textValue","generateText","jsx"],"mappings":"kfA2BMA,CAAAA,CAAcC,WAAAA,CAEdC,EAAcC,WAAAA,CACdC,CAAAA,CAAaC,WAAW,SAAA,CAAU,CACtC,eAAgB,CACd,KAAA,CAASC,GACP,8HACF,CACF,CACF,CAAC,CAAA,CAEKC,EAAoBC,QAAAA,CAAS,SAAA,CAAU,CAC3C,IAAA,CAAM,IAAA,CACN,WAAY,IAAA,CACZ,cAAA,CAAgB,QAChB,gBAAA,CAAkB,GAAA,CAClB,QAAS,KAAA,CACT,MAAA,CAAQ,KAAA,CACR,mBAAA,CAAqB,MACrB,mBAAA,CAAqB,KACvB,CAAC,CAAA,CAEKC,CAAAA,CAAcC,YAAY,MAAA,CAAO,CACrC,uBAAwB,CACtB,OAAO,CACLC,kBAAAA,CAAmB,CACjB,WAAYL,EAAAA,CAAG,2DAA2D,CAC5E,CAAC,CACH,CACF,CACF,CAAC,EAAE,SAAA,CAAU,CACX,YAAa,IAAA,CACb,cAAA,CAAgB,CACd,KAAA,CAAOA,EAAAA,CAAG,yCAAyC,CACrD,CACF,CAAC,CAAA,CAEKM,CAAAA,CAAWC,SAAS,SAAA,CAAU,CAClC,eAAgB,CACd,KAAA,CAAOP,GAAG,uBAAuB,CACnC,CACF,CAAC,CAAA,CACKQ,EAAWC,QAAAA,CAA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AAgB,CACd,MAASvB,EAAAA,CAAG,0EAA0E,CACxF,CAAA,CACA,YAAA,CAAc,CACZ,YAAA,CAAc,KAChB,CACF,CAAC,CAAA,CAEKwB,EAAiBC,cAAAA,CAAe,SAAA,GAEzBC,CAAAA,CAAwC,CACnDd,EACAhB,CAAAA,CACAE,CAAAA,CACAK,EACAG,CAAAA,CACAE,CAAAA,CACAE,EACAhB,CAAAA,CACAoB,CAAAA,CACAI,EACAE,CAAAA,CACAE,CAAAA,CACAE,EACAG,eAAAA,CACA1B,CAAAA,CACA2B,mBACAC,SAAAA,CACAC,KAAAA,CACAC,aACAC,gBACF,ECtKA,IAAMC,CAAAA,CAAa,GAAA,CAKZ,SAASC,CAAAA,CAAO,CAAE,MAAAC,CAAM,CAAA,CAAsB,CACnD,IAAIC,CAAAA,CAEJ,GAAI,CACFA,CAAAA,CAAYC,aAAa,IAAA,CAAK,KAAA,CAAMF,CAAK,CAAA,CAAGT,CAA+B,EAAE,SAAA,CAAU,CAAA,CAAGO,CAAU,EACtG,CAAA,KAAQ,CACNG,CAAAA,CAAYD,CAAAA,EAAO,UAAU,CAAA,CAAGF,CAAU,GAAK,GACjD,CAEA,OAAOK,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,aAAA,CAAe,QAAA,CAAAF,EAAU,CACjD","file":"chunk-6PYMDKS6.js","sourcesContent":["import {\n AIHighlight,\n CharacterCount,\n CodeBlockLowlight,\n Color,\n CustomKeymap,\n GlobalDragHandle,\n HighlightExtension,\n HorizontalRule,\n Placeholder,\n StarterKit,\n TaskItem,\n TaskList,\n TextStyle,\n TiptapImage,\n TiptapLink,\n TiptapUnderline,\n Twitter,\n Youtube,\n Mathematics,\n UploadImagesPlugin,\n} from 'novel';\nimport { Markdown } from 'tiptap-markdown';\nimport { cx } from 'class-variance-authority';\nimport { common, createLowlight } from 'lowlight';\n\n//TODO I am using cx here to get tailwind autocomplete working, idk if someone else can write a regex to just capture the class key in objects\nconst aiHighlight = AIHighlight;\n//You can overwrite the placeholder with your own configuration\nconst placeholder = Placeholder;\nconst tiptapLink = TiptapLink.configure({\n HTMLAttributes: {\n 'class': cx(\n 'fk-text-muted-foreground fk-underline fk-underline-offset-[3px] hover:fk-text-primary fk-transition-colors fk-cursor-pointer'\n ),\n },\n});\n\nconst markdownExtension = Markdown.configure({\n html: true,\n tightLists: true,\n tightListClass: 'tight',\n bulletListMarker: '-',\n linkify: false,\n breaks: false,\n transformPastedText: false,\n transformCopiedText: false,\n});\n\nconst tiptapImage = TiptapImage.extend({\n addProseMirrorPlugins() {\n return [\n UploadImagesPlugin({\n imageClass: cx('fk-opacity-40 fk-rounded-lg fk-border fk-border-stone-200'),\n }),\n ];\n },\n}).configure({\n allowBase64: true,\n HTMLAttributes: {\n class: cx('fk-rounded-lg fk-border fk-border-muted'),\n },\n});\n\nconst taskList = TaskList.configure({\n HTMLAttributes: {\n class: cx('fk-not-prose fk-pl-2 '),\n },\n});\nconst taskItem = TaskItem.configure({\n HTMLAttributes: {\n 'class': cx('fk-flex gap-2 fk-items-start fk-my-2'),\n },\n nested: true,\n});\n\nconst horizontalRule = HorizontalRule.configure({\n HTMLAttributes: {\n 'class': cx('mt-4 mb-6 border-t border-muted-foreground'),\n },\n});\n\nconst starterKit = StarterKit.configure({\n bulletList: {\n HTMLAttributes: {\n 'class': cx('fk-list-disc fk-list-outside fk-leading-3 -fk-mt-2'),\n },\n },\n orderedList: {\n HTMLAttributes: {\n 'class': cx('fk-list-decimal fk-list-outside fk-leading-3 -fk-mt-2'),\n },\n },\n listItem: {\n HTMLAttributes: {\n 'class': cx('fk-leading-normal -fk-mb-2'),\n },\n },\n blockquote: {\n HTMLAttributes: {\n 'class': cx('fk-border-l-4 fk-border-primary'),\n },\n },\n codeBlock: false,\n code: {\n HTMLAttributes: {\n 'class': cx('fk-rounded-md fk-bg-muted fk-px-1.5 fk-py-1 fk-font-mono fk-font-medium'),\n spellcheck: 'false',\n },\n },\n horizontalRule: false,\n dropcursor: {\n color: '#DBEAFE',\n width: 4,\n },\n gapcursor: false,\n});\n\nconst codeBlockLowlight = CodeBlockLowlight.configure({\n // configure lowlight: common / all / use highlightJS in case there is a need to specify certain language grammars only\n // common: covers 37 language grammars which should be good enough in most cases\n lowlight: createLowlight(common),\n});\n\nconst youtube = Youtube.configure({\n HTMLAttributes: {\n 'class': cx('fk-rounded-lg fk-border fk-border-muted'),\n },\n inline: false,\n});\n\nconst twitter = Twitter.configure({\n HTMLAttributes: {\n 'class': cx('fk-not-prose'),\n },\n inline: false,\n});\n\nconst mathematics = Mathematics.configure({\n HTMLAttributes: {\n 'class': cx('fk-text-foreground fk-rounded fk-p-1 hover:fk-bg-muted fk-cursor-pointer'),\n },\n katexOptions: {\n throwOnError: false,\n },\n});\n\nconst characterCount = CharacterCount.configure();\n\nexport const defaultExtensions: readonly unknown[] = [\n starterKit,\n placeholder,\n tiptapLink,\n tiptapImage,\n taskList,\n taskItem,\n horizontalRule,\n aiHighlight,\n codeBlockLowlight,\n youtube,\n twitter,\n mathematics,\n characterCount,\n TiptapUnderline,\n markdownExtension,\n HighlightExtension,\n TextStyle,\n Color,\n CustomKeymap,\n GlobalDragHandle,\n];\n","import { generateText } from '@tiptap/core';\nimport { defaultExtensions } from '../../form/fields/editor/extensions';\nimport { Extensions } from '@tiptap/core';\n\nconst MAX_LENGTH = 100;\n\n/**\n * Renders a preview of the editor content.\n */\nexport function Editor({ value }: { value: string }) {\n let textValue;\n\n try {\n textValue = generateText(JSON.parse(value), defaultExtensions as Extensions).substring(0, MAX_LENGTH);\n } catch {\n textValue = value?.substring(0, MAX_LENGTH) ?? '';\n }\n\n return <div className=\"fk-truncate\">{textValue}</div>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import'./index.css';export{b as Editor}from'./chunk-6PYMDKS6.js';//# sourceMappingURL=editor-F72NJQ25.js.map
2
+ //# sourceMappingURL=editor-F72NJQ25.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"editor-ZLTDOUPT.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"editor-F72NJQ25.js"}
@@ -0,0 +1 @@
1
+ export * from 'lucide-react';
package/dist/icons.js ADDED
@@ -0,0 +1,2 @@
1
+ import'./index.css';export*from'lucide-react';//# sourceMappingURL=icons.js.map
2
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"icons.js","sourcesContent":[]}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { Dispatch, SetStateAction, UIEvent, ReactElement } from 'react';
3
- import { A as AppContextType, a as ActionSetRelationship, b as ActionSetScope, C as Config, c as AppOptions, E as Entity, P as PluginOptions, d as ProjectOptions, S as SearchRequestProps, e as SearchResultItem, U as UseEntityQueryParams, M as MappedEntityItem, F as FormEntityItem, I as ImageValue, f as Schema, g as EntityData, h as AttributeValue, i as Attribute, j as MultipleRelationshipConnection } from './types.d-CH6seXQw.js';
4
- export { D as DataType, n as FormFieldParams, k as FormFieldProps, o as FormFieldValue, L as LogoProps, m as ScopeType, l as SingleProject } from './types.d-CH6seXQw.js';
3
+ import { A as AppContextType, a as ActionSetRelationship, b as ActionSetScope, C as Config, c as AppOptions, E as Entity, P as PluginOptions, d as ProjectOptions, e as SearchRequestProps, f as SearchResultItem, U as UseEntityQueryParams, M as MappedEntityItem, F as FormEntityItem, I as ImageValue, g as Schema, h as EntityData, i as AttributeValue, j as Attribute, k as MultipleRelationshipConnection } from './types.d-D7S0yibv.js';
4
+ export { D as DataType, l as FormFieldParams, m as FormFieldProps, n as FormFieldValue, L as LogoProps, o as ScopeType, S as SingleProject } from './types.d-D7S0yibv.js';
5
5
  export { Outlet, useLocation, useParams } from 'react-router-dom';
6
6
  import { DocumentNode, ErrorLike } from '@apollo/client';
7
7
  export { gql } from '@apollo/client';