@aprovan/bobbin 0.1.0-dev.a730a6e → 0.1.0-dev.abe9883
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/.turbo/turbo-build.log +4 -4
- package/dist/index.d.ts +14 -1
- package/dist/index.js +3153 -3053
- package/package.json +3 -2
- package/src/Bobbin.tsx +6 -6
- package/src/__tests__/deduplicateChanges.test.ts +178 -0
- package/src/__tests__/typeGuards.test.ts +416 -0
- package/src/components/EditPanel/EditPanel.tsx +5 -5
- package/src/components/EditPanel/controls/QuickSelectDropdown.tsx +1 -1
- package/src/components/EditPanel/sections/BackgroundSection.tsx +2 -2
- package/src/components/EditPanel/sections/EffectsSection.tsx +2 -2
- package/src/components/EditPanel/sections/LayoutSection.tsx +2 -2
- package/src/components/EditPanel/sections/SectionWrapper.tsx +1 -1
- package/src/components/EditPanel/sections/SizeSection.tsx +2 -2
- package/src/components/EditPanel/sections/SpacingSection.tsx +2 -2
- package/src/components/EditPanel/sections/TypographySection.tsx +4 -4
- package/src/components/Overlay/ControlHandles.tsx +14 -7
- package/src/core/useBobbin.ts +8 -7
- package/src/core/useChangeTracker.ts +6 -32
- package/src/core/useElementSelection.ts +1 -1
- package/src/index.ts +15 -0
- package/src/tokens/index.ts +3 -3
- package/src/typeGuards.ts +169 -0
- package/src/utils/deduplicateChanges.ts +34 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2022
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m126.23 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 748ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 8153ms
|
|
16
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m12.07 KB[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -226,6 +226,19 @@ declare function generateId(): string;
|
|
|
226
226
|
declare function getElementPath(el: HTMLElement): string;
|
|
227
227
|
declare function getElementXPath(el: HTMLElement): string;
|
|
228
228
|
|
|
229
|
+
declare function deduplicateChanges(changes: Change[], originalStates: Map<string, Map<string, string>>): Change[];
|
|
230
|
+
|
|
231
|
+
declare function isChangeType(value: unknown): value is ChangeType;
|
|
232
|
+
declare function isChange(value: unknown): value is Change;
|
|
233
|
+
declare function isStyleChange(value: unknown): value is StyleChange;
|
|
234
|
+
declare function isTextChange(value: unknown): value is TextChange;
|
|
235
|
+
declare function isMoveChange(value: unknown): value is MoveChange;
|
|
236
|
+
declare function isSelectedElement(value: unknown): value is SelectedElement;
|
|
237
|
+
declare function isAnnotation(value: unknown): value is Annotation;
|
|
238
|
+
declare function isDesignTokens(value: unknown): value is DesignTokens;
|
|
239
|
+
declare function isBobbinState(value: unknown): value is BobbinState;
|
|
240
|
+
declare function isBobbinChangeset(value: unknown): value is BobbinChangeset;
|
|
241
|
+
|
|
229
242
|
declare const colors: {
|
|
230
243
|
slate: {
|
|
231
244
|
50: string;
|
|
@@ -399,4 +412,4 @@ declare const boxShadow: Record<string, string>;
|
|
|
399
412
|
|
|
400
413
|
declare const defaultTokens: DesignTokens;
|
|
401
414
|
|
|
402
|
-
export { type Annotation, Bobbin, type BobbinActions, type BobbinChangeset, type BobbinComponentProps, type BobbinProps, type BobbinState, type Change, type ChangeType, type DesignTokens, type MoveChange, type SelectedElement, type StyleChange, type TextChange, borderRadius, borderWidth, boxShadow, colors, defaultTokens, fontFamily, fontSize, fontWeight, generateId, getElementPath, getElementXPath, letterSpacing, lineHeight, parseYAMLChangeset, serializeChangesToYAML, spacing, useBobbin, useChangeTracker, useClipboard, useElementSelection };
|
|
415
|
+
export { type Annotation, Bobbin, type BobbinActions, type BobbinChangeset, type BobbinComponentProps, type BobbinProps, type BobbinState, type Change, type ChangeType, type DesignTokens, type MoveChange, type SelectedElement, type StyleChange, type TextChange, borderRadius, borderWidth, boxShadow, colors, deduplicateChanges, defaultTokens, fontFamily, fontSize, fontWeight, generateId, getElementPath, getElementXPath, isAnnotation, isBobbinChangeset, isBobbinState, isChange, isChangeType, isDesignTokens, isMoveChange, isSelectedElement, isStyleChange, isTextChange, letterSpacing, lineHeight, parseYAMLChangeset, serializeChangesToYAML, spacing, useBobbin, useChangeTracker, useClipboard, useElementSelection };
|